mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Fixes #10054, fixes some mushroom issues.
This commit is contained in:
@@ -160,7 +160,7 @@
|
|||||||
|
|
||||||
//Splatter a turf.
|
//Splatter a turf.
|
||||||
/datum/seed/proc/splatter(var/turf/T,var/obj/item/thrown)
|
/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)
|
var/obj/effect/plant/splat = new splat_type(T, src)
|
||||||
if(!istype(splat)) // Plants handle their own stuff.
|
if(!istype(splat)) // Plants handle their own stuff.
|
||||||
splat.name = "[thrown.name] [pick("smear","smudge","splatter")]"
|
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.
|
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.
|
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)
|
/mob/living/silicon/robot/drone/proc/question(var/client/C)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
if(!C || jobban_isbanned(C,"Cyborg")) return
|
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)
|
if(!C || ckey)
|
||||||
return
|
return
|
||||||
if(response == "Yes")
|
if(response == "Yes")
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
response_harm = "whacks"
|
response_harm = "whacks"
|
||||||
harm_intent_damage = 5
|
harm_intent_damage = 5
|
||||||
var/datum/seed/seed
|
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()
|
/mob/living/simple_animal/mushroom/verb/spawn_spores()
|
||||||
|
|
||||||
@@ -31,6 +37,10 @@
|
|||||||
usr << "<span class='danger'>You are sterile!</span>"
|
usr << "<span class='danger'>You are sterile!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(world.time < harvest_time + min_explode_time)
|
||||||
|
usr << "<span class='danger'>You are not mature enough for that.</span>"
|
||||||
|
return
|
||||||
|
|
||||||
spore_explode()
|
spore_explode()
|
||||||
|
|
||||||
/mob/living/simple_animal/mushroom/death()
|
/mob/living/simple_animal/mushroom/death()
|
||||||
@@ -40,14 +50,12 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/living/simple_animal/mushroom/proc/spore_explode()
|
/mob/living/simple_animal/mushroom/proc/spore_explode()
|
||||||
|
|
||||||
if(!seed)
|
if(!seed)
|
||||||
return
|
return
|
||||||
|
if(world.time < harvest_time + min_explode_time)
|
||||||
var/list/target_turfs = list()
|
return
|
||||||
for(var/turf/new_turf in orange(1,src))
|
for(var/turf/simulated/target_turf in orange(1,src))
|
||||||
if(prob(60) && !new_turf.density && src.Adjacent(new_turf)) target_turfs |= new_turf
|
if(prob(60) && !target_turf.density && src.Adjacent(target_turf))
|
||||||
for(var/turf/target_turf in target_turfs)
|
|
||||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(target_turf,seed)
|
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(target_turf,seed)
|
||||||
seed.thrown_at(src,get_turf(src),1)
|
seed.thrown_at(src,get_turf(src),1)
|
||||||
if(src)
|
if(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user