mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] fixes constructs (#10176)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ad9e7bd513
commit
914b76a320
@@ -46,8 +46,7 @@
|
||||
/spell/aoe_turf/conjure/floor/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
|
||||
animation.icon_state = "cultfloor"
|
||||
flick("cultfloor",animation)
|
||||
spawn(10)
|
||||
qdel(animation)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), animation), 1 SECOND)
|
||||
|
||||
/spell/aoe_turf/conjure/wall
|
||||
name = "Lesser Construction"
|
||||
@@ -65,8 +64,7 @@
|
||||
/spell/aoe_turf/conjure/wall/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
|
||||
animation.icon_state = "cultwall"
|
||||
flick("cultwall",animation)
|
||||
spawn(10)
|
||||
qdel(animation)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), animation), 1 SECOND)
|
||||
|
||||
/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
@@ -194,15 +192,14 @@
|
||||
return */
|
||||
for(var/turf/T in targets)
|
||||
for(var/obj/machinery/door/door in T.contents)
|
||||
spawn(1)
|
||||
if(istype(door,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/AL = door
|
||||
AL.locked = 0 //The spirits of the damned care not for your locks.
|
||||
AL.welded = 0 //Or your welding tools.
|
||||
else if(istype(door, /obj/machinery/door/firedoor))
|
||||
var/obj/machinery/door/firedoor/FD = door
|
||||
FD.blocked = 0
|
||||
door.open(1)
|
||||
if(istype(door,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/AL = door
|
||||
AL.locked = 0 //The spirits of the damned care not for your locks.
|
||||
AL.welded = 0 //Or your welding tools.
|
||||
else if(istype(door, /obj/machinery/door/firedoor))
|
||||
var/obj/machinery/door/firedoor/FD = door
|
||||
FD.blocked = 0
|
||||
door.open(1)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -523,19 +520,23 @@
|
||||
return P
|
||||
|
||||
/obj/item/spell/construct/projectile/proc/set_up(atom/hit_atom, mob/living/user)
|
||||
if(spell_projectile)
|
||||
if(pay_energy(energy_cost_per_shot))
|
||||
if(pre_shot_delay)
|
||||
var/image/target_image = image(icon = 'icons/obj/spells.dmi', loc = get_turf(hit_atom), icon_state = "target")
|
||||
user << target_image
|
||||
user.Stun(pre_shot_delay / 10)
|
||||
sleep(pre_shot_delay)
|
||||
qdel(target_image)
|
||||
if(owner)
|
||||
return TRUE
|
||||
return FALSE // We got dropped before the firing occured.
|
||||
return TRUE // No delay, no need to check.
|
||||
return FALSE
|
||||
if(!spell_projectile || !pay_energy(energy_cost_per_shot) || !owner)
|
||||
return FALSE
|
||||
if(!pre_shot_delay)
|
||||
return TRUE
|
||||
var/succeeded = FALSE
|
||||
|
||||
var/turf/T = get_turf(hit_atom)
|
||||
var/image/target_image = image(icon = 'icons/obj/spells.dmi', icon_state = "target")
|
||||
|
||||
T.add_overlay(target_image)
|
||||
|
||||
if(do_after(user, pre_shot_delay))
|
||||
succeeded = TRUE
|
||||
|
||||
T.cut_overlay(target_image)
|
||||
qdel(target_image)
|
||||
return succeeded
|
||||
|
||||
/obj/item/spell/construct/spawner
|
||||
name = "spawner template"
|
||||
|
||||
Reference in New Issue
Block a user