From 10100f1d9fc9eb02b71286283ea29e47ecbd3fac Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Mon, 6 Mar 2017 13:19:40 -0500 Subject: [PATCH 1/3] Glowshrooms now have colored light --- code/game/objects/effects/glowshroom.dm | 8 +++++++- code/modules/hydroponics/grown/mushrooms.dm | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 08ae4c38e19..679a5ea3053 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -12,6 +12,7 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( density = 0 icon = 'icons/obj/lighting.dmi' icon_state = "glowshroom" //replaced in New + light_color = "#AAD84B" layer = ABOVE_NORMAL_TURF_LAYER obj_integrity = 30 max_integrity = 30 @@ -24,7 +25,9 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( /obj/structure/glowshroom/glowcap name = "glowcap" + desc = "Mycena Ruthenia, a species of mushroom that, while it does glow in the dark, is not actually bioluminescent." icon_state = "glowcap" + light_color = LIGHT_COLOR_RED /obj/structure/glowshroom/single yield = 0 @@ -35,7 +38,10 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( /obj/structure/glowshroom/New() ..() - set_light(round(potency/10)) + addtimer(CALLBACK(src, .proc/setup), 0) //run this on the next tick so we can set vars first + +/obj/structure/glowshroom/proc/setup() + set_light(max(round(potency*0.025), 1.4), max(round(potency*0.05), 0.1)) setDir(CalcDir()) var/base_icon_state = initial(icon_state) if(!floor) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 602c2decdf7..707e3f24cdd 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -228,10 +228,15 @@ name = "glowshroom cluster" desc = "Mycena Bregprox: This species of mushroom glows in the dark." icon_state = "glowshroom" + light_color = "#AAD84B" filling_color = "#00FA9A" var/effect_path = /obj/structure/glowshroom origin_tech = "biotech=4;plasmatech=6" +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/add_juice() + ..() + set_light(max(seed.potency*0.025, 1.4), max(seed.potency*0.05, 0.1)) + /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) if(isspaceturf(user.loc)) return @@ -263,8 +268,9 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap seed = /obj/item/seeds/glowshroom/glowcap name = "glowcap cluster" - desc = "Mycena Ruthenia: This species of mushroom glows in the dark, but aren't bioluminescent. They're warm to the touch..." + desc = "Mycena Ruthenia: This species of mushroom glows in the dark, but isn't actually bioluminescent. They're warm to the touch..." icon_state = "glowcap" + light_color = LIGHT_COLOR_RED filling_color = "#00FA9A" effect_path = /obj/structure/glowshroom/glowcap origin_tech = "biotech=4;powerstorage=6;plasmatech=4" From 08cc485e9824346b7a9b5d23983f192a153de7c0 Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Mon, 6 Mar 2017 20:35:57 -0500 Subject: [PATCH 2/3] glowy shit --- code/game/objects/effects/glowshroom.dm | 2 +- code/modules/hydroponics/grown/mushrooms.dm | 8 +------ code/modules/hydroponics/hydroponics.dm | 2 +- code/modules/hydroponics/plant_genes.dm | 23 +++++++++++++-------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 679a5ea3053..af86f6770c2 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -41,7 +41,7 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( addtimer(CALLBACK(src, .proc/setup), 0) //run this on the next tick so we can set vars first /obj/structure/glowshroom/proc/setup() - set_light(max(round(potency*0.025), 1.4), max(round(potency*0.05), 0.1)) + set_light(1.4 + potency*0.03, max(potency*0.05, 0.1)) setDir(CalcDir()) var/base_icon_state = initial(icon_state) if(!floor) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 707e3f24cdd..39459d9406e 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -228,15 +228,10 @@ name = "glowshroom cluster" desc = "Mycena Bregprox: This species of mushroom glows in the dark." icon_state = "glowshroom" - light_color = "#AAD84B" filling_color = "#00FA9A" var/effect_path = /obj/structure/glowshroom origin_tech = "biotech=4;plasmatech=6" -/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/add_juice() - ..() - set_light(max(seed.potency*0.025, 1.4), max(seed.potency*0.05, 0.1)) - /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) if(isspaceturf(user.loc)) return @@ -260,7 +255,7 @@ icon_dead = "glowshroom-dead" plantname = "Glowcaps" product = /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap - genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/cell_charge, /datum/plant_gene/trait/plant_type/fungal_metabolism) + genes = list(/datum/plant_gene/trait/glow/red, /datum/plant_gene/trait/cell_charge, /datum/plant_gene/trait/plant_type/fungal_metabolism) mutatelist = list() reagents_add = list("teslium" = 0.1, "nutriment" = 0.04) rarity = 30 @@ -270,7 +265,6 @@ name = "glowcap cluster" desc = "Mycena Ruthenia: This species of mushroom glows in the dark, but isn't actually bioluminescent. They're warm to the touch..." icon_state = "glowcap" - light_color = LIGHT_COLOR_RED filling_color = "#00FA9A" effect_path = /obj/structure/glowshroom/glowcap origin_tech = "biotech=4;powerstorage=6;plasmatech=4" diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 1790c54c7aa..57c2ac58b56 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -271,7 +271,7 @@ if(!self_sustaining) if(myseed && myseed.get_gene(/datum/plant_gene/trait/glow)) var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow) - set_light(G.get_lum(myseed)) + set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color) else set_light(0) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 56f7d1bfe5a..0a1b71a9276 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -263,25 +263,30 @@ /datum/plant_gene/trait/glow // Makes plant glow. Makes plant in tray glow too. - // Adds potency*rate luminosity to products. + // Adds 1 + potency*rate light range and potency*(rate + 0.01) light_power to products. name = "Bioluminescence" - rate = 0.1 + rate = 0.03 examine_line = "It emits a soft glow." trait_id = "glow" + var/glow_color = "#AAD84B" -/datum/plant_gene/trait/glow/proc/get_lum(obj/item/seeds/S) - return round(S.potency*rate) +/datum/plant_gene/trait/glow/proc/glow_range(obj/item/seeds/S) + return 1.4 + S.potency*rate + +/datum/plant_gene/trait/glow/proc/glow_power(obj/item/seeds/S) + return max(S.potency*(rate + 0.01), 0.1) /datum/plant_gene/trait/glow/on_new(obj/item/weapon/reagent_containers/food/snacks/grown/G, newloc) ..() - if(ismob(newloc)) - G.pickup(newloc)//adjusts the lighting on the mob - else - G.set_light(get_lum(G.seed)) + G.set_light(glow_range(G.seed), glow_power(G.seed), glow_color) + +/datum/plant_gene/trait/glow/red + glow_color = LIGHT_COLOR_RED /datum/plant_gene/trait/glow/berry name = "Strong Bioluminescence" - rate = 0.2 + rate = 0.05 + glow_color = null /datum/plant_gene/trait/teleport From a73cb2cfcea85241b195f96754fc2720af364cb1 Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Mon, 6 Mar 2017 20:41:36 -0500 Subject: [PATCH 3/3] Not Bioluminescence --- code/game/objects/effects/glowshroom.dm | 2 +- code/modules/hydroponics/plant_genes.dm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index af86f6770c2..9004315d4a2 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -41,7 +41,7 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( addtimer(CALLBACK(src, .proc/setup), 0) //run this on the next tick so we can set vars first /obj/structure/glowshroom/proc/setup() - set_light(1.4 + potency*0.03, max(potency*0.05, 0.1)) + set_light(1.4 + potency*0.03, max(potency*0.04, 0.1)) setDir(CalcDir()) var/base_icon_state = initial(icon_state) if(!floor) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 0a1b71a9276..d283e606e90 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -281,6 +281,7 @@ G.set_light(glow_range(G.seed), glow_power(G.seed), glow_color) /datum/plant_gene/trait/glow/red + name = "Red Electrical Glow" glow_color = LIGHT_COLOR_RED /datum/plant_gene/trait/glow/berry