mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
* Combat Mechs Can Punch More Things Removes the var to check for the 5 things it can attack, instead it can punch anything (but not everything will take damage). Gives punching objects a check so you don't accidently smash something without meaning to. Gives closets and canisters a proc to take_damage so they'll actually get smashed by the mechs. * Take_Damage Boogaloo * More take_damage Stuff Adds click delay on attacking barriers. Proper noises when attacking material doors and barricades. More stuff can be broken by mech punch and simple mobs. * Adds changelong * usr to user
74 lines
1.5 KiB
Plaintext
74 lines
1.5 KiB
Plaintext
// Generic damage proc (slimes and monkeys).
|
|
/atom/proc/attack_generic(mob/user as mob)
|
|
return 0
|
|
|
|
/atom/proc/take_damage(var/damage)
|
|
return 0
|
|
|
|
/*
|
|
Humans:
|
|
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
|
|
|
Otherwise pretty standard.
|
|
*/
|
|
/mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity)
|
|
|
|
if(!..())
|
|
return
|
|
|
|
// Special glove functions:
|
|
// If the gloves do anything, have them return 1 to stop
|
|
// normal attack_hand() here.
|
|
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
|
if(istype(G) && G.Touch(A,1))
|
|
return
|
|
|
|
A.attack_hand(src)
|
|
|
|
/atom/proc/attack_hand(mob/user as mob)
|
|
return
|
|
|
|
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
|
return
|
|
|
|
/mob/living/carbon/human/RangedAttack(var/atom/A)
|
|
if(!gloves && !mutations.len && !spitting)
|
|
return
|
|
var/obj/item/clothing/gloves/G = gloves
|
|
if((LASER in mutations) && a_intent == I_HURT)
|
|
LaserEyes(A) // moved into a proc below
|
|
|
|
else if(istype(G) && G.Touch(A,0)) // for magic gloves
|
|
return
|
|
|
|
else if(TK in mutations)
|
|
A.attack_tk(src)
|
|
|
|
else if(spitting) //Only used by xenos right now, can be expanded.
|
|
Spit(A)
|
|
|
|
/mob/living/RestrainedClickOn(var/atom/A)
|
|
return
|
|
|
|
/*
|
|
Aliens
|
|
*/
|
|
|
|
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
|
return
|
|
|
|
/mob/living/carbon/alien/UnarmedAttack(var/atom/A, var/proximity)
|
|
|
|
if(!..())
|
|
return 0
|
|
|
|
setClickCooldown(get_attack_speed())
|
|
A.attack_generic(src,rand(5,6),"bitten")
|
|
|
|
/*
|
|
New Players:
|
|
Have no reason to click on anything at all.
|
|
*/
|
|
/mob/new_player/ClickOn()
|
|
return
|