mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Mob refactoring.
Updates Bump() code. Intents now use constants. Simple animals can now use languages without overriding say(). There is now a difference between being able to smash normal and reinforced walls. Reworks simple_animal/attackby so that constructs don't need to override it simply to add damage resistance.
This commit is contained in:
@@ -873,11 +873,11 @@
|
||||
var/phrase = "I don't want to exist anymore!"
|
||||
|
||||
/obj/structure/plushie/attack_hand(mob/user)
|
||||
if(user.a_intent == "help")
|
||||
if(user.a_intent == I_HELP)
|
||||
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
|
||||
else if (user.a_intent == "hurt")
|
||||
else if (user.a_intent == I_HURT)
|
||||
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
|
||||
else if (user.a_intent == "grab")
|
||||
else if (user.a_intent == I_GRAB)
|
||||
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
|
||||
@@ -915,11 +915,11 @@
|
||||
icon_state = "nymphplushie"
|
||||
|
||||
/obj/item/toy/plushie/attack_self(mob/user as mob)
|
||||
if(user.a_intent == "help")
|
||||
if(user.a_intent == I_HELP)
|
||||
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
|
||||
else if (user.a_intent == "hurt")
|
||||
else if (user.a_intent == I_HURT)
|
||||
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
|
||||
else if (user.a_intent == "grab")
|
||||
else if (user.a_intent == I_GRAB)
|
||||
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
|
||||
|
||||
@@ -74,7 +74,7 @@ var/last_chew = 0
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
if (!H.handcuffed) return
|
||||
if (H.a_intent != "hurt") return
|
||||
if (H.a_intent != I_HURT) return
|
||||
if (H.zone_sel.selecting != "mouth") return
|
||||
if (H.wear_mask) return
|
||||
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.a_intent != "help")
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
breaktape(W, user)
|
||||
|
||||
/obj/item/tape/attack_hand(mob/user as mob)
|
||||
if (user.a_intent == "help" && src.allowed(user))
|
||||
if (user.a_intent == I_HELP && src.allowed(user))
|
||||
user.show_viewers("\blue [user] lifts [src], allowing passage.")
|
||||
crumple()
|
||||
lifted = 1
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
|
||||
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
|
||||
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
|
||||
user << "You can't break the [src] with that!"
|
||||
return
|
||||
user.show_viewers("\blue [user] breaks the [src]!")
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
var/mob/living/L = M
|
||||
|
||||
var/target_zone = check_zone(user.zone_sel.selecting)
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == I_HURT)
|
||||
if (!..()) //item/attack() does it's own messaging and logs
|
||||
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
|
||||
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
*/
|
||||
if (user.a_intent == "hurt")
|
||||
if (user.a_intent == I_HURT)
|
||||
if(!..()) return
|
||||
//playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
|
||||
|
||||
if (!S) return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
|
||||
return ..()
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
|
||||
Reference in New Issue
Block a user