Mixing of paint

The generic paint can now be mixed and tranferred.
This commit is contained in:
RKF45
2015-02-01 22:54:18 +01:00
parent 4eb3e16f72
commit 4d8dd50cea
4 changed files with 28 additions and 134 deletions
@@ -8,7 +8,6 @@
var/list/greencolor = new /list(contents)
var/list/bluecolor = new /list(contents)
var/i
//fill the list of weights
for(i=1; i<=contents; i++)
var/datum/reagent/re = reagent_list[i]
@@ -17,7 +16,6 @@
reagentweight *= 20 //Paint colours a mixture twenty times as much
weight[i] = reagentweight
//fill the lists of colours
for(i=1; i<=contents; i++)
var/datum/reagent/re = reagent_list[i]
+6 -12
View File
@@ -353,13 +353,10 @@ datum
if(C.result)
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
multiplier = max(multiplier, 1) //this shouldnt happen ...
world << "chemical_reaction [C.result]|[C.result_amount*multiplier][C.resultcolor]"
if(!isnull(C.resultcolor))
world << "Paint made with colour [C.resultcolor]"
if(!isnull(C.resultcolor)) //paints
add_reagent(C.result, C.result_amount*multiplier, C.resultcolor)
else
add_reagent(C.result, C.result_amount*multiplier)
world << "This happened? [preserved_data]"
set_data(C.result, preserved_data)
//add secondary products
@@ -504,18 +501,16 @@ datum
if(R.color && data)
var/list/mix = new /list(2)
//fill the list
var/datum/reagent/paint/P1 = chemical_reagents_list["paint"]
var/datum/reagent/paint/P = chemical_reagents_list["paint"]
var/datum/reagent/paint/P1 = new P.type()
P1.color = R.color
P1.volume = R.volume - amount //since we just increased that
world << "First paint [P1.color] vol [P1.volume]"
var/datum/reagent/paint/P2 = chemical_reagents_list["paint"]
var/datum/reagent/paint/P2 = new P.type()
P2.color = data
P2.volume = amount
world << "Second paint [P2.color] vol [P2.volume]"
mix += P1
mix += P2
mix[1] = P1
mix[2] = P2
R.color = mix_color_from_reagents(mix)
world << "Eventual mixed colour [R.color]"
if(!safety)
handle_reactions()
my_atom.on_reagent_change()
@@ -530,7 +525,6 @@ datum
R.volume = amount
if(reagent == "paint")
R.color = data
world << "The paint is given [data] colour"
else
SetViruses(R, data) // Includes setting data for blood
+8 -39
View File
@@ -1575,48 +1575,17 @@ datum
reagent_state = LIQUID
color = "#808080"
overdose = 15
/*
//Paints corresponding to crayons are hardcoded
red
id = "paint_red"
color = "#FE191A"
orange
id = "paint_orange"
color = "#FFBE4F"
reaction_turf(var/turf/T, var/volume)
if(!istype(T) || istype(T, /turf/space))
return
T.color = color
yellow
id = "paint_yellow"
color = "#FDFE7D"
reaction_obj(var/obj/O, var/volume)
..()
if(istype(O,/obj/item/weapon/light))
O.color = color
green
id = "paint_green"
color = "#18A31A"
blue
id = "paint_blue"
color = "#247CFF"
purple
id = "paint_purple"
color = "#CC0099"
grey //Mime
id = "paint_grey"
color = "#808080"
brown //Rainbow
id = "paint_brown"
color = "#846F35"
black
id = "paint_black"
color = "#333333"
white
id = "paint_white"
color = "#F0F8FF"
*/
//////////////////////////Poison stuff///////////////////////