Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into deadspidersprite
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdragonTOW committed Oct 4, 2023
2 parents 53adec6 + 59d41ea commit d31f123
Show file tree
Hide file tree
Showing 29 changed files with 656 additions and 217 deletions.
30 changes: 22 additions & 8 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
#define COMSIG_KG_CLIENT_RADIO_DOWN "keybinding_client_radio_down"

//Human
#define COMSIG_KB_HUMAN_QUICKEQUIP_DOWN "keybinding_human_quickequip_down"
#define COMSIG_KB_HUMAN_SECONDARY_DOWN "keybinding_human_secondary_down"
#define COMSIG_KB_HUMAN_TERTIARY_DOWN "keybinding_human_tertiary_down"
#define COMSIG_KB_HUMAN_QUATERNARY_DOWN "keybinding_human_quaternary_down"
#define COMSIG_KB_HUMAN_QUICK_EQUIP_DOWN "keybinding_human_quick_equip_down"

#define COMSIG_KB_HUMAN_ISSUE_ORDER "keybinding_human_issue_order"
#define COMSIG_KB_HUMAN_ISSUE_ORDER_MOVE "keybinding_human_issue_order_move"
#define COMSIG_KB_HUMAN_ISSUE_ORDER_HOLD "keybinding_human_issue_order_hold"
Expand All @@ -57,12 +51,31 @@
#define COMSIG_KB_HUMAN_SPECIALIST_ACTIVATION_ONE "keybinding_human_specialist_activation_one"
#define COMSIG_KB_HUMAN_SPECIALIST_ACTIVATION_TWO "keybinding_human_specialist_activation_two"

#define COMSIG_KB_HUMAN_PICK_UP "keybinding_human_pick_up"

#define COMSIG_KB_HUMAN_ROTATE_CHAIR "keybinding_human_rotate_chair"

#define COMSIG_KB_HUMAN_SHOW_HELD_ITEM "keybinding_human_show_held_item"

#define COMSIG_KB_HUMAN_CYCLE_HELMET_HUD "keybinding_human_cycle_helmet_hud"

// Human Inventory Navigation
#define COMSIG_KB_HUMAN_INTERACT_OTHER_HAND "keybinding_human_interact_other_hand"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_BACK "keybinding_human_interact_slot_back"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_BELT "keybinding_human_interact_slot_belt"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_UNIFORM "keybinding_human_interact_slot_uniform"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_SUIT "keybinding_human_interact_slot_suit"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_HELMET "keybinding_human_interact_slot_helmet"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_LEFT_POUCH "keybinding_human_interact_slot_left_pouch"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_RIGHT_POUCH "keybinding_human_interact_slot_right_pouch"
#define COMSIG_KB_HUMAN_INTERACT_SUIT_S_STORE "keybinding_human_interact_slot_suit_storage"

#define COMSIG_KB_HUMAN_INTERACT_QUICKEQUIP_DOWN "keybinding_human_interact_quickequip_down"
#define COMSIG_KB_HUMAN_INTERACT_SECONDARY_DOWN "keybinding_human_interact_secondary_down"
#define COMSIG_KB_HUMAN_INTERACT_TERTIARY_DOWN "keybinding_human_interact_tertiary_down"
#define COMSIG_KB_HUMAN_INTERACT_QUATERNARY_DOWN "keybinding_human_interact_quaternary_down"
#define COMSIG_KB_HUMAN_INTERACT_QUICK_EQUIP_DOWN "keybinding_human_interact_quick_equip_down"

#define COMSIG_KB_HUMAN_INTERACT_PICK_UP "keybinding_human_interact_pick_up"

// Human Combat
#define COMSIG_KB_HUMAN_WEAPON_FIELDSTRIP "keybinding_human_weapon_fieldstrip"
#define COMSIG_KB_HUMAN_WEAPON_BURSTFIRE "keybinding_human_weapon_burstfire"
Expand Down Expand Up @@ -199,6 +212,7 @@
#define CATEGORY_CARBON "CARBON"
#define CATEGORY_HUMAN "HUMAN"
#define CATEGORY_HUMAN_COMBAT "HUMAN COMBAT"
#define CATEGORY_HUMAN_INVENTORY "HUMAN INVENTORY"
#define CATEGORY_ROBOT "ROBOT"
#define CATEGORY_YAUTJA "YAUTJA"
#define CATEGORY_MISC "MISC"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@
/// The time it takes for a pylon to give one larva while activated
#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES)

/// The time until you can re-corrupt a comms relay after the last pylon was destroyed
#define XENO_PYLON_DESTRUCTION_DELAY (5 MINUTES)


/// The time against away_timer when an AFK xeno larva can be replaced
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
/// The time against away_timer when an AFK xeno (not larva) can be replaced
Expand Down
5 changes: 5 additions & 0 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ Quick adjacency (to turf):
/obj/item/Adjacent(atom/neighbor, recurse = 1)
if(neighbor == loc || (loc && neighbor == loc.loc))
return TRUE

// Internal storages have special relationships with the object they are connected to and we still want two depth adjacency for storages
if(istype(loc?.loc, /obj/item/storage/internal) && recurse > 0)
return loc.loc.Adjacent(neighbor, recurse)

