Diona-related bugfixes (#19641)

see changelog

not strictly passport-related despite the branch name, but fuck it
This commit is contained in:
feartheblackout
2024-07-25 13:19:52 +00:00
committed by GitHub
parent b6853f24f8
commit 435c5fd3b5
4 changed files with 67 additions and 1 deletions
@@ -127,8 +127,10 @@
whitelisted = list(SPECIES_DIONA, SPECIES_DIONA_COEUS)
sort_category = "Xenowear - Diona"
culture_restriction = list(/singleton/origin_item/culture/dionae_nralakk, /singleton/origin_item/culture/xrim)
/datum/gear/accessory/diona
abstract_type = /datum/gear/accessory/diona
/datum/gear/accessory/diona/skrell_passport
display_name = "dionae nralakk federation passport"
path = /obj/item/clothing/accessory/badge/passport/nralakk
@@ -138,6 +140,10 @@
flags = GEAR_NO_SELECTION
culture_restriction = list(/singleton/origin_item/culture/dionae_nralakk, /singleton/origin_item/culture/xrim)
/datum/gear/accessory/diona/skrell_passport/New()
. = ..()
gear_tweaks += list(social_credit_tweak)
/datum/gear/accessory/diona/skrell_passport/check_species_whitelist(mob/living/carbon/human/H)
var/static/list/species_list = list(SPECIES_DIONA, SPECIES_DIONA_COEUS)
if(H.species.name in species_list)
@@ -257,7 +257,7 @@ var/datum/gear_tweak/social_credit/social_credit_tweak = new()
return 5
/datum/gear_tweak/social_credit/get_metadata(var/user, var/metadata)
var/credit_score = tgui_input_number(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Nralakk calculations.)", "Social Credit Score", round_value = FALSE)
var/credit_score = tgui_input_number(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Nralakk calculations.)", "Social Credit Score", round_value = FALSE, max_value = 10)
if(credit_score)
return round(credit_score, 0.01)
return metadata