Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a cargo-locked disabler to the quartermaster's locker #4270

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
new /obj/item/storage/bag/garment/quartermaster(src)
new /obj/item/encryptionkey/headset_cargo(src) // monkestation edit - An extra encryption key for someone joining Cargyptia
new /obj/item/cargo_teleporter(src) // monkestation edit - singular roundstart cargo teleporter
new /obj/item/gun/energy/disabler/cargo(src) // monkestation edit - a single disabler that can only be used in parts of cargo

/obj/structure/closet/secure_closet/quartermaster/populate_contents_immediate()
. = ..()
Expand Down
2 changes: 2 additions & 0 deletions monkestation/code/modules/projectiles/guns/energy/stun.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/obj/item/gun/energy/disabler/cargo
pin = /obj/item/firing_pin/cargo/unremovable
21 changes: 21 additions & 0 deletions monkestation/code/modules/projectiles/pins.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/obj/item/firing_pin/cargo //Firing pin for use in cargo only
name = "cargo-locked firing pin"
desc = "A firing pin that scans the area to check if it is within the station's cargo bay or warehouse before firing."
fail_message = "Area check failed"
var/list/station_cargo = list(
/area/station/cargo/warehouse,
/area/station/cargo/storage,
/area/station/cargo/office,
/area/station/cargo/sorting,
)

//Checks to see if the user in cargo or it's warehouse
/obj/item/firing_pin/cargo/pin_auth(mob/living/user)
if(!istype(user))
return FALSE
if (is_type_in_list(get_area(user), station_cargo))
return TRUE
return FALSE

/obj/item/firing_pin/cargo/unremovable
pin_removable = FALSE
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7784,9 +7784,11 @@
#include "monkestation\code\modules\power\singularity\particle_accelerator\particle_controller.dm"
#include "monkestation\code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
#include "monkestation\code\modules\projectiles\gun.dm"
#include "monkestation\code\modules\projectiles\pins.dm"
#include "monkestation\code\modules\projectiles\ammunition\_ammunition.dm"
#include "monkestation\code\modules\projectiles\guns\ballistic\revolver.dm"
#include "monkestation\code\modules\projectiles\guns\ballistic\ryanecorp_whispering_jester.dm"
#include "monkestation\code\modules\projectiles\guns\energy\stun.dm"
#include "monkestation\code\modules\projectiles\guns\special\meat_hook.dm"
#include "monkestation\code\modules\projectiles\projectile\spells.dm"
#include "monkestation\code\modules\projectiles\projectile\bullets\c45_caseless.dm"
Expand Down
Loading