Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyThorne committed Aug 20, 2024
1 parent 8bac87a commit 3511d0d
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 27 deletions.
2 changes: 2 additions & 0 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@

#define ui_head "WEST+1:8,SOUTH+3:11"

#define ui_underwear "WEST:6,SOUTH+3:11"

//Intent small buttons
#define ui_help_small "EAST-3:8,SOUTH:1"
#define ui_disarm_small "EAST-3:15,SOUTH:18"
Expand Down
12 changes: 6 additions & 6 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
inv_box.alpha = ui_alpha

var/list/slot_data = hud_data.gear[gear_slot]
inv_box.SetName(gear_slot)
inv_box.SetName(slot_data["name"])
inv_box.screen_loc = slot_data["loc"]
inv_box.slot_id = slot_data["slot"]
inv_box.icon_state = slot_data["state"]
Expand Down Expand Up @@ -98,7 +98,7 @@
if(hud_data.has_hands)

using = new /atom/movable/screen()
using.SetName("equip")
using.SetName("Equip")
using.icon = ui_style
using.icon_state = "act_equip"
using.screen_loc = ui_equip
Expand All @@ -107,7 +107,7 @@
static_inventory += using

inv_box = new /atom/movable/screen/inventory()
inv_box.SetName("r_hand")
inv_box.SetName("Right Hand")
inv_box.icon = ui_style
inv_box.icon_state = "r_hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
Expand All @@ -121,7 +121,7 @@
static_inventory += inv_box

inv_box = new /atom/movable/screen/inventory()
inv_box.SetName("l_hand")
inv_box.SetName("Left Hand")
inv_box.icon = ui_style
inv_box.icon_state = "l_hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
Expand All @@ -134,7 +134,7 @@
static_inventory += inv_box

using = new /atom/movable/screen/inventory()
using.SetName("hand")
using.SetName("Swap Hands")
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
Expand All @@ -143,7 +143,7 @@
static_inventory += using

using = new /atom/movable/screen/inventory()
using.SetName("hand")
using.SetName("Swap Hands")
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
Expand Down
17 changes: 11 additions & 6 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@

usr.hud_used.hidden_inventory_update()

if("equip")
if("Equip")
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1
if(ishuman(usr))
Expand Down Expand Up @@ -581,18 +581,23 @@
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1
switch(name)
if("r_hand")
if("Right Hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("r")
if("l_hand")
if("Left Hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("l")
if("swap")
usr.swap_hand()
if("hand")
if("Swap Hands")
usr.swap_hand()
if("Miscellaneous")
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
if(!H.show_inv(H, TRUE))
return

H.show_inventory?.open()
else
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand(0)
Expand Down
31 changes: 16 additions & 15 deletions code/modules/mob/living/carbon/human/species/species_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@
// to be drawn for the mob. This is fairly delicate, try to avoid messing with it
// unless you know exactly what it does.
var/list/gear = list(
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1),
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1),
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses", "toggle" = 1),
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"),
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"),
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id"),
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1),
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1),
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses", "toggle" = 1),
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"),
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"),
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id"),
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt"),
"underwear" = list("loc" = ui_underwear, "name" = "Miscellaneous", "slot" = null, "state" = "underwear", "toggle" = 1)
)

/datum/hud_data/New()
Expand Down
Binary file modified icons/hud/style/goon.dmi
Binary file not shown.
Binary file modified icons/hud/style/midnight.dmi
Binary file not shown.
Binary file modified icons/hud/style/minimalist.dmi
Binary file not shown.
Binary file modified icons/hud/style/old-noborder.dmi
Binary file not shown.
Binary file modified icons/hud/style/old.dmi
Binary file not shown.
Binary file modified icons/hud/style/orange.dmi
Binary file not shown.
Binary file modified icons/hud/style/white.dmi
Binary file not shown.

0 comments on commit 3511d0d

Please sign in to comment.