if(issurface(loc))
return loc.Adjacent(neighbor, recurse) //Surfaces don't count as storage depth.
else if(istype(loc, /obj/item))
Expand Down
137 changes: 26 additions & 111 deletions code/datums/keybinding/human.dm
Original file line number Diff line number Diff line change
@@ -1,95 +1,10 @@
#define QUICK_EQUIP_PRIMARY 1
#define QUICK_EQUIP_SECONDARY 2
#define QUICK_EQUIP_TERTIARY 3
#define QUICK_EQUIP_QUATERNARY 4

/datum/keybinding/human
category = CATEGORY_HUMAN
weight = WEIGHT_MOB

/datum/keybinding/human/can_use(client/user)
return ishuman(user.mob)

/datum/keybinding/human/quick_equip
hotkey_keys = list("E")
classic_keys = list("E")
name = "quick_equip"
full_name = "Unholster"
description = "Take out an available weapon"
keybind_signal = COMSIG_KB_HUMAN_QUICKEQUIP_DOWN

/datum/keybinding/human/quick_equip/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.holster_verb(QUICK_EQUIP_PRIMARY)
return TRUE

/datum/keybinding/human/quick_equip_secondary
hotkey_keys = list("Shift+E")
classic_keys = list("Shift+E")
name = "quick_equip_secondary"
full_name = "Unholster secondary"
description = "Take out your secondary weapon"
keybind_signal = COMSIG_KB_HUMAN_SECONDARY_DOWN

/datum/keybinding/human/quick_equip_secondary/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.holster_verb(QUICK_EQUIP_SECONDARY)
return TRUE

/datum/keybinding/human/quick_equip_tertiary
hotkey_keys = list("Ctrl+E", "Alt+E")
classic_keys = list("Ctrl+E", "Alt+E")
name = "quick_equip_tertiary"
full_name = "Unholster tertiary"
description = "Take out your tertiary item."
keybind_signal = COMSIG_KB_HUMAN_TERTIARY_DOWN

/datum/keybinding/human/quick_equip_tertiary/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.holster_verb(QUICK_EQUIP_TERTIARY)
return TRUE

/datum/keybinding/human/quick_equip_quaternary
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "quick_equip_quaternary"
full_name = "Unholster quaternary"
description = "Take out your quaternary item."
keybind_signal = COMSIG_KB_HUMAN_QUATERNARY_DOWN

/datum/keybinding/human/quick_equip_quaternary/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.holster_verb(QUICK_EQUIP_QUATERNARY)
return TRUE

/datum/keybinding/human/quick_equip_inventory
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "quick_equip_inventory"
full_name = "Quick equip inventory"
description = "Quickly puts an item in the best slot available"
keybind_signal = COMSIG_KB_HUMAN_QUICK_EQUIP_DOWN

/datum/keybinding/human/quick_equip_inventory/down(client/user)
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.quick_equip()
return TRUE

/datum/keybinding/human/issue_order
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
Expand All @@ -103,8 +18,8 @@
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.issue_order(order)
var/mob/living/carbon/human/human_mob = user.mob
human_mob.issue_order(order)
return TRUE

/datum/keybinding/human/issue_order/move
Expand Down Expand Up @@ -139,8 +54,8 @@
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.spec_activation_one()
var/mob/living/carbon/human/human_mob = user.mob
human_mob.spec_activation_one()
return TRUE

/datum/keybinding/human/specialist_two
Expand All @@ -154,24 +69,8 @@
. = ..()
if(.)
return
var/mob/living/carbon/human/H = user.mob
H.spec_activation_two()
return TRUE

/datum/keybinding/human/pick_up
hotkey_keys = list("F")
classic_keys = list("Unbound")
name = "pick_up"
full_name = "Pick Up Dropped Items"
keybind_signal = COMSIG_KB_HUMAN_PICK_UP

/datum/keybinding/human/pick_up/down(client/user)
. = ..()
if(.)
return

var/mob/living/carbon/human/human_user = user.mob
human_user.pickup_recent()
var/mob/living/carbon/human/human_mob = user.mob
human_mob.spec_activation_two()
return TRUE

/datum/keybinding/human/rotate_chair
Expand Down Expand Up @@ -209,7 +108,23 @@
shown_item.showoff(human_user)
return TRUE

#undef QUICK_EQUIP_PRIMARY
#undef QUICK_EQUIP_SECONDARY
#undef QUICK_EQUIP_TERTIARY
#undef QUICK_EQUIP_QUATERNARY
/datum/keybinding/human/cycle_helmet_hud
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "cycle_helmet_hud"
full_name = "Cycle Helmet HUD"
keybind_signal = COMSIG_KB_HUMAN_CYCLE_HELMET_HUD

/datum/keybinding/human/cycle_helmet_hud/down(client/user)
. = ..()
if(.)
return

var/mob/living/carbon/human/human_user = user.mob
var/obj/item/clothing/head/helmet/marine/marine_helmet = human_user?.head
var/cycled_hud = marine_helmet?.cycle_huds(human_user)

var/datum/action/item_action/cycle_helmet_huds/cycle_action = locate() in marine_helmet.actions
cycle_action.set_action_overlay(cycled_hud)

return TRUE
1 change: 0 additions & 1 deletion code/datums/keybinding/human_combat.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/datum/keybinding/human/combat
category = CATEGORY_HUMAN_COMBAT
weight = WEIGHT_MOB

/datum/keybinding/human/combat/can_use(client/user)
. = ..()
Expand Down
Loading

0 comments on commit d31f123

Please sign in to comment.