Bedshaped's Bugfixes 5 (#1146)

Fixes #1056 
Fixes #1036 
Fixes #1127 
Fixes #1135 
Fixes #1112, increases their health.
Quiets the bosun's whistle for night lighting.
This commit is contained in:
Bedshaped
2016-11-11 22:20:21 +02:00
committed by skull132
parent 10d09f78cc
commit fbaf8c61a3
7 changed files with 31 additions and 14 deletions
@@ -21,7 +21,7 @@
if(istype(A, /turf/simulated/floor))
var/turf/simulated/floor/F = A
if(F.is_steel_floor()) // only tiled floors
if(!is_type_in_list(F, subtypesof(/turf/simulated/floor))) // only tiled floors
if(tile_dir_mode)
var/D = get_dir(usr, F)
if(usr.loc == F)
@@ -13,7 +13,7 @@
//icon_state = "inactive"
w_class = 3
req_access = list(access_cent_specops)
health = 90
health = 150
var/department = "CENTCOM"
var/status = 0
@@ -107,13 +107,17 @@
user << "<span class='danger'>You cannot swipe your [I] through [src] with it partially dismantled!</span>"
return
if (istype(I, /obj/item/weapon) && user.a_intent == "hurt")
if (I.force >= 8)
if (istype(I, /obj/item/weapon) && user.a_intent == "harm")
if (I.force >= 18)
user.visible_message("<span class='danger'>[user] bashes [src] with [I]!</span>", "<span class='danger'>You strike [src] with [I], damaging it!</span>")
takedamage(I.force)
playsound(loc, "sound/weapons/genhit[rand(1,3)].ogg", I.force*3, 1)
spawn(3)
playsound(loc, "sound/effects/sparks[rand(1,4)].ogg", 30, 1)
return
else
user.visible_message("<span class='notice'>[user] hits [src] with [I] to no visible effect.</span>", "<span class='notice'>You hit [src] with [I], but it appears to have no effect.</span>")
user.visible_message("<span class='danger'>[user] hits [src] with [I] but fails to damage it.</span>", "<span class='warning'>You hit [src] with [I], [I.force >= 10 ? "and it almost makes a dent!" : "but it appears to have no visible effect."]</span>")
playsound(loc, "sound/weapons/Genhit.ogg", I.force*2.5, 1)
return
switch (constructionstate)
@@ -402,13 +406,14 @@
overlays += "overlay_deconstruct_[constructionstate]"
/obj/item/device/magnetic_lock/proc/takedamage(var/damage)
health -= damage
health -= rand(damage/2, damage)
if (damage >= 40 && prob(50))
health = 0
if (health <= 0)
visible_message("<span class='danger'>[src] sparks[target ? " and falls off of \the [target]!" : "!"] It is now completely unusable!</span>")
detach(0)
status = STATUS_BROKEN
update_icon()
return