mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-19 05:09:49 +01:00
d5849910e5
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
128 lines
5.1 KiB
Plaintext
128 lines
5.1 KiB
Plaintext
/obj/item/holowarrant
|
|
name = "warrant projector"
|
|
desc = "The practical paperwork replacement for the officer on the go."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "holowarrant"
|
|
item_state = "flashtool"
|
|
throwforce = 5
|
|
w_class = ITEMSIZE_SMALL
|
|
throw_speed = 4
|
|
throw_range = 10
|
|
var/datum/data/record/warrant/active
|
|
pickup_sound = 'sound/items/pickup/device.ogg'
|
|
drop_sound = 'sound/items/drop/device.ogg'
|
|
|
|
//look at it
|
|
/obj/item/holowarrant/examine(mob/user)
|
|
. = ..()
|
|
if(active)
|
|
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
|
|
if(in_range(user, src) || isobserver(user))
|
|
show_content(user) //Opens a browse window, not chatbox related
|
|
else
|
|
. += span_notice("You have to go closer if you want to read it.")
|
|
|
|
//hit yourself with it
|
|
/obj/item/holowarrant/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
active = null
|
|
var/list/warrants = list()
|
|
if(!isnull(GLOB.data_core.general))
|
|
for(var/datum/data/record/warrant/W in GLOB.data_core.warrants)
|
|
warrants += W.fields["namewarrant"]
|
|
if(warrants.len == 0)
|
|
to_chat(user,span_notice("There are no warrants available"))
|
|
return
|
|
var/temp
|
|
temp = tgui_input_list(user, "Which warrant would you like to load?", "Warrant Selection", warrants)
|
|
for(var/datum/data/record/warrant/W in GLOB.data_core.warrants)
|
|
if(W.fields["namewarrant"] == temp)
|
|
active = W
|
|
update_icon()
|
|
|
|
/obj/item/holowarrant/attackby(obj/item/W, mob/user)
|
|
if(active)
|
|
var/obj/item/card/id/I = W.GetIdCard()
|
|
if(ACCESS_HOS in I.GetAccess()) // VOREStation edit
|
|
var/choice = tgui_alert(user, "Would you like to authorize this warrant?","Warrant authorization",list("Yes","No"))
|
|
if(choice == "Yes")
|
|
active.fields["auth"] = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]"
|
|
user.visible_message(span_notice("You swipe \the [I] through the [src]."), \
|
|
span_notice("[user] swipes \the [I] through the [src]."))
|
|
return 1
|
|
to_chat(user, span_warning("You don't have the access to do this!")) // VOREStation edit
|
|
return 1
|
|
..()
|
|
|
|
//hit other people with it
|
|
/obj/item/holowarrant/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
user.visible_message(span_notice("You show the warrant to [M]."), \
|
|
span_notice("[user] holds up a warrant projector and shows the contents to [M]."))
|
|
M.examinate(src)
|
|
|
|
/obj/item/holowarrant/update_icon()
|
|
if(active)
|
|
icon_state = "holowarrant_filled"
|
|
else
|
|
icon_state = "holowarrant"
|
|
|
|
/obj/item/holowarrant/proc/show_content(mob/user, forceshow)
|
|
if(!active)
|
|
return
|
|
if(active.fields["arrestsearch"] == "arrest")
|
|
var/output = {"
|
|
<HTML><HEAD><TITLE>[active.fields["namewarrant"]]</TITLE></HEAD>
|
|
<BODY bgcolor='#FFFFFF'><center><large><b>Commonwealth Security Bond Association</b></large></br>
|
|
in the jurisdiction of the</br>
|
|
[using_map.boss_name] in [using_map.station_name]</br>
|
|
</br>
|
|
<b>ARREST WARRANT</b></center></br>
|
|
</br>
|
|
This document serves as authorization and notice for the arrest of _<u>[active.fields["namewarrant"]]</u>____ for the crime(s) of:</br>[active.fields["charges"]]</br>
|
|
</br>
|
|
Vessel or habitat: _<u>[using_map.station_name]</u>____</br>
|
|
</br>_<u>[active.fields["auth"]]</u>____</br>
|
|
<small>Person authorizing arrest</small></br>
|
|
</BODY></HTML>
|
|
"}
|
|
|
|
show_browser(user, output, "window=Warrant for the arrest of [active.fields["namewarrant"]]")
|
|
if(active.fields["arrestsearch"] == "search")
|
|
var/output= {"
|
|
<HTML><HEAD><TITLE>Search Warrant: [active.fields["namewarrant"]]</TITLE></HEAD>
|
|
<BODY bgcolor='#FFFFFF'><center>in the jurisdiction of the</br>
|
|
[using_map.boss_name] in [using_map.station_name]</br>
|
|
</br>
|
|
<b>SEARCH WARRANT</b></center></br>
|
|
</br>
|
|
<small><i>The Security Officer(s) bearing this Warrant are hereby authorized by the Issuer </br>
|
|
to conduct a one time lawful search of the Suspect's person/belongings/premises and/or Department </br>
|
|
for any items and materials that could be connected to the suspected criminal act described below, </br>
|
|
pending an investigation in progress. The Security Officer(s) are obligated to remove any and all</br>
|
|
such items from the Suspect's possession and/or Department and file it as evidence. The Suspect/Department </br>
|
|
staff is expected to offer full co-operation. In the event of the Suspect/Department staff attempting </br>
|
|
to resist/impede this search or flee, they must be taken into custody immediately! </br>
|
|
All confiscated items must be filed and taken to Evidence!</small></i></br>
|
|
</br>
|
|
<b>Suspect's/location name: </b>[active.fields["namewarrant"]]</br>
|
|
</br>
|
|
<b>For the following reasons: </b> [active.fields["charges"]]</br>
|
|
</br>
|
|
<b>Warrant issued by: </b> [active.fields ["auth"]]</br>
|
|
</br>
|
|
Vessel or habitat: _<u>[using_map.station_name]</u>____</br>
|
|
</BODY></HTML>
|
|
"}
|
|
show_browser(user, output, "window=Search warrant for [active.fields["namewarrant"]]")
|
|
|
|
/obj/item/storage/box/holowarrants // VOREStation addition starts
|
|
name = "holowarrant devices"
|
|
desc = "A box of holowarrant displays for security use."
|
|
|
|
/obj/item/storage/box/holowarrants/Initialize(mapload)
|
|
. = ..()
|
|
for(var/i = 0 to 3)
|
|
new /obj/item/holowarrant(src) // VOREStation addition ends
|