mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
moved process() to datum. made /datum/reagents/ process instead of the containers.
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
A.nullifyPipenet(src)
|
A.nullifyPipenet(src)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/datum/pipeline/proc/process()//This use to be called called from the pipe networks
|
/datum/pipeline/process()//This use to be called called from the pipe networks
|
||||||
if(update)
|
if(update)
|
||||||
update = 0
|
update = 0
|
||||||
reconcile_air()
|
reconcile_air()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var/datum/controller/failsafe/Failsafe
|
|||||||
Failsafe.process()
|
Failsafe.process()
|
||||||
|
|
||||||
|
|
||||||
/datum/controller/failsafe/proc/process()
|
/datum/controller/failsafe/process()
|
||||||
spawn(0)
|
spawn(0)
|
||||||
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
|
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
|
||||||
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
|
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Note: you can set the datum's defined processing_interval to some integer to set
|
|||||||
//used for smoothing out the cost values so they don't fluctuate wildly
|
//used for smoothing out the cost values so they don't fluctuate wildly
|
||||||
#define MC_AVERAGE(average, current) (0.8*(average) + 0.2*(current))
|
#define MC_AVERAGE(average, current) (0.8*(average) + 0.2*(current))
|
||||||
|
|
||||||
/datum/controller/game_controller/proc/process()
|
/datum/controller/game_controller/process()
|
||||||
if(!Failsafe) new /datum/controller/failsafe()
|
if(!Failsafe) new /datum/controller/failsafe()
|
||||||
spawn(0)
|
spawn(0)
|
||||||
var/timer = world.time
|
var/timer = world.time
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
var/datum/subsystem/objects/SSobj
|
var/datum/subsystem/objects/SSobj
|
||||||
|
|
||||||
|
/datum/proc/process()
|
||||||
|
SSobj.processing.Remove(src)
|
||||||
|
return 0
|
||||||
|
|
||||||
/datum/subsystem/objects
|
/datum/subsystem/objects
|
||||||
name = "Objects"
|
name = "Objects"
|
||||||
priority = 12
|
priority = 12
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
|||||||
C.ContractDisease(src)
|
C.ContractDisease(src)
|
||||||
|
|
||||||
|
|
||||||
/datum/disease/proc/process()
|
/datum/disease/process()
|
||||||
if(!holder)
|
if(!holder)
|
||||||
SSdisease.processing -= src
|
SSdisease.processing -= src
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ Data storage vars:
|
|||||||
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
|
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/global_iterator/proc/process()
|
/datum/global_iterator/process()
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/global_iterator/proc/active()
|
/datum/global_iterator/proc/active()
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
///process()
|
///process()
|
||||||
///Called by the gameticker
|
///Called by the gameticker
|
||||||
/datum/game_mode/proc/process()
|
/datum/game_mode/process()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ datum/computer/file/embedded_program/proc/receive_user_command(command)
|
|||||||
datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
|
datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
datum/computer/file/embedded_program/proc/process()
|
datum/computer/file/embedded_program/process()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
obj/machinery/embedded_controller
|
obj/machinery/embedded_controller
|
||||||
|
|||||||
@@ -141,16 +141,4 @@
|
|||||||
gender = PLURAL
|
gender = PLURAL
|
||||||
icon = 'icons/obj/objects.dmi'
|
icon = 'icons/obj/objects.dmi'
|
||||||
icon_state = "ash"
|
icon_state = "ash"
|
||||||
anchored = 1
|
anchored = 1
|
||||||
/obj/effect/decal/cleanable/chem_pile/New()
|
|
||||||
..()
|
|
||||||
SSobj.processing |= src
|
|
||||||
|
|
||||||
/obj/effect/decal/cleanable/chem_pile/Destroy()
|
|
||||||
SSobj.processing.Remove(src)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/effect/decal/cleanable/chem_pile/process()
|
|
||||||
if(reagents)
|
|
||||||
reagents.reagent_on_tick()
|
|
||||||
return
|
|
||||||
@@ -196,7 +196,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
|
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
|
||||||
reagents.reagent_on_tick()
|
|
||||||
if(iscarbon(loc))
|
if(iscarbon(loc))
|
||||||
var/mob/living/carbon/C = loc
|
var/mob/living/carbon/C = loc
|
||||||
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
|
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||||
|
|||||||
@@ -10,10 +10,6 @@
|
|||||||
var/damtype = "brute"
|
var/damtype = "brute"
|
||||||
var/force = 0
|
var/force = 0
|
||||||
|
|
||||||
/obj/proc/process()
|
|
||||||
SSobj.processing.Remove(src)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/Destroy()
|
/obj/Destroy()
|
||||||
if(!istype(src, /obj/machinery))
|
if(!istype(src, /obj/machinery))
|
||||||
SSobj.processing.Remove(src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
|
SSobj.processing.Remove(src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
//Do not override this proc, instead use the appropiate procs.
|
//Do not override this proc, instead use the appropiate procs.
|
||||||
//This proc will handle the calls to the appropiate procs.
|
//This proc will handle the calls to the appropiate procs.
|
||||||
/datum/round_event/proc/process()
|
/datum/round_event/process()
|
||||||
if(!processing)
|
if(!processing)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
var/input
|
var/input
|
||||||
var/output
|
var/output
|
||||||
var/time = 40
|
var/time = 40
|
||||||
proc/process(loc, what)
|
/datum/food_processor_process/proc/process_food(loc, what)
|
||||||
if (src.output && loc)
|
if (src.output && loc)
|
||||||
new src.output(loc)
|
new src.output(loc)
|
||||||
if (what)
|
if (what)
|
||||||
qdel(what) // Note to self: Make this safer
|
qdel(what) // Note to self: Make this safer
|
||||||
|
|
||||||
/* objs */
|
/* objs */
|
||||||
/datum/food_processor_process/meat
|
/datum/food_processor_process/meat
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ nanoui is used to open and update nano browser uis
|
|||||||
*
|
*
|
||||||
* @return nothing
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
/datum/nanoui/proc/process(update = 0)
|
/datum/nanoui/process(update = 0)
|
||||||
if (!src_object || !user)
|
if (!src_object || !user)
|
||||||
close()
|
close()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ datum/reagents
|
|||||||
|
|
||||||
datum/reagents/New(maximum=100)
|
datum/reagents/New(maximum=100)
|
||||||
maximum_volume = maximum
|
maximum_volume = maximum
|
||||||
|
SSobj.processing |= src
|
||||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||||
if(!chemical_reagents_list)
|
if(!chemical_reagents_list)
|
||||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||||
@@ -53,6 +53,7 @@ datum/reagents/New(maximum=100)
|
|||||||
|
|
||||||
datum/reagents/Destroy()
|
datum/reagents/Destroy()
|
||||||
..()
|
..()
|
||||||
|
SSobj.processing.Remove(src)
|
||||||
for(var/datum/reagent/R in reagent_list)
|
for(var/datum/reagent/R in reagent_list)
|
||||||
qdel(R)
|
qdel(R)
|
||||||
reagent_list.Cut()
|
reagent_list.Cut()
|
||||||
@@ -260,7 +261,7 @@ datum/reagents/proc/metabolize(var/mob/M)
|
|||||||
last_tick++
|
last_tick++
|
||||||
update_total()
|
update_total()
|
||||||
|
|
||||||
datum/reagents/proc/reagent_on_tick()
|
datum/reagents/process()
|
||||||
for(var/datum/reagent/R in reagent_list)
|
for(var/datum/reagent/R in reagent_list)
|
||||||
R.on_tick()
|
R.on_tick()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -35,11 +35,6 @@
|
|||||||
reagents.add_reagent("blood", disease_amount, data)
|
reagents.add_reagent("blood", disease_amount, data)
|
||||||
if(list_reagents)
|
if(list_reagents)
|
||||||
reagents.add_reagent_list(list_reagents)
|
reagents.add_reagent_list(list_reagents)
|
||||||
SSobj.processing |= src
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/Destroy()
|
|
||||||
SSobj.processing.Remove(src)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
|
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
|
||||||
return
|
return
|
||||||
@@ -83,12 +78,6 @@
|
|||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/process()
|
|
||||||
if(reagents)
|
|
||||||
reagents.reagent_on_tick()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/ex_act()
|
/obj/item/weapon/reagent_containers/ex_act()
|
||||||
if(reagents)
|
if(reagents)
|
||||||
for(var/datum/reagent/R in reagents.reagent_list)
|
for(var/datum/reagent/R in reagents.reagent_list)
|
||||||
|
|||||||
Reference in New Issue
Block a user