diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno/skrell.dm b/code/modules/client/preference_setup/loadout/loadout_xeno/skrell.dm index 369f48fd2c3..46439cf1ab2 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno/skrell.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno/skrell.dm @@ -134,6 +134,10 @@ cost = 0 flags = 0 +/datum/gear/accessory/skrell_passport/New() + . = ..() + gear_tweaks += list(social_credit_tweak) + // the whitelisted list ensures only people with skrell, vaurca, or diona whitelists can reach this check /datum/gear/accessory/skrell_passport/check_species_whitelist(mob/living/carbon/human/H) var/static/list/species_list = list(SPECIES_SKRELL, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER, SPECIES_VAURCA_BREEDER, SPECIES_DIONA) @@ -148,3 +152,25 @@ if(tag) J.species_tag = tag return J + +/* + Skrellian Social Score +*/ +var/datum/gear_tweak/social_credit/social_credit_tweak = new() + +datum/gear_tweak/social_credit/get_contents(var/metadata) + return "Social Credit Score: [metadata]" + +datum/gear_tweak/social_credit/get_default() + return 5 + +datum/gear_tweak/social_credit/get_metadata(var/user, var/metadata) + var/credit_score = input(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Jargon calculations.)", "Social Credit Score") as null|num + if(credit_score) + return round(credit_score, 0.01) + return metadata + +datum/gear_tweak/social_credit/tweak_item(var/obj/item/clothing/accessory/badge/passport/jargon/PP, var/metadata) + if(!istype(PP)) + return + PP.credit_score = metadata + pick(-0.01, 0, 0.01) \ No newline at end of file diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm index 1a2069fc163..418bf610922 100644 --- a/code/modules/clothing/under/accessories/badges.dm +++ b/code/modules/clothing/under/accessories/badges.dm @@ -506,8 +506,13 @@ icon_state = "passport_jargon" item_state = "passport_jargon" open = CLOSED + var/credit_score = 5 var/species_tag = "" +/obj/item/clothing/accessory/badge/passport/jargon/examine(mob/user) + . = ..() + to_chat(user, SPAN_NOTICE("The passport displays the owner's social credit score as: [credit_score].")) + /obj/item/clothing/accessory/badge/passport/jargon/update_icon() icon_state = "[initial(icon_state)][open ? "_o[species_tag]" : ""]" diff --git a/html/changelogs/geeves-social_credit.yml b/html/changelogs/geeves-social_credit.yml new file mode 100644 index 00000000000..ca7f84fc052 --- /dev/null +++ b/html/changelogs/geeves-social_credit.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added a social credit score to the Jargon passport, remember to set yours if you have one." \ No newline at end of file