mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 04:32:42 +00:00
Merge pull request #7836 from VOREStation/aro-rigopti
Only process rigs on a person
This commit is contained in:
@@ -125,8 +125,6 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
var/obj/item/rig_module/module = new path(src)
|
||||
@@ -184,6 +182,22 @@
|
||||
spark_system = null
|
||||
return ..()
|
||||
|
||||
// We only care about processing when we're on a mob
|
||||
/obj/item/weapon/rig/Moved(old_loc, direction, forced)
|
||||
if(ismob(loc))
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
// If we've lost any parts, grab them back.
|
||||
var/mob/living/M
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
if(piece.loc != src && !(wearer && piece.loc == wearer))
|
||||
if(istype(piece.loc, /mob/living))
|
||||
M = piece.loc
|
||||
M.unEquip(piece)
|
||||
piece.forceMove(src)
|
||||
|
||||
/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands)
|
||||
if(!inhands && (slot_name == slot_back_str || slot_name == slot_belt_str))
|
||||
if(icon_override)
|
||||
@@ -466,14 +480,13 @@
|
||||
turn_cooling_off(H, 1)
|
||||
|
||||
/obj/item/weapon/rig/process()
|
||||
// If we've lost any parts, grab them back.
|
||||
var/mob/living/M
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
if(piece.loc != src && !(wearer && piece.loc == wearer))
|
||||
if(istype(piece.loc, /mob/living))
|
||||
M = piece.loc
|
||||
M.unEquip(piece)
|
||||
piece.forceMove(src)
|
||||
// Not on a mob...?
|
||||
if(!ismob(loc))
|
||||
if(wearer?.wearing_rig == src)
|
||||
wearer.wearing_rig = null
|
||||
wearer = null
|
||||
return PROCESS_KILL
|
||||
|
||||
// Run through cooling
|
||||
coolingProcess()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user