Skip to content

Commit

Permalink
[MIRROR] Security Pen and Penlight improvement [MDB IGNORE] (#24727)
Browse files Browse the repository at this point in the history
* Security Pen and Penlight improvement

* Update inventory.dm

---------

Co-authored-by: DrTuxedo <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored and FFMirrorBot committed Nov 1, 2023
1 parent a2758f6 commit 130beba
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 10 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,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,
/obj/item/gun/microfusion, //SKYRAT EDIT ADDITION
))

Expand Down
16 changes: 16 additions & 0 deletions code/datums/status_effects/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
28 changes: 18 additions & 10 deletions code/game/objects/items/devices/flashlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,25 +295,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
41 changes: 41 additions & 0 deletions code/modules/paperwork/pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!"))
22 changes: 22 additions & 0 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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////////////
/////////////////////////////////////////
Expand Down
11 changes: 11 additions & 0 deletions code/modules/research/designs/misc_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"sec_dart",
"sec_Islug",
"sec_rshot",
"sec_pen",
"servingtray",
"shaker",
"shot_glass",
Expand Down Expand Up @@ -299,6 +300,7 @@
"plumbing_rcd_service",
"plumbing_rcd_sci",
"portable_chem_mixer",
"penlight",
"retractor",
"scalpel",
"stethoscope",
Expand Down Expand Up @@ -417,6 +419,7 @@
"medigel",
"medipen_refiller",
"pandemic",
"penlight_paramedic",
"soda_dispenser",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
Expand Down
Binary file modified icons/effects/effects.dmi
Binary file not shown.
Binary file modified icons/obj/lighting.dmi
Binary file not shown.
Binary file modified icons/obj/service/bureaucracy.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions strings/tips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 130beba

Please sign in to comment.