Skip to content

Commit

Permalink
Yautja Legacy restoration & Yautja Sprite Fixes (#4033)
Browse files Browse the repository at this point in the history
# About the pull request
Removes duplicate plasma pistol and thwei sprites.
Renamed one of the legacy mask sprites to what it was supposed to be.
Renamed the health analyzer for preds from Tracker to scanner.
Changed relay beacon to a newer sprite we never used.
Fixes the code for selecting what used to be "elder" armor. Locked it
off to the keys that had that gear.

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
Cleaning out duplicate sprites and old ones is useful I think.
Fixed the legacy gear as we still held the sprites and ~half the code,
so might as well make it work as we do have at least one of the users
still around.
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.
Tested that it works.

![image](https://github.com/cmss13-devs/cmss13/assets/41653574/cc02b39c-5379-4752-adde-43cffb626bc0)


</details>


# Changelog
:cl:
add: Added a preference for using the old legacy yautja armor, only
accessible to the people who had the special gear.
fix: Fixed the old Yautja Legacy armor selection code. Removed the
unique titles from the legacy gear however.
imageadd: Changed the Yautja relay beacon sprite to a newer unused
sprite. Changed iconstate name of health scanner for preds from tracker
to scanner.
imageadd: Moved some of the used sprites out of the unused category in
pred_gear.dmi.
imagedel: Deleted old relay beacon sprite, deleted duplicate plasma
pistol and thwei sprites.
/:cl:
  • Loading branch information
realforest2001 authored Sep 2, 2023
1 parent f045488 commit 481a546
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 28 deletions.
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 @@ -511,6 +512,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 @@ -1237,6 +1240,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 @@ -233,6 +234,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 @@ -339,6 +341,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 @@ -44,16 +44,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 = "None"
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.

0 comments on commit 481a546

Please sign in to comment.