mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Warrant projectors now show an undeployed state when no warrant is loaded (#16022)
* Fixed warrant projectors not displaying their undeployed icon state, as intended with the original sprite. * Fix cl
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/obj/item/device/holowarrant
|
||||
name = "warrant projector"
|
||||
desc = "The practical paperwork replacement for the officer on the go."
|
||||
icon = 'icons/obj/holowarrant.dmi'
|
||||
icon_state = "holowarrant"
|
||||
item_state = "holowarrant"
|
||||
throwforce = 5
|
||||
w_class = ITEMSIZE_SMALL
|
||||
throw_speed = 4
|
||||
@@ -11,7 +13,7 @@
|
||||
var/activename = null
|
||||
var/activecharges = null
|
||||
var/activeauth = null //Currently active warrant
|
||||
var/activetype = null //Is this a search or arrest warrtant?
|
||||
var/activetype = null //Is this a search or arrest warrant?
|
||||
|
||||
//look at it
|
||||
/obj/item/device/holowarrant/examine(mob/user)
|
||||
@@ -21,13 +23,18 @@
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
show_content(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You have to go closer if you want to read it.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You have to go closer if you want to read it."))
|
||||
|
||||
//hit yourself with it
|
||||
/obj/item/device/holowarrant/attack_self(mob/living/user as mob)
|
||||
sync(user)
|
||||
if(activename)
|
||||
activename = null
|
||||
activecharges = null
|
||||
activeauth = null
|
||||
activetype = null
|
||||
if(!storedwarrant.len)
|
||||
to_chat(user, "There seem to be no warrants stored in the device.")
|
||||
to_chat(user, SPAN_NOTICE("There are no warrants available at this time."))
|
||||
return
|
||||
var/temp
|
||||
temp = input(usr, "Which warrant would you like to load?") as null|anything in storedwarrant
|
||||
@@ -37,19 +44,29 @@
|
||||
activecharges = W.notes
|
||||
activeauth = W.authorization
|
||||
activetype = W.wtype
|
||||
update_icon()
|
||||
|
||||
//hit other people with it
|
||||
/obj/item/device/holowarrant/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
user.visible_message("<span class='notice'>[user] holds up a warrant projector and shows the contents to [M]. </span>", \
|
||||
"<span class='notice'>You show the warrant to [M]. </span>")
|
||||
M.examinate(src)
|
||||
if(activename)
|
||||
user.visible_message(SPAN_NOTICE("[user] holds up a warrant projector and shows the contents to [M]."), \
|
||||
SPAN_NOTICE("You show the warrant to [M]."))
|
||||
M.examinate(src)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("There are no warrants loaded!"))
|
||||
|
||||
/obj/item/device/holowarrant/update_icon()
|
||||
if(activename)
|
||||
icon_state = "holowarrant_filled"
|
||||
else
|
||||
icon_state = "holowarrant"
|
||||
|
||||
//sync with database
|
||||
/obj/item/device/holowarrant/proc/sync(var/mob/user)
|
||||
storedwarrant = list()
|
||||
for(var/datum/record/warrant/W in SSrecords.warrants)
|
||||
storedwarrant += W.name
|
||||
to_chat(user, "<span class='notice'>The device hums faintly as it syncs with the station database</span>")
|
||||
to_chat(user, SPAN_NOTICE("The device hums faintly as it syncs with the station database."))
|
||||
|
||||
/obj/item/device/holowarrant/proc/show_content(mob/user, forceshow)
|
||||
if(activetype == "arrest")
|
||||
|
||||
Reference in New Issue
Block a user