Merge pull request #17336 from coiax/coiax-fixes-things

Glass tables break more, Metastation HoP hat fix
This commit is contained in:
Joan Lung
2016-05-04 07:36:37 -04:00
4 changed files with 27 additions and 18 deletions
+19 -15
View File
@@ -264,23 +264,27 @@
canSmoothWith = null
health = 50
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
if(..())
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
new /obj/item/weapon/shard(src.loc)
qdel(src)
/obj/structure/table/glass/Crossed(atom/movable/AM)
. = ..()
if(flags & NODECONSTRUCT)
return
// Don't break if they're just flying past
if(AM.throwing)
return
if(istype(AM, /mob/living))
var/mob/living/M = AM
if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
table_shatter(M)
/obj/structure/table/glass/climb_structure(mob/user)
if(..())
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
new /obj/item/weapon/shard(src.loc)
qdel(src)
user.Weaken(5)
/obj/structure/table/glass/proc/table_shatter(mob/M)
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
var/obj/item/weapon/shard/S = new(src.loc)
S.throw_impact(M)
M.Weaken(5)
qdel(src)
/*
* Wooden tables