Skip to content

Commit

Permalink
Yautja Actions Update (/QOL changes) (#5294)
Browse files Browse the repository at this point in the history
# About the pull request

This was hell

Action sprites from
Cosmic-Overlord/TerraGov-Marine-Corps#206

# Explain why it's good for the game

Ease of use

# Changelog

:cl: BeagleGaming1, Mr.Crowford
add: Added Yautja action buttons
qol: Added a keybind to control falcon drones
qol: Thwei crystals and healing capsules say how much time until off
cooldown
code: Yautja keybinds now redirect to action buttons
code: Changed thwei crystals and healing capsules to cooldowns instead
of timers
code: Miscellaneous Yautja-related code cleanup
/:cl:
  • Loading branch information
BeagleGaming1 authored Jan 3, 2024
1 parent f530006 commit 9cc3d9e
Show file tree
Hide file tree
Showing 14 changed files with 501 additions and 371 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@
#define COMSIG_KB_YAUTJA_BUTCHER "keybinding_yautja_butcher"
#define COMSIG_KB_YAUTJA_PRED_BUY "keybinding_yautja_pred_buy"
#define COMSIG_KB_YAUTJA_MARK_PANEL "keybinding_yautja_mark_panel"
#define COMSIG_KB_YAUTJA_MARK_FOR_HUNT "keybinding_yautja_mark_for_hunt"
#define COMSIG_KB_YAUTJA_REMOVE_FROM_HUNT "keybinding_yautja_remove_from_hunt"
#define COMSIG_KB_YAUTJA_TOGGLE_MARK_FOR_HUNT "keybinding_yautja_toggle_mark_for_hunt"

// Yautja Bracer
#define COMSIG_KB_YAUTJA_TOGGLE_NOTIFICATION_SOUND "keybinding_yautja_toggle_notification_sound"
Expand All @@ -192,6 +191,7 @@
#define COMSIG_KB_YAUTJA_BRACERNAME "keybinding_yautja_bracername"
#define COMSIG_KB_YAUTJA_IDCHIP "keybinding_yautja_idchip"
#define COMSIG_KB_YAUTJA_LINK_BRACER "keybinding_yautja_link_bracer"
#define COMSIG_KB_YAUTJA_CONTROL_FALCON "keybinding_yautja_control_falcon"

//mask
#define COMSIG_KB_YAUTJA_MASK_TOGGLE_ZOOM "keybinding_yautja_mask_toggle_zoom"
Expand Down
221 changes: 12 additions & 209 deletions code/datums/keybinding/yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@
classic_keys = list("Unbound")
name = "pred_buy"
full_name = "Claim equipment"
keybind_signal = COMSIG_KB_YAUTJA_BUTCHER

/datum/keybinding/yautja/pred_buy/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
if(!isyautja(H))
return
H.pred_buy()
keybind_signal = COMSIG_KB_YAUTJA_PRED_BUY

/datum/keybinding/yautja/mark_panel
hotkey_keys = list("Unbound")
Expand All @@ -48,46 +39,12 @@
full_name = "Mark panel"
keybind_signal = COMSIG_KB_YAUTJA_MARK_PANEL

/datum/keybinding/yautja/mark_panel/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
if(!isyautja(H))
return
H.mark_panel()

/datum/keybinding/yautja/mark_for_hunt
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "mark_for_hunt"
full_name = "Mark for hunt"
keybind_signal = COMSIG_KB_YAUTJA_MARK_FOR_HUNT

/datum/keybinding/yautja/mark_for_hunt/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
if(!isyautja(H))
return
H.mark_for_hunt()

/datum/keybinding/yautja/remove_from_hunt
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "remove_from_hunt"
full_name = "Remove from hunt"
keybind_signal = COMSIG_KB_YAUTJA_REMOVE_FROM_HUNT

/datum/keybinding/yautja/remove_from_hunt/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
if(!isyautja(H))
return
H.remove_from_hunt()
full_name = "Toggle mark for hunt"
keybind_signal = COMSIG_KB_YAUTJA_TOGGLE_MARK_FOR_HUNT

// BRACER SPECIFIC \\
Expand Down Expand Up @@ -168,22 +125,6 @@
full_name = "Toggle wristblades"
keybind_signal = COMSIG_KB_YAUTJA_WRISTBLADES

/datum/keybinding/yautja/bracer_hunter/wristblades/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.wristblades()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.wristblades()
return TRUE

/datum/keybinding/yautja/bracer_hunter/track_gear
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
Expand Down Expand Up @@ -214,45 +155,13 @@
full_name = "Toggle cloak"
keybind_signal = COMSIG_KB_YAUTJA_CLOAKER

/datum/keybinding/yautja/bracer_hunter/cloaker/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.cloaker()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.cloaker()
return TRUE

/datum/keybinding/yautja/bracer_hunter/caster
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "caster"
full_name = "Toggle plasma caster"
keybind_signal = COMSIG_KB_YAUTJA_CASTER

/datum/keybinding/yautja/bracer_hunter/caster/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.caster()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.caster()
return TRUE

/datum/keybinding/yautja/bracer_hunter/change_explosion_type
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
Expand Down Expand Up @@ -283,90 +192,27 @@
full_name = "Self-destruct"
keybind_signal = COMSIG_KB_YAUTJA_ACTIVATE_SUICIDE

/datum/keybinding/yautja/bracer_hunter/activate_suicide/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.activate_suicide()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.activate_suicide()
return TRUE

/datum/keybinding/yautja/bracer_hunter/injectors
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "injectors"
full_name = "Create Stabilising Crystal"
keybind_signal = COMSIG_KB_YAUTJA_INJECTORS

/datum/keybinding/yautja/bracer_hunter/injectors/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.injectors()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.injectors()
return TRUE
/datum/keybinding/yautja/bracer_hunter/healing_capsule
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "capsule"
full_name = "Create Healing Capsule"
keybind_signal = COMSIG_KB_YAUTJA_CAPSULE

/datum/keybinding/yautja/bracer_hunter/healing_capsule/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.healing_capsule()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.healing_capsule()
return TRUE

/datum/keybinding/yautja/bracer_hunter/call_disc
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "call_disc"
full_name = "Call smart-disc"
keybind_signal = COMSIG_KB_YAUTJA_CALL_DISC

/datum/keybinding/yautja/bracer_hunter/call_disc/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.call_disc()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.call_disc()
return TRUE

/datum/keybinding/yautja/bracer_hunter/remove_tracked_item
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
Expand Down Expand Up @@ -420,45 +266,13 @@
full_name = "Yank combi-stick"
keybind_signal = COMSIG_KB_YAUTJA_CALL_COMBI

/datum/keybinding/yautja/bracer_hunter/call_combi/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.call_combi()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.call_combi()
return TRUE

/datum/keybinding/yautja/bracer_hunter/translate
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "translate"
full_name = "Translator"
keybind_signal = COMSIG_KB_YAUTJA_TRANSLATE

/datum/keybinding/yautja/bracer_hunter/translate/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob

var/obj/item/clothing/gloves/yautja/hunter/gloves = H.gloves
if(istype(gloves))
gloves.translate()
return TRUE

var/obj/item/clothing/gloves/yautja/hunter/held = H.get_held_item()
if(istype(held))
held.translate()
return TRUE

/datum/keybinding/yautja/bracer_hunter/bracername
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
Expand Down Expand Up @@ -528,6 +342,13 @@
held.link_bracer()
return TRUE

/datum/keybinding/yautja/bracer_hunter/control_falcon_drone
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "control_falcon"
full_name = "Control falcon drone"
keybind_signal = COMSIG_KB_YAUTJA_CONTROL_FALCON

// Misc stuff - mask, teleporter \\
// mask
Expand All @@ -545,32 +366,14 @@
classic_keys = list("Unbound")
name = "toggle_zoom"
full_name = "Toggle mask zoom"
keybind_signal = COMSIG_KB_YAUTJA_LINK_BRACER

/datum/keybinding/yautja/mask/toggle_zoom/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
var/obj/item/clothing/mask/gas/yautja/mask = H.wear_mask
mask.toggle_zoom()
return TRUE
keybind_signal = COMSIG_KB_YAUTJA_MASK_TOGGLE_ZOOM

/datum/keybinding/yautja/mask/togglesight
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "togglesight"
full_name = "Toggle mask visors"
keybind_signal = COMSIG_KB_YAUTJA_LINK_BRACER

/datum/keybinding/yautja/mask/togglesight/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
var/obj/item/clothing/mask/gas/yautja/mask = H.wear_mask
mask.togglesight()
return TRUE
keybind_signal = COMSIG_KB_YAUTJA_MASK_TOGGLESIGHT

// teleporter

Expand Down
Loading

0 comments on commit 9cc3d9e

Please sign in to comment.