mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fix SSmachines when a machine returns PROCESS_KILL
This commit is contained in:
@@ -105,7 +105,18 @@ SUBSYSTEM_DEF(machines)
|
|||||||
while(current_run.len)
|
while(current_run.len)
|
||||||
var/datum/pipe_network/PN = current_run[current_run.len]
|
var/datum/pipe_network/PN = current_run[current_run.len]
|
||||||
current_run.len--
|
current_run.len--
|
||||||
|
<<<<<<< HEAD
|
||||||
if(istype(PN) && !QDELETED(PN))
|
if(istype(PN) && !QDELETED(PN))
|
||||||
|
||||||| parent of 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
|
if(QDELETED(PN))
|
||||||
|
global.pipe_networks.Remove(PN)
|
||||||
|
else
|
||||||
|
=======
|
||||||
|
if(QDELETED(PN))
|
||||||
|
global.pipe_networks.Remove(PN)
|
||||||
|
DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING)
|
||||||
|
else
|
||||||
|
>>>>>>> 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
PN.process(wait)
|
PN.process(wait)
|
||||||
else
|
else
|
||||||
global.pipe_networks.Remove(PN)
|
global.pipe_networks.Remove(PN)
|
||||||
@@ -125,8 +136,13 @@ SUBSYSTEM_DEF(machines)
|
|||||||
current_run.len--
|
current_run.len--
|
||||||
if(!istype(M) || QDELETED(M) || (M.process(wait) == PROCESS_KILL))
|
if(!istype(M) || QDELETED(M) || (M.process(wait) == PROCESS_KILL))
|
||||||
global.processing_machines.Remove(M)
|
global.processing_machines.Remove(M)
|
||||||
|
<<<<<<< HEAD
|
||||||
if(!QDELETED(M))
|
if(!QDELETED(M))
|
||||||
DISABLE_BITFIELD(M.datum_flags, DF_ISPROCESSING)
|
DISABLE_BITFIELD(M.datum_flags, DF_ISPROCESSING)
|
||||||
|
||||||| parent of 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
|
=======
|
||||||
|
DISABLE_BITFIELD(M?.datum_flags, DF_ISPROCESSING)
|
||||||
|
>>>>>>> 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
if(MC_TICK_CHECK)
|
if(MC_TICK_CHECK)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -139,7 +155,18 @@ SUBSYSTEM_DEF(machines)
|
|||||||
while(current_run.len)
|
while(current_run.len)
|
||||||
var/datum/powernet/PN = current_run[current_run.len]
|
var/datum/powernet/PN = current_run[current_run.len]
|
||||||
current_run.len--
|
current_run.len--
|
||||||
|
<<<<<<< HEAD
|
||||||
if(istype(PN) && !QDELETED(PN))
|
if(istype(PN) && !QDELETED(PN))
|
||||||
|
||||||| parent of 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
|
if(QDELETED(PN))
|
||||||
|
global.powernets.Remove(PN)
|
||||||
|
else
|
||||||
|
=======
|
||||||
|
if(QDELETED(PN))
|
||||||
|
global.powernets.Remove(PN)
|
||||||
|
DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING)
|
||||||
|
else
|
||||||
|
>>>>>>> 471935bb8b... Merge pull request #11288 from VOREStation/Arokha/ssmachines2
|
||||||
PN.reset(wait)
|
PN.reset(wait)
|
||||||
else
|
else
|
||||||
global.powernets.Remove(PN)
|
global.powernets.Remove(PN)
|
||||||
@@ -159,9 +186,9 @@ SUBSYSTEM_DEF(machines)
|
|||||||
while(current_run.len)
|
while(current_run.len)
|
||||||
var/obj/item/I = current_run[current_run.len]
|
var/obj/item/I = current_run[current_run.len]
|
||||||
current_run.len--
|
current_run.len--
|
||||||
if(!I.pwr_drain(wait)) // 0 = Process Kill, remove from processing list.
|
if(QDELETED(I) || (I.pwr_drain(wait) == PROCESS_KILL))
|
||||||
global.processing_power_items.Remove(I)
|
global.processing_power_items.Remove(I)
|
||||||
DISABLE_BITFIELD(I.datum_flags, DF_ISPROCESSING)
|
DISABLE_BITFIELD(I?.datum_flags, DF_ISPROCESSING)
|
||||||
if(MC_TICK_CHECK)
|
if(MC_TICK_CHECK)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user