Fixes the party alarm (#2082)
This commit is contained in:
committed by
kevinz000
parent
75bf8aa73c
commit
5db90b28dc
@@ -262,39 +262,6 @@
|
||||
name = "\improper PARTY BUTTON"
|
||||
desc = "Cuban Pete is in the house!"
|
||||
|
||||
/obj/machinery/firealarm/partyalarm/attack_hand(mob/user)
|
||||
if((user.stat && !IsAdminGhost(user)) || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if (buildstage != 2)
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/area/A = src.loc
|
||||
var/d1
|
||||
var/dat
|
||||
if(ishuman(user) || user.has_unlimited_silicon_privilege)
|
||||
A = A.loc
|
||||
|
||||
if (A.party)
|
||||
d1 = text("<A href='?src=\ref[];reset=1'>No Party :(</A>", src)
|
||||
else
|
||||
d1 = text("<A href='?src=\ref[];alarm=1'>PARTY!!!</A>", src)
|
||||
dat = text("<HTML><HEAD></HEAD><BODY><TT><B>Party Button</B> []</BODY></HTML>", d1)
|
||||
|
||||
else
|
||||
A = A.loc
|
||||
if (A.fire)
|
||||
d1 = text("<A href='?src=\ref[];reset=1'>[]</A>", src, stars("No Party :("))
|
||||
else
|
||||
d1 = text("<A href='?src=\ref[];alarm=1'>[]</A>", src, stars("PARTY!!!"))
|
||||
dat = text("<HTML><HEAD></HEAD><BODY><TT><B>[]</B> []", stars("Party Button"), d1)
|
||||
|
||||
var/datum/browser/popup = new(user, "firealarm", "Party Alarm")
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/partyalarm/reset()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
@@ -317,3 +284,8 @@
|
||||
for(var/area/RA in A.related)
|
||||
RA.partyalert()
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/partyalarm/ui_data(mob/user)
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
.["alarm"] = A.party
|
||||
|
||||
Reference in New Issue
Block a user