Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/ChaoticOnyx/OnyxBay into nec…
Browse files Browse the repository at this point in the history
…k_slot
  • Loading branch information
TobyThorne committed Aug 20, 2024
2 parents a1e0270 + fbba4f8 commit 9a8d209
Show file tree
Hide file tree
Showing 17 changed files with 94 additions and 32 deletions.
1 change: 1 addition & 0 deletions code/_helpers/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@

/mob/proc/can_block_magic()
return FALSE

//Find a dead mob with a brain and client.
/proc/find_dead_player(find_key, include_observers = 0)
if(isnull(find_key))
Expand Down
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
3 changes: 0 additions & 3 deletions code/game/objects/items/weapons/soap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
return
if(M.slip_on_obj(src, 2, 2))
reagents.remove_any(3)
if(rustg_rand_bool(0.001))
to_chat(M, SPAN_DANGER("You slipped so hard that you gibbed!"))
M.gib()

/obj/item/soap/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/clothing/underwear/base.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
/obj/item/underwear/proc/EquipUnderwear(mob/user, mob/living/carbon/human/H)
if(!CanEquipUnderwear(user, H))
return FALSE
return ForceEquipUnderwear(H, user)
if(!user.drop(src))
return FALSE
return ForceEquipUnderwear(H)

/obj/item/underwear/proc/ForceEquipUnderwear(mob/living/carbon/human/H, update_icons = TRUE)
// No matter how forceful, we still don't allow multiples of the same underwear type
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" = "ears2", "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
17 changes: 17 additions & 0 deletions html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@
</table>

<div class="commit">
<div class="date"><span>20 август 2024</span></div>
<h3 class="author">TobyThorne updated:</h3>
<ul class="changes">
<li class="green"><i class="fas fa-bug"></i><p>Починено снимание нижнего белья.</p>
<sup><a href="https://github.com/ChaoticOnyx/OnyxBay/pull/12734">#12734</a></sup></li>
<li class="green"><i class="fas fa-plus"></i><p>На интерфейс добавлена кнопка, открывающая инвентарь нижнего белья.</p>
<sup><a href="https://github.com/ChaoticOnyx/OnyxBay/pull/12734">#12734</a></sup></li>
<li class="green"><i class="fas fa-wrench"></i><p>Исправлены названия у слотов инвентаря в интерфейсе (i.e. &quot;i_clothing&quot; → &quot;Uniform&quot;, &quot;storage1&quot; → &quot;Left Pocket&quot;).</p>
<sup><a href="https://github.com/ChaoticOnyx/OnyxBay/pull/12734">#12734</a></sup></li>
<li class="green"><i class="fas fa-wrench"></i><p>На слоте правого уха теперь нарисовано правое ухо.</p>
<sup><a href="https://github.com/ChaoticOnyx/OnyxBay/pull/12734">#12734</a></sup></li>
</ul>
<h3 class="author">igorsaux updated:</h3>
<ul class="changes">
<li class="red"><i class="fas fa-minus"></i><p>Мыло теперь не так опасно.</p>
<sup><a href="https://github.com/ChaoticOnyx/OnyxBay/pull/12735">#12735</a></sup></li>
</ul>
<div class="date"><span>19 август 2024</span></div>
<h3 class="author">BaraBara updated:</h3>
<ul class="changes">
Expand Down
37 changes: 37 additions & 0 deletions html/changelogs/.all_changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
[
{
"author": "TobyThorne",
"date": "2024-08-20T00:00:00+03:00",
"changes": [
{
"prefix": "BugFix",
"message": "Починено снимание нижнего белья.",
"pr": 12734
},
{
"prefix": "RscAdd",
"message": "На интерфейс добавлена кнопка, открывающая инвентарь нижнего белья.",
"pr": 12734
},
{
"prefix": "Tweak",
"message": "Исправлены названия у слотов инвентаря в интерфейсе (i.e. \"i_clothing\" -> \"Uniform\", \"storage1\" -> \"Left Pocket\").",
"pr": 12734
},
{
"prefix": "Tweak",
"message": "На слоте правого уха теперь нарисовано правое ухо.",
"pr": 12734
}
]
},
{
"author": "igorsaux",
"date": "2024-08-20T00:00:00+03:00",
"changes": [
{
"prefix": "RscDel",
"message": "Мыло теперь не так опасно.",
"pr": 12735
}
]
},
{
"author": "BaraBara",
"date": "2024-08-19T00:00:00+03:00",
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.
2 changes: 1 addition & 1 deletion tools/ChangelogGenerator/last_pr.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
08/19/2024 14:36:01
08/20/2024 12:55:39

0 comments on commit 9a8d209

Please sign in to comment.