diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index b68e1e61cd..8e1a382a86 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -91,7 +91,8 @@ /obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob) if(M == user) user << "You take a bite of the crayon and swallow it." -// user.nutrition += 5 + user.nutrition += 1 + user.reagents.add_reagent("crayon_dust",min(5,uses)/3) if(uses) uses -= 5 if(uses <= 0) diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index fc122c185c..0606569c4f 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -12,7 +12,7 @@ var/global/list/cached_icons = list() w_class = 3.0 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,30,50,70) - volume = 70 + volume = 60 flags = OPENCONTAINER var/paint_type = "" @@ -33,7 +33,13 @@ var/global/list/cached_icons = list() else if(paint_type && lentext(paint_type) > 0) name = paint_type + " " + name ..() - reagents.add_reagent("paint_[paint_type]", volume) + reagents.add_reagent("water", volume*3/5) + reagents.add_reagent("plasticide", volume/5) + if(paint_type == "white") //why don't white crayons exist + reagents.add_reagent("aluminum", volume/5) + else + reagents.add_reagent("crayon_dust_[paint_type]", volume/5) + reagents.handle_reactions() on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can var/mixedcolor = mix_color_from_reagents(reagents.reagent_list) @@ -44,6 +50,10 @@ var/global/list/cached_icons = list() icon_state = "paint_red" paint_type = "red" + yellow + icon_state = "paint_yellow" + paint_type = "yellow" + green icon_state = "paint_green" paint_type = "green" @@ -52,17 +62,13 @@ var/global/list/cached_icons = list() icon_state = "paint_blue" paint_type = "blue" - yellow - icon_state = "paint_yellow" - paint_type = "yellow" - violet icon_state = "paint_violet" - paint_type = "violet" + paint_type = "purple" black icon_state = "paint_black" - paint_type = "black" + paint_type = "gray" white icon_state = "paint_white" @@ -81,71 +87,6 @@ var/global/list/cached_icons = list() item_state = "paintcan" w_class = 3.0 -/obj/item/weapon/paint/red - name = "red paint" - color = "FF0000" - icon_state = "paint_red" - -/obj/item/weapon/paint/green - name = "green paint" - color = "00FF00" - icon_state = "paint_green" - -/obj/item/weapon/paint/blue - name = "blue paint" - color = "0000FF" - icon_state = "paint_blue" - -/obj/item/weapon/paint/yellow - name = "yellow paint" - color = "FFFF00" - icon_state = "paint_yellow" - -/obj/item/weapon/paint/violet - name = "violet paint" - color = "FF00FF" - icon_state = "paint_violet" - -/obj/item/weapon/paint/black - name = "black paint" - color = "333333" - icon_state = "paint_black" - -/obj/item/weapon/paint/white - name = "white paint" - color = "FFFFFF" - icon_state = "paint_white" - - -/obj/item/weapon/paint/anycolor - gender= PLURAL - name = "any color" - icon_state = "paint_neutral" - - attack_self(mob/user as mob) - var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white") - if ((user.get_active_hand() != src || user.stat || user.restrained())) - return - switch(t1) - if("red") - color = "FF0000" - if("blue") - color = "0000FF" - if("green") - color = "00FF00" - if("yellow") - color = "FFFF00" - if("violet") - color = "FF00FF" - if("white") - color = "FFFFFF" - if("black") - color = "333333" - icon_state = "paint_[t1]" - add_fingerprint(user) - return - - /obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity) if(!proximity) return if(!istype(target) || istype(target, /turf/space)) @@ -171,7 +112,7 @@ var/global/list/cached_icons = list() target.icon = initial(target.icon) return */ - +/* datum/reagent/paint name = "Paint" id = "paint_" @@ -179,15 +120,7 @@ datum/reagent/paint color = "#808080" description = "This paint will only adhere to floor tiles." - reaction_turf(var/turf/T, var/volume) - if(!istype(T) || istype(T, /turf/space)) - return - T.color = color - reaction_obj(var/obj/O, var/volume) - ..() - if(istype(O,/obj/item/weapon/light)) - O.color = color red name = "Red Paint" @@ -235,3 +168,4 @@ datum/reagent/paint_remover if(istype(T) && T.icon != initial(T.icon)) T.icon = initial(T.icon) return +*/ diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/Chemistry-Colours.dm index a59147e85f..aaae973d95 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/Chemistry-Colours.dm @@ -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] diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 78a48cf8e0..6c6c194af5 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -79,9 +79,9 @@ datum if(A.volume > the_volume) the_volume = A.volume the_reagent = A - + return the_reagent - + get_master_reagent_name() var/the_name = null var/the_volume = 0 @@ -353,8 +353,11 @@ datum if(C.result) feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") multiplier = max(multiplier, 1) //this shouldnt happen ... - add_reagent(C.result, C.result_amount*multiplier) - set_data(C.result, preserved_data) + if(!isnull(C.resultcolor)) //paints + add_reagent(C.result, C.result_amount*multiplier, C.resultcolor) + else + add_reagent(C.result, C.result_amount*multiplier) + set_data(C.result, preserved_data) //add secondary products for(var/S in C.secondary_results) @@ -458,7 +461,7 @@ datum else R.reaction_obj(A, R.volume+volume_modifier) return - add_reagent(var/reagent, var/amount, var/list/data=null, var/safety = 0) + add_reagent(var/reagent, var/amount, var/data=null, var/safety = 0) if(!isnum(amount)) return 1 update_total() if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. @@ -469,7 +472,6 @@ datum if (R.id == reagent) R.volume += amount update_total() - my_atom.on_reagent_change() // mix dem viruses if(R.id == "blood" && reagent == "blood") @@ -495,9 +497,23 @@ datum if(!istype(D, /datum/disease/advance)) preserve += D R.data["viruses"] = preserve - + if(R.id == "paint" && reagent == "paint") + if(R.color && data) + var/list/mix = new /list(2) + //fill the list + 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 + var/datum/reagent/paint/P2 = new P.type() + P2.color = data + P2.volume = amount + mix[1] = P1 + mix[2] = P2 + R.color = mix_color_from_reagents(mix) if(!safety) handle_reactions() + my_atom.on_reagent_change() return 0 var/datum/reagent/D = chemical_reagents_list[reagent] @@ -507,7 +523,10 @@ datum reagent_list += R R.holder = src R.volume = amount - SetViruses(R, data) // Includes setting data + if(reagent == "paint") + R.color = data + else + SetViruses(R, data) // Includes setting data for blood //debug //world << "Adding data" @@ -611,6 +630,7 @@ datum my_atom.reagents = null copy_data(var/datum/reagent/current_reagent) + if (current_reagent.id == "paint") return current_reagent.color if (!current_reagent || !current_reagent.data) return null if (!istype(current_reagent.data, /list)) return current_reagent.data diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 7f754e56b3..b2ac133cc5 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -851,7 +851,10 @@ //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! /obj/item/weapon/reagent_containers/pill = list(), - /obj/item/weapon/reagent_containers/food = list() + /obj/item/weapon/reagent_containers/food = list(), + + //Crayons + /obj/item/toy/crayon = list() ) var/list/juice_items = list ( @@ -1186,6 +1189,21 @@ break remove_object(O) + //crayons + for (var/obj/item/toy/crayon/O in holdingitems) + if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/amount = round(O.uses/3) //full crayon gives 10 juice + var/dustcolour = "red" + if (O.colourName == "mime") + dustcolour = "grey" //black+white + else if (O.colourName == "rainbow") + dustcolour = "brown" //mix of all colours + else if (!isnull(O.colourName)) //all other defined colours + dustcolour = O.colourName + beaker.reagents.add_reagent("crayon_dust_[dustcolour]",amount) + remove_object(O) + //Everything else - Transfers reagents from it into beaker for (var/obj/item/weapon/reagent_containers/O in holdingitems) if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index e92a803b1e..6e2103e842 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -88,7 +88,7 @@ datum on_new(var/data) return - // Called when two reagents of the same are mixing. + // Called when two reagents of the same are mixing. <-- Blatant lies on_merge(var/data) return @@ -1515,6 +1515,78 @@ datum ..() return +//////////////////////////Ground crayons///////////////////// + + + crayon_dust + name = "Crayon dust" + id = "crayon_dust" + description = "Intensely coloured powder obtained by grinding crayons." + reagent_state = LIQUID + color = "#888888" + overdose = 5 + + red + name = "Red crayon dust" + id = "crayon_dust_red" + color = "#FE191A" + + orange + name = "Orange crayon dust" + id = "crayon_dust_orange" + color = "#FFBE4F" + + yellow + name = "Yellow crayon dust" + id = "crayon_dust_yellow" + color = "#FDFE7D" + + green + name = "Green crayon dust" + id = "crayon_dust_green" + color = "#18A31A" + + blue + name = "Blue crayon dust" + id = "crayon_dust_blue" + color = "#247CFF" + + purple + name = "Purple crayon dust" + id = "crayon_dust_purple" + color = "#CC0099" + + grey //Mime + name = "Grey crayon dust" + id = "crayon_dust_grey" + color = "#808080" + + brown //Rainbow + name = "Brown crayon dust" + id = "crayon_dust_brown" + color = "#846F35" + +//////////////////////////Paint////////////////////////////// + + paint + name = "Paint" + id = "paint" + description = "This paint will stick to almost any object" + reagent_state = LIQUID + color = "#808080" + overdose = 15 + + reaction_turf(var/turf/T, var/volume) + if(!istype(T) || istype(T, /turf/space)) + return + T.color = color + + reaction_obj(var/obj/O, var/volume) + ..() + if(istype(O,/obj/item/weapon/light)) + O.color = color + + //////////////////////////Poison stuff/////////////////////// toxin diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index b9c657f97e..4d6b44fb84 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -4,6 +4,7 @@ datum var/name = null var/id = null var/result = null + var/resultcolor = null //for paint var/list/required_reagents = new/list() var/list/required_catalysts = new/list() @@ -131,7 +132,7 @@ datum name = "Water" id = "water" result = "water" - required_reagents = list("oxygen" = 2, "hydrogen" = 1) + required_reagents = list("oxygen" = 1, "hydrogen" = 2) result_amount = 1 thermite @@ -1344,6 +1345,109 @@ datum var/obj/effect/golemrune/Z = new /obj/effect/golemrune Z.loc = get_turf(holder.my_atom) Z.announce_to_ghosts() + +//////////////////////////////////////////PAINT/////////////////////////////////////////// +//Crayon dust -> paint + red_paint + name = "Red paint" + id = "red_paint" + result = "paint" + resultcolor = "#FE191A" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_red" = 1) + result_amount = 5 + + orange_paint + name = "Orange paint" + id = "orange_paint" + result = "paint" + resultcolor = "#FFBE4F" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_orange" = 1) + result_amount = 5 + + yellow_paint + name = "Yellow paint" + id = "yellow_paint" + result = "paint" + resultcolor = "#FDFE7D" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_yellow" = 1) + result_amount = 5 + + green_paint + name = "Green paint" + id = "green_paint" + result = "paint" + resultcolor = "#18A31A" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_green" = 1) + result_amount = 5 + + blue_paint + name = "Blue paint" + id = "blue_paint" + result = "paint" + resultcolor = "#247CFF" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_blue" = 1) + result_amount = 5 + + purple_paint + name = "Purple paint" + id = "purple_paint" + result = "paint" + resultcolor = "#CC0099" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_purple" = 1) + result_amount = 5 + + grey_paint //mime + name = "Grey paint" + id = "grey_paint" + result = "paint" + resultcolor = "#808080" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_grey" = 1) + result_amount = 5 + + brown_paint + name = "Brown paint" + id = "brown_paint" + result = "paint" + resultcolor = "#846F35" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_brown" = 1) + result_amount = 5 + +//Ghetto reactions + + blood_paint + name = "Blood paint" + id = "blood_paint" + result = "paint" + resultcolor = "#FE191A" + required_reagents = list("plasticide" = 1, "water" = 3, "blood" = 2) + result_amount = 5 + + milk_paint + name = "Milk paint" + id = "milk_paint" + result = "paint" + resultcolor = "#F0F8FF" + required_reagents = list("plasticide" = 1, "water" = 3, "milk" = 5) + result_amount = 5 + + carbon_paint + name = "Carbon paint" + id = "carbon_paint" + result = "paint" + resultcolor = "#333333" + required_reagents = list("plasticide" = 1, "water" = 3, "carbon" = 1) + result_amount = 5 + +//Aluminum "non-ghetto" white paint + + aluminum_paint + name = "Aluminum paint" + id = "aluminum_paint" + result = "paint" + resultcolor = "#F0F8FF" + required_reagents = list("plasticide" = 1, "water" = 3, "aluminum" = 1) + result_amount = 5 + //////////////////////////////////////////FOOD MIXTURES//////////////////////////////////// tofu