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

Pred gear rack and bracer attachments #7361

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
// Yautja Bracer
#define COMSIG_KB_YAUTJA_TOGGLE_NOTIFICATION_SOUND "keybinding_yautja_toggle_notification_sound"
#define COMSIG_KB_YAUTJA_BRACER_MESSAGE "keybinding_yautja_bracer_message"
#define COMSIG_KB_YAUTJA_WRISTBLADES "keybinding_yautja_wristblades"
#define COMSIG_KB_YAUTJA_BRACER_ATTACHMENT "keybinding_yautja_bracer_attachement"
#define COMSIG_KB_YAUTJA_TRACK_GEAR "keybinding_yautja_track_gear"
#define COMSIG_KB_YAUTJA_CLOAKER "keybinding_yautja_cloaker"
#define COMSIG_KB_YAUTJA_CASTER "keybinding_yautja_caster"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/keybinding/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
classic_keys = list("Unbound")
name = "wristblades"
full_name = "Toggle wristblades"
keybind_signal = COMSIG_KB_YAUTJA_WRISTBLADES
keybind_signal = COMSIG_KB_YAUTJA_BRACER_ATTACHMENT

/datum/keybinding/yautja/bracer_hunter/track_gear
hotkey_keys = list("Unbound")
Expand Down
191 changes: 191 additions & 0 deletions code/game/machinery/vending/vendor_types/antag/antag_predator.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
GLOBAL_LIST_INIT(cm_vending_equipment_yautja, list(
list("Essential Hunting Supplies", 0, null, null, null),
list("Hunting Equipment", 0, list(/obj/item/clothing/under/chainshirt/hunter, /obj/item/device/radio/headset/yautja, /obj/item/storage/backpack/yautja, /obj/item/storage/medicomp/full, /obj/item/device/yautja_teleporter), MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),
list("Armor", 0, list(/obj/item/clothing/suit/armor/yautja, /obj/item/clothing/mask/gas/yautja/hunter, /obj/item/clothing/shoes/yautja/hunter/knife), MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY),

list("Main Weapons (CHOOSE 1)", 0, null, null, null),
list("The Piercing Hunting Sword", 0, /obj/item/weapon/yautja/sword, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Rending Chain-Whip", 0, /obj/item/weapon/yautja/chain, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Cleaving War-Scythe", 0, /obj/item/weapon/yautja/scythe, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Ripping War-Scythe", 0, /obj/item/weapon/yautja/scythe/alt, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Adaptive Combi-Stick", 0, /obj/item/weapon/yautja/chained/combistick, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Butchering War Axe", 0, /obj/item/weapon/yautja/chained/war_axe, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Lumbering Glaive", 0, /obj/item/weapon/twohanded/yautja/glaive, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Imposing Glaive", 0, /obj/item/weapon/twohanded/yautja/glaive/alt, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),

list("Bracer Attachments", 0, null, null, null),
list("Wrist Blades", 0,list(/obj/item/bracer_attachments/wristblades, /obj/item/bracer_attachments/wristblades), MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("The Fearsome Scimitars", 0, list(/obj/item/bracer_attachments/scimitars, /obj/item/bracer_attachments/scimitars), MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Skewering Scimitars", 0, list(/obj/item/bracer_attachments/scimitars_alt, /obj/item/bracer_attachments/scimitars_alt), MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),

list("Secondary Equipment (CHOOSE 2)", 0, null, null, null),
list("The Fleeting Spike Launcher", 0, /obj/item/weapon/gun/launcher/spike, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Swift Plasma Pistol", 0, /obj/item/weapon/gun/energy/yautja/plasmapistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Agile Drone", 0, /obj/item/falcon_drone, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Purifying Smart-Disc", 0, /obj/item/explosive/grenade/spawnergrenade/smartdisc, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Steadfast Shield", 0, /obj/item/weapon/shield/riot/yautja, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),

list("Clothing Accessory (CHOOSE 1)", 0, null, null, null),
list("Third-Cape", 0, /obj/item/clothing/yautja_cape/third, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Half-Cape", 0, /obj/item/clothing/yautja_cape/half, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Quarter-Cape", 0, /obj/item/clothing/yautja_cape/quarter, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Poncho", 0, /obj/item/clothing/yautja_cape/poncho, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Damaged-Cape", 0, /obj/item/clothing/yautja_cape/damaged, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
))

GLOBAL_LIST_INIT(cm_vending_elder_yautja, list(
list("Essential Hunting Supplies", 0, null, null, null),
list("Hunting Equipment", 0, list(/obj/item/clothing/under/chainshirt/hunter, /obj/item/device/radio/headset/yautja/elder, /obj/item/storage/backpack/yautja, /obj/item/storage/medicomp/full, /obj/item/device/yautja_teleporter), MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),
list("Armor", 0, list(/obj/item/clothing/suit/armor/yautja, /obj/item/clothing/mask/gas/yautja/hunter, /obj/item/clothing/shoes/yautja/hunter/knife), MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY),

list("Main Weapons (CHOOSE 1)", 0, null, null, null),
list("The Piercing Hunting Sword", 0, /obj/item/weapon/yautja/sword, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Rending Chain-Whip", 0, /obj/item/weapon/yautja/chain, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Cleaving War-Scythe", 0, /obj/item/weapon/yautja/scythe, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Ripping War-Scythe", 0, /obj/item/weapon/yautja/scythe/alt, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Adaptive Combi-Stick", 0, /obj/item/weapon/yautja/chained/combistick, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Butchering War Axe", 0, /obj/item/weapon/yautja/chained/war_axe, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Lumbering Glaive", 0, /obj/item/weapon/twohanded/yautja/glaive, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Imposing Glaive", 0, /obj/item/weapon/twohanded/yautja/glaive/alt, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),

list("Bracer Attachments", 0, null, null, null),
list("Wrist Blades", 0,list(/obj/item/bracer_attachments/wristblades, /obj/item/bracer_attachments/wristblades), MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY),
list("The Fearsome Scimitars", 0, list(/obj/item/bracer_attachments/scimitars, /obj/item/bracer_attachments/scimitars), MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),
list("The Skewering Scimitars", 0, list(/obj/item/bracer_attachments/scimitars_alt, /obj/item/bracer_attachments/scimitars_alt), MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED),

list("Secondary Equipment (CHOOSE 2)", 0, null, null, null),
list("The Fleeting Spike Launcher", 0, /obj/item/weapon/gun/launcher/spike, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Swift Plasma Pistol", 0, /obj/item/weapon/gun/energy/yautja/plasmapistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Agile Drone", 0, /obj/item/falcon_drone, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Purifying Smart-Disc", 0, /obj/item/explosive/grenade/spawnergrenade/smartdisc, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("The Steadfast Shield", 0, /obj/item/weapon/shield/riot/yautja, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),

list("Clothing Accessory (CHOOSE 1)", 0, null, null, null),
list("Third-Cape", 0, /obj/item/clothing/yautja_cape/third, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Half-Cape", 0, /obj/item/clothing/yautja_cape/half, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Quarter-Cape", 0, /obj/item/clothing/yautja_cape/quarter, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Poncho", 0, /obj/item/clothing/yautja_cape/poncho, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Damaged-Cape", 0, /obj/item/clothing/yautja_cape/damaged, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Ceremonial Cape", 0, /obj/item/clothing/yautja_cape/ceremonial, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Full-Cape", 0, /obj/item/clothing/yautja_cape, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
))

/obj/structure/machinery/cm_vending/clothing/yautja
name = "\improper Yautja Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon = 'icons/obj/items/hunter/pred_vendor.dmi'
icon_state = "pred_vendor_left"
req_access = list(ACCESS_YAUTJA_SECURE)
vendor_role = list(JOB_PREDATOR)
show_points = FALSE

/obj/structure/machinery/cm_vending/clothing/yautja/left_centre
name = "\improper Yautja Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_lcenter"

/obj/structure/machinery/cm_vending/clothing/yautja/centre
name = "\improper Yautja Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_centre"

/obj/structure/machinery/cm_vending/clothing/yautja/right_centre
name = "\improper Yautja Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_rcentre"

/obj/structure/machinery/cm_vending/clothing/yautja/right
name = "\improper Yautja Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_right"

/obj/structure/machinery/cm_vending/clothing/yautja/get_listed_products(mob/user)
return GLOB.cm_vending_equipment_yautja

/obj/structure/machinery/cm_vending/clothing/yautja/elder
name = "\improper Yautja Elder Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_elder_left"
req_access = list(ACCESS_YAUTJA_ELDER)

/obj/structure/machinery/cm_vending/clothing/yautja/elder/right
name = "\improper Yautja Elder Hunting Gear Rack"
desc = "A gear rack for hunting, expose your bracers ID chip to access."
icon_state = "pred_vendor_elder_right"

/obj/structure/machinery/cm_vending/clothing/yautja/elder/get_listed_products(mob/user)
return GLOB.cm_vending_elder_yautja

//Armour Prefs
/obj/item/clothing/suit/armor/yautja/post_vendor_spawn_hook(mob/living/carbon/human/user)
if(!user?.client?.prefs)
return
var/client/mob_client = user.client

if(mob_client.prefs.predator_use_legacy != "None")
switch(mob_client.prefs.predator_use_legacy)
if("dragon")
icon_state = "halfarmor_elder_tr"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_tr")
if("swamp")
icon_state = "halfarmor_elder_joshuu"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_joshuu")
if("enforcer")
icon_state = "halfarmor_elder_feweh"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_feweh")
if("collector")
icon_state = "halfarmor_elder_n"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor_elder_n")
user.update_inv_wear_suit()
return

icon_state = "halfarmor[mob_client.prefs.predator_armor_type]_[mob_client.prefs.predator_armor_material]"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor[mob_client.prefs.predator_armor_type]_[mob_client.prefs.predator_armor_material]")
user.update_inv_wear_suit()

//Mask Prefs
/obj/item/clothing/mask/gas/yautja/hunter/post_vendor_spawn_hook(mob/living/carbon/human/user)
if(!user?.client?.prefs)
return
var/client/mob_client = user.client

if(mob_client.prefs.predator_use_legacy != "None")
switch(mob_client.prefs.predator_use_legacy)
if("Dragon")
icon_state = "pred_mask_elder_tr"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_tr")
if("Swamp")
icon_state = "pred_mask_elder_joshuu"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_joshuu")
if("Enforcer")
icon_state = "pred_mask_elder_feweh"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_feweh")
if("Collector")
icon_state = "pred_mask_elder_n"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask_elder_n")
user.update_inv_wear_mask()
return

icon_state = "pred_mask[mob_client.prefs.predator_mask_type]_[mob_client.prefs.predator_mask_material]"
LAZYSET(item_state_slots, WEAR_FACE, "pred_mask[mob_client.prefs.predator_mask_type]_[mob_client.prefs.predator_mask_material]")
user.update_inv_wear_mask()

//Greaves Prefs

/obj/item/clothing/shoes/yautja/hunter/post_vendor_spawn_hook(mob/living/carbon/human/user)
if(!user?.client?.prefs)
return
var/client/mob_client = user.client

icon_state = "y-boots[mob_client.prefs.predator_boot_type]_[mob_client.prefs.predator_greave_material]"
user.update_inv_shoes()

//Cape Prefs

/obj/item/clothing/yautja_cape/post_vendor_spawn_hook(mob/living/carbon/human/user)
if(!user?.client?.prefs)
return
var/client/mob_client = user.client

color = mob_client.prefs.predator_cape_color
user.update_inv_back()
16 changes: 0 additions & 16 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ GLOBAL_LIST_INIT(bgstate_options, list(
var/predator_mask_material = "ebony"
var/predator_greave_material = "ebony"
var/predator_caster_material = "ebony"
var/predator_cape_type = "None"
var/predator_cape_color = "#654321"
var/predator_flavor_text = ""
//CO-specific preferences
Expand Down Expand Up @@ -541,7 +540,6 @@ GLOBAL_LIST_INIT(bgstate_options, list(

dat += "<div id='column3'>"
dat += "<h2><b><u>Clothing Setup:</u></b></h2>"
dat += "<b>Cape Type:</b> <a href='?_src_=prefs;preference=pred_cape_type;task=input'><b>[capitalize_first_letters(predator_cape_type)]</b></a><br>"
dat += "<b>Cape Color:</b> "
dat += "<a href='?_src_=prefs;preference=pred_cape_color;task=input'>"
dat += "<b>Color</b> <span class='square' style='background-color: [predator_cape_color];'></span>"
Expand Down Expand Up @@ -1337,20 +1335,6 @@ GLOBAL_LIST_INIT(bgstate_options, list(
if(!new_pred_caster_mat)
return
predator_caster_material = new_pred_caster_mat
if("pred_cape_type")
var/datum/job/J = GLOB.RoleAuthority.roles_by_name[JOB_PREDATOR]
var/whitelist_status = GLOB.clan_ranks_ordered[J.get_whitelist_status(owner)]

var/list/options = list("None" = "None")
for(var/cape_name in GLOB.all_yautja_capes)
var/obj/item/clothing/yautja_cape/cape = GLOB.all_yautja_capes[cape_name]
if(whitelist_status >= initial(cape.clan_rank_required) || (initial(cape.councillor_override) && (whitelist_flags & (WHITELIST_YAUTJA_COUNCIL|WHITELIST_YAUTJA_COUNCIL_LEGACY))))
options += list(capitalize_first_letters(cape_name) = cape_name)

var/new_cape = tgui_input_list(user, "Choose your cape type:", "Cape Type", options)
if(!new_cape)
return
predator_cape_type = options[new_cape]
if("pred_cape_color")
var/new_cape_color = input(user, "Choose your cape color:", "Cape Color", predator_cape_color) as color|null
if(!new_cape_color)
Expand Down
3 changes: 0 additions & 3 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@
S["pred_armor_mat"] >> predator_armor_material
S["pred_greave_mat"] >> predator_greave_material
S["pred_caster_mat"] >> predator_caster_material
S["pred_cape_type"] >> predator_cape_type
S["pred_cape_color"] >> predator_cape_color
S["pred_h_style"] >> predator_h_style
S["pred_skin_color"] >> predator_skin_color
Expand Down Expand Up @@ -358,7 +357,6 @@
predator_armor_material = sanitize_inlist(predator_armor_material, PRED_MATERIALS, initial(predator_armor_material))
predator_greave_material = sanitize_inlist(predator_greave_material, PRED_MATERIALS, initial(predator_greave_material))
predator_caster_material = sanitize_inlist(predator_caster_material, PRED_MATERIALS + "retro", initial(predator_caster_material))
predator_cape_type = sanitize_inlist(predator_cape_type, GLOB.all_yautja_capes + "None", initial(predator_cape_type))
predator_cape_color = sanitize_hexcolor(predator_cape_color, initial(predator_cape_color))
predator_h_style = sanitize_inlist(predator_h_style, GLOB.yautja_hair_styles_list, initial(predator_h_style))
predator_skin_color = sanitize_inlist(predator_skin_color, PRED_SKIN_COLOR, initial(predator_skin_color))
Expand Down Expand Up @@ -474,7 +472,6 @@
S["pred_armor_mat"] << predator_armor_material
S["pred_greave_mat"] << predator_greave_material
S["pred_caster_mat"] << predator_caster_material
S["pred_cape_type"] << predator_cape_type
S["pred_cape_color"] << predator_cape_color
S["pred_h_style"] << predator_h_style
S["pred_skin_color"] << predator_skin_color
Expand Down
16 changes: 3 additions & 13 deletions code/modules/cm_preds/yaut_actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@
. = ..()
yautja.mark_panel()

/datum/action/predator_action/claim_equipment
name = "Claim Equipment"
action_icon_state = "claim_equipment"
listen_signal = COMSIG_KB_YAUTJA_PRED_BUY
active = PREDATOR_ACTION_ON_CLICK

/datum/action/predator_action/claim_equipment/action_activate()
. = ..()
yautja.pred_buy()

//Actions that require wearing a mask
/datum/action/predator_action/mask
require_mask = TRUE
Expand Down Expand Up @@ -155,13 +145,13 @@
require_bracers = TRUE

/datum/action/predator_action/bracer/wristblade
name = "Toggle Wristblades"
name = "Toggle Bracer Attachment"
action_icon_state = "wristblade"
listen_signal = COMSIG_KB_YAUTJA_WRISTBLADES
listen_signal = COMSIG_KB_YAUTJA_BRACER_ATTACHMENT

/datum/action/predator_action/bracer/wristblade/action_activate()
. = ..()
bracers.wristblades()
bracers.bracer_attachment()

/datum/action/predator_action/bracer/chained
name = "Yank Weapon"
Expand Down
Loading
Loading