mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
TGUI Research
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
var/datum/seed/seed = plant_controller.create_random_seed(1)
|
||||
var/datum/seed/seed = SSplants.create_random_seed(1)
|
||||
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
|
||||
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
|
||||
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
|
||||
@@ -74,9 +74,9 @@
|
||||
/obj/effect/plant/Destroy()
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
unsense_proximity(callback = .HasProximity, center = get_turf(src))
|
||||
plant_controller.remove_plant(src)
|
||||
SSplants.remove_plant(src)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
plant_controller.add_plant(neighbor)
|
||||
SSplants.add_plant(neighbor)
|
||||
return ..()
|
||||
|
||||
/obj/effect/plant/single
|
||||
@@ -90,15 +90,15 @@
|
||||
else
|
||||
parent = newparent
|
||||
|
||||
if(!plant_controller)
|
||||
if(!SSplants)
|
||||
sleep(250) // ugly hack, should mean roundstart plants are fine. TODO initialize perhaps?
|
||||
if(!plant_controller)
|
||||
if(!SSplants)
|
||||
to_world("<span class='danger'>Plant controller does not exist and [src] requires it. Aborting.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!istype(newseed))
|
||||
newseed = plant_controller.seeds[DEFAULT_SEED]
|
||||
newseed = SSplants.seeds[DEFAULT_SEED]
|
||||
seed = newseed
|
||||
if(!seed)
|
||||
qdel(src)
|
||||
@@ -135,7 +135,7 @@
|
||||
/obj/effect/plant/proc/finish_spreading()
|
||||
set_dir(calc_dir())
|
||||
update_icon()
|
||||
plant_controller.add_plant(src)
|
||||
SSplants.add_plant(src)
|
||||
//Some plants eat through plating.
|
||||
if(islist(seed.chems) && !isnull(seed.chems["pacid"]))
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -240,7 +240,7 @@
|
||||
/obj/effect/plant/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
plant_controller.add_plant(src)
|
||||
SSplants.add_plant(src)
|
||||
|
||||
if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel))
|
||||
if(sampled)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
neighbors |= floor
|
||||
|
||||
if(neighbors.len)
|
||||
plant_controller.add_plant(src) //if we have neighbours again, start processing
|
||||
SSplants.add_plant(src) //if we have neighbours again, start processing
|
||||
|
||||
// Update all of our friends.
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -110,7 +110,7 @@
|
||||
// We shouldn't have spawned if the controller doesn't exist.
|
||||
check_health()
|
||||
if(has_buckled_mobs() || neighbors.len)
|
||||
plant_controller.add_plant(src)
|
||||
SSplants.add_plant(src)
|
||||
|
||||
//spreading vines aren't created on their final turf.
|
||||
//Instead, they are created at their parent and then move to their destination.
|
||||
@@ -160,7 +160,7 @@
|
||||
continue
|
||||
for(var/obj/effect/plant/neighbor in check_turf.contents)
|
||||
neighbor.neighbors |= check_turf
|
||||
plant_controller.add_plant(neighbor)
|
||||
SSplants.add_plant(neighbor)
|
||||
spawn(1) if(src) qdel(src)
|
||||
|
||||
#undef NEIGHBOR_REFRESH_TIME
|
||||
Reference in New Issue
Block a user