Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yautja Legacy restoration & Yautja Sprite Fixes #4033

Merged
merged 8 commits into from
Sep 2, 2023
1 change: 1 addition & 0 deletions code/__DEFINES/pred.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PRED_MATERIALS list("ebony", "silver", "bronze", "crimson", "bone")
#define PRED_TRANSLATORS list("Modern", "Retro", "Combo")
#define PRED_LEGACIES list("None", "Dragon", "Swamp", "Enforcer", "Collector")
#define PRED_SKIN_COLOR list("tan", "green", "purple", "blue", "red", "black")

#define PRED_YAUTJA_CAPE "yautja cape"
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ FORENSIC SCANNER
/obj/item/device/healthanalyzer/alien
name = "\improper YMX scanner"
icon = 'icons/obj/items/hunter/pred_gear.dmi'
icon_state = "Tracker"
icon_state = "scanner"
item_state = "analyzer"
desc = "An alien design hand-held body scanner able to distinguish vital signs of the subject. The front panel is able to provide the basic readout of the subject's status."
alien = TRUE
Expand Down
8 changes: 8 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var/const/MAX_SAVE_SLOTS = 10
var/predator_age = 100
var/predator_h_style = "Standard"
var/predator_skin_color = "tan"
var/predator_use_legacy = "None"
var/predator_translator_type = "Modern"
var/predator_mask_type = 1
var/predator_armor_type = 1
Expand Down Expand Up @@ -508,6 +509,8 @@ var/const/MAX_SAVE_SLOTS = 10

dat += "<div id='column2'>"
dat += "<h2><b><u>Equipment Setup:</u></b></h2>"
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_YAUTJA_LEGACY)
dat += "<b>Legacy Gear:</b> <a href='?_src_=prefs;preference=pred_use_legacy;task=input'><b>[predator_use_legacy]</b></a><br>"
dat += "<b>Translator Type:</b> <a href='?_src_=prefs;preference=pred_trans_type;task=input'><b>[predator_translator_type]</b></a><br>"
dat += "<b>Mask Style:</b> <a href='?_src_=prefs;preference=pred_mask_type;task=input'><b>([predator_mask_type])</b></a><br>"
dat += "<b>Armor Style:</b> <a href='?_src_=prefs;preference=pred_armor_type;task=input'><b>([predator_armor_type])</b></a><br>"
Expand Down Expand Up @@ -1233,6 +1236,11 @@ var/const/MAX_SAVE_SLOTS = 10
var/new_predator_age = tgui_input_number(user, "Choose your Predator's age(175 to 3000):", "Character Preference", 1234, 3000, 175)
if(new_predator_age)
predator_age = max(min( round(text2num(new_predator_age)), 3000),175)
if("pred_use_legacy")
var/legacy_choice = tgui_input_list(user, "What legacy set do you wish to use?", "Legacy Set", PRED_LEGACIES)
if(!legacy_choice)
return
predator_use_legacy = legacy_choice
if("pred_trans_type")
var/new_translator_type = tgui_input_list(user, "Choose your translator type.", "Translator Type", PRED_TRANSLATORS)
if(!new_translator_type)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
S["pred_name"] >> predator_name
S["pred_gender"] >> predator_gender
S["pred_age"] >> predator_age
S["pred_use_legacy"] >> predator_use_legacy
S["pred_trans_type"] >> predator_translator_type
S["pred_mask_type"] >> predator_mask_type
S["pred_armor_type"] >> predator_armor_type
Expand Down Expand Up @@ -231,6 +232,7 @@
predator_name = predator_name ? sanitize_text(predator_name, initial(predator_name)) : initial(predator_name)
predator_gender = sanitize_text(predator_gender, initial(predator_gender))
predator_age = sanitize_integer(predator_age, 100, 10000, initial(predator_age))
predator_use_legacy = sanitize_inlist(predator_use_legacy, PRED_LEGACIES, initial(predator_use_legacy))
predator_translator_type = sanitize_inlist(predator_translator_type, PRED_TRANSLATORS, initial(predator_translator_type))
predator_mask_type = sanitize_integer(predator_mask_type,1,1000000,initial(predator_mask_type))
predator_armor_type = sanitize_integer(predator_armor_type,1,1000000,initial(predator_armor_type))
Expand Down Expand Up @@ -337,6 +339,7 @@
S["pred_name"] << predator_name
S["pred_gender"] << predator_gender
S["pred_age"] << predator_age
S["pred_use_legacy"] << predator_use_legacy
S["pred_trans_type"] << predator_translator_type
S["pred_mask_type"] << predator_mask_type
S["pred_armor_type"] << predator_armor_type
Expand Down
44 changes: 21 additions & 23 deletions code/modules/cm_preds/yaut_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,41 +61,39 @@
fire_intensity_resistance = 10
black_market_value = 100

