mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-25 17:02:04 +00:00
All credits to the author for this handy little script. I Committed the modified python script to tool directory. Although it needs to be in the root folder of your repo to work. To notice the improved compile times, in dreammaker go to Build > Preferences > and untick "automatically set file_dir for subfolders" If this commit inteferes with any large projects just revert it, do your thing, then rerun the script. Easy-peasy. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4488 316c924e-a436-60f5-8080-3fe189b3f50e
108 lines
2.4 KiB
Plaintext
108 lines
2.4 KiB
Plaintext
#define NODERANGE 3
|
|
|
|
/obj/effect/alien/weeds/New()
|
|
..()
|
|
if(istype(loc, /turf/space))
|
|
del(src)
|
|
return
|
|
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
|
spawn(rand(150,300))
|
|
if(src)
|
|
Life()
|
|
return
|
|
|
|
/obj/effect/alien/weeds/node/New()
|
|
..()
|
|
sd_SetLuminosity(NODERANGE)
|
|
return
|
|
|
|
/obj/effect/alien/weeds/proc/Life()
|
|
set background = 1
|
|
var/turf/U = get_turf(src)
|
|
/*
|
|
if (locate(/obj/movable, U))
|
|
U = locate(/obj/movable, U)
|
|
if(U.density == 1)
|
|
del(src)
|
|
return
|
|
|
|
Alien plants should do something if theres a lot of poison
|
|
if(U.poison> 200000)
|
|
health -= round(U.poison/200000)
|
|
update()
|
|
return
|
|
*/
|
|
if (istype(U, /turf/space))
|
|
del(src)
|
|
return
|
|
|
|
direction_loop:
|
|
for(var/dirn in cardinal)
|
|
var/turf/T = get_step(src, dirn)
|
|
|
|
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
|
continue
|
|
|
|
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
|
|
continue
|
|
|
|
// if (locate(/obj/movable, T)) // don't propogate into movables
|
|
// continue
|
|
|
|
for(var/obj/O in T)
|
|
if(O.density)
|
|
continue direction_loop
|
|
|
|
new /obj/effect/alien/weeds(T)
|
|
|
|
|
|
/obj/effect/alien/weeds/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
if(2.0)
|
|
if (prob(50))
|
|
del(src)
|
|
if(3.0)
|
|
if (prob(5))
|
|
del(src)
|
|
return
|
|
|
|
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
|
if(W.attack_verb.len)
|
|
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
|
else
|
|
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
|
|
|
|
var/damage = W.force / 4.0
|
|
|
|
if(istype(W, /obj/item/weapon/weldingtool))
|
|
var/obj/item/weapon/weldingtool/WT = W
|
|
|
|
if(WT.remove_fuel(0, user))
|
|
damage = 15
|
|
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
|
|
|
health -= damage
|
|
healthcheck()
|
|
|
|
/obj/effect/alien/weeds/proc/healthcheck()
|
|
if(health <= 0)
|
|
del(src)
|
|
|
|
|
|
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
|
if(exposed_temperature > 300)
|
|
health -= 5
|
|
healthcheck()
|
|
|
|
/*/obj/effect/alien/weeds/burn(fi_amount)
|
|
if (fi_amount > 18000)
|
|
spawn( 0 )
|
|
del(src)
|
|
return
|
|
return 0
|
|
return 1
|
|
*/
|
|
|
|
#undef NODRANGE |