Fixes body cameras, buffs Sashes (#269)

* cry about it

* selene SUCKS
This commit is contained in:
John Willard
2021-07-15 08:39:38 -04:00
committed by GitHub
parent d84f47eb61
commit f1825d904a
5 changed files with 45 additions and 49 deletions

View File

@@ -13953,7 +13953,7 @@
/obj/item/grenade/barrier,
/obj/item/grenade/barrier,
/obj/item/grenade/barrier,
/obj/item/clothing/under/bodysash/warden,
/obj/item/clothing/under/bodysash/security/warden,
/obj/machinery/status_display/ai/directional/west{
pixel_y = 32
},
@@ -76077,7 +76077,7 @@
/area/service/library/printer)
"tLO" = (
/obj/structure/closet/secure_closet/detective,
/obj/item/clothing/under/bodysash/detective,
/obj/item/clothing/under/bodysash/security/detective,
/turf/open/floor/iron/grimy,
/area/security/detectives_office)
"tLR" = (
@@ -92494,7 +92494,7 @@
/obj/item/storage/secure/safe/hos{
pixel_x = -25
},
/obj/item/clothing/under/bodysash/hos,
/obj/item/clothing/under/bodysash/security/hos,
/turf/open/floor/iron/dark,
/area/command/heads_quarters/hos)
"xYf" = (

View File

@@ -1,23 +1,22 @@
/// Security Jumpsuit
/obj/item/clothing/under/rank/security
// This is all useless for non Security jumpsuits.
/obj/item/clothing/under
var/upgraded = FALSE
var/obj/machinery/camera/builtInCamera = null
var/registrant
/obj/item/clothing/under/rank/security/examine(mob/user)
/obj/item/clothing/under/examine(mob/user)
. = ..()
if(!upgraded)
. += "It appears to have an empty slot for a <b>body camera upgrade</b>."
return
if(builtInCamera)
. += "Its body camera appears to be <b>active</b>."
else
. += "Its body camera appears to be <b>inactive</b>."
. += "It appears to have an <b>active</b> body camera attached."
/// Modifying the Jumpsuit
/obj/item/clothing/under/rank/security/attackby(obj/item/W, mob/user, params)
/obj/item/clothing/under/attackby(obj/item/W, mob/user, params)
. = ..()
/// Using a bodycam on the jumpsuit, upgrading it
// Are we a security jumpsuit? If not, we can't do anything special, so return here.
if(!istype(src, /obj/item/clothing/under/rank/security) && !istype(src, /obj/item/clothing/under/bodysash/security) && !istype(src, /obj/item/clothing/under/plasmaman/security))
return
// Using a bodycam on the jumpsuit, upgrading it
if(istype(W, /obj/item/bodycam_upgrade))
// Check if its already upgraded
if(upgraded)
@@ -29,7 +28,11 @@
playsound(loc, 'sound/items/drill_use.ogg', get_clamped_volume(), TRUE, -1)
qdel(W)
return
/// Upgraded, but removing it
// Check: Is the Jumpsuit upgraded?
if(!upgraded)
return
// Upgraded, but removing it.
if(W.tool_behaviour == TOOL_SCREWDRIVER)
// If it isnt upgraded, it will go onto the next check, and just return.
if(upgraded)
@@ -40,10 +43,8 @@
var/obj/item/bodycam_upgrade/bodycam = new /obj/item/bodycam_upgrade
user.put_in_hands(bodycam)
return
/// Check: Is the Jumpsuit upgraded? Otherwise, we can't register body cameras!
if(!upgraded)
return
// Registering our ID
var/obj/item/card/id/I
if(isidcard(W))
I = W
@@ -57,11 +58,11 @@
register_body_camera(I, user)
/// Manual Register via ID
/obj/item/clothing/under/rank/security/proc/register_body_camera(obj/item/card/id/I, mob/user)
/obj/item/clothing/under/proc/register_body_camera(obj/item/card/id/I, mob/user)
if(!I)
return
var/mob/living/carbon/human/H = user
var/obj/item/clothing/under/rank/security/S = H.get_item_by_slot(ITEM_SLOT_ICLOTHING)
var/obj/item/clothing/under/S = H.get_item_by_slot(ITEM_SLOT_ICLOTHING)
if(!istype(S))
to_chat(user, span_warning("You have to be wearing [src] to turn the body camera on!"))
return
@@ -100,7 +101,7 @@
to_chat(user, span_notice("Security uniform body camera successfully registered to [id_name]."))
/// Unregistering the ID - Called when using your ID on an already claimed jumpsuit, or removing it.
/obj/item/clothing/under/rank/security/proc/unregister_body_camera(mob/user)
/obj/item/clothing/under/proc/unregister_body_camera(mob/user)
if(!builtInCamera)
return
QDEL_NULL(builtInCamera)

View File

@@ -201,17 +201,17 @@
newSash = new /obj/item/clothing/under/bodysash/captain()
// Security
if("Head of Security")
newSash = new /obj/item/clothing/under/bodysash/hos()
newSash = new /obj/item/clothing/under/bodysash/security/hos()
if("Warden")
newSash = new /obj/item/clothing/under/bodysash/warden()
newSash = new /obj/item/clothing/under/bodysash/security/warden()
if("Security Officer")
newSash = new /obj/item/clothing/under/bodysash/security()
if("Detective")
newSash = new /obj/item/clothing/under/bodysash/detective()
newSash = new /obj/item/clothing/under/bodysash/security/detective()
if("Brig Physician")
newSash = new /obj/item/clothing/under/bodysash/brigdoc()
newSash = new /obj/item/clothing/under/bodysash/security/brigdoc()
if("Deputy")
newSash = new /obj/item/clothing/under/bodysash/deputy()
newSash = new /obj/item/clothing/under/bodysash/security/deputy()
// Medical
if("Chief Medical Officer")

View File

@@ -12,7 +12,11 @@
/obj/item/clothing/under/bodysash/Initialize()
. = ..()
desc = "A simple [name], slung from shoulder to hip."
var/description
description += "A simple [name], slung from shoulder to hip."
if(istype(src, /obj/item/clothing/under/bodysash/security))
description += " It has been slightly reinforced to protect better."
desc = description
//Captain
/obj/item/clothing/under/bodysash/captain
@@ -20,41 +24,32 @@
icon_state = "captain"
//Security
/obj/item/clothing/under/bodysash/hos
name = "head of security's sash"
icon_state = "hos"
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
/obj/item/clothing/under/bodysash/warden
name = "warden's sash"
icon_state = "warden"
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
/obj/item/clothing/under/bodysash/security
name = "security's sash"
icon_state = "security"
armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 30, ACID = 30, WOUND = 10)
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
/obj/item/clothing/under/bodysash/detective
/obj/item/clothing/under/bodysash/security/hos
name = "head of security's sash"
icon_state = "hos"
/obj/item/clothing/under/bodysash/security/warden
name = "warden's sash"
icon_state = "warden"
/obj/item/clothing/under/bodysash/security/detective
name = "detective's sash"
icon_state = "detective"
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
/obj/item/clothing/under/bodysash/brigdoc
/obj/item/clothing/under/bodysash/security/brigdoc
name = "brig physician's sash"
icon_state = "brigdoc"
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
/obj/item/clothing/under/bodysash/deputy
/obj/item/clothing/under/bodysash/security/deputy
name = "deputy's sash"
icon_state = "deputy"
sensor_mode = SENSOR_COORDS
random_sensor = FALSE
//Medical
/obj/item/clothing/under/bodysash/cmo

View File

@@ -126,7 +126,7 @@
/// Beefmen Datum
/datum/outfit/job/deputy/beefman
uniform = /obj/item/clothing/under/bodysash/deputy
uniform = /obj/item/clothing/under/bodysash/security/deputy
/// Shirt
/obj/item/clothing/under/rank/security/officer/mallcop