/obj/item/clothing/suit/armor/yautja/Initialize(mapload, armor_number = rand(1,7), armor_material = "ebony", elder_restricted = 0)
/obj/item/clothing/suit/armor/yautja/Initialize(mapload, armor_number = rand(1,7), armor_material = "ebony", legacy = "None")
. = ..()
if(thrall)
return
if(elder_restricted)
switch(armor_number)
if(1341)
name = "\improper 'Armor of the Dragon'"
flags_cold_protection = flags_armor_protection
flags_heat_protection = flags_armor_protection

if(legacy != "None")
switch(legacy)
if("dragon")
icon_state = "halfarmor_elder_tr"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_tr")
if(7128)
name = "\improper 'Armor of the Swamp Horror'"
return
if("swamp")
icon_state = "halfarmor_elder_joshuu"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_joshuu")
if(9867)
name = "\improper 'Armor of the Enforcer'"
return
if("enforcer")
icon_state = "halfarmor_elder_feweh"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_feweh")
if(4879)
name = "\improper 'Armor of the Ambivalent Collector'"
return
if("collector")
icon_state = "halfarmor_elder_n"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_n")
else
name = "clan elder's armor"
icon_state = "halfarmor_elder"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder")
else
if(armor_number > 7)
armor_number = 1
if(armor_number) //Don't change full armor number
icon_state = "halfarmor[armor_number]_[armor_material]"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor[armor_number]_[armor_material]")
return

if(armor_number > 7)
armor_number = 1
if(armor_number) //Don't change full armor number
icon_state = "halfarmor[armor_number]_[armor_material]"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor[armor_number]_[armor_material]")


flags_cold_protection = flags_armor_protection
flags_heat_protection = flags_armor_protection

/obj/item/clothing/suit/armor/yautja/hunter
name = "clan armor"
Expand Down
22 changes: 20 additions & 2 deletions code/modules/cm_preds/yaut_mask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,34 @@
var/thrall = FALSE //Used to affect icon generation.


/obj/item/clothing/mask/gas/yautja/New(location, mask_number = rand(1,12), armor_material = "ebony", elder_restricted = 0)
/obj/item/clothing/mask/gas/yautja/New(location, mask_number = rand(1,12), armor_material = "ebony", legacy = "None")
..()
forceMove(location)
if(thrall)
return

if(legacy != "None")
switch(legacy)
if("Dragon")
icon_state = "pred_mask_elder_tr"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_tr")
return
if("Swamp")
icon_state = "pred_mask_elder_joshuu"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_joshuu")
return
if("Enforcer")
icon_state = "pred_mask_elder_feweh"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_feweh")
return
if("Collector")
icon_state = "pred_mask_elder_n"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_n")
return

if(mask_number > 12)
mask_number = 1
icon_state = "pred_mask[mask_number]_[armor_material]"

LAZYSET(item_state_slots, WEAR_FACE, "pred_mask[mask_number]_[armor_material]")

/obj/item/clothing/mask/gas/yautja/pickup(mob/living/user)
Expand Down
6 changes: 4 additions & 2 deletions code/modules/gear_presets/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
return //No vanity items for Yautja!

/datum/equipment_preset/yautja/load_gear(mob/living/carbon/human/new_human, client/mob_client)
var/using_legacy = "No"
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
var/armor_number = 1
var/boot_number = 1
var/mask_number = 1
Expand All @@ -42,6 +43,7 @@
if(!mob_client)
mob_client = new_human.client
if(mob_client?.prefs)
using_legacy = mob_client.prefs.predator_use_legacy
armor_number = mob_client.prefs.predator_armor_type
boot_number = mob_client.prefs.predator_boot_type
mask_number = mob_client.prefs.predator_mask_type
Expand All @@ -62,8 +64,8 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/medicomp/full(new_human), WEAR_IN_BELT)

new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/yautja/hunter/knife(new_human, boot_number, greave_material), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/yautja/hunter(new_human, armor_number, armor_material), WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/yautja/hunter(new_human, mask_number, mask_material), WEAR_FACE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/yautja/hunter(new_human, armor_number, armor_material, using_legacy), WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/yautja/hunter(new_human, mask_number, mask_material, using_legacy), WEAR_FACE)

var/cape_path = GLOB.all_yautja_capes[cape_type]
if(ispath(cape_path))
Expand Down
Binary file modified icons/obj/items/hunter/pred_gear.dmi
Binary file not shown.