From e4fdf84ef71b17ba35abef0133215d45a04c6db1 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 9 Jul 2015 04:25:36 +0930 Subject: [PATCH] Fixes #10054, fixes some mushroom issues. --- code/modules/hydroponics/seed.dm | 2 +- code/modules/hydroponics/seed_mobs.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 2 +- .../living/simple_animal/friendly/mushroom.dm | 22 +++++++++++++------ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 088956dd55..90870d4bf3 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -160,7 +160,7 @@ //Splatter a turf. /datum/seed/proc/splatter(var/turf/T,var/obj/item/thrown) - if(splat_type) + if(splat_type && !(locate(/obj/effect/plant) in T)) var/obj/effect/plant/splat = new splat_type(T, src) if(!istype(splat)) // Plants handle their own stuff. splat.name = "[thrown.name] [pick("smear","smudge","splatter")]" diff --git a/code/modules/hydroponics/seed_mobs.dm b/code/modules/hydroponics/seed_mobs.dm index ec2a88b6da..08d0ff0bec 100644 --- a/code/modules/hydroponics/seed_mobs.dm +++ b/code/modules/hydroponics/seed_mobs.dm @@ -37,7 +37,7 @@ if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob. - var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.") + var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round") if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer. diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 8a476087eb..754129ce54 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -235,7 +235,7 @@ /mob/living/silicon/robot/drone/proc/question(var/client/C) spawn(0) if(!C || jobban_isbanned(C,"Cyborg")) return - var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round.") + var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round") if(!C || ckey) return if(response == "Yes") diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm index a924588d02..195cb443bc 100644 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ b/code/modules/mob/living/simple_animal/friendly/mushroom.dm @@ -15,6 +15,12 @@ response_harm = "whacks" harm_intent_damage = 5 var/datum/seed/seed + var/harvest_time + var/min_explode_time = 1200 + +/mob/living/simple_animal/mushroom/New() + ..() + harvest_time = world.time /mob/living/simple_animal/mushroom/verb/spawn_spores() @@ -31,6 +37,10 @@ usr << "You are sterile!" return + if(world.time < harvest_time + min_explode_time) + usr << "You are not mature enough for that." + return + spore_explode() /mob/living/simple_animal/mushroom/death() @@ -40,15 +50,13 @@ ..() /mob/living/simple_animal/mushroom/proc/spore_explode() - if(!seed) return - - var/list/target_turfs = list() - for(var/turf/new_turf in orange(1,src)) - if(prob(60) && !new_turf.density && src.Adjacent(new_turf)) target_turfs |= new_turf - for(var/turf/target_turf in target_turfs) - new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(target_turf,seed) + if(world.time < harvest_time + min_explode_time) + return + for(var/turf/simulated/target_turf in orange(1,src)) + if(prob(60) && !target_turf.density && src.Adjacent(target_turf)) + new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(target_turf,seed) seed.thrown_at(src,get_turf(src),1) if(src) gib()