Skip to content

Commit

Permalink
Merge pull request VOREStation#15244 from Heroman3003/emagstack
Browse files Browse the repository at this point in the history
Fixes emag modules stacking
  • Loading branch information
Heroman3003 authored Aug 13, 2023
2 parents 10391d7 + 1355012 commit 9b1dec8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@ var/obj/screen/robot_inventory
//be emagged before they actually select a module. - or some situation can cause them to get a new module
// - or some situation might cause them to get de-emagged or something.
if(r.emagged || r.emag_items)
if(!(r.module.emag in r.module.modules))
r.module.modules.Add(r.module.emag)
for(var/obj/O in r.module.emag)
if(!(O in r.module.modules))
r.module.modules.Add(r.module.emag)
else
if(r.module.emag in r.module.modules)
r.module.modules.Remove(r.module.emag)
for(var/obj/O in r.module.emag)
if(O in r.module.modules)
r.module.modules.Remove(r.module.emag)

for(var/atom/movable/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
var/obj/item/weapon/gun/energy/phasegun/mounted/cyborg/phasegun = new(src)
modules += phasegun

emag = new /obj/item/weapon/chainsaw(src)
emag += new /obj/item/weapon/chainsaw(src)

/obj/item/weapon/robot_module/robot/platform/explorer/respawn_consumable(var/mob/living/silicon/robot/R, rate)
. = ..()
Expand All @@ -93,7 +93,7 @@
modules += new /obj/item/weapon/packageWrap(src)
modules += new /obj/item/weapon/pen/multi(src)
modules += new /obj/item/device/destTagger(src)
emag = new /obj/item/weapon/stamp/denied
emag += new /obj/item/weapon/stamp/denied

/obj/item/weapon/robot_module/robot/platform/cargo/respawn_consumable(mob/living/silicon/robot/R, rate)
. = ..()
Expand Down

0 comments on commit 9b1dec8

Please sign in to comment.