Skip to content

Commit

Permalink
Drake IDs get names and photos set.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jan 5, 2024
1 parent 5877d21 commit a49d5f9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 36 deletions.
11 changes: 7 additions & 4 deletions code/game/objects/items/weapons/id cards/station_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

var/access = list()
var/registered_name = "Unknown" // The name registered_name on the card
var/registered_id_string = "ID Card"
slot_flags = SLOT_ID | SLOT_EARS

var/age = "\[UNSET\]"
Expand Down Expand Up @@ -53,12 +54,14 @@
ui.open()

/obj/item/card/id/proc/update_name()
name = "[src.registered_name]'s ID Card ([src.assignment])"
name = "[src.registered_name]'s [registered_id_string] ([src.assignment])"

/obj/item/card/id/proc/set_id_photo(mob/M)
/obj/item/card/id/proc/get_id_icon(mob/M)
M.ImmediateOverlayUpdate()
var/icon/F = getFlatIcon(M, defdir = SOUTH, no_anim = TRUE)
front = "'data:image/png;base64,[icon2base64(F)]'"
return getFlatIcon(M, defdir = SOUTH, no_anim = TRUE)

/obj/item/card/id/proc/set_id_photo(mob/M)
front = "'data:image/png;base64,[icon2base64(get_id_icon(M))]'"

/mob/proc/set_id_info(var/obj/item/card/id/id_card)
id_card.age = 0
Expand Down
24 changes: 23 additions & 1 deletion maps/cynosure/cynosure_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ var/global/const/access_explorer = 43
economic_modifier = 1
access = list()
minimal_access = list()
outfit_type = /decl/hierarchy/outfit/drake_preview
outfit_type = /decl/hierarchy/outfit/siffet
job_description = "A number of the bolder folks in Sif's anomalous region have partially domesticated some of the local wildlife as working animals."
assignable = FALSE
has_headset = FALSE
Expand Down Expand Up @@ -293,6 +293,21 @@ var/global/const/access_explorer = 43
var/obj/item/gps/gps = drake.harness.attached_items[drake.harness.ATTACHED_GPS]
if (gps)
gps.SetTag(drake.name)
var/obj/item/card/id/critter_card = drake.harness.attached_items[drake.harness.ATTACHED_ID]
if (critter_card)
critter_card.registered_name = critter.real_name
critter_card.assignment = istype(drake_setup) ? drake_setup.title : initial(drake_setup.title)
critter_card.sex = capitalize(critter.gender)
critter_card.update_name()

// Photo time
drake.sitting = TRUE
drake.resting = TRUE
drake.update_icon()
critter_card.set_id_photo(drake)
drake.sitting = FALSE
drake.resting = FALSE
drake.update_icon()

// Transfer over key.
if(player.mind)
Expand Down Expand Up @@ -340,12 +355,19 @@ var/global/const/access_explorer = 43

/obj/item/card/id/drake_expedition
name = "animal access card"
registered_id_string = "Registration Card"
access = list(
access_explorer,
access_research,
access_xenofauna
)

/obj/item/card/id/drake_expedition/get_id_icon(mob/M)
var/icon/mob_icon = ..()
if(istype(M, /mob/living/simple_mob/animal/sif/grafadreka))
mob_icon.Crop(16, 0, 48, 32)
return mob_icon

/obj/item/storage/animal_harness/grafadreka/expedition
name = "expedition harness"
color = null
Expand Down
35 changes: 4 additions & 31 deletions maps/cynosure/job/outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,35 +97,8 @@ Keep outfits simple. Spawn with basic uniforms and minimal gear. Gear instead go
suit_store = /obj/item/tank/oxygen
mask = null

// Sort of a joke. Overrides the mob with a version of what their drake will most likely look like.
/decl/hierarchy/outfit/drake_preview
// This is basically a joke for the service drake spawn alt title.
/decl/hierarchy/outfit/siffet
name = OUTFIT_JOB_NAME("Siffet")
suit = /obj/item/clothing/suit/storage/hooded/costume/siffet/show_as_drake

/obj/item/clothing/suit/storage/hooded/costume/siffet/show_as_drake
var/mob/living/simple_mob/animal/sif/grafadreka/secret_drake

/obj/item/clothing/suit/storage/hooded/costume/siffet/show_as_drake/Initialize()
. = ..()
secret_drake = new

/obj/item/clothing/suit/storage/hooded/costume/siffet/show_as_drake/Destroy()
QDEL_NULL(secret_drake)
return ..()

/obj/item/clothing/suit/storage/hooded/costume/siffet/show_as_drake/get_worn_overlay(var/mob/living/wearer, var/body_type, var/slot_name, var/inhands, var/default_icon, var/default_layer, var/icon/clip_mask)
if(!ishuman(wearer))
return new /image
wearer.alpha = 0

var/mob/living/carbon/human/human_wearer = wearer
secret_drake.eye_colour = rgb(human_wearer.r_eyes, human_wearer.g_eyes, human_wearer.b_eyes)
secret_drake.fur_colour = rgb(human_wearer.r_facial, human_wearer.g_facial, human_wearer.b_facial)
secret_drake.base_colour = rgb(human_wearer.r_hair, human_wearer.g_hair, human_wearer.b_hair)
secret_drake.update_icon()

var/image/standing = new /image
standing.appearance = secret_drake
standing.pixel_x = -16
standing.appearance_flags |= RESET_ALPHA
return standing
suit = /obj/item/clothing/suit/storage/hooded/costume/siffet
head = /obj/item/clothing/head/hood/siffet_hood

0 comments on commit a49d5f9

Please sign in to comment.