mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
adds more hand keybinds (#25225)
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
#define SLOT_HUD_COLLAR 23
|
||||
#define SLOT_HUD_AMOUNT 23
|
||||
|
||||
// Boolean defines for hands
|
||||
#define HAND_BOOL_RIGHT 0
|
||||
#define HAND_BOOL_LEFT 1
|
||||
|
||||
// accessory slots
|
||||
#define ACCESSORY_SLOT_DECOR 1
|
||||
#define ACCESSORY_SLOT_UTILITY 2
|
||||
|
||||
@@ -486,9 +486,9 @@
|
||||
var/mob/M = usr
|
||||
switch(name)
|
||||
if("right hand", "r_hand")
|
||||
M.activate_hand("r")
|
||||
M.activate_hand(HAND_BOOL_RIGHT)
|
||||
if("left hand", "l_hand")
|
||||
M.activate_hand("l")
|
||||
M.activate_hand(HAND_BOOL_LEFT)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/screen/swap_hand
|
||||
|
||||
@@ -42,6 +42,22 @@
|
||||
. = ..()
|
||||
C.mob.swap_hand()
|
||||
|
||||
/datum/keybinding/mob/hand_right
|
||||
name = "Swap to/Activate Right Hand"
|
||||
|
||||
/datum/keybinding/mob/hand_right/down(client/C)
|
||||
. = ..()
|
||||
if(!C.mob.activate_hand(HAND_BOOL_RIGHT))
|
||||
C.mob.mode()
|
||||
|
||||
/datum/keybinding/mob/hand_left
|
||||
name = "Swap to/Activate Left Hand"
|
||||
|
||||
/datum/keybinding/mob/hand_left/down(client/C)
|
||||
. = ..()
|
||||
if(!C.mob.activate_hand(HAND_BOOL_LEFT))
|
||||
C.mob.mode()
|
||||
|
||||
// Intents
|
||||
/datum/keybinding/mob/prev_intent
|
||||
name = "Previous Intent"
|
||||
|
||||
@@ -194,18 +194,11 @@
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_SWAP_HANDS)
|
||||
|
||||
|
||||
/mob/living/carbon/activate_hand(selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.
|
||||
|
||||
if(istext(selhand))
|
||||
selhand = lowertext(selhand)
|
||||
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
|
||||
/mob/living/carbon/activate_hand(selhand)
|
||||
if(selhand != hand)
|
||||
swap_hand()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if(health < HEALTH_THRESHOLD_CRIT)
|
||||
|
||||
@@ -918,7 +918,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
return
|
||||
|
||||
/mob/proc/activate_hand(selhand)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/mob/dead/observer/verb/respawn()
|
||||
set name = "Respawn as NPC"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/memory = ""
|
||||
var/notransform = FALSE //Carbon
|
||||
/// True for left hand active, otherwise for right hand active
|
||||
var/hand = null
|
||||
var/hand = HAND_BOOL_RIGHT
|
||||
var/real_name = null
|
||||
var/flavor_text = ""
|
||||
var/med_record = ""
|
||||
|
||||
Reference in New Issue
Block a user