From 91bfedcd16dcf817e5b9de8e47ae75ab1c0ec39b Mon Sep 17 00:00:00 2001
From: Ghom <42542238+Ghommie@users.noreply.github.com>
Date: Tue, 10 Nov 2020 19:15:31 +0100
Subject: [PATCH] Refactored 'IsAdvancedToolUser' into a macro plus relative
trait. Tweaked 'can_hold_items'. (#54665)
The PR aims to allow advanced tool users to be defined by traits rather than a hardcoded proc.
Also necessary for the CanUseTopic refactor I'm working on, which will be PRed separately for atomization purposes.
This PR also fixes an inconsistency with can_hold_items (since monkeys can actually hold items).
---
code/__DEFINES/traits.dm | 4 +++-
code/__HELPERS/mobs.dm | 2 ++
code/_globalvars/traits.dm | 1 +
code/_onclick/other_mobs.dm | 2 +-
code/game/machinery/Sleeper.dm | 2 +-
code/game/machinery/dna_scanner.dm | 2 +-
code/game/machinery/hypnochair.dm | 2 +-
code/game/objects/items.dm | 2 +-
code/game/objects/items/RPD.dm | 2 +-
code/game/objects/items/crab17.dm | 2 +-
code/game/objects/items/devices/PDA/PDA.dm | 2 +-
code/game/objects/items/devices/flashlight.dm | 2 +-
code/game/objects/items/devices/laserpointer.dm | 2 +-
code/game/objects/items/dna_injector.dm | 2 +-
code/game/objects/items/implants/implantchair.dm | 2 +-
code/game/objects/items/inducer.dm | 2 +-
code/game/objects/items/storage/book.dm | 2 +-
code/game/objects/items/toys.dm | 2 +-
code/game/turfs/closed/minerals.dm | 2 +-
code/game/turfs/closed/walls.dm | 2 +-
code/modules/antagonists/monkey/monkey.dm | 10 ++++++++++
.../machinery/components/unary_devices/cryo.dm | 2 +-
code/modules/instruments/items.dm | 2 +-
code/modules/mob/living/carbon/alien/alien.dm | 6 +-----
code/modules/mob/living/carbon/human/human.dm | 4 +---
code/modules/mob/living/carbon/human/human_helpers.dm | 5 -----
code/modules/mob/living/carbon/monkey/monkey.dm | 6 ------
code/modules/mob/living/living.dm | 2 +-
code/modules/mob/living/silicon/robot/inventory.dm | 3 +++
code/modules/mob/living/silicon/silicon.dm | 4 +---
code/modules/mob/living/simple_animal/simple_animal.dm | 6 ++----
code/modules/mob/mob.dm | 6 +-----
code/modules/paperwork/handlabeler.dm | 2 +-
code/modules/power/cable.dm | 4 ++--
34 files changed, 48 insertions(+), 55 deletions(-)
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 52cdda24ec3..840f6a4d239 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -107,7 +107,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_CLUMSY "clumsy"
#define TRAIT_CHUNKYFINGERS "chunkyfingers" //means that you can't use weapons with normal trigger guards.
#define TRAIT_DUMB "dumb"
-#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE
+#define TRAIT_ADVANCEDTOOLUSER "advancedtooluser" //Whether a mob is dexterous enough to use machines and certain items or not.
+#define TRAIT_MONKEYLIKE "monkeylike" //Antagonizes the above.
#define TRAIT_PACIFISM "pacifism"
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
#define TRAIT_IGNOREDAMAGESLOWDOWN "ignoredamageslowdown"
@@ -325,6 +326,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define SCRYING_ORB "scrying-orb"
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
#define NUKEOP_TRAIT "nuke-op"
+#define JUNGLE_FEVER_TRAIT "jungle_fever"
#define DEATHSQUAD_TRAIT "deathsquad"
#define MEGAFAUNA_TRAIT "megafauna"
#define CLOWN_NUKE_TRAIT "clown-nuke"
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 5b96a03e9d3..597ec640c5e 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -614,3 +614,5 @@ GLOBAL_LIST_EMPTY(species_list)
else
. = pick(ais)
return .
+
+#define ISADVANCEDTOOLUSER(mob) (HAS_TRAIT(mob, TRAIT_ADVANCEDTOOLUSER) && !HAS_TRAIT(mob, TRAIT_MONKEYLIKE))
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index 3e230283af1..11e89d087a0 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -24,6 +24,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CLUMSY" = TRAIT_CLUMSY,
"TRAIT_CHUNKYFINGERS" = TRAIT_CHUNKYFINGERS,
"TRAIT_DUMB" = TRAIT_DUMB,
+ "TRAIT_ADVANCEDTOOLUSER" = TRAIT_ADVANCEDTOOLUSER,
"TRAIT_MONKEYLIKE" = TRAIT_MONKEYLIKE,
"TRAIT_PACIFISM" = TRAIT_PACIFISM,
"TRAIT_IGNORESLOWDOWN" = TRAIT_IGNORESLOWDOWN,
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 5be3c2f76d7..47165e12d39 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -51,7 +51,7 @@
/atom/proc/can_interact(mob/user)
if(!user.can_interact_with(src))
return FALSE
- if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
+ if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return FALSE
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index c67cd5c3d4c..634605d3f11 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -94,7 +94,7 @@
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
- if(HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !ISADVANCEDTOOLUSER(user))
return
close_machine(target)
diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm
index d710851ec5e..e4b5e98372a 100644
--- a/code/game/machinery/dna_scanner.dm
+++ b/code/game/machinery/dna_scanner.dm
@@ -140,7 +140,7 @@
toggle_open(user)
/obj/machinery/dna_scannernew/MouseDrop_T(mob/target, mob/user)
- if(user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !ISADVANCEDTOOLUSER(user))
return
close_machine(target)
diff --git a/code/game/machinery/hypnochair.dm b/code/game/machinery/hypnochair.dm
index 82f4a52a98a..64f5885a684 100644
--- a/code/game/machinery/hypnochair.dm
+++ b/code/game/machinery/hypnochair.dm
@@ -198,7 +198,7 @@
/obj/machinery/hypnochair/MouseDrop_T(mob/target, mob/user)
- if(HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
+ if(HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !ISADVANCEDTOOLUSER(user))
return
close_machine(target)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 34a2c07a4a3..987a36abeeb 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -421,7 +421,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
/obj/item/attack_alien(mob/user)
var/mob/living/carbon/alien/A = user
- if(!A.has_fine_manipulation)
+ if(!ISADVANCEDTOOLUSER(A))
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.dropItemToGround(src)
to_chat(user, "Your claws aren't capable of such fine manipulation!")
diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm
index f584886a30c..318f8827487 100644
--- a/code/game/objects/items/RPD.dm
+++ b/code/game/objects/items/RPD.dm
@@ -375,7 +375,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
return TRUE
/obj/item/pipe_dispenser/pre_attack(atom/A, mob/user)
- if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
+ if(!ISADVANCEDTOOLUSER(user) || istype(A, /turf/open/space/transit))
return ..()
var/atom/attack_target = A
diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm
index 4e28cb7124e..ca80a8a437c 100644
--- a/code/game/objects/items/crab17.dm
+++ b/code/game/objects/items/crab17.dm
@@ -9,7 +9,7 @@
var/dumped = FALSE
/obj/item/suspiciousphone/attack_self(mob/living/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "This device is too advanced for you!")
return
if(dumped)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 5b89284021e..5c08ae68d22 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/interact(mob/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index cfa6549003d..6bc79feec50 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -59,7 +59,7 @@
if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 736b766c9a6..595e96dd37c 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -75,7 +75,7 @@
if (!diode)
to_chat(user, "You point [src] at [target], but nothing happens!")
return
- if (!user.IsAdvancedToolUser())
+ if (!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
if(HAS_TRAIT(user, TRAIT_CHUNKYFINGERS))
diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm
index 479d2a72e82..6f7498f477c 100644
--- a/code/game/objects/items/dna_injector.dm
+++ b/code/game/objects/items/dna_injector.dm
@@ -48,7 +48,7 @@
return FALSE
/obj/item/dnainjector/attack(mob/target, mob/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
if(used)
diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm
index bc670815307..f5824858e65 100644
--- a/code/game/objects/items/implants/implantchair.dm
+++ b/code/game/objects/items/implants/implantchair.dm
@@ -143,7 +143,7 @@
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
- if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
+ if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !ISADVANCEDTOOLUSER(user))
return
if(isliving(user))
var/mob/living/L = user
diff --git a/code/game/objects/items/inducer.dm b/code/game/objects/items/inducer.dm
index 760303e50b0..3b67ce325ff 100644
--- a/code/game/objects/items/inducer.dm
+++ b/code/game/objects/items/inducer.dm
@@ -46,7 +46,7 @@
return ..()
/obj/item/inducer/proc/cantbeused(mob/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to use [src]!")
return TRUE
diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm
index 9883782b86f..27fa8d21699 100644
--- a/code/game/objects/items/storage/book.dm
+++ b/code/game/objects/items/storage/book.dm
@@ -137,7 +137,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
- if (!user.IsAdvancedToolUser())
+ if (!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 38cd53f0b3c..07af7c377b9 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -281,7 +281,7 @@
. = ..()
if (flag)
return
- if (!user.IsAdvancedToolUser())
+ if (!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
src.add_fingerprint(user)
diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm
index c36fbcbf4a3..643d47a0147 100644
--- a/code/game/turfs/closed/minerals.dm
+++ b/code/game/turfs/closed/minerals.dm
@@ -58,7 +58,7 @@
/turf/closed/mineral/attackby(obj/item/I, mob/user, params)
- if (!user.IsAdvancedToolUser())
+ if (!ISADVANCEDTOOLUSER(user))
to_chat(usr, "You don't have the dexterity to do this!")
return
diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm
index 12af8b80852..847b60358ac 100644
--- a/code/game/turfs/closed/walls.dm
+++ b/code/game/turfs/closed/walls.dm
@@ -178,7 +178,7 @@
/turf/closed/wall/attackby(obj/item/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
- if (!user.IsAdvancedToolUser())
+ if (!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return
diff --git a/code/modules/antagonists/monkey/monkey.dm b/code/modules/antagonists/monkey/monkey.dm
index 519fa00ac29..168fbb4b5b0 100644
--- a/code/modules/antagonists/monkey/monkey.dm
+++ b/code/modules/antagonists/monkey/monkey.dm
@@ -47,6 +47,16 @@
. = ..()
+/datum/antagonist/monkey/apply_innate_effects(mob/living/mob_override)
+ . = ..()
+ var/mob/living/M = mob_override || owner.current
+ ADD_TRAIT(M, TRAIT_ADVANCEDTOOLUSER, JUNGLE_FEVER_TRAIT)
+
+/datum/antagonist/monkey/remove_innate_effects(mob/living/mob_override)
+ . = ..()
+ var/mob/living/M = mob_override || owner.current
+ REMOVE_TRAIT(M, TRAIT_ADVANCEDTOOLUSER, JUNGLE_FEVER_TRAIT)
+
/datum/antagonist/monkey/create_team(datum/team/monkey/new_team)
if(!new_team)
for(var/datum/antagonist/monkey/H in GLOB.antagonists)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index f36067155fc..3c226fc72f9 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -350,7 +350,7 @@ GLOBAL_VAR_INIT(cryo_overlay_cover_off, mutable_appearance('icons/obj/cryogenics
. += "[src] seems empty."
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
- if(user.incapacitated() || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
+ if(user.incapacitated() || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !ISADVANCEDTOOLUSER(user))
return
if(isliving(target))
var/mob/living/L = target
diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm
index ba0d2d5cc93..20f6e64f7a9 100644
--- a/code/modules/instruments/items.dm
+++ b/code/modules/instruments/items.dm
@@ -31,7 +31,7 @@
return (BRUTELOSS)
/obj/item/instrument/attack_self(mob/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return TRUE
interact(user)
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 36642bd0c26..4da3627a370 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -12,7 +12,6 @@
bubble_icon = "alien"
type_of_meat = /obj/item/food/meat/slab/xeno
- var/has_fine_manipulation = 0
var/move_delay_add = 0 // movement delay to add
status_flags = CANUNCONSCIOUS|CANPUSH
@@ -71,9 +70,6 @@
/mob/living/carbon/alien/reagent_check(datum/reagent/R) //can metabolize all reagents
return 0
-/mob/living/carbon/alien/IsAdvancedToolUser()
- return has_fine_manipulation
-
/mob/living/carbon/alien/get_status_tab_items()
. = ..()
. += "Intent: [a_intent]"
@@ -135,7 +131,7 @@ Des: Removes all infected images from the alien.
qdel(src)
/mob/living/carbon/alien/can_hold_items()
- return has_fine_manipulation
+ return ISADVANCEDTOOLUSER(src) && ..()
/mob/living/carbon/alien/on_lying_down(new_lying_angle)
. = ..()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 97d65eff66d..8f815e443b5 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -22,6 +22,7 @@
AddComponent(/datum/component/personal_crafting)
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
AddComponent(/datum/component/bloodysoles/feet)
+ ADD_TRAIT(src, TRAIT_ADVANCEDTOOLUSER, ROUNDSTART_TRAIT)
GLOB.human_list += src
/mob/living/carbon/human/proc/setup_human_dna()
@@ -900,9 +901,6 @@
/mob/living/carbon/human/is_literate()
return TRUE
-/mob/living/carbon/human/can_hold_items()
- return TRUE
-
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
if(dna?.species) //prevents a runtime while a human is being monkeyfied
override = dna.species.override_float
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index 330eed9a1d7..7048ab37380 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -84,11 +84,6 @@
//Check inventory slots
return (wear_id?.GetID() || belt?.GetID())
-/mob/living/carbon/human/IsAdvancedToolUser()
- if(HAS_TRAIT(src, TRAIT_MONKEYLIKE))
- return FALSE
- return TRUE//Humans can use guns and such
-
/mob/living/carbon/human/reagent_check(datum/reagent/R)
return dna.species.handle_chemicals(R,src)
// if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species.
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 37b6ee9c34d..31b395cc6c4 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -108,12 +108,6 @@
internal = null
return
-
-/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys can't use advanced tools
- if(mind && is_monkey(mind))
- return TRUE
- return FALSE
-
/mob/living/carbon/monkey/can_use_guns(obj/item/G)
if(G.trigger_guard == TRIGGER_GUARD_NONE)
to_chat(src, "You are unable to fire this!")
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index f67d026a74d..4e7772cf95f 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1102,7 +1102,7 @@
if(G.trigger_guard == TRIGGER_GUARD_NONE)
to_chat(src, "You are unable to fire this!")
return FALSE
- if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
+ if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !ISADVANCEDTOOLUSER(src))
to_chat(src, "You try to fire [G], but can't use the trigger!")
return FALSE
return TRUE
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index 4baaf21a6de..6df46ddbbc0 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -403,3 +403,6 @@
/mob/living/silicon/robot/swap_hand()
cycle_modules()
+/mob/living/silicon/robot/can_hold_items()
+ return FALSE //held_items are used for modules.
+
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 6c9de851325..d5fb7f32e43 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -58,6 +58,7 @@
diag_hud_set_status()
diag_hud_set_health()
add_sensors()
+ ADD_TRAIT(src, TRAIT_ADVANCEDTOOLUSER, ROUNDSTART_TRAIT)
/mob/living/silicon/Destroy()
QDEL_NULL(radio)
@@ -164,9 +165,6 @@
to_chat(user, "[p_their(TRUE)] outer shell is too tough.")
return FALSE
-/mob/living/silicon/IsAdvancedToolUser()
- return TRUE
-
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
if(!istype(bot) || !istype(ai))
return FALSE
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index ac4b0b0afb1..e5449575629 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -176,6 +176,7 @@
update_simplemob_varspeed()
if(dextrous)
AddComponent(/datum/component/personal_crafting)
+ ADD_TRAIT(src, TRAIT_ADVANCEDTOOLUSER, ROUNDSTART_TRAIT)
if(speak)
speak = string_list(speak)
@@ -610,10 +611,7 @@
return (..() || access_card)
/mob/living/simple_animal/can_hold_items()
- return dextrous
-
-/mob/living/simple_animal/IsAdvancedToolUser()
- return dextrous
+ return dextrous && ..()
/mob/living/simple_animal/activate_hand(selhand)
if(!dextrous)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index c5c9d0ac445..4cf49389b66 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -925,10 +925,6 @@
client.last_turn = world.time + MOB_FACE_DIRECTION_DELAY
return TRUE
-///This might need a rename but it should replace the can this mob use things check
-/mob/proc/IsAdvancedToolUser()
- return FALSE
-
/mob/proc/swap_hand()
var/obj/item/held_item = get_active_held_item()
if(SEND_SIGNAL(src, COMSIG_MOB_SWAP_HANDS, held_item) & COMPONENT_BLOCK_SWAP)
@@ -1192,7 +1188,7 @@
///Can this mob hold items
/mob/proc/can_hold_items()
- return FALSE
+ return length(held_items)
/**
* Get the mob VV dropdown extras
diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm
index 783e3b36f91..6f3e8ecc956 100644
--- a/code/modules/paperwork/handlabeler.dm
+++ b/code/modules/paperwork/handlabeler.dm
@@ -63,7 +63,7 @@
/obj/item/hand_labeler/attack_self(mob/user)
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to use [src]!")
return
mode = !mode
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 6454792a44f..04cdf09dddd 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -440,7 +440,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/item/stack/cable_coil/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return FALSE
if(user.incapacitated() || !user.Adjacent(src))
@@ -738,7 +738,7 @@ GLOBAL_LIST(hub_radial_layer_list)
/obj/structure/cable/multilayer/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
- if(!user.IsAdvancedToolUser())
+ if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "You don't have the dexterity to do this!")
return FALSE
if(user.incapacitated() || !user.Adjacent(src))