mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes #10054, fixes some mushroom issues.
This commit is contained in:
@@ -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")]"
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 << "<span class='danger'>You are sterile!</span>"
|
||||
return
|
||||
|
||||
if(world.time < harvest_time + min_explode_time)
|
||||
usr << "<span class='danger'>You are not mature enough for that.</span>"
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user