diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm index 53c6818ac87..51050f66ac6 100644 --- a/code/defines/obj/hydro.dm +++ b/code/defines/obj/hydro.dm @@ -336,6 +336,23 @@ growthstages = 3 plant_type = 2 +/obj/item/seeds/glowshroom + name = "Glowshroom mycelium" + icon_state = "mycelium-glowshroom" + mypath = "/obj/item/seeds/glowshroom" + species = "glowshroom" + plantname = "Glowshroom" + productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom" + lifespan = 30 //ten times that is the delay + endurance = 30 + maturation = 15 + production = 1 + yield = 3 //-> spread + potency = 30 //-> brightness + oneharvest = 1 + growthstages = 4 + plant_type = 2 + /obj/item/seeds/plumpmycelium name = "Plump Helmet mycelium" icon_state = "mycelium-plump" @@ -733,10 +750,47 @@ ..() reagents.add_reagent("nutriment", 2) +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom + seed = "/obj/item/seeds/glowshroom" + name = "Glowshroom" + desc = "Glowshroom: These species of mushrooms glown in the dark. OR DO THEY?" + icon_state = "glowshroom" + New() + ..() + reagents.add_reagent("radium",1) + if(istype(src.loc,/mob)) + pickup(src.loc) + else + src.sd_SetLuminosity(potency/10) + lifespan = 30 //ten times that is the delay + endurance = 30 + maturation = 15 + production = 1 + yield = 3 + potency = 30 + plant_type = 2 +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob) + if(istype(user.loc,/turf/space)) + return + var/obj/glowshroom/planted = new /obj/glowshroom(user.loc) + planted.delay = lifespan * 10 + planted.endurance = endurance + planted.yield = yield + planted.potency = potency + del(src) + user << "You plant the glowshroom." + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user) + src.sd_SetLuminosity(0) + user.sd_SetLuminosity(user.luminosity + potency/10) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user) + user.sd_SetLuminosity(user.luminosity - potency/10) + src.sd_SetLuminosity(potency/10) // ************************************* diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 106697575b5..934ba8f60ad 100644 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -131,8 +131,8 @@ product_paths = "/obj/item/seeds/cornseed;/obj/item/seeds/chiliseed;/obj/item/seeds/berryseed;/obj/item/seeds/eggplantseed;/obj/item/seeds/tomatoseed;/obj/item/seeds/wheatseed;/obj/item/seeds/soyaseed;/obj/item/seeds/carrotseed;/obj/item/seeds/potatoseed;/obj/item/seeds/chantermycelium;/obj/item/seeds/towermycelium;/obj/item/seeds/replicapod" product_amounts = "2;2;2;2;2;2;2;2;2;2;2;3" product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!" - product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium" - product_hideamt = "2;2;2;2" + product_hidden = "/obj/item/seeds/glowshroom;/obj/item/seeds/amanitamycelium;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium" + product_hideamt = "2;2;2;2;2" /obj/machinery/vending/magivend name = "MagiVend" diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 81100a2f790..aaca880f55b 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -133,7 +133,7 @@ obj/machinery/hydroponics/process() obj/machinery/hydroponics/proc/updateicon() - //Refreshes the icon + //Refreshes the icon and sets the luminosity overlays = null if(src.planted) if(dead) @@ -164,6 +164,15 @@ obj/machinery/hydroponics/proc/updateicon() overlays += image('hydroponics.dmi', icon_state="over_alert") if(src.harvest) overlays += image('hydroponics.dmi', icon_state="over_harvest") + + if(myseed) + if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom)) //revert luminosity to 0 + sd_SetLuminosity(0) + else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom)) //update luminosity + sd_SetLuminosity(myseed.potency/10) + else + if(luminosity) + sd_SetLuminosity(0) return @@ -300,6 +309,8 @@ obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant! else return + contents += myseed + src.dead = 0 src.hardmutate() src.planted = 1 @@ -873,6 +884,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) else user << text("You harvest from the [src.myseed.plantname]") if(myseed.oneharvest) + del(myseed) planted = 0 dead = 0 updateicon() \ No newline at end of file diff --git a/code/game/objects/glowshroom.dm b/code/game/objects/glowshroom.dm new file mode 100644 index 00000000000..482e6e3521e --- /dev/null +++ b/code/game/objects/glowshroom.dm @@ -0,0 +1,154 @@ +//separate dm since hydro is getting bloated already + +/obj/glowshroom + opacity = 0 + density = 0 + icon = 'lighting.dmi' + icon_state = "glowshroomf" + layer = 2.1 + var/endurance = 30 + var/potency = 30 + var/delay = 300 + var/floor = 0 + var/yield = 3 + var/spreadChance = 80 + var/spreadIntoAdjacentChance = 10 + var/evolveChance = 2 + +/obj/glowshroom/New() + ..() + + dir = CalcDir() + + if(!floor) + switch(dir) //offset to make it be on the wall rather than on the floor + if(NORTH) + pixel_y = 32 + if(SOUTH) + pixel_y = -32 + if(EAST) + pixel_x = 32 + if(WEST) + pixel_x = -32 + icon_state = "glowshroom[rand(1,3)]" + else //if on the floor, glowshroom on-floor sprite + icon_state = "glowshroomf" + + spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation + sd_SetLuminosity(potency/10) + spawn(delay) + if(src) + Spread() + +/obj/glowshroom/proc/Spread() + set background = 1 + + for(var/i=1,i<=yield,i++) + if(prob(spreadChance)) + var/list/possibleLocs = list() + + for(var/turf/turf in view(3,src)) + if(!turf.density) + possibleLocs += turf + + var/turf/newLoc = pick(possibleLocs) + + if(istype(newLoc,/turf/space)) + continue + + var/ifContinue = 0 //hacky + if(!prob(spreadIntoAdjacentChance)) + for(var/obj/glowshroom in view(1,newLoc)) + ifContinue = 1 + break + if(ifContinue) + continue + + var/shroomCount = 0 //hacky + var/placeCount = 1 + for(var/obj/glowshroom/shroom in newLoc) + shroomCount++ + for(var/wallDir in cardinal) + var/turf/isWall = get_step(newLoc,wallDir) + if(isWall.density) + placeCount++ + if(shroomCount >= placeCount) + continue + + var/obj/glowshroom/child = new /obj/glowshroom(newLoc) + child.potency = potency + child.yield = yield + child.delay = delay + child.endurance = endurance + + if(prob(evolveChance)) //very low chance to evolve on its own + potency += rand(4,6) + + sleep(delay) + + if(src) + .() + +/obj/glowshroom/proc/CalcDir(turf/location = loc) + var/direction = 16 + + for(var/wallDir in cardinal) + var/turf/newTurf = get_step(location,wallDir) + if(newTurf.density) + direction |= wallDir + + for(var/obj/glowshroom/shroom in location) + if(shroom == src) + continue + if(shroom.floor) //special + direction &= ~16 + else + direction &= ~shroom.dir + + var/list/dirList = list() + + for(var/i=0,i<=4,i++) + if(direction & 2 ** i) + dirList += 2 ** i + + if(dirList.len) + var/newDir = pick(dirList) + if(newDir == 16) + floor = 1 + newDir = 1 + return newDir + + floor = 1 + return 1 + +/obj/glowshroom/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + + endurance -= W.force + + CheckEndurance() + +/obj/glowshroom/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if (prob(50)) + del(src) + return + if(3.0) + if (prob(5)) + del(src) + return + else + return + +/obj/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > 300) + endurance -= 5 + CheckEndurance() + +/obj/glowshroom/proc/CheckEndurance() + if(endurance <= 0) + del(src) \ No newline at end of file diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index bea0a4fb8e3..41137af98e6 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -153,6 +153,7 @@ src.verbs += /client/proc/play_sound src.verbs += /client/proc/cuban_pete // -- Urist src.verbs += /client/proc/bananaphone // -- Darem + src.verbs += /client/proc/honk_theme // -- Urist the Honky src.verbs += /client/proc/only_one // muskets src.verbs += /client/proc/space_asshole // --Agouri :3 src.verbs += /client/proc/strike_team //N @@ -284,6 +285,7 @@ //src.verbs += /client/proc/object_talk // -- TLE src.verbs += /client/proc/play_sound src.verbs += /client/proc/cuban_pete // -- Urist + src.verbs += /client/proc/honk_theme // -- Urist the Honky src.verbs += /client/proc/bananaphone src.verbs += /client/proc/only_one // muskets src.verbs += /client/proc/space_asshole // --Agouri :3 @@ -1154,6 +1156,7 @@ src.verbs -= /client/proc/object_talk // -- TLE src.verbs -= /client/proc/play_sound src.verbs -= /client/proc/cuban_pete // -- Urist + src.verbs -= /client/proc/honk_theme // -- Urist the Honky src.verbs -= /client/proc/bananaphone // -- Darem src.verbs -= /client/proc/space_asshole // --Agouri :3 src.verbs -= /client/proc/strike_team //N diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 8061d6f2383..dc68f0c14f7 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -81,6 +81,17 @@ client/proc/space_asshole() M << 'space_asshole.ogg' +client/proc/honk_theme() + set category = "Fun" + set name = "Honk" + + message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1) + + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << 'honk_theme.ogg' + /*if(Debug2) if(!src.authenticated || !src.holder) diff --git a/icons/obj/harvest.dmi b/icons/obj/harvest.dmi index 3a7e20e16b0..7b4eb8f36fa 100644 Binary files a/icons/obj/harvest.dmi and b/icons/obj/harvest.dmi differ diff --git a/icons/obj/hydroponics.dmi b/icons/obj/hydroponics.dmi index 0c882c2c982..e35d9c21b13 100644 Binary files a/icons/obj/hydroponics.dmi and b/icons/obj/hydroponics.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 7c6b2d9f68b..e65494ba7c9 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ diff --git a/icons/obj/seeds.dmi b/icons/obj/seeds.dmi index e16ce021dd5..b2eb81ffbf8 100644 Binary files a/icons/obj/seeds.dmi and b/icons/obj/seeds.dmi differ diff --git a/sound/ambience/honk_theme.ogg b/sound/ambience/honk_theme.ogg new file mode 100644 index 00000000000..ca63ae89ab0 Binary files /dev/null and b/sound/ambience/honk_theme.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 49beb5f8db8..94b938b3a63 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -461,6 +461,7 @@ #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" #include "code\game\objects\gibs.dm" +#include "code\game\objects\glowshroom.dm" #include "code\game\objects\grille.dm" #include "code\game\objects\items.dm" #include "code\game\objects\kitchen.dm"