Migrate "Cyborg Pre-screened dogtag" quirk to loadout (#91868)

## About The Pull Request
Borg me dogtag is a loadout item instead of a quirk

## Why It's Good For The Game
The quirk doesn't do anything

## Changelog

🆑 Melbert
del: "Cyborg Pre-screened dogtag" quirk. It's a loadout item now.
/🆑
This commit is contained in:
MrMelbert
2025-06-29 12:41:49 -05:00
committed by Roxy
parent f2db304b6c
commit bcd1d78189
6 changed files with 32 additions and 19 deletions

View File

@@ -1,14 +0,0 @@
/datum/quirk/item_quirk/borg_ready
name = "Cyborg Pre-screened dogtag"
desc = "Get pre-approved for NT's experimental Cyborg program, with a dog tag that lets medical staff know."
icon = FA_ICON_TAG
value = 0
gain_text = span_notice("You hear a distant echo of beeps and buzzes.")
lose_text = span_danger("The distant beeping halts.")
medical_record_text = "Patient is a registered brain donor for Robotics research."
/datum/quirk/item_quirk/borg_ready/add_unique(client/client_source)
if(is_banned_from(client_source.ckey, JOB_CYBORG))
return FALSE
var/obj/item/clothing/accessory/dogtag/borg_ready/borgtag = new(get_turf(quirk_holder))
give_item_to_holder(borgtag, list(LOCATION_BACKPACK, LOCATION_HANDS))

View File

@@ -9,7 +9,7 @@
/// Station timestamp
var/time
/datum/medical_note/New(author = "Anonymous", content = "No details provided.")
/datum/medical_note/New(author = "Anonymous", content = "No details provided.", time = "--:--:--")
src.author = author
src.content = content
src.time = station_time_timestamp()
src.time = time

View File

@@ -105,7 +105,7 @@
if(!content)
return FALSE
var/datum/medical_note/new_note = new(usr.name, content)
var/datum/medical_note/new_note = new(usr.name, content, station_time_timestamp())
while(length(target.medical_notes) > 2)
target.medical_notes.Cut(1, 2)

View File

@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 48
#define SAVEFILE_VERSION_MAX 49
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -120,6 +120,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
quirk_to_migrate = "Colorist",
new_typepath = /obj/item/dyespray,
)
if(current_version < 49)
migrate_quirk_to_loadout(
quirk_to_migrate = "Cyborg Pre-screened dogtag",
new_typepath = /obj/item/clothing/accessory/dogtag/borg_ready,
)
/// checks through keybindings for outdated unbound keys and updates them
/datum/preferences/proc/check_keybindings()

View File

@@ -324,3 +324,26 @@
if(thing.w_class > wallet.atom_storage.max_specific_storage)
continue
wallet.atom_storage.attempt_insert(thing, override = TRUE, force = STORAGE_FULLY_LOCKED, messages = FALSE)
/datum/loadout_item/pocket_items/borg_me_dogtag
item_path = /obj/item/clothing/accessory/dogtag/borg_ready
/datum/loadout_item/pocket_items/borg_me_dogtag/on_equip_item(
obj/item/equipped_item,
datum/preferences/preference_source,
list/preference_list,
mob/living/carbon/human/equipper,
visuals_only = FALSE,
)
// We're hooking this datum to add an extra bit of flavor to the dogtag - a pregenerated medical record
if(!visuals_only && !isdummy(equipper))
RegisterSignal(equipper, COMSIG_HUMAN_CHARACTER_SETUP_FINISHED, PROC_REF(apply_after_setup), override = TRUE)
return NONE
/datum/loadout_item/pocket_items/borg_me_dogtag/proc/apply_after_setup(mob/living/carbon/human/source, ...)
SIGNAL_HANDLER
UnregisterSignal(source, COMSIG_HUMAN_CHARACTER_SETUP_FINISHED)
var/datum/record/crew/record = find_record(source.real_name)
record?.medical_notes += new /datum/medical_note("Central Command", "Patient is a registered brain donor for Robotics research.", null)

View File

@@ -1991,7 +1991,6 @@
#include "code\datums\quirks\negative_quirks\unstable.dm"
#include "code\datums\quirks\negative_quirks\unusual.dm"
#include "code\datums\quirks\neutral_quirks\bald.dm"
#include "code\datums\quirks\neutral_quirks\borg_ready.dm"
#include "code\datums\quirks\neutral_quirks\deviant_tastes.dm"
#include "code\datums\quirks\neutral_quirks\evil.dm"
#include "code\datums\quirks\neutral_quirks\extrovert.dm"