mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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,7 +192,6 @@
|
||||
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.
|
||||
@@ -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.
|
||||
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"
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
/mob/living/simple_mob/construct/cultify()
|
||||
return
|
||||
|
||||
/mob/living/simple_mob/construct/New()
|
||||
..()
|
||||
/mob/living/simple_mob/construct/Initialize(mapload)
|
||||
. = ..()
|
||||
name = text("[initial(name)] ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
for(var/spell in construct_spells)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
..()
|
||||
if(spell_masters)
|
||||
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
|
||||
spell_master.toggle_open(1)
|
||||
spell_master.toggle_open()
|
||||
client.screen -= spell_master
|
||||
|
||||
// TODO: Investigate if this matters
|
||||
|
||||
Reference in New Issue
Block a user