Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] [MODULAR] Adds mag-fed turret limitations to pneumatic cannon #5198

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/obj/item/pneumatic_cannon/load_item(obj/item/I, mob/user) //we make this compatable with the master file incase of future updates.
if(!can_load_item(I, user))
return FALSE
if(user)
if(istype(I, /obj/item/storage/toolbox/emergency/turret/mag_fed))
to_chat(user, span_warning("You prepare \the [I] to load into \the [src]. This action will block other items from being loaded!"))
if(!do_after(user, 15)) //adding a warning and a delay so it cant just be invo-juggle-spammed.
return FALSE
return ..()

/obj/item/pneumatic_cannon/can_load_item(obj/item/I, mob/user)
. = ..()
if(!.)
return
if(locate(/obj/item/storage/toolbox/emergency/turret/mag_fed) in src) //If loaded with a turret, stops more from being put in
if(user)
to_chat(user, span_warning("\The [I] is blocked from \the [src]'s loader!"))
return FALSE
if(istype(I, /obj/item/storage/toolbox/emergency/turret/mag_fed) && length(loadedItems) >= 1)
if(user)
to_chat(user, span_warning("\The [I] needs an empty cannon!"))
return FALSE
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6656,6 +6656,7 @@
#include "modular_nova\master_files\code\game\objects\items\holy_weapons.dm"
#include "modular_nova\master_files\code\game\objects\items\kirby_plants.dm"
#include "modular_nova\master_files\code\game\objects\items\oxygen_candle.dm"
#include "modular_nova\master_files\code\game\objects\items\pneumaticCannon.dm"
#include "modular_nova\master_files\code\game\objects\items\RCD.dm"
#include "modular_nova\master_files\code\game\objects\items\religion.dm"
#include "modular_nova\master_files\code\game\objects\items\scratchingstone.dm"
Expand Down
Loading