Skip to content

Commit

Permalink
id&badges
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCastmer committed Feb 25, 2024
1 parent 1ebd050 commit 450bf90
Show file tree
Hide file tree
Showing 16 changed files with 300 additions and 7 deletions.
137 changes: 136 additions & 1 deletion modular_dripstation/code/game/objects/items/card_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
forged = TRUE
anyone = TRUE
registered_age = null
icon_state = "syndie"

/obj/item/card/id/syndicate/nuke_leader
name = "squad leader card"
Expand All @@ -27,4 +28,138 @@
forged = TRUE
anyone = TRUE
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
registered_age = null
registered_age = null
icon_state = "syndie"

/obj/item/card/id/syndicate_command
icon_state = "commander"


/obj/item/card/id
icon = 'modular_dripstation/icons/obj/card.dmi'

/obj/item/card/id/ID_fluff()
var/job = originalassignment
var/static/list/idfluff = list(
"Assistant" = list("civillian","green"),
"Captain" = list("captain","gold"),
"Head of Personnel" = list("civillian","silver"),
"Head of Security" = list("HOS","HOS_id"),
"Chief Engineer" = list("CE","CE_id"),
"Research Director" = list("RD","RD_id"),
"Chief Medical Officer" = list("CMO","CMO_id"),
"Quartermaster" = list("QM","QM_id"),
"Station Engineer" = list("engineering","yellow"),
"Atmospheric Technician" = list("engineering","white"),
"Network Admin" = list("engineering","green"),
"Medical Doctor" = list("medical","blue"),
"Geneticist" = list("medical","purple"),
"Virologist" = list("medical","green"),
"Chemist" = list("medical","orange"),
"Paramedic" = list("medical","white"),
"Psychiatrist" = list("medical","brown"),
"Scientist" = list("science","purple"),
"Roboticist" = list("science","black"),
"Cargo Technician" = list("cargo","brown"),
"Shaft Miner" = list("cargo","black"),
"Mining Medic" = list("cargo","blue"),
"Bartender" = list("civillian","black"),
"Botanist" = list("civillian","blue"),
"Cook" = list("civillian","white"),
"Janitor" = list("civillian","purple"),
"Curator" = list("civillian","purple"),
"Chaplain" = list("civillian","black"),
"Clown" = list("clown","rainbow"),
"Mime" = list("mime","white"),
"Artist" = list("civillian","yellow"),
"Clerk" = list("civillian","blue"),
"Tourist" = list("civillian","yellow"),
"Warden" = list("security","black"),
"Security Officer" = list("security","red"),
"Detective" = list("security","brown"),
"Brig Physician" = list("security","blue"),
"Lawyer" = list("security","purple"),
"Blue Shield" = list("nanotrasen","black"),
"Magistrate" = list("nanotrasen","red"),
"NT Representative" = list("nanotrasen","gold"),
"Explorer" = list("cargo","purple"),
"Bridge Assistant" = list("captain","green"),
"Brig Officer" = list("security","white"),
)
if(job in idfluff)
has_fluff = TRUE
else if(!job)
return
else
if(has_fluff)
return
else
job = "Assistant" //Loads up the basic green ID
overlays.Cut()
overlays += idfluff[job][1]
overlays += idfluff[job][2]

/obj/item/card/id/nanotrasen
icon_state = "nanotrasen"

/obj/item/card/id/head
icon_state = "id_head"

/obj/item/card/id/mime
icon_state = "id_mime"

/obj/item/card/id/deathsquad
name = "\improper BlackOps ID"
desc = "An ID straight from Nanotrasen SpecOps Division."
icon_state = "deathsquad"
registered_name = "BlackOps Operative"
assignment = "Deathsquad Officer"
originalassignment = "Deathsquad Officer"
registered_age = null

/obj/item/card/id/deathsquad/gamma_force
name = "\improper SpecOps ID"
icon_state = "ERT_gamma"
registered_name = "SpecOps Operative"
assignment = "SpecOps Officer"
originalassignment = "SpecOps Officer"

/obj/item/card/id/centcom/silver
name = "\improper silver CentCom ID"
desc = "A silver ID straight from Central Command."
icon_state = "centcom_silver"

/obj/item/card/id/centcom/gold
name = "\improper gold CentCom ID"
desc = "A gold ID straight from Central Command."
icon_state = "centcom_gold"

