diff --git a/baystation12.dme b/baystation12.dme index d13c553649..2af4e4e2cd 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -981,7 +981,6 @@ #include "code\modules\mob\living\carbon\human\examine.dm" #include "code\modules\mob\living\carbon\human\human.dm" #include "code\modules\mob\living\carbon\human\human_attackhand.dm" -#include "code\modules\mob\living\carbon\human\human_attackpaw.dm" #include "code\modules\mob\living\carbon\human\human_damage.dm" #include "code\modules\mob\living\carbon\human\human_defense.dm" #include "code\modules\mob\living\carbon\human\human_defines.dm" diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 6ac412ec88..2d3f3c45da 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -14,6 +14,7 @@ return A.attack_hand(src) + /atom/proc/attack_hand(mob/user as mob) return @@ -54,6 +55,12 @@ Monkeys */ + +//TODO: Disease spreading and unarmed damage against mobs. +/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity) + if(!proximity) + A.attack_hand(src) + /* Monkey RestrainedClickOn() was apparently the one and only use of all of the restrained click code diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 2e186781e1..9ebc550119 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -518,10 +518,14 @@ var/global/list/holodeck_programs = list( user << "The device is a solid button, there's nothing you can do with it!" /obj/machinery/readybutton/attack_hand(mob/user as mob) + if(user.stat || stat & (NOPOWER|BROKEN)) user << "This device is not powered." return + if(!user.IsAdvancedToolUser()) + return 0 + currentarea = get_area(src.loc) if(!currentarea) del(src) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index e6fb2c0332..84fa419265 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -30,6 +30,10 @@ src.ui_interact(user) /obj/machinery/embedded_controller/attack_hand(mob/user as mob) + + if(!user.IsAdvancedToolUser()) + return 0 + src.ui_interact(user) /obj/machinery/embedded_controller/ui_interact() diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 140e4eb5c4..16e1cc032d 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -127,6 +127,10 @@ interact(user, 1) attack_hand(var/mob/user) + + if(!user.IsAdvancedToolUser()) + return 0 + interact(user, 0) interact(var/mob/user, var/ai = 0) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 0468c264f2..5e278bf2f5 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -243,8 +243,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co return src.attack_hand(user) /obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############ + if(!src.ispowered || src.isbroken) return + + if(!user.IsAdvancedToolUser()) + return 0 + if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) var/mob/living/human_or_robot_user = user var/dat diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 05a5a84eb3..68da5f0ef1 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -94,6 +94,8 @@ return if(stat & NOPOWER) return + if(!user.IsAdvancedToolUser()) + return 0 if(src.panelopen) //The maintenance panel is open. Time for some shady stuff dat+= "Suit storage unit: Maintenance panel" dat+= "Maintenance panel controls
" @@ -776,6 +778,9 @@ if(..() || stat & (BROKEN|NOPOWER)) return + if(!user.IsAdvancedToolUser()) + return 0 + if(electrified != 0) if(src.shock(user, 100)) return diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index c1126464f5..f65442e462 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -64,7 +64,6 @@ if(!user || !src) return 0 if(!istype(user.loc,/turf)) return 0 if(!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 var/title = "Sheet-Glass" title += " ([src.amount] sheet\s left)" @@ -145,7 +144,6 @@ if(!user || !src) return 0 if(!istype(user.loc,/turf)) return 0 if(!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 var/title = "Sheet Reinf. Glass" title += " ([src.amount] sheet\s left)" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index cca2dff7de..3f3094c794 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -8,6 +8,12 @@ w_class = 2 gas_transfer_coefficient = 0.90 +// Clumsy folks can't take the mask off themselves. +/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob) + if(user.wear_mask == src && !user.IsAdvancedToolUser()) + return 0 + ..() + /obj/item/clothing/mask/surgical name = "sterile mask" desc = "A sterile mask designed to help prevent the spread of diseases." diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4c58f67a79..2b6ec75ac0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -691,9 +691,12 @@ return number -/mob/living/carbon/human/IsAdvancedToolUser() - return species.has_fine_manipulation - +/mob/living/carbon/human/IsAdvancedToolUser(var/silent) + if(species.has_fine_manipulation) + return 1 + if(!silent) + src << "You don't have the dexterity to use [src]!" + return 0 /mob/living/carbon/human/abiotic(var/full_body = 0) if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves))) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index bd12e4b154..4d5f88095e 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -292,8 +292,10 @@ del(src) return - -/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools +//Unless its monkey mode monkeys cant use advanced tools +/mob/living/carbon/monkey/IsAdvancedToolUser(var/silent) + if(!silent) + src << "You don't have the dexterity to use [src]!" return 0 /mob/living/carbon/monkey/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list()) @@ -311,7 +313,4 @@ message = capitalize(trim_left(message)) - ..(message, speaking, verb, alt_name, italics, message_range, used_radios) - -/mob/living/carbon/monkey/UnarmedAttack(var/atom/A) - return \ No newline at end of file + ..(message, speaking, verb, alt_name, italics, message_range, used_radios) \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9577a476f6..1233923ca5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -921,10 +921,10 @@ note dizziness decrements automatically in the mob's Life() proc. return facedir(SOUTH) -/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check +//This might need a rename but it should replace the can this mob use things check +/mob/proc/IsAdvancedToolUser() return 0 - /mob/proc/Stun(amount) if(status_flags & CANSTUN) stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 12b16a54ef..e906bf99b0 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -819,7 +819,6 @@ if(inoperable()) return 0 if(!user.IsAdvancedToolUser()) - user << "You don't have the dexterity to use [src]!" return 0 if(user.restrained()) user << "You must have free hands to use [src]." diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 3d4ea67c3b..c7a62e7f5c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -74,7 +74,6 @@ return if (!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return if(istype(user, /mob/living)) var/mob/living/M = user diff --git a/code/modules/projectiles/guns/projectile/launcher.dm b/code/modules/projectiles/guns/projectile/launcher.dm index c367780a5e..5f9d9fdfde 100644 --- a/code/modules/projectiles/guns/projectile/launcher.dm +++ b/code/modules/projectiles/guns/projectile/launcher.dm @@ -39,7 +39,6 @@ /obj/item/weapon/gun/launcher/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0) if (!user.IsAdvancedToolUser()) - user << "\red You don't have the dexterity to do this!" return 0 add_fingerprint(user) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index ebf10843d9..bf77c47d59 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -210,15 +210,21 @@ // human interact with machine /obj/machinery/disposal/attack_hand(mob/user as mob) + + if(stat & BROKEN) + return + if(user && user.loc == src) usr << "\red You cannot reach the controls from inside." return - /* - if(mode==-1) - usr << "\red The disposal units power is disabled." - return - */ - interact(user, 0) + + // Clumsy folks can only flush it. + if(user.IsAdvancedToolUser(1)) + interact(user, 0) + else + flush = !flush + update() + return // user interaction /obj/machinery/disposal/interact(mob/user, var/ai=0) diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index bda06182ef..87514a5473 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -49,6 +49,8 @@ if(user.stat || stat & (NOPOWER|BROKEN)) user << "This device is not powered." return + if(!user.IsAdvancedToolUser()) + return 0 if(busy) user << "This device is busy." return