Merge and removal of a wild file

Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/modules/reagents/Chemistry-Holder.dm
This commit is contained in:
Kelenius
2015-04-29 14:20:44 +03:00
34 changed files with 788 additions and 517 deletions
+6 -6
View File
@@ -6,14 +6,14 @@
var/reacting = 0 // Reacting right now
/datum/reagents/New(var/max = 100)
maximum_volume = max
maximum_volume = max
//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
var/paths = typesof(/datum/reagent) - /datum/reagent
chemical_reagents_list = list()
for(var/path in paths)
var/datum/reagent/D = new path()
var/datum/reagent/D = new path()
if(!D.name)
continue
chemical_reagents_list[D.id] = D
@@ -40,7 +40,7 @@
for(var/id in reaction_ids)
if(!chemical_reactions_list[id])
chemical_reactions_list[id] = list()
chemical_reactions_list[id] += D
chemical_reactions_list[id] += D
break // Don't bother adding ourselves to other reagent ids, it is redundant.
/datum/reagents/Destroy()
@@ -254,10 +254,10 @@
amount = min(amount, total_volume)
if(!amount)
return
return
var/part = amount / total_volume
for(var/datum/reagent/current in reagent_list)
var/amount_to_remove = current.volume * part
remove_reagent(current.id, amount_to_remove, 1)
@@ -432,4 +432,4 @@
/atom/proc/create_reagents(var/max_vol)
reagents = new/datum/reagents(max_vol)
reagents.my_atom = src
reagents.my_atom = src