moved process() to datum. made /datum/reagents/ process instead of the containers.

This commit is contained in:
Iamgoofball
2015-04-07 17:13:59 -07:00
parent 54154bec12
commit c06ad7e6b8
16 changed files with 22 additions and 45 deletions

View File

@@ -22,7 +22,7 @@
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)
update = 0
reconcile_air()

View File

@@ -15,7 +15,7 @@ var/datum/controller/failsafe/Failsafe
Failsafe.process()
/datum/controller/failsafe/proc/process()
/datum/controller/failsafe/process()
spawn(0)
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.

View File

@@ -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
#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()
spawn(0)
var/timer = world.time

View File

@@ -1,5 +1,9 @@
var/datum/subsystem/objects/SSobj
/datum/proc/process()
SSobj.processing.Remove(src)
return 0
/datum/subsystem/objects
name = "Objects"
priority = 12

View File

@@ -126,7 +126,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
C.ContractDisease(src)
/datum/disease/proc/process()
/datum/disease/process()
if(!holder)
SSdisease.processing -= src
return

View File

@@ -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.")
return 1
/datum/global_iterator/proc/process()
/datum/global_iterator/process()
return
/datum/global_iterator/proc/active()

View File

@@ -161,7 +161,7 @@
///process()
///Called by the gameticker
/datum/game_mode/proc/process()
/datum/game_mode/process()
return 0

View File

@@ -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)
return null
datum/computer/file/embedded_program/proc/process()
datum/computer/file/embedded_program/process()
return 0
obj/machinery/embedded_controller

View File

@@ -141,16 +141,4 @@
gender = PLURAL
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
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
anchored = 1

View File

@@ -196,7 +196,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
reagents.reagent_on_tick()
if(iscarbon(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

View File

@@ -10,10 +10,6 @@
var/damtype = "brute"
var/force = 0
/obj/proc/process()
SSobj.processing.Remove(src)
return 0
/obj/Destroy()
if(!istype(src, /obj/machinery))
SSobj.processing.Remove(src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists

View File

@@ -86,7 +86,7 @@
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/round_event/proc/process()
/datum/round_event/process()
if(!processing)
return

View File

@@ -19,11 +19,11 @@
var/input
var/output
var/time = 40
proc/process(loc, what)
if (src.output && loc)
new src.output(loc)
if (what)
qdel(what) // Note to self: Make this safer
/datum/food_processor_process/proc/process_food(loc, what)
if (src.output && loc)
new src.output(loc)
if (what)
qdel(what) // Note to self: Make this safer
/* objs */
/datum/food_processor_process/meat

View File

@@ -402,7 +402,7 @@ nanoui is used to open and update nano browser uis
*
* @return nothing
*/
/datum/nanoui/proc/process(update = 0)
/datum/nanoui/process(update = 0)
if (!src_object || !user)
close()
return

View File

@@ -17,7 +17,7 @@ datum/reagents
datum/reagents/New(maximum=100)
maximum_volume = maximum
SSobj.processing |= src
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
if(!chemical_reagents_list)
//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()
..()
SSobj.processing.Remove(src)
for(var/datum/reagent/R in reagent_list)
qdel(R)
reagent_list.Cut()
@@ -260,7 +261,7 @@ datum/reagents/proc/metabolize(var/mob/M)
last_tick++
update_total()
datum/reagents/proc/reagent_on_tick()
datum/reagents/process()
for(var/datum/reagent/R in reagent_list)
R.on_tick()
return

View File

@@ -35,11 +35,6 @@
reagents.add_reagent("blood", disease_amount, data)
if(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)
return
@@ -83,12 +78,6 @@
return 0
return 1
/obj/item/weapon/reagent_containers/process()
if(reagents)
reagents.reagent_on_tick()
return
/obj/item/weapon/reagent_containers/ex_act()
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)