Repathes structures to fluff, traps to their own path

This commit is contained in:
AnturK
2016-09-20 17:36:27 +02:00
parent 93f444fd38
commit 6700f30012
10 changed files with 90 additions and 254 deletions
+15 -19
View File
@@ -1,18 +1,14 @@
/obj/structure/divine/trap
/obj/structure/trap
name = "IT'S A TARP"
desc = "stepping on me is a guaranteed bad day"
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "trap"
density = 0
alpha = 30 //initially quite hidden when not "recharging"
health = 20
maxhealth = 20
trap = TRUE
var/last_trigger = 0
var/time_between_triggers = 600 //takes a minute to recharge
/obj/structure/divine/trap/Crossed(atom/movable/AM)
/obj/structure/trap/Crossed(atom/movable/AM)
if(last_trigger + time_between_triggers > world.time)
return
alpha = initial(alpha)
@@ -23,7 +19,7 @@
trap_effect(L)
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/divine/trap/examine(mob/user)
/obj/structure/trap/examine(mob/user)
..()
if(!isliving(user)) //bad ghosts, stop trying to powergame from beyond the grave
return
@@ -32,15 +28,15 @@
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/divine/trap/proc/trap_effect(mob/living/L)
/obj/structure/trap/proc/trap_effect(mob/living/L)
return
/obj/structure/divine/trap/stun
/obj/structure/trap/stun
name = "shock trap"
desc = "A trap that will shock you, it will burn your flesh and render you immobile, You'd better avoid it."
icon_state = "trap-shock"
/obj/structure/divine/trap/stun/trap_effect(mob/living/L)
/obj/structure/trap/stun/trap_effect(mob/living/L)
L << "<span class='danger'><B>You are paralyzed from the intense shock!</B></span>"
L.Weaken(5)
var/turf/Lturf = get_turf(L)
@@ -48,13 +44,13 @@
new /obj/effect/particle_effect/sparks(Lturf)
/obj/structure/divine/trap/fire
/obj/structure/trap/fire
name = "flame trap"
desc = "A trap that will set you ablaze. You'd better avoid it."
icon_state = "trap-fire"
/obj/structure/divine/trap/fire/trap_effect(mob/living/L)
/obj/structure/trap/fire/trap_effect(mob/living/L)
L << "<span class='danger'><B>Spontaneous combustion!</B></span>"
L.Weaken(1)
var/turf/Lturf = get_turf(L)
@@ -62,26 +58,26 @@
new /obj/effect/particle_effect/sparks(Lturf)
/obj/structure/divine/trap/chill
/obj/structure/trap/chill
name = "frost trap"
desc = "A trap that will chill you to the bone. You'd better avoid it."
icon_state = "trap-frost"
/obj/structure/divine/trap/chill/trap_effect(mob/living/L)
/obj/structure/trap/chill/trap_effect(mob/living/L)
L << "<span class='danger'><B>You're frozen solid!</B></span>"
L.Weaken(1)
L.bodytemperature -= 300
new /obj/effect/particle_effect/sparks(get_turf(L))
/obj/structure/divine/trap/damage
/obj/structure/trap/damage
name = "earth trap"
desc = "A trap that will summon a small earthquake, just for you. You'd better avoid it."
icon_state = "trap-earth"
/obj/structure/divine/trap/damage/trap_effect(mob/living/L)
/obj/structure/trap/damage/trap_effect(mob/living/L)
L << "<span class='danger'><B>The ground quakes beneath your feet!</B></span>"
L.Weaken(5)
L.adjustBruteLoss(35)
@@ -90,7 +86,7 @@
new /obj/structure/flora/rock(Lturf)
/obj/structure/divine/trap/ward
/obj/structure/trap/ward
name = "divine ward"
desc = "A divine barrier, It looks like you could destroy it with enough effort, or wait for it to dissipate..."
icon_state = "ward"
@@ -100,6 +96,6 @@
time_between_triggers = 1200 //Exists for 2 minutes
/obj/structure/divine/trap/ward/New()
/obj/structure/trap/ward/New()
..()
QDEL_IN(src, time_between_triggers)