mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
var/global/list -> GLOB. conversion (#17928)
* These two are easy * !!!runlevel_flags the fact it was global.runlevel_flags.len has me a bit...iffy on this. * !!!json_cache Same as above. used global. * player_list & observer_mob_list * mechas_list * this wasn't even used * surgery_steps * event_triggers * landmarks_list * dead_mob_list * living_mob_list * ai_list * cable_list * cleanbot_reserved_turfs * listening_objects * silicon_mob_list * human_mob_list * Update global_lists.dm * joblist * mob_list * Update global_lists.dm * holomap_markers * mapping_units * mapping_beacons * hair_styles_list * facial_hair_styles_list * Update global_lists.dm * facial_hair_styles_male_list * facial_hair_styles_female_list * body_marking_styles_list * body_marking_nopersist_list * ear_styles_list * hair_styles_male_list * tail_styles_list * wing_styles_list * escape_list & rune_list & endgame_exits these were all really small * endgame_safespawns * stool_cache * emotes_by_key * random_maps & map_count * item_tf_spawnpoints * narsie_list * active_radio_jammers * unused * paikeys * pai_software_by_key & default_pai_software * plant_seed_sprites * magazine_icondata_keys & magazine_icondata_states * unused * ashtray_cache * light_type_cache * HOLIDAY!!! this one was annoying * faction stuff (red?!) * Update preferences_factions.dm * vs edit removal * backbaglist, pdachoicelist, exclude_jobs * item_digestion_blacklist, edible_tech, blacklisted_artifact_effect, selectable_footstep, hexNums, syndicate_access * string_slot_flags and hexdigits->hexNums * possible_changeling_IDs * vr_mob_tf_options * vr_mob_spawner_options * pipe_colors * vr_mob_spawner_options * common_tools * newscaster_standard_feeds * Update periodic_news.dm * changeling_fabricated_clothing * semirandom_mob_spawner_decisions * id_card_states * Update syndicate_ids.dm * overlay_cache & gear_distributed_to * more * radio_channels_by_freq * Update global_lists.dm * proper * default_medbay_channels & default_internal_channels default_internal_channels is weird as it has a mapbased proc() but that proc is never called... * valid_ringtones * move this * possible_plants * more * separate these moves xeno2chemlist from a hook to a new global list. * tube_dir_list * valid_bloodreagents & monitor_states * Junk * valid_bloodtypes * breach_burn_descriptors & burn * more!! appliance_available_recipes seems uber cursed, re-look at later * Appliance code is cursed * wide_chassis & flying_chassis * allows_eye_color * all_tooltip_styles * direction_table * gun_choices * severity_to_string * old event_viruses * description_icons * MOVE_KEY_MAPPINGS * more more * pai & robot modules * Update global_lists.dm * GEOSAMPLES Also swaps a .len to LAZYLEN() * shieldgens * reagent recipies * global ammo types * rad collector * old file and unused global * nif_look_messages * FESH * nifsoft * chamelion * the death of sortAtom * globulins * lazylen that * Update global_lists.dm * LAZY * Theese too * quick fix --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
f6ccd518ac
commit
84dc5535dc
@@ -1,4 +1,3 @@
|
||||
var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
|
||||
// Not actually used; just forces this into the RSC for TGUI.
|
||||
var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
|
||||
@@ -30,26 +29,26 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
|
||||
// Grandfather in anyone loading paths from a save.
|
||||
if(ispath(ear_style, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/instance = global.ear_styles_list[ear_style]
|
||||
var/datum/sprite_accessory/instance = GLOB.ear_styles_list[ear_style]
|
||||
if(istype(instance))
|
||||
ear_style = instance.name
|
||||
if(ispath(wing_style, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/instance = global.wing_styles_list[wing_style]
|
||||
var/datum/sprite_accessory/instance = GLOB.wing_styles_list[wing_style]
|
||||
if(istype(instance))
|
||||
wing_style = instance.name
|
||||
if(ispath(tail_style, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/instance = global.tail_styles_list[tail_style]
|
||||
var/datum/sprite_accessory/instance = GLOB.tail_styles_list[tail_style]
|
||||
if(istype(instance))
|
||||
tail_style = instance.name
|
||||
|
||||
// Sanitize for non-existent keys.
|
||||
if(ear_style && !(ear_style in get_available_styles(global.ear_styles_list)))
|
||||
if(ear_style && !(ear_style in get_available_styles(GLOB.ear_styles_list)))
|
||||
ear_style = null
|
||||
if(ear_secondary_style && !(ear_secondary_style in get_available_styles(global.ear_styles_list)))
|
||||
if(ear_secondary_style && !(ear_secondary_style in get_available_styles(GLOB.ear_styles_list)))
|
||||
ear_secondary_style = null
|
||||
if(wing_style && !(wing_style in get_available_styles(global.wing_styles_list)))
|
||||
if(wing_style && !(wing_style in get_available_styles(GLOB.wing_styles_list)))
|
||||
wing_style = null
|
||||
if(tail_style && !(tail_style in get_available_styles(global.tail_styles_list)))
|
||||
if(tail_style && !(tail_style in get_available_styles(GLOB.tail_styles_list)))
|
||||
tail_style = null
|
||||
|
||||
/datum/preferences/proc/get_available_styles(var/style_list)
|
||||
@@ -67,7 +66,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
.[instance.name] = instance
|
||||
|
||||
/datum/preferences/proc/mass_edit_marking_list(var/marking, var/change_on = TRUE, var/change_color = TRUE, var/marking_value = null, var/on = TRUE, var/color = "#000000")
|
||||
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[marking]
|
||||
var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[marking]
|
||||
var/list/new_marking = marking_value||mark_datum.body_parts
|
||||
for (var/NM in new_marking)
|
||||
if (marking_value && !islist(new_marking[NM])) continue
|
||||
@@ -133,15 +132,15 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
if(!pref.species || !(pref.species in GLOB.playable_species))
|
||||
pref.species = SPECIES_HUMAN
|
||||
pref.s_tone = sanitize_integer(pref.s_tone, -185, 34, initial(pref.s_tone))
|
||||
pref.h_style = sanitize_inlist(pref.h_style, hair_styles_list, initial(pref.h_style))
|
||||
pref.f_style = sanitize_inlist(pref.f_style, facial_hair_styles_list, initial(pref.f_style))
|
||||
pref.h_style = sanitize_inlist(pref.h_style, GLOB.hair_styles_list, initial(pref.h_style))
|
||||
pref.f_style = sanitize_inlist(pref.f_style, GLOB.facial_hair_styles_list, initial(pref.f_style))
|
||||
pref.grad_style = sanitize_inlist(pref.grad_style, GLOB.hair_gradients, initial(pref.grad_style))
|
||||
pref.b_type = sanitize_text(pref.b_type, initial(pref.b_type))
|
||||
|
||||
if(!pref.organ_data) pref.organ_data = list()
|
||||
if(!pref.rlimb_data || !islist(pref.rlimb_data)) pref.rlimb_data = list()
|
||||
if(!pref.body_markings) pref.body_markings = list()
|
||||
else pref.body_markings &= body_marking_styles_list
|
||||
else pref.body_markings &= GLOB.body_marking_styles_list
|
||||
for (var/M in pref.body_markings)
|
||||
if (!islist(pref.body_markings[M]))
|
||||
var/col = istext(pref.body_markings[M]) ? pref.body_markings[M] : "#000000"
|
||||
@@ -185,17 +184,17 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
character.digitigrade = 0
|
||||
pref.digitigrade = 0
|
||||
|
||||
var/list/ear_styles = pref.get_available_styles(global.ear_styles_list)
|
||||
var/list/ear_styles = pref.get_available_styles(GLOB.ear_styles_list)
|
||||
character.ear_style = ear_styles[pref.ear_style]
|
||||
|
||||
// apply secondary ears; sanitize again to prevent runtimes in rendering
|
||||
character.ear_secondary_style = ear_styles[pref.ear_secondary_style]
|
||||
character.ear_secondary_colors = SANITIZE_LIST(pref.ear_secondary_colors)
|
||||
|
||||
var/list/tail_styles = pref.get_available_styles(global.tail_styles_list)
|
||||
var/list/tail_styles = pref.get_available_styles(GLOB.tail_styles_list)
|
||||
character.tail_style = tail_styles[pref.tail_style]
|
||||
|
||||
var/list/wing_styles = pref.get_available_styles(global.wing_styles_list)
|
||||
var/list/wing_styles = pref.get_available_styles(GLOB.wing_styles_list)
|
||||
character.wing_style = wing_styles[pref.wing_style]
|
||||
|
||||
character.set_gender(pref.biological_gender)
|
||||
@@ -246,7 +245,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
var/priority = 0
|
||||
for(var/M in pref.body_markings)
|
||||
priority += 1
|
||||
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[M]
|
||||
var/datum/sprite_accessory/marking/mark_datum = GLOB.body_marking_styles_list[M]
|
||||
|
||||
for(var/BP in mark_datum.body_parts)
|
||||
var/obj/item/organ/external/O = character.organs_by_name[BP]
|
||||
@@ -350,28 +349,28 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["can_play"] = can_play_list
|
||||
|
||||
var/list/available_hair_styles = list()
|
||||
for(var/path in pref.get_available_styles(hair_styles_list))
|
||||
for(var/path in pref.get_available_styles(GLOB.hair_styles_list))
|
||||
UNTYPED_LIST_ADD(available_hair_styles, path)
|
||||
data["available_hair_styles"] = available_hair_styles
|
||||
|
||||
var/list/available_facial_styles = list()
|
||||
for(var/path in pref.get_available_styles(facial_hair_styles_list))
|
||||
for(var/path in pref.get_available_styles(GLOB.facial_hair_styles_list))
|
||||
UNTYPED_LIST_ADD(available_facial_styles, path)
|
||||
data["available_facial_styles"] = available_facial_styles
|
||||
|
||||
// WARNING: Depends on adding "None"
|
||||
var/list/available_ear_styles = list("None")
|
||||
for(var/path in pref.get_available_styles(ear_styles_list))
|
||||
for(var/path in pref.get_available_styles(GLOB.ear_styles_list))
|
||||
UNTYPED_LIST_ADD(available_ear_styles, path)
|
||||
data["available_ear_styles"] = available_ear_styles
|
||||
|
||||
var/list/available_tail_styles = list()
|
||||
for(var/path in pref.get_available_styles(tail_styles_list))
|
||||
for(var/path in pref.get_available_styles(GLOB.tail_styles_list))
|
||||
UNTYPED_LIST_ADD(available_tail_styles, path)
|
||||
data["available_tail_styles"] = available_tail_styles
|
||||
|
||||
var/list/available_wing_styles = list()
|
||||
for(var/path in pref.get_available_styles(wing_styles_list))
|
||||
for(var/path in pref.get_available_styles(GLOB.wing_styles_list))
|
||||
UNTYPED_LIST_ADD(available_wing_styles, path)
|
||||
data["available_wing_styles"] = available_wing_styles
|
||||
|
||||
@@ -398,8 +397,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["species"] = species_list
|
||||
|
||||
var/list/hair_styles = list()
|
||||
for(var/path in hair_styles_list)
|
||||
var/datum/sprite_accessory/hair/S = hair_styles_list[path]
|
||||
for(var/path in GLOB.hair_styles_list)
|
||||
var/datum/sprite_accessory/hair/S = GLOB.hair_styles_list[path]
|
||||
hair_styles[path] = list(
|
||||
"name" = S.name,
|
||||
"icon" = REF(S.icon),
|
||||
@@ -409,8 +408,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["hair_styles"] = hair_styles
|
||||
|
||||
var/list/facial_styles = list()
|
||||
for(var/path in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/facial_hair/S = facial_hair_styles_list[path]
|
||||
for(var/path in GLOB.facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/facial_hair/S = GLOB.facial_hair_styles_list[path]
|
||||
facial_styles[path] = list(
|
||||
"name" = S.name,
|
||||
"icon" = REF(S.icon),
|
||||
@@ -430,8 +429,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["grad_styles"] = grad_styles
|
||||
|
||||
var/list/ear_styles = list()
|
||||
for(var/path in ear_styles_list)
|
||||
var/datum/sprite_accessory/ears/S = ear_styles_list[path]
|
||||
for(var/path in GLOB.ear_styles_list)
|
||||
var/datum/sprite_accessory/ears/S = GLOB.ear_styles_list[path]
|
||||
ear_styles[S.name] = list(
|
||||
"name" = S.name,
|
||||
"type" = S.type,
|
||||
@@ -444,8 +443,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["ear_styles"] = ear_styles
|
||||
|
||||
var/list/body_markings = list()
|
||||
for(var/path in body_marking_styles_list)
|
||||
var/datum/sprite_accessory/marking/S = body_marking_styles_list[path]
|
||||
for(var/path in GLOB.body_marking_styles_list)
|
||||
var/datum/sprite_accessory/marking/S = GLOB.body_marking_styles_list[path]
|
||||
|
||||
var/icon_state = S.icon_state
|
||||
if(LAZYLEN(S.body_parts))
|
||||
@@ -461,8 +460,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["body_markings"] = body_markings
|
||||
|
||||
var/list/tail_styles = list()
|
||||
for(var/path in tail_styles_list)
|
||||
var/datum/sprite_accessory/tail/S = tail_styles_list[path]
|
||||
for(var/path in GLOB.tail_styles_list)
|
||||
var/datum/sprite_accessory/tail/S = GLOB.tail_styles_list[path]
|
||||
tail_styles[S.name] = list(
|
||||
"name" = name,
|
||||
"icon" = REF(S.icon),
|
||||
@@ -474,8 +473,8 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
data["tail_styles"] = tail_styles
|
||||
|
||||
var/list/wing_styles = list()
|
||||
for(var/path in wing_styles_list)
|
||||
var/datum/sprite_accessory/wing/S = wing_styles_list[path]
|
||||
for(var/path in GLOB.wing_styles_list)
|
||||
var/datum/sprite_accessory/wing/S = GLOB.wing_styles_list[path]
|
||||
wing_styles[S.name] = list(
|
||||
"name" = S.name,
|
||||
"icon" = REF(S.icon),
|
||||
@@ -500,7 +499,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
/* Hair */
|
||||
if("set_hair_style")
|
||||
var/new_h_style = params["hair_style"]
|
||||
if(new_h_style in pref.get_available_styles(hair_styles_list))
|
||||
if(new_h_style in pref.get_available_styles(GLOB.hair_styles_list))
|
||||
pref.h_style = new_h_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_hair_color")
|
||||
@@ -514,7 +513,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
/* Facial Hair */
|
||||
if("set_facial_hair_style")
|
||||
var/new_f_style = params["facial_hair_style"]
|
||||
if(new_f_style in pref.get_available_styles(facial_hair_styles_list))
|
||||
if(new_f_style in pref.get_available_styles(GLOB.facial_hair_styles_list))
|
||||
pref.f_style = new_f_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_facial_hair_color")
|
||||
@@ -542,7 +541,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
|
||||
/* Markings */
|
||||
if("add_marking")
|
||||
var/list/usable_markings = pref.body_markings.Copy() ^ body_marking_styles_list.Copy()
|
||||
var/list/usable_markings = pref.body_markings.Copy() ^ GLOB.body_marking_styles_list.Copy()
|
||||
var/new_marking = params["new_marking"]
|
||||
if(new_marking && (new_marking in usable_markings))
|
||||
pref.body_markings[new_marking] = pref.mass_edit_marking_list(new_marking) //New markings start black
|
||||
@@ -616,7 +615,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
if(new_ear_style == "None")
|
||||
pref.ear_style = null
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if(new_ear_style in pref.get_available_styles(global.ear_styles_list))
|
||||
if(new_ear_style in pref.get_available_styles(GLOB.ear_styles_list))
|
||||
pref.ear_style = new_ear_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_ear_color")
|
||||
@@ -642,7 +641,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
if(new_ear_style == "None")
|
||||
pref.ear_secondary_style = null
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if(new_ear_style in pref.get_available_styles(ear_styles_list))
|
||||
if(new_ear_style in pref.get_available_styles(GLOB.ear_styles_list))
|
||||
pref.ear_secondary_style = new_ear_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_ear_secondary_color")
|
||||
@@ -680,7 +679,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
/* Wings */
|
||||
if("set_wing_style")
|
||||
var/new_style = params["style"]
|
||||
if(new_style in pref.get_available_styles(global.wing_styles_list))
|
||||
if(new_style in pref.get_available_styles(GLOB.wing_styles_list))
|
||||
pref.wing_style = new_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_wing_color")
|
||||
@@ -711,7 +710,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
/* Tail */
|
||||
if("set_tail_style")
|
||||
var/new_tail_style = params["style"]
|
||||
if(new_tail_style in pref.get_available_styles(global.tail_styles_list))
|
||||
if(new_tail_style in pref.get_available_styles(GLOB.tail_styles_list))
|
||||
pref.tail_style = new_tail_style
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if("set_tail_color")
|
||||
@@ -765,7 +764,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
pref.h_style = pick(valid_hairstyles)
|
||||
else
|
||||
//this shouldn't happen
|
||||
pref.h_style = hair_styles_list["Bald"]
|
||||
pref.h_style = GLOB.hair_styles_list["Bald"]
|
||||
|
||||
//grab one of the valid facial hair styles for the newly chosen species
|
||||
var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
|
||||
@@ -775,7 +774,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
pref.f_style = pick(valid_facialhairstyles)
|
||||
else
|
||||
//this shouldn't happen
|
||||
pref.f_style = facial_hair_styles_list["Shaved"]
|
||||
pref.f_style = GLOB.facial_hair_styles_list["Shaved"]
|
||||
|
||||
//reset hair colour and skin colour
|
||||
pref.update_preference_by_type(/datum/preference/color/human/hair_color, "#000000")
|
||||
@@ -988,7 +987,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
if("blood_type")
|
||||
var/new_b_type = tgui_input_list(user, "Choose your character's blood-type:", "Character Preference", valid_bloodtypes, pref.b_type)
|
||||
var/new_b_type = tgui_input_list(user, "Choose your character's blood-type:", "Character Preference", GLOB.valid_bloodtypes, pref.b_type)
|
||||
if(new_b_type)
|
||||
pref.b_type = new_b_type
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("home_system")
|
||||
var/choice = tgui_input_list(user, "Please choose your home planet and/or system. This should be your current primary residence. Select \"Other\" to specify manually.", "Character Preference", home_system_choices + list("Unset","Other"), pref.home_system)
|
||||
var/choice = tgui_input_list(user, "Please choose your home planet and/or system. This should be your current primary residence. Select \"Other\" to specify manually.", "Character Preference", GLOB.home_system_choices + list("Unset","Other"), pref.home_system)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
@@ -91,7 +91,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("birthplace")
|
||||
var/choice = tgui_input_list(user, "Please choose the planet and/or system or other appropriate location that you were born/created. Select \"Other\" to specify manually.", "Character Preference", home_system_choices + list("Unset","Other"), pref.birthplace)
|
||||
var/choice = tgui_input_list(user, "Please choose the planet and/or system or other appropriate location that you were born/created. Select \"Other\" to specify manually.", "Character Preference", GLOB.home_system_choices + list("Unset","Other"), pref.birthplace)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
@@ -103,7 +103,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("citizenship")
|
||||
var/choice = tgui_input_list(user, "Please select the faction or political entity with which you currently hold citizenship. Select \"Other\" to specify manually.", "Character Preference", citizenship_choices + list("None","Other"), pref.citizenship)
|
||||
var/choice = tgui_input_list(user, "Please select the faction or political entity with which you currently hold citizenship. Select \"Other\" to specify manually.", "Character Preference", GLOB.citizenship_choices + list("None","Other"), pref.citizenship)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
@@ -115,7 +115,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("faction")
|
||||
var/choice = tgui_input_list(user, "Please choose the faction you primarily work for, if you are not under the direct employ of NanoTrasen. Select \"Other\" to specify manually.", "Character Preference", faction_choices + list("None","Other"), pref.faction)
|
||||
var/choice = tgui_input_list(user, "Please choose the faction you primarily work for, if you are not under the direct employ of NanoTrasen. Select \"Other\" to specify manually.", "Character Preference", GLOB.faction_choices + list("None","Other"), pref.faction)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
@@ -127,7 +127,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("religion")
|
||||
var/choice = tgui_input_list(user, "Please choose a religion. Select \"Other\" to specify manually.", "Character Preference", religion_choices + list("None","Other"), pref.religion)
|
||||
var/choice = tgui_input_list(user, "Please choose a religion. Select \"Other\" to specify manually.", "Character Preference", GLOB.religion_choices + list("None","Other"), pref.religion)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("antagfaction")
|
||||
var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", antag_faction_choices + list("None","Other"), pref.antag_faction)
|
||||
var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", GLOB.antag_faction_choices + list("None","Other"), pref.antag_faction)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
@@ -104,7 +104,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("antagvis")
|
||||
var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", antag_visiblity_choices, pref.antag_vis)
|
||||
var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", GLOB.antag_visiblity_choices, pref.antag_vis)
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
else
|
||||
|
||||
@@ -1,33 +1,3 @@
|
||||
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf
|
||||
//some autodetection here.
|
||||
// Change these to 0 if the equivalent mode is disabled for whatever reason!
|
||||
"traitor" = 0, // 0
|
||||
"operative" = 0, // 1
|
||||
"changeling" = 0, // 2
|
||||
"wizard" = 0, // 3
|
||||
"malf AI" = 0, // 4
|
||||
"revolutionary" = 0, // 5
|
||||
"alien candidate" = 0, // 6
|
||||
"positronic brain" = 1, // 7
|
||||
"cultist" = 0, // 8
|
||||
"renegade" = 0, // 9
|
||||
"ninja" = 0, // 10
|
||||
"raider" = 0, // 11
|
||||
"diona" = 0, // 12
|
||||
"mutineer" = 0, // 13
|
||||
"loyalist" = 0, // 14
|
||||
"pAI candidate" = 1, // 15
|
||||
//VOREStation Add
|
||||
"lost drone" = 1, // 16
|
||||
"maint pred" = 1, // 17
|
||||
"maint lurker" = 1, // 18
|
||||
"morph" = 1, // 19
|
||||
"corgi" = 1, // 20
|
||||
"cursed sword" = 1, // 21
|
||||
"Ship Survivor" = 1, // 22
|
||||
//VOREStation Add End
|
||||
)
|
||||
|
||||
/datum/category_item/player_setup_item/general/candidacy
|
||||
name = "Candidacy"
|
||||
sort_order = 8
|
||||
@@ -63,8 +33,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
|
||||
var/list/special_data = list()
|
||||
var/n = 0
|
||||
for(var/i in special_roles)
|
||||
if(special_roles[i])
|
||||
for(var/i in GLOB.special_roles)
|
||||
if(GLOB.special_roles[i])
|
||||
var/banned = FALSE
|
||||
if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, JOB_AI) && jobban_isbanned(user, JOB_CYBORG)) || (i == "pAI candidate" && jobban_isbanned(user, JOB_PAI)))
|
||||
banned = TRUE
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("customize_footsteps")
|
||||
var/list/footstep_choice = selectable_footstep
|
||||
var/list/footstep_choice = GLOB.selectable_footstep
|
||||
var/choice = tgui_input_list(user, "What footstep sounds would your character make?", "Custom Foostep Sounds", footstep_choice)
|
||||
if(choice)
|
||||
pref.custom_footstep = footstep_choice[choice]
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define NEUTRAL_MODE 2
|
||||
#define NEGATIVE_MODE 3
|
||||
|
||||
var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_COPPER,REAGENT_ID_PHORON,REAGENT_ID_SILVER,REAGENT_ID_GOLD,REAGENT_ID_SLIMEJELLY) //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs!
|
||||
|
||||
/datum/preferences
|
||||
var/custom_base // What to base the custom species on
|
||||
var/blood_color = "#A10808"
|
||||
@@ -253,7 +251,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
pref.blood_color = new_blood
|
||||
return TOPIC_REFRESH
|
||||
if("blood_reagents")
|
||||
var/new_blood_reagents = tgui_input_list(user, "Choose your character's blood restoration reagent:", "Character Preference", valid_bloodreagents)
|
||||
var/new_blood_reagents = tgui_input_list(user, "Choose your character's blood restoration reagent:", "Character Preference", GLOB.valid_bloodreagents)
|
||||
if(new_blood_reagents && CanUseTopic(user))
|
||||
pref.blood_reagents = new_blood_reagents
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -33,33 +33,6 @@
|
||||
save_data["shoe_hater"] = pref.shoe_hater
|
||||
save_data["no_jacket"] = pref.no_jacket
|
||||
|
||||
var/global/list/valid_ringtones = list(
|
||||
"beep",
|
||||
"boom",
|
||||
"slip",
|
||||
"honk",
|
||||
"SKREE",
|
||||
"xeno",
|
||||
"spark",
|
||||
"rad",
|
||||
"servo",
|
||||
"buh-boop",
|
||||
"trombone",
|
||||
"whistle",
|
||||
"chirp",
|
||||
"slurp",
|
||||
"pwing",
|
||||
"clack",
|
||||
"bzzt",
|
||||
"chimes",
|
||||
"prbt",
|
||||
"bark",
|
||||
"bork",
|
||||
"roark",
|
||||
"chitter",
|
||||
"squish"
|
||||
)
|
||||
|
||||
// Moved from /datum/preferences/proc/copy_to()
|
||||
/datum/category_item/player_setup_item/loadout/equipment/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
character.all_underwear.Cut()
|
||||
@@ -80,7 +53,7 @@ var/global/list/valid_ringtones = list(
|
||||
pref.headset = 1 //Same as above
|
||||
character.headset = pref.headset
|
||||
|
||||
if(pref.backbag > backbaglist.len || pref.backbag < 1)
|
||||
if(pref.backbag > GLOB.backbaglist.len || pref.backbag < 1)
|
||||
pref.backbag = 2 //Same as above
|
||||
character.backbag = pref.backbag
|
||||
|
||||
@@ -114,8 +87,8 @@ var/global/list/valid_ringtones = list(
|
||||
if(!(underwear_metadata in pref.all_underwear))
|
||||
pref.all_underwear_metadata -= underwear_metadata
|
||||
pref.headset = sanitize_integer(pref.headset, 1, GLOB.headsetlist.len, initial(pref.headset))
|
||||
pref.backbag = sanitize_integer(pref.backbag, 1, backbaglist.len, initial(pref.backbag))
|
||||
pref.pdachoice = sanitize_integer(pref.pdachoice, 1, pdachoicelist.len, initial(pref.pdachoice))
|
||||
pref.backbag = sanitize_integer(pref.backbag, 1, GLOB.backbaglist.len, initial(pref.backbag))
|
||||
pref.pdachoice = sanitize_integer(pref.pdachoice, 1, GLOB.pdachoicelist.len, initial(pref.pdachoice))
|
||||
pref.ringtone = sanitize(pref.ringtone, 20)
|
||||
|
||||
/datum/category_item/player_setup_item/loadout/equipment/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
@@ -142,8 +115,8 @@ var/global/list/valid_ringtones = list(
|
||||
data["underwear"] = underwear_data
|
||||
|
||||
data["headset_type"] = GLOB.headsetlist[pref.headset]
|
||||
data["backpack_type"] = backbaglist[pref.backbag]
|
||||
data["pda_type"] = pdachoicelist[pref.pdachoice]
|
||||
data["backpack_type"] = GLOB.backbaglist[pref.backbag]
|
||||
data["pda_type"] = GLOB.pdachoicelist[pref.pdachoice]
|
||||
data["communicator_visibility"] = pref.communicator_visibility // boolean
|
||||
data["ringtone"] = pref.ringtone
|
||||
data["shoes"] = !pref.shoe_hater
|
||||
@@ -159,8 +132,8 @@ var/global/list/valid_ringtones = list(
|
||||
var/list/data = ..()
|
||||
|
||||
data["headsetlist"] = GLOB.headsetlist
|
||||
data["backbaglist"] = backbaglist
|
||||
data["pdachoicelist"] = pdachoicelist
|
||||
data["GLOB.backbaglist"] = GLOB.backbaglist
|
||||
data["GLOB.pdachoicelist"] = GLOB.pdachoicelist
|
||||
|
||||
return data
|
||||
|
||||
@@ -198,14 +171,14 @@ var/global/list/valid_ringtones = list(
|
||||
if("change_backpack")
|
||||
// Takes the JS index
|
||||
var/new_backbag = text2num(params["backbag"]) + 1
|
||||
if(LAZYACCESS(backbaglist, new_backbag))
|
||||
if(LAZYACCESS(GLOB.backbaglist, new_backbag))
|
||||
pref.backbag = new_backbag
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
if("change_pda")
|
||||
// Takes the JS index
|
||||
var/new_pdachoice = text2num(params["pda"]) + 1
|
||||
if(LAZYACCESS(backbaglist, new_pdachoice))
|
||||
if(LAZYACCESS(GLOB.backbaglist, new_pdachoice))
|
||||
pref.pdachoice = new_pdachoice
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
@@ -235,7 +208,7 @@ var/global/list/valid_ringtones = list(
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if("set_ringtone")
|
||||
var/choice = tgui_input_list(user, "Please select a ringtone. All of these choices come with an associated preset sound. Alternately, select \"Other\" to specify manually.", "Character Preference", valid_ringtones + "Other", pref.ringtone)
|
||||
var/choice = tgui_input_list(user, "Please select a ringtone. All of these choices come with an associated preset sound. Alternately, select \"Other\" to specify manually.", "Character Preference", GLOB.valid_ringtones + "Other", pref.ringtone)
|
||||
if(!choice)
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
|
||||
Reference in New Issue
Block a user