Ports /tg/'s meteor implementation.

Merges the two meteor events into one, and now takes severity into consideration instead.
Including the basic meteors there are also new types ranging from flaming to radioactive which may drop appropriate types of ore.
This commit is contained in:
PsiOmegaDelta
2015-06-05 14:58:35 +02:00
parent 5844b836e9
commit a07d20d657
50 changed files with 276 additions and 443 deletions
@@ -210,13 +210,6 @@
A.loc = src.loc
qdel(src)
/obj/structure/closet/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
src.dump_contents()
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
@@ -80,12 +80,15 @@
/obj/structure/closet/statue/toggle()
return
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
/obj/structure/closet/statue/proc/check_health()
if(health <= 0)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
check_health()
return
/obj/structure/closet/statue/attack_generic(var/mob/user, damage, attacktext, environment_smash)
@@ -97,19 +100,17 @@
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
shatter(M)
/obj/structure/closet/statue/ex_act(severity)
for(var/mob/M in src)
M.ex_act(severity)
health -= 60 / severity
check_health()
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
if(health <= 0)
for(var/mob/M in src)
shatter(M)
check_health()
/obj/structure/closet/statue/MouseDrop_T()
return
@@ -43,13 +43,6 @@
occupied = 0
qdel(src)
/obj/structure/displaycase/meteorhit(obj/O as obj)
new /obj/item/weapon/material/shard( src.loc )
new /obj/item/weapon/gun/energy/captain( src.loc )
qdel(src)
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
-3
View File
@@ -19,9 +19,6 @@
/obj/structure/grille/blob_act()
qdel(src)
/obj/structure/grille/meteorhit(var/obj/M)
qdel(src)
/obj/structure/grille/update_icon()
if(destroyed)
icon_state = "[initial(icon_state)]-b"
@@ -63,9 +63,6 @@
/obj/structure/inflatable/blob_act()
deflate(1)
/obj/structure/inflatable/meteorhit()
deflate(1)
/obj/structure/inflatable/attack_hand(mob/user as mob)
add_fingerprint(user)
return
@@ -39,13 +39,6 @@
Break()
qdel(src)
/obj/structure/lamarr/meteorhit(obj/O as obj)
new /obj/item/weapon/material/shard( src.loc )
Break()
qdel(src)
/obj/structure/lamarr/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
-5
View File
@@ -167,11 +167,6 @@ obj/structure/safe/blob_act()
obj/structure/safe/ex_act(severity)
return
obj/structure/safe/meteorhit(obj/O as obj)
return
//FLOOR SAFES
/obj/structure/safe/floor
name = "floor safe"
-4
View File
@@ -125,10 +125,6 @@
/obj/structure/window/blob_act()
shatter()
/obj/structure/window/meteorhit()
shatter()
//TODO: Make full windows a separate type of window.
//Once a full window, it will always be a full window, so there's no point
//having the same type for both.