diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index 2028b2c1f51..5b2881f0f60 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -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, "You have to go closer if you want to read it.") + 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("[user] holds up a warrant projector and shows the contents to [M]. ", \ - "You show the warrant to [M]. ") - 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, "The device hums faintly as it syncs with the station database") + 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") diff --git a/html/changelogs/generalcamo - warrant fix.yml b/html/changelogs/generalcamo - warrant fix.yml new file mode 100644 index 00000000000..3bca1fdd208 --- /dev/null +++ b/html/changelogs/generalcamo - warrant fix.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Warrant projectors now use their intended iconstate when not displaying a warrant." + - imageadd: "Added missing iconstate for warrant projects." \ No newline at end of file diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index cbf4c164ec2..cce3bd822bd 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/holowarrant.dmi b/icons/obj/holowarrant.dmi new file mode 100644 index 00000000000..ec63c7d9cf9 Binary files /dev/null and b/icons/obj/holowarrant.dmi differ