mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Readded monkey dexterity checks in each attack_hand as appropriate.
This commit is contained in:
@@ -981,7 +981,6 @@
|
|||||||
#include "code\modules\mob\living\carbon\human\examine.dm"
|
#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.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_attackhand.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_damage.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
A.attack_hand(src)
|
A.attack_hand(src)
|
||||||
|
|
||||||
/atom/proc/attack_hand(mob/user as mob)
|
/atom/proc/attack_hand(mob/user as mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -54,6 +55,12 @@
|
|||||||
Monkeys
|
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
|
Monkey RestrainedClickOn() was apparently the
|
||||||
one and only use of all of the restrained click code
|
one and only use of all of the restrained click code
|
||||||
|
|||||||
@@ -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!"
|
user << "The device is a solid button, there's nothing you can do with it!"
|
||||||
|
|
||||||
/obj/machinery/readybutton/attack_hand(mob/user as mob)
|
/obj/machinery/readybutton/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||||
user << "This device is not powered."
|
user << "This device is not powered."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
|
|
||||||
currentarea = get_area(src.loc)
|
currentarea = get_area(src.loc)
|
||||||
if(!currentarea)
|
if(!currentarea)
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
@@ -30,6 +30,10 @@
|
|||||||
src.ui_interact(user)
|
src.ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/embedded_controller/attack_hand(mob/user as mob)
|
/obj/machinery/embedded_controller/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
|
|
||||||
src.ui_interact(user)
|
src.ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/embedded_controller/ui_interact()
|
/obj/machinery/embedded_controller/ui_interact()
|
||||||
|
|||||||
@@ -127,6 +127,10 @@
|
|||||||
interact(user, 1)
|
interact(user, 1)
|
||||||
|
|
||||||
attack_hand(var/mob/user)
|
attack_hand(var/mob/user)
|
||||||
|
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
|
|
||||||
interact(user, 0)
|
interact(user, 0)
|
||||||
|
|
||||||
interact(var/mob/user, var/ai = 0)
|
interact(var/mob/user, var/ai = 0)
|
||||||
|
|||||||
@@ -243,8 +243,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
return src.attack_hand(user)
|
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...############
|
/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)
|
if(!src.ispowered || src.isbroken)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
|
|
||||||
if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) )
|
if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) )
|
||||||
var/mob/living/human_or_robot_user = user
|
var/mob/living/human_or_robot_user = user
|
||||||
var/dat
|
var/dat
|
||||||
|
|||||||
@@ -94,6 +94,8 @@
|
|||||||
return
|
return
|
||||||
if(stat & NOPOWER)
|
if(stat & NOPOWER)
|
||||||
return
|
return
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
|
if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
|
||||||
dat+= "<HEAD><TITLE>Suit storage unit: Maintenance panel</TITLE></HEAD>"
|
dat+= "<HEAD><TITLE>Suit storage unit: Maintenance panel</TITLE></HEAD>"
|
||||||
dat+= "<Font color ='black'><B>Maintenance panel controls</B></font><HR>"
|
dat+= "<Font color ='black'><B>Maintenance panel controls</B></font><HR>"
|
||||||
@@ -776,6 +778,9 @@
|
|||||||
if(..() || stat & (BROKEN|NOPOWER))
|
if(..() || stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
|
|
||||||
if(electrified != 0)
|
if(electrified != 0)
|
||||||
if(src.shock(user, 100))
|
if(src.shock(user, 100))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -64,7 +64,6 @@
|
|||||||
if(!user || !src) return 0
|
if(!user || !src) return 0
|
||||||
if(!istype(user.loc,/turf)) return 0
|
if(!istype(user.loc,/turf)) return 0
|
||||||
if(!user.IsAdvancedToolUser())
|
if(!user.IsAdvancedToolUser())
|
||||||
user << "\red You don't have the dexterity to do this!"
|
|
||||||
return 0
|
return 0
|
||||||
var/title = "Sheet-Glass"
|
var/title = "Sheet-Glass"
|
||||||
title += " ([src.amount] sheet\s left)"
|
title += " ([src.amount] sheet\s left)"
|
||||||
@@ -145,7 +144,6 @@
|
|||||||
if(!user || !src) return 0
|
if(!user || !src) return 0
|
||||||
if(!istype(user.loc,/turf)) return 0
|
if(!istype(user.loc,/turf)) return 0
|
||||||
if(!user.IsAdvancedToolUser())
|
if(!user.IsAdvancedToolUser())
|
||||||
user << "\red You don't have the dexterity to do this!"
|
|
||||||
return 0
|
return 0
|
||||||
var/title = "Sheet Reinf. Glass"
|
var/title = "Sheet Reinf. Glass"
|
||||||
title += " ([src.amount] sheet\s left)"
|
title += " ([src.amount] sheet\s left)"
|
||||||
|
|||||||
@@ -8,6 +8,12 @@
|
|||||||
w_class = 2
|
w_class = 2
|
||||||
gas_transfer_coefficient = 0.90
|
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
|
/obj/item/clothing/mask/surgical
|
||||||
name = "sterile mask"
|
name = "sterile mask"
|
||||||
desc = "A sterile mask designed to help prevent the spread of diseases."
|
desc = "A sterile mask designed to help prevent the spread of diseases."
|
||||||
|
|||||||
@@ -691,9 +691,12 @@
|
|||||||
return number
|
return number
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
|
||||||
return species.has_fine_manipulation
|
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)
|
/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)))
|
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)))
|
||||||
|
|||||||
@@ -292,8 +292,10 @@
|
|||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//Unless its monkey mode monkeys cant use advanced tools
|
||||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//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
|
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())
|
/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())
|
||||||
@@ -312,6 +314,3 @@
|
|||||||
message = capitalize(trim_left(message))
|
message = capitalize(trim_left(message))
|
||||||
|
|
||||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||||
|
|
||||||
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A)
|
|
||||||
return
|
|
||||||
@@ -921,10 +921,10 @@ note dizziness decrements automatically in the mob's Life() proc.
|
|||||||
return facedir(SOUTH)
|
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
|
return 0
|
||||||
|
|
||||||
|
|
||||||
/mob/proc/Stun(amount)
|
/mob/proc/Stun(amount)
|
||||||
if(status_flags & CANSTUN)
|
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
|
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||||
|
|||||||
@@ -819,7 +819,6 @@
|
|||||||
if(inoperable())
|
if(inoperable())
|
||||||
return 0
|
return 0
|
||||||
if(!user.IsAdvancedToolUser())
|
if(!user.IsAdvancedToolUser())
|
||||||
user << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
|
||||||
return 0
|
return 0
|
||||||
if(user.restrained())
|
if(user.restrained())
|
||||||
user << "<span class='warning'>You must have free hands to use [src].</span>"
|
user << "<span class='warning'>You must have free hands to use [src].</span>"
|
||||||
|
|||||||
@@ -74,7 +74,6 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if (!user.IsAdvancedToolUser())
|
if (!user.IsAdvancedToolUser())
|
||||||
user << "\red You don't have the dexterity to do this!"
|
|
||||||
return
|
return
|
||||||
if(istype(user, /mob/living))
|
if(istype(user, /mob/living))
|
||||||
var/mob/living/M = user
|
var/mob/living/M = user
|
||||||
|
|||||||
@@ -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)
|
/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())
|
if (!user.IsAdvancedToolUser())
|
||||||
user << "\red You don't have the dexterity to do this!"
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|||||||
@@ -210,15 +210,21 @@
|
|||||||
|
|
||||||
// human interact with machine
|
// human interact with machine
|
||||||
/obj/machinery/disposal/attack_hand(mob/user as mob)
|
/obj/machinery/disposal/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
|
if(stat & BROKEN)
|
||||||
|
return
|
||||||
|
|
||||||
if(user && user.loc == src)
|
if(user && user.loc == src)
|
||||||
usr << "\red You cannot reach the controls from inside."
|
usr << "\red You cannot reach the controls from inside."
|
||||||
return
|
return
|
||||||
/*
|
|
||||||
if(mode==-1)
|
// Clumsy folks can only flush it.
|
||||||
usr << "\red The disposal units power is disabled."
|
if(user.IsAdvancedToolUser(1))
|
||||||
return
|
interact(user, 0)
|
||||||
*/
|
else
|
||||||
interact(user, 0)
|
flush = !flush
|
||||||
|
update()
|
||||||
|
return
|
||||||
|
|
||||||
// user interaction
|
// user interaction
|
||||||
/obj/machinery/disposal/interact(mob/user, var/ai=0)
|
/obj/machinery/disposal/interact(mob/user, var/ai=0)
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||||
user << "This device is not powered."
|
user << "This device is not powered."
|
||||||
return
|
return
|
||||||
|
if(!user.IsAdvancedToolUser())
|
||||||
|
return 0
|
||||||
if(busy)
|
if(busy)
|
||||||
user << "This device is busy."
|
user << "This device is busy."
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user