Skip to content

Commit

Permalink
[MIRROR] [MODULAR] Adds mag-fed turret limitations to pneumatic cannon (
Browse files Browse the repository at this point in the history
#5198)

* [MODULAR] Adds mag-fed turret limitations to pneumatic cannon (#4596)

* FIRST TRY LETS GO - adds limits to pneumatic cannon

* Update code/game/objects/items/pneumaticCannon.dm

* Modularization Edit

* make it parent-code friendly:tm:

* comment readability

* Update modular_nova/master_files/code/game/objects/items/pneumaticCannon.dm

---------

Co-authored-by: Bloop <[email protected]>

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

---------

Co-authored-by: Zenitheevee <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: StealsThePRs <[email protected]>
  • Loading branch information
4 people authored Nov 26, 2024
1 parent 577b2ed commit 6ebe8bb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit 6ebe8bb

Please sign in to comment.