Security Pen and Penlight improvement (#79299)

## About The Pull Request
Improves penlight sprite and code.

A new type of pen has been introduced - the Security Pen. This pen is
red and can create a holograph around a person, similar to a medical
penlight. The holograph prompts the person to surrender for 30 seconds,
and the holograph itself is visible for 5. There is a 30-second cooldown
between usage.

Holosign itself does nothing except be visual, just like medical
holosign **(DO NOT MISTAKE HOLOSIGNS FOR HOLOBARRIERS)**


https://github.com/tgstation/tgstation/assets/42353186/1ee5f794-7218-4e52-b04f-3ebb50bd224a

Now every Security member spawns with a Security Pen in their PDA.

Now you can print Security Pens at Security Techfab, and Penlights at
Medical Techfab.
## Why It's Good For The Game
The only way to prompt someone to perform the surrender emote is by
holding them up with a gun. However, this mechanic can be quite
unreliable, even after updates, especially if the person is moving. As a
result, many players are unaware of how to prompt the surrender emote or
even about its existence, so they don't know they can trigger it
themselves by typing "*surrender".
This enables non-lethal arrests without stun batons or other tools.

Sprites are a significant improvement as the previous penlight sprites
were outdated.
## Changelog
🆑
qol: There is now a more convenient way to prompt surrender to emote -
the Security Pen. Each officer is equipped with one in their PDA. Simply
click someone with it to prompt a 30-second surrender. They are
printable at Security Techfab as well.
qol: Penlights now are printable at Medical Techfab.
image: Penlights got a new cleaner sprite to replace its ancient one
code: The code for Penlight's holographic sign has been improved.
/🆑
This commit is contained in:
DrTuxedo
2023-11-01 21:00:09 +00:00
committed by GitHub
parent 35fc15d53e
commit b5654d7203
12 changed files with 117 additions and 10 deletions
+1
View File
@@ -197,6 +197,7 @@ GLOBAL_LIST_INIT(security_vest_allowed, list(
/obj/item/storage/belt/holster/nukie,
/obj/item/storage/belt/holster/energy,
/obj/item/gun/ballistic/shotgun/automatic/combat/compact,
/obj/item/pen/red/security,
))
GLOBAL_LIST_INIT(security_wintercoat_allowed, list(
+16
View File
@@ -334,6 +334,22 @@
owner.emote("surrender")
///For when you need to make someone be prompted for surrender, but not forever
/datum/status_effect/surrender_timed
id = "surrender_timed"
duration = 30 SECONDS
status_type = STATUS_EFFECT_UNIQUE
alert_type = null
/datum/status_effect/surrender_timed/on_apply()
owner.apply_status_effect(/datum/status_effect/grouped/surrender, REF(src))
return ..()
/datum/status_effect/surrender_timed/on_remove()
owner.remove_status_effect(/datum/status_effect/grouped/surrender, REF(src))
return ..()
/*
* A status effect used for preventing caltrop message spam
*
+18 -10
View File
@@ -294,25 +294,33 @@
w_class = WEIGHT_CLASS_TINY
flags_1 = CONDUCT_1
light_range = 2
var/holo_cooldown = 0
COOLDOWN_DECLARE(holosign_cooldown)
/obj/item/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(!proximity_flag)
if(holo_cooldown > world.time)
to_chat(user, span_warning("[src] is not ready yet!"))
return
var/T = get_turf(target)
if(locate(/mob/living) in T)
new /obj/effect/temp_visual/medical_holosign(T,user) //produce a holographic glow
holo_cooldown = world.time + 10 SECONDS
return
if(proximity_flag)
return
if(!COOLDOWN_FINISHED(src, holosign_cooldown))
balloon_alert(user, "not ready!")
return
var/target_turf = get_turf(target)
var/mob/living/living_target = locate(/mob/living) in target_turf
if(!living_target || (living_target == user))
return
to_chat(living_target, span_boldnotice("[user] is offering medical assistance; please halt your actions."))
new /obj/effect/temp_visual/medical_holosign(target_turf, user) //produce a holographic glow
COOLDOWN_START(src, holosign_cooldown, 10 SECONDS)
// see: [/datum/wound/burn/flesh/proc/uv()]
/obj/item/flashlight/pen/paramedic
name = "paramedic penlight"
desc = "A high-powered UV penlight intended to help stave off infection in the field on serious burned patients. Probably really bad to look into."
icon_state = "penlight_surgical"
light_color = LIGHT_COLOR_PURPLE
/// Our current UV cooldown
COOLDOWN_DECLARE(uv_cooldown)
/// How long between UV fryings
@@ -47,6 +47,7 @@
name = "head of security PDA"
greyscale_config = /datum/greyscale_config/tablet/head
greyscale_colors = "#EA3232#0000CC"
inserted_item = /obj/item/pen/red/security
starting_programs = list(
/datum/computer_file/program/crew_manifest,
/datum/computer_file/program/status,
@@ -122,6 +123,7 @@
/obj/item/modular_computer/pda/security
name = "security PDA"
greyscale_colors = "#EA3232#0000cc"
inserted_item = /obj/item/pen/red/security
starting_programs = list(
/datum/computer_file/program/records/security,
/datum/computer_file/program/crew_manifest,
@@ -131,6 +133,7 @@
/obj/item/modular_computer/pda/detective
name = "detective PDA"
greyscale_colors = "#805A2F#990202"
inserted_item = /obj/item/pen/red/security
starting_programs = list(
/datum/computer_file/program/records/security,
/datum/computer_file/program/crew_manifest,
@@ -141,6 +144,7 @@
name = "warden PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_double
greyscale_colors = "#EA3232#0000CC#363636"
inserted_item = /obj/item/pen/red/security
starting_programs = list(
/datum/computer_file/program/records/security,
/datum/computer_file/program/crew_manifest,
+41
View File
@@ -400,3 +400,44 @@
. = ..()
icon_state = "[initial(icon_state)][HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE) ? "_out" : null]"
inhand_icon_state = initial(inhand_icon_state) //since transforming component switches the icon.
//The Security holopen
/obj/item/pen/red/security
name = "security pen"
desc = "This is a red ink pen exclusively provided to members of the Security Department. Its opposite end features a built-in holographic projector designed for issuing arrest prompts to individuals."
icon_state = "pen_sec"
COOLDOWN_DECLARE(holosign_cooldown)
/obj/item/pen/red/security/examine(mob/user)
. = ..()
. += span_notice("To initiate the surrender prompt, simply click on an individual within your proximity.")
//Code from the medical penlight
/obj/item/pen/red/security/afterattack(atom/target, mob/living/user, proximity)
. = ..()
if(!COOLDOWN_FINISHED(src, holosign_cooldown))
balloon_alert(user, "not ready!")
return
var/target_turf = get_turf(target)
var/mob/living/living_target = locate(/mob/living) in target_turf
if(!living_target || (living_target == user))
return
living_target.apply_status_effect(/datum/status_effect/surrender_timed)
to_chat(living_target, span_userdanger("[user] requests your immediate surrender! You are given 30 seconds to comply!"))
new /obj/effect/temp_visual/security_holosign(target_turf, user) //produce a holographic glow
COOLDOWN_START(src, holosign_cooldown, 30 SECONDS)
/obj/effect/temp_visual/security_holosign
name = "security holosign"
desc = "A small holographic glow that indicates you're under arrest."
icon_state = "sec_holo"
duration = 60
/obj/effect/temp_visual/security_holosign/Initialize(mapload, creator)
. = ..()
playsound(loc, 'sound/machines/chime.ogg', 50, FALSE) //make some noise!
if(creator)
visible_message(span_danger("[creator] created a security hologram!"))
@@ -359,6 +359,28 @@
)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL
/datum/design/penlight
name = "Penlight"
id = "penlight"
build_type = PROTOLATHE | AWAY_LATHE
materials = list(/datum/material/iron =SMALL_MATERIAL_AMOUNT*5, /datum/material/glass =SMALL_MATERIAL_AMOUNT*0.5)
build_path = /obj/item/flashlight/pen
category = list(
RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_MEDICAL
)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL
/datum/design/penlight_paramedic
name = "Paramedic Penlight"
id = "penlight_paramedic"
build_type = PROTOLATHE | AWAY_LATHE
materials = list(/datum/material/iron =SMALL_MATERIAL_AMOUNT*5, /datum/material/glass =SMALL_MATERIAL_AMOUNT*1)
build_path = /obj/item/flashlight/pen/paramedic
category = list(
RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_MEDICAL
)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL
/////////////////////////////////////////
//////////Cybernetic Implants////////////
/////////////////////////////////////////
@@ -819,6 +819,17 @@
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY
/datum/design/sec_pen
name = "Security Pen"
id = "sec_pen"
build_type = PROTOLATHE | AUTOLATHE
materials = list(/datum/material/iron =SMALL_MATERIAL_AMOUNT)
build_path = /obj/item/pen/red/security
category = list(
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SECURITY
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY
/datum/design/plumbing_rcd
name = "Plumbing Constructor"
id = "plumbing_rcd"
@@ -98,6 +98,7 @@
"sec_dart",
"sec_Islug",
"sec_rshot",
"sec_pen",
"servingtray",
"shaker",
"shot_glass",
@@ -298,6 +299,7 @@
"plumbing_rcd_service",
"plumbing_rcd_sci",
"portable_chem_mixer",
"penlight",
"retractor",
"scalpel",
"stethoscope",
@@ -416,6 +418,7 @@
"medigel",
"medipen_refiller",
"pandemic",
"penlight_paramedic",
"soda_dispenser",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 KiB

After

Width:  |  Height:  |  Size: 936 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

+1
View File
@@ -94,6 +94,7 @@ As a Security Officer, mindshield implants can only prevent someone from being t
As a Security Officer, remember that correlation does not equal causation. Someone may have just been at the wrong place at the wrong time!
As a Security Officer, remember that you can attach a sec-lite to your disabler or your helmet!
As a Security Officer, your sechuds or HUDsunglasses can not only see crewmates' job assignments and criminal status, but also if they are mindshield implanted. You can tell by the flashing blue outline around their job icon. Use this to your advantage in a revolution to definitively tell who is on your side!
As a Security Officer, you have a special pen in your PDA that you can use to prompt people to surrender. This will stun them without the need to use a baton!
As a Service Cyborg, your spray can knocks people down. However, it is blocked by masks and glasses.
As a Shaft Miner, always have a GPS on you, so a fellow miner or cyborg can come to save you if you die.
As a Shaft Miner, every monster on Lavaland has a pattern you can exploit to minimize damage from the encounters.