mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
[NO GBP] Fixes toolboxes automatically using the first item, allows placing them on/into tables/racks/closets/crates (#88459)
## About The Pull Request Closes #88446 I swear to god I should stop listening to webedit suggestions ## Changelog 🆑 fix: Toolboxes can now be placed onto tables/into crates fix: Fixed toolboxes automatically using the first item in them /🆑
This commit is contained in:
@@ -25,6 +25,13 @@
|
||||
wound_bonus = 5
|
||||
/// How many interactions are we currently performing
|
||||
var/current_interactions = 0
|
||||
/// Items we should not interact with when left clicking
|
||||
var/static/list/lmb_exception_typecache = typecacheof(list(
|
||||
/obj/structure/table,
|
||||
/obj/structure/rack,
|
||||
/obj/structure/closet,
|
||||
/obj/machinery/disposal,
|
||||
))
|
||||
|
||||
/obj/item/storage/toolbox/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -45,6 +52,9 @@
|
||||
if (user.combat_mode || !user.has_hand_for_held_index(user.get_inactive_hand_index()))
|
||||
return NONE
|
||||
|
||||
if (is_type_in_typecache(interacting_with, lmb_exception_typecache) && !LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
return NONE
|
||||
|
||||
if (current_interactions)
|
||||
var/obj/item/other_tool = user.get_inactive_held_item()
|
||||
if (!istype(other_tool)) // what even
|
||||
@@ -60,7 +70,6 @@
|
||||
for (var/obj/item/tool in atom_storage.real_location)
|
||||
if(is_type_in_list(tool, GLOB.tool_items))
|
||||
item_radial[tool] = tool.appearance
|
||||
break
|
||||
|
||||
if (!length(item_radial))
|
||||
return NONE
|
||||
|
||||
Reference in New Issue
Block a user