/obj/item/card/id/ert
icon_state = "ERT_empty"

/obj/item/card/id/ert/amber
icon_state = "ERT_amber"

/obj/item/card/id/ert/occupying
icon_state = "ERT_occ"

/obj/item/card/id/ert/leader
icon_state = "ERT_leader"

/obj/item/card/id/ert/Security
icon_state = "ERT_security"

/obj/item/card/id/ert/Engineer
icon_state = "ERT_engineering"

/obj/item/card/id/ert/Medical
icon_state = "ERT_medical"

/obj/item/card/id/ert/chaplain
icon_state = "ERT_chaplain"

/obj/item/card/id/ert/Janitor
icon_state = "ERT_janitorial"

/obj/item/card/id/ert/clown
icon_state = "ERT_clown"
15 changes: 14 additions & 1 deletion modular_dripstation/code/game/objects/items/storage/box.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@
new /obj/item/clothing/mask/breath/tactical(src)
new /obj/item/tank/internals/emergency_oxygen/engi(src)
new /obj/item/reagent_containers/autoinjector/medipen(src)
new /obj/item/crowbar/red(src)
new /obj/item/crowbar/red(src)

/obj/item/storage/box/holobadge
name = "holobadge box"
desc = "A box claiming to contain holobadges."

/obj/item/storage/box/holobadge/New()
..()
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)
126 changes: 126 additions & 0 deletions modular_dripstation/code/modules/clothing/badges.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/obj/item/badge/security
icon = 'modular_dripstation/icons/obj/clothing/accessories.dmi'
icon_state = "silverbadge"
item_state = ""
accessory_state = "silverbadge"
mob_overlay_icon = 'modular_dripstation/icons/mob/clothing/accessories.dmi'
var/can_be_adjusted = FALSE
var/cord_state = FALSE

/obj/item/badge/security/cadet
name = "security holobadge (Cadet)"
icon_state = "holobadge"
accessory_state = "holobadge"
can_be_adjusted = TRUE

/obj/item/badge/security/officer1
name = "security holobadge (Junior Officer)"
icon_state = "holobadge"
accessory_state = "holobadge"
can_be_adjusted = TRUE

/obj/item/badge/security/officer2
name = "security holobadge (Officer)"
icon_state = "holobadge"
accessory_state = "holobadge"
can_be_adjusted = TRUE

/obj/item/badge/security/officer3
name = "security holobadge (Senior Officer)"
icon_state = "holobadge"
accessory_state = "holobadge"
can_be_adjusted = TRUE

/obj/item/badge/security/warden1
name = "security silver badge (Sergeant)"
icon_state = "silverbadge"
accessory_state = "silverbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/warden2
name = "security silver badge (Staff Sergeant)"
icon_state = "silverbadge"
accessory_state = "silverbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/warden3
name = "security gold badge (2nd Lieutenant)"
icon_state = "goldbadge"
accessory_state = "goldbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/hos1
name = "security gold badge (1st Lieutenant)"
icon_state = "goldbadge"
accessory_state = "goldbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/hos2
name = "security gold badge (Brig Captain)"
icon_state = "goldbadge"
accessory_state = "goldbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/hos3
name = "security gold badge (Major)"
icon_state = "goldbadge"
accessory_state = "goldbadge"
can_be_adjusted = TRUE

/obj/item/badge/security/det1
name = "security badge (Junior Investigator)"
icon_state = "sherrif"
accessory_state = "sherrif"

/obj/item/badge/security/det2
name = "security badge (Investigator)"
icon_state = "sherrif"
accessory_state = "sherrif"

/obj/item/badge/security/det3
name = "security badge (Chief Inspector)"
icon_state = "sherrif"
accessory_state = "sherrif"

/obj/item/badge/security/AltClick(mob/user)
if(can_be_adjusted)
if(!cord_state)
icon_state = "[initial(icon_state)]-cord"
accessory_state = "[initial(accessory_state)]-cord"
cord_state = TRUE
else
icon_state = "[initial(icon_state)]"
accessory_state = "[initial(accessory_state)]"
cord_state = FALSE

