module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
+92 -3
View File
@@ -34,6 +34,7 @@
return
if(target.anti_magic_check())
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return
if(iscarbon(target))
var/mob/living/carbon/C = target
C.regenerate_limbs()
@@ -236,7 +237,7 @@
for(var/obj/item/W in contents)
new_mob.equip_to_appropriate_slot(W)
M.log_message("<font color='orange'>became [new_mob.real_name].</font>", INDIVIDUAL_ATTACK_LOG)
M.log_message("became [new_mob.real_name]", LOG_ATTACK, color="orange")
new_mob.a_intent = INTENT_HARM
@@ -244,7 +245,7 @@
to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")
var/poly_msg = CONFIG_GET(keyed_string_list/policy)["polymorph"]
var/poly_msg = CONFIG_GET(keyed_list/policy)["polymorph"]
if(poly_msg)
to_chat(new_mob, poly_msg)
@@ -335,6 +336,91 @@
return
. = ..()
/obj/item/projectile/magic/locker
name = "locker bolt"
icon_state = "locker"
nodamage = TRUE
flag = "magic"
var/weld = TRUE
var/created = FALSE //prevents creation of more then one locker if it has multiple hits
/obj/item/projectile/magic/locker/prehit(atom/A)
if(ismob(A))
var/mob/M = A
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [A]!</span>")
qdel(src)
return
if(M.anchored)
return ..()
M.forceMove(src)
return FALSE
return ..()
/obj/item/projectile/magic/locker/on_hit(target)
if(created)
return ..()
var/obj/structure/closet/decay/C = new(get_turf(src))
if(LAZYLEN(contents))
for(var/atom/movable/AM in contents)
C.insert(AM)
C.welded = weld
C.update_icon()
created = TRUE
return ..()
/obj/item/projectile/magic/locker/Destroy()
for(var/atom/movable/AM in contents)
AM.forceMove(get_turf(src))
. = ..()
/obj/structure/closet/decay
breakout_time = 600
icon_welded = null
var/magic_icon = "cursed"
var/weakened_icon = "decursed"
var/auto_destroy = TRUE
/obj/structure/closet/decay/Initialize()
. = ..()
if(auto_destroy)
addtimer(CALLBACK(src, .proc/bust_open), 5 MINUTES)
addtimer(CALLBACK(src, .proc/magicly_lock), 5)
/obj/structure/closet/decay/proc/magicly_lock()
if(!welded)
return
icon_state = magic_icon
update_icon()
/obj/structure/closet/decay/after_weld(weld_state)
if(weld_state)
unmagify()
/obj/structure/closet/decay/proc/decay()
animate(src, alpha = 0, time = 30)
addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 30)
/obj/structure/closet/decay/open(mob/living/user)
. = ..()
if(.)
if(icon_state == magic_icon) //check if we used the magic icon at all before giving it the lesser magic icon
unmagify()
else
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
/obj/structure/closet/decay/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity/2, target) //Difference is it does half the damage to contents from explosion, to make fireball not completely instakill
CHECK_TICK
/obj/structure/closet/decay/proc/unmagify()
icon_state = weakened_icon
update_icon()
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
icon_welded = "welded"
/obj/item/projectile/magic/aoe
name = "Area Bolt"
desc = "What the fuck does this do?!"
@@ -345,9 +431,10 @@
if(proxdet)
for(var/mob/living/L in range(1, get_turf(src)))
if(L.stat != DEAD && L != firer && !L.anti_magic_check())
return Collide(L)
return Bump(L)
..()
/obj/item/projectile/magic/aoe/lightning
name = "lightning bolt"
icon_state = "tesla_projectile" //Better sprites are REALLY needed and appreciated!~
@@ -423,3 +510,5 @@
var/turf/T = get_turf(target)
for(var/i=0, i<50, i+=10)
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)