Readded monkey dexterity checks in each attack_hand as appropriate.

This commit is contained in:
Zuhayr
2014-11-13 17:46:37 +10:30
parent 90d65aed57
commit 4090f04839
17 changed files with 62 additions and 23 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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+= "<HEAD><TITLE>Suit storage unit: Maintenance panel</TITLE></HEAD>"
dat+= "<Font color ='black'><B>Maintenance panel controls</B></font><HR>"
@@ -776,6 +778,9 @@
if(..() || stat & (BROKEN|NOPOWER))
return
if(!user.IsAdvancedToolUser())
return 0
if(electrified != 0)
if(src.shock(user, 100))
return

View File

@@ -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)"

View File

@@ -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."

View File

@@ -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 << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
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)))

View File

@@ -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 << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
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
..(message, speaking, verb, alt_name, italics, message_range, used_radios)

View File

@@ -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

View File

@@ -819,7 +819,6 @@
if(inoperable())
return 0
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
return 0
if(user.restrained())
user << "<span class='warning'>You must have free hands to use [src].</span>"

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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