Drake IDs get names and photos set.

This commit is contained in:
MistakeNot4892
2024-01-14 17:21:12 +11:00
parent 5565cc813b
commit f42b83fbac
3 changed files with 34 additions and 36 deletions
@@ -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\]"
@@ -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/get_id_icon(mob/M)
M.ImmediateOverlayUpdate()
return getFlatIcon(M, defdir = SOUTH, no_anim = TRUE)
/obj/item/card/id/proc/set_id_photo(mob/M)
M.ImmediateOverlayUpdate()
var/icon/F = getFlatIcon(M, defdir = SOUTH, no_anim = TRUE)
front = "'data:image/png;base64,[icon2base64(F)]'"
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
+23 -1
View File
@@ -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
@@ -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)
@@ -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
+4 -31
View File
@@ -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