Fix alarms triggering on non-contact levels, spectral blade ghost fix, assigning outfits runtime fix

This commit is contained in:
Mark van Alphen
2019-06-03 17:39:23 +02:00
parent 264f019658
commit 94eb652f15
11 changed files with 106 additions and 97 deletions
+12 -12
View File
@@ -93,14 +93,14 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
icon = 'icons/obj/stationobjs.dmi'
icon_state = "glassbox20"
desc = "A display case for prized possessions. It taunts you to kick it."
density = 1
anchored = 1
unacidable = 1 //Dissolving the case would also delete the contents.
density = TRUE
anchored = TRUE
unacidable = TRUE //Dissolving the case would also delete the contents.
var/health = 30
var/obj/item/occupant = null
var/destroyed = 0
var/locked = 0
var/burglar_alarm = 0
var/destroyed = FALSE
var/locked = FALSE
var/burglar_alarm = FALSE
var/ue = null
var/image/occupant_overlay = null
var/obj/item/airlock_electronics/circuit
@@ -116,8 +116,8 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
/obj/structure/displaycase/captains_laser
name = "captain's display case"
desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system."
burglar_alarm = 1
locked = 1
burglar_alarm = TRUE
locked = TRUE
req_access = list(access_captain)
start_showpiece_type = /obj/item/gun/energy/laser/captain
@@ -205,7 +205,7 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
return
/obj/structure/displaycase/proc/burglar_alarm()
if(burglar_alarm)
if(burglar_alarm && is_station_contact(z))
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
visible_message("<span class='danger'>The burglar alarm goes off!</span>")
@@ -215,10 +215,10 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
sleep(74) // 7.4 seconds long
/obj/structure/displaycase/update_icon()
if(src.destroyed)
src.icon_state = "glassbox2b"
if(destroyed)
icon_state = "glassbox2b"
else
src.icon_state = "glassbox2[locked]"
icon_state = "glassbox2[locked]"
overlays = 0
if(occupant)
var/icon/occupant_icon=getFlatIcon(occupant)