diff --git a/modular_nova/master_files/code/game/objects/items/pneumaticCannon.dm b/modular_nova/master_files/code/game/objects/items/pneumaticCannon.dm new file mode 100644 index 00000000000..f1ad0669510 --- /dev/null +++ b/modular_nova/master_files/code/game/objects/items/pneumaticCannon.dm @@ -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 diff --git a/tgstation.dme b/tgstation.dme index 61cab8f8cee..199da3a008a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"