/obj/item/badge/security/attack_self(mob/user)
if(!owner_string)
to_chat(user, "Waving around a badge without your name would be pretty pointless.")
return
if(isliving(user))
user.visible_message("<span class='warning'>[user] displays [user.p_their()] Nanotrasen Security Legal Authorization Badge.\nIt reads: [owner_string], NT Security.</span>",
"<span class='warning'>You display your Nanotrasen Security Legal Authorization Badge.\nIt reads: [owner_string], NT Security.</span>")

/obj/item/badge/security/attack(mob/living/carbon/human/H, mob/living/user)
if(isliving(user))
user.visible_message("<span class='warning'>[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently.</span>",
"<span class='warning'>You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are the law.</span>")

/obj/item/badge/security/officer1/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))

var/obj/item/card/id/id_card = null

if(istype(I, /obj/item/card/id))
id_card = I
else
var/obj/item/pda/pda = I
id_card = pda.id

if(ACCESS_SEC_DOORS in id_card.access)
to_chat(user, "<span class='notice'>You imprint your ID details onto the badge.</span>")
owner_string = id_card.registered_name
else
to_chat(user, "<span class='warning'>[src] rejects your insufficient access rights.</span>")
return
..()
4 changes: 4 additions & 0 deletions modular_dripstation/code/modules/job/job_types/captain.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/outfit/job/captain
head = /obj/item/clothing/head/beret/captain
shoes = /obj/item/clothing/shoes/laceup/cap
box = /obj/item/storage/box/captain
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/cargo_tech
backpack_contents = list(/obj/item/boxcutter)
2 changes: 2 additions & 0 deletions modular_dripstation/code/modules/job/job_types/ce.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/ce
id_type = /obj/item/card/id/head
2 changes: 2 additions & 0 deletions modular_dripstation/code/modules/job/job_types/cmo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/cmo
id_type = /obj/item/card/id/head
2 changes: 2 additions & 0 deletions modular_dripstation/code/modules/job/job_types/hos.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/hos
id_type = /obj/item/card/id/head
2 changes: 2 additions & 0 deletions modular_dripstation/code/modules/job/job_types/mime.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/mime
id_type = /obj/item/card/id/mime
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
)

/datum/outfit/job/quartermaster
id_type = /obj/item/card/id/head
backpack_contents = list(/obj/item/melee/classic_baton/telescopic = 1)
2 changes: 2 additions & 0 deletions modular_dripstation/code/modules/job/job_types/rd.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/outfit/job/rd
id_type = /obj/item/card/id/head
4 changes: 0 additions & 4 deletions modular_dripstation/code/modules/jobs/job_types/captain.dm

This file was deleted.

Binary file modified modular_dripstation/icons/mob/clothing/accessories.dmi
Binary file not shown.
Binary file modified modular_dripstation/icons/obj/card.dmi
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion modular_dripstation/includes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
#include "code\modules\cargo\packs.dm"
#include "code\modules\job\job_types\janitor.dm"
#include "code\modules\job\job_types\quartermaster.dm"
#include "code\modules\job\job_types\cargo_technician.dm"
#include "code\modules\job\job_types\captain.dm"
#include "code\modules\job\job_types\cmo.dm"
#include "code\modules\job\job_types\hos.dm"
#include "code\modules\job\job_types\ce.dm"
#include "code\modules\job\job_types\rd.dm"
#include "code\modules\antagonists\cult\cult_items.dm"
#include "code\modules\antagonists\cult\cult_structures.dm"
#include "code\modules\antagonists\wizard\equipment\wizard_spellbook.dm"
Expand Down Expand Up @@ -85,6 +91,7 @@
#include "code\modules\clothing\backpacks.dm"
#include "code\modules\clothing\belt.dm"
#include "code\modules\clothing\mask.dm"
#include "code\modules\clothing\badges.dm"
#include "code\modules\clothing\department\corporate.dm"
#include "code\modules\clothing\department\security.dm"
#include "code\modules\clothing\department\command.dm"
Expand All @@ -93,7 +100,6 @@
#include "code\modules\clothing\department\service.dm"
#include "code\modules\clothing\department\supply.dm"
#include "code\game\objects\items\storage\box.dm"
#include "code\modules\jobs\job_types\captain.dm"
#include "code\modules\uplink\uplink_items.dm"
#include "code\modules\clothing\bagsholding.dm"
#include "code\modules\clothing\hats.dm"
Expand Down

0 comments on commit 450bf90

Please sign in to comment.