mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Merge pull request #7449 from SamHPurp/Intent-defines
Uses more intent defines
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
|
||||
@@ -421,7 +421,7 @@ BLIND // can't see anything
|
||||
if(!istype(H) || !istype(T))
|
||||
return 0
|
||||
|
||||
if(H.m_intent == "run")
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
if(shoe_sound_footstep >= 2)
|
||||
if(T.shoe_running_volume)
|
||||
playsound(src, shoe_sound, T.shoe_running_volume, 1)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
return FALSE
|
||||
if(cell)
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.a_intent == I_HARM)
|
||||
if(H.a_intent == INTENT_HARM)
|
||||
var/mob/living/carbon/C = A
|
||||
if(cell.use(stun_cost))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
|
||||
to_chat(user, "<span class='warning'>You need an empty hand to draw the [holstered]!</span>")
|
||||
else
|
||||
if(user.a_intent == I_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
usr.visible_message("<span class='warning'>[user] draws the [holstered], ready to shoot!</span></span>", \
|
||||
"<span class='warning'>You draw the [holstered], ready to shoot!</span>")
|
||||
else
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
usesound = 'sound/items/Welder2.ogg'
|
||||
|
||||
/obj/item/device/fluff/tattoo_gun/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(user.a_intent == "harm")
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='warning'>[user] stabs [M] with the [src]!</span>", "<span class='warning'>You stab [M] with the [src]!</span>")
|
||||
to_chat(M, "<span class='userdanger'>[user] stabs you with the [src]!<br></span><span class = 'warning'>You feel a tiny prick!</span>")
|
||||
return
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
|
||||
/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/pet/cat))
|
||||
if(M.a_intent == I_HELP) //Cats can try to fish in open tanks on help intent
|
||||
if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent
|
||||
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
|
||||
M.visible_message("[M.name] stares at into \the [src] while sitting perfectly still.", "The lid is closed, so you stare into \the [src] intently.")
|
||||
else
|
||||
@@ -535,7 +535,7 @@
|
||||
else
|
||||
attack_generic(M, M.harm_intent_damage)
|
||||
else if(istype(M, /mob/living/simple_animal/hostile/bear))
|
||||
if(M.a_intent == I_HELP) //Bears can try to fish in open tanks on help intent
|
||||
if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent
|
||||
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
|
||||
M.visible_message("[M.name] scrapes it's claws along \the [src]'s lid.", "The lid is closed, so you scrape your claws against \the [src]'s lid.")
|
||||
else
|
||||
@@ -555,7 +555,7 @@
|
||||
else
|
||||
if(M.melee_damage_upper > 0) //If the simple_animal has a melee_damage_upper defined, use that for the damage
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
else if(M.a_intent == I_HARM) //Let any simple_animal try to break tanks when on harm intent
|
||||
else if(M.a_intent == INTENT_HARM) //Let any simple_animal try to break tanks when on harm intent
|
||||
if(M.harm_intent_damage <= 0) return //If it doesn't do damage, don't bother with the attack
|
||||
attack_generic(M, M.harm_intent_damage)
|
||||
check_health()
|
||||
@@ -575,7 +575,7 @@
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
destroy()
|
||||
else if(usr.a_intent == I_HARM)
|
||||
else if(usr.a_intent == INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("<span class='danger'>[usr.name] bangs against the [src.name]!</span>", \
|
||||
@@ -611,7 +611,7 @@
|
||||
//Welders repair damaged tanks on help intent, damage on all others
|
||||
if(istype(O, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = O
|
||||
if(user.a_intent == I_HELP)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(W.isOn())
|
||||
if(cur_health < max_health)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(user.a_intent != I_HARM || !isGlass)
|
||||
if(user.a_intent != INTENT_HARM || !isGlass)
|
||||
return ..()
|
||||
|
||||
force = 15 //Smashing bottles over someoen's head hurts.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(canopened == 0)
|
||||
to_chat(user, "<span class='notice'>You need to open the drink!</span>")
|
||||
return
|
||||
else if(M == user && !reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head")
|
||||
else if(M == user && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_sel.selecting == "head")
|
||||
user.visible_message("<span class='warning'>[user] crushes ["\the [src]"] on \his forehead!</span>", "<span class='notice'>You crush \the [src] on your forehead.</span>")
|
||||
crush(user)
|
||||
return
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
|
||||
if(user.a_intent == I_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
if(processing)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
to_chat(user, "<span class='notice'>You add [O] to [name].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(user.a_intent != I_HARM)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
to_chat(user, "<span class='warning'>It would be dishonorable to attack a foe while they cannot retaliate.</span>")
|
||||
return
|
||||
switch(user.a_intent)
|
||||
if("disarm")
|
||||
if(INTENT_DISARM)
|
||||
if(!wielded)
|
||||
return ..()
|
||||
if(!ishuman(target))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
status_flags = CANSTUN|CANWEAKEN|CANPUSH
|
||||
mouse_opacity = 1
|
||||
faction = list("neutral")
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
wander = 0
|
||||
@@ -93,7 +93,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M)
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
toggle_mode()
|
||||
switch(mode)
|
||||
if(MINEDRONE_COLLECT)
|
||||
|
||||
@@ -273,7 +273,7 @@ Des: Removes all infected images from the alien.
|
||||
if(T.footstep_sounds["xeno"])
|
||||
var/S = pick(T.footstep_sounds["xeno"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
@@ -281,7 +281,7 @@ Des: Removes all infected images from the alien.
|
||||
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
var/volume = 5
|
||||
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
return 0 //silent when walking
|
||||
|
||||
if(buckled || lying || throwing)
|
||||
|
||||
@@ -15,7 +15,7 @@ In all, this is a lot like the monkey code. /N
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
AdjustSleeping(-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
@@ -23,7 +23,7 @@ In all, this is a lot like the monkey code. /N
|
||||
AdjustWeakened(-3)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
return 1
|
||||
|
||||
@@ -50,11 +50,11 @@ In all, this is a lot like the monkey code. /N
|
||||
return 0 //this is horrible but 100% necessary
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
if(I_HARM, I_DISARM)
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
|
||||
if(m_intent == "run" || resting)
|
||||
if(m_intent == MOVE_INTENT_RUN || resting)
|
||||
..()
|
||||
else
|
||||
adjustPlasma(-heal_rate)
|
||||
|
||||
@@ -160,13 +160,13 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(I_HARM)
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(1, 9)
|
||||
if(prob(90))
|
||||
@@ -191,7 +191,7 @@
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
|
||||
|
||||
if(I_DISARM)
|
||||
if(INTENT_DISARM)
|
||||
if(!lying)
|
||||
if(prob(5))//Very small chance to push an alien down.
|
||||
Paralyse(2)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
else if(lying || resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(m_intent == "run")
|
||||
else if(m_intent == MOVE_INTENT_RUN)
|
||||
icon_state = "alien[caste]_running"
|
||||
else
|
||||
icon_state = "alien[caste]_s"
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
if(.)
|
||||
if(nutrition && stat != DEAD)
|
||||
nutrition -= hunger_drain / 10
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= hunger_drain / 10
|
||||
if((FAT in mutations) && m_intent == "run" && bodytemperature <= 360)
|
||||
if((FAT in mutations) && m_intent == MOVE_INTENT_RUN && bodytemperature <= 360)
|
||||
bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
@@ -936,7 +936,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
|
||||
|
||||
/mob/living/carbon/proc/slip(var/description, var/stun, var/weaken, var/tilesSlipped, var/walkSafely, var/slipAny)
|
||||
if(flying || buckled || (walkSafely && m_intent == "walk"))
|
||||
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
|
||||
return 0
|
||||
if((lying) && (!(tilesSlipped)))
|
||||
return 0
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
|
||||
if(lying)
|
||||
if(surgeries.len)
|
||||
if(user != src && user.a_intent == "help")
|
||||
if(user != src && user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
@@ -37,4 +37,4 @@
|
||||
for(var/datum/disease/D in user.viruses)
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
|
||||
switch(L.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(I_HARM)
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
@@ -33,7 +33,7 @@
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
updatehealth()
|
||||
|
||||
if(I_DISARM)
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
if(prob(80))
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
..()
|
||||
|
||||
if((M != src) && M.a_intent != "help" && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
|
||||
if((M != src) && M.a_intent != INTENT_HELP && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_logs(M, src, "attempted to touch")
|
||||
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
|
||||
return 0
|
||||
@@ -53,7 +53,7 @@
|
||||
species.handle_attack_hand(src,M)
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
if(attacker_style && attacker_style.help_act(H, src))//adminfu only...
|
||||
return 1
|
||||
if(can_operate(src))
|
||||
@@ -99,14 +99,14 @@
|
||||
else
|
||||
to_chat(M, "<span class='danger'>You need to stay still while performing CPR!</span>")
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
if(attacker_style && attacker_style.grab_act(H, src))
|
||||
return 1
|
||||
else
|
||||
src.grabbedby(M)
|
||||
return 1
|
||||
|
||||
if(I_HARM)
|
||||
if(INTENT_HARM)
|
||||
//Vampire code
|
||||
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M)
|
||||
if(species && species.flags & NO_BLOOD)//why this hell were we never checkinf for this?
|
||||
@@ -168,7 +168,7 @@
|
||||
forcesay(hit_appends)
|
||||
|
||||
|
||||
if(I_DISARM)
|
||||
if(INTENT_DISARM)
|
||||
if(attacker_style && attacker_style.disarm_act(H, src))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -191,7 +191,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
if(!I || !user) return 0
|
||||
|
||||
if((istype(I, /obj/item/weapon/kitchen/knife/butcher/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == I_HARM)
|
||||
if((istype(I, /obj/item/weapon/kitchen/knife/butcher/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == INTENT_HARM)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new /obj/item/weapon/reagent_containers/food/snacks/meat/human(get_turf(src.loc))
|
||||
newmeat.name = src.real_name + newmeat.name
|
||||
newmeat.subjectname = src.real_name
|
||||
@@ -378,7 +378,7 @@ emp_act
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
|
||||
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == I_HARM)
|
||||
if(M.occupant.a_intent == INTENT_HARM)
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
if(T.footstep_sounds["human"])
|
||||
var/S = pick(T.footstep_sounds["human"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
var/range = -(world.view - 2)
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
range -= 0.333
|
||||
if(!shoes)
|
||||
range -= 0.333
|
||||
@@ -65,7 +65,7 @@
|
||||
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
|
||||
var/volume = 13
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
volume -= 4
|
||||
if(!shoes)
|
||||
volume -= 4
|
||||
@@ -91,4 +91,4 @@
|
||||
playsound(T, S, volume, 1, range)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -638,7 +638,7 @@
|
||||
if(canmove)
|
||||
if((graytide || (TRAITS & TRAIT_MEAN)) || retal)
|
||||
interest += targetInterestShift
|
||||
a_intent = "harm"
|
||||
a_intent = INTENT_HARM
|
||||
zone_sel.selecting = pick("chest","r_leg","l_leg","r_arm","l_arm","head")
|
||||
doing |= SNPC_FIGHTING
|
||||
if(retal)
|
||||
@@ -746,7 +746,7 @@
|
||||
tryWalk(TARGET)
|
||||
else
|
||||
if(Adjacent(TARGET))
|
||||
a_intent = pick("disarm", "harm")
|
||||
a_intent = pick(INTENT_DISARM, INTENT_HARM)
|
||||
M.attack_hand(src)
|
||||
timeout++
|
||||
else if(timeout >= 10 || !(targetRange(M) > 14))
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
var/mob/living/M = target
|
||||
if(istype(M))
|
||||
if(health > 0)
|
||||
if(M.a_intent == "help" && !incapacitated())
|
||||
if(M.a_intent == INTENT_HELP && !incapacitated())
|
||||
chatter()
|
||||
if(istype(target, /mob/living/carbon) && !retal && prob(SNPC_FUZZY_CHANCE_LOW))
|
||||
var/mob/living/carbon/C = target
|
||||
@@ -439,7 +439,7 @@
|
||||
tryWalk(target)
|
||||
else
|
||||
C.help_shake_act(src)
|
||||
if(M.a_intent == "harm")
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
retal = 1
|
||||
retal_target = target
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
if(grabbed_by.len > 0)
|
||||
for(var/obj/item/weapon/grab/G in grabbed_by)
|
||||
if(Adjacent(G))
|
||||
a_intent = "disarm"
|
||||
a_intent = INTENT_DISARM
|
||||
G.assailant.attack_hand(src)
|
||||
inactivity_period = 10
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
if(M.a_intent == I_HARM)
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(H.handcuffed)
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return
|
||||
var/turf/p_loc = M.loc
|
||||
|
||||
@@ -1092,8 +1092,8 @@ var/global/list/damage_icon_parts = list()
|
||||
if(legcuffed)
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
|
||||
if(m_intent != "walk")
|
||||
m_intent = "walk"
|
||||
if(m_intent != MOVE_INTENT_WALK)
|
||||
m_intent = MOVE_INTENT_WALK
|
||||
if(hud_used && hud_used.move_intent)
|
||||
hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
switch(L.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
return
|
||||
else
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
@@ -343,10 +343,10 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
help_shake_act(M)
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
@@ -393,10 +393,10 @@
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
|
||||
if(I_HARM)
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
if(prob(95))
|
||||
attacked += 10
|
||||
@@ -416,10 +416,10 @@
|
||||
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(I_DISARM)
|
||||
if(INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
@@ -460,7 +460,7 @@
|
||||
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(user.a_intent == I_HELP)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
if(!M.buckled && !M.has_buckled_mobs())
|
||||
var/mob_swap
|
||||
//the puller can always swap with it's victim if on grab intent
|
||||
if(M.pulledby == src && a_intent == I_GRAB)
|
||||
if(M.pulledby == src && a_intent == INTENT_GRAB)
|
||||
mob_swap = 1
|
||||
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
else if((M.restrained() || M.a_intent == I_HELP) && (restrained() || a_intent == I_HELP))
|
||||
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
|
||||
mob_swap = 1
|
||||
if(mob_swap)
|
||||
//switch our position with M
|
||||
@@ -176,7 +176,7 @@
|
||||
return 0
|
||||
var/obj/item/hand_item = get_active_hand()
|
||||
if(istype(hand_item, /obj/item/weapon/gun) && A != hand_item)
|
||||
if(a_intent == I_HELP || !ismob(A))
|
||||
if(a_intent == INTENT_HELP || !ismob(A))
|
||||
visible_message("<b>[src]</b> points to [A] with [hand_item]")
|
||||
return 1
|
||||
A.visible_message("<span class='danger'>[src] points [hand_item] at [A]!</span>",
|
||||
@@ -937,11 +937,11 @@
|
||||
. += config.run_speed
|
||||
else
|
||||
switch(m_intent)
|
||||
if("run")
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(drowsyness > 0)
|
||||
. += 6
|
||||
. += config.run_speed
|
||||
if("walk")
|
||||
if(MOVE_INTENT_WALK)
|
||||
. += config.walk_speed
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
|
||||
/mob/living/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant.a_intent == I_HARM)
|
||||
if(M.occupant.a_intent == INTENT_HARM)
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
switch(M.damtype)
|
||||
|
||||
@@ -677,7 +677,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
|
||||
|
||||
else //harm
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='notice'>[M] caresses [src]'s casing with its scythe like arm.</span>"), 1)
|
||||
@@ -508,7 +508,7 @@
|
||||
/mob/living/silicon/pai/attack_hand(mob/user as mob)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(user.a_intent == I_HELP)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
user.visible_message("<span class='notice'>[user] pets [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
//Actual picking-up event.
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
|
||||
@@ -575,7 +575,7 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP)
|
||||
if(W == module_active)
|
||||
return
|
||||
if(!getBruteLoss())
|
||||
@@ -594,7 +594,7 @@ var/list/robot_verbs_default = list(
|
||||
return
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == I_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
|
||||
if(!getFireLoss())
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
@@ -818,15 +818,15 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if((O.client && !( O.blinded )))
|
||||
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(I_HARM)
|
||||
if(INTENT_HARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(10, 20)
|
||||
if(prob(90))
|
||||
@@ -842,7 +842,7 @@ var/list/robot_verbs_default = list(
|
||||
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
|
||||
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
|
||||
|
||||
if(I_DISARM)
|
||||
if(INTENT_DISARM)
|
||||
if(!(lying))
|
||||
M.do_attack_animation(src)
|
||||
if(prob(85))
|
||||
@@ -923,7 +923,7 @@ var/list/robot_verbs_default = list(
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
if(!opened && (!istype(user, /mob/living/silicon)))
|
||||
if(user.a_intent == I_HELP)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
|
||||
"<span class='notice'>You pet [src]!</span>")
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
|
||||
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == "help")
|
||||
if(H.a_intent == INTENT_HELP)
|
||||
interact(H)
|
||||
else
|
||||
return ..()
|
||||
@@ -329,7 +329,7 @@
|
||||
ejectpai(user)
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
if(health >= maxHealth)
|
||||
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
|
||||
return
|
||||
|
||||
@@ -161,13 +161,13 @@ Auto Patrol[]"},
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == "harm")
|
||||
if(H.a_intent == INTENT_HARM)
|
||||
retaliate(H)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
|
||||
return
|
||||
if(!istype(W, /obj/item/weapon/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
|
||||
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
a_intent = "harm" //No swapping
|
||||
a_intent = INTENT_HARM //No swapping
|
||||
buckle_lying = 0
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
radio_channel = "Supply"
|
||||
|
||||
@@ -173,13 +173,13 @@ Auto Patrol: []"},
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == "harm")
|
||||
if(H.a_intent == INTENT_HARM)
|
||||
retaliate(H)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
|
||||
return
|
||||
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
|
||||
retaliate(user)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
response_harm = "punches"
|
||||
icon_dead = "shade_dead"
|
||||
speed = 0
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
stop_automated_movement = 1
|
||||
status_flags = CANPUSH
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
|
||||
@@ -557,8 +557,8 @@
|
||||
/mob/living/simple_animal/pet/corgi/attack_hand(mob/living/carbon/human/M)
|
||||
. = ..()
|
||||
switch(M.a_intent)
|
||||
if(I_HELP) wuv(1,M)
|
||||
if(I_HARM) wuv(-1,M)
|
||||
if(INTENT_HELP) wuv(1,M)
|
||||
if(INTENT_HARM) wuv(-1,M)
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/proc/wuv(change, mob/M)
|
||||
if(change)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/mob/living/simple_animal/diona/attack_hand(mob/living/carbon/human/M)
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
if(M.species && M.species.name == "Diona")
|
||||
to_chat(M, "You feel your being twine with that of [src] as it merges with your biomass.")
|
||||
to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.")
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
milk_content = min(50, milk_content+rand(5, 10))
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
|
||||
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
|
||||
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
|
||||
Weaken(30)
|
||||
icon_state = icon_dead
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
client.time_died_as_mouse = world.time
|
||||
|
||||
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
get_scooped(M)
|
||||
..()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
speak_emote = list("hisses")
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
@@ -141,7 +141,7 @@
|
||||
name = "lusty xenomorph maid"
|
||||
melee_damage_lower = 0
|
||||
melee_damage_upper = 0
|
||||
a_intent = "help"
|
||||
a_intent = INTENT_HELP
|
||||
friendly = "caresses"
|
||||
environment_smash = 0
|
||||
icon_state = "maid"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_dead = "null"
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
a_intent = "harm"
|
||||
a_intent = INTENT_HARM
|
||||
attacktext = "gores"
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "Attack the weak point for massive damage."
|
||||
health = 1000
|
||||
maxHealth = 1000
|
||||
a_intent = "harm"
|
||||
a_intent = INTENT_HARM
|
||||
sentience_type = SENTIENCE_BOSS
|
||||
environment_smash = 3
|
||||
luminosity = 3
|
||||
@@ -228,4 +228,4 @@
|
||||
/proc/ClearScore(client/player)
|
||||
world.SetScores(player.ckey, "", global.medal_hub, global.medal_pass)
|
||||
|
||||
#undef MEDAL_PREFIX
|
||||
#undef MEDAL_PREFIX
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
melee_damage_upper = 0
|
||||
attacktext = "barrels into"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = I_HELP
|
||||
a_intent = INTENT_HELP
|
||||
speak_emote = list("screeches")
|
||||
throw_message = "sinks in slowly, before being pushed out of "
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
response_disarm = "shoves"
|
||||
response_harm = "strikes"
|
||||
status_flags = 0
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
var/throw_message = "bounces off of"
|
||||
var/icon_aggro = null // for swapping to when we get aggressive
|
||||
see_in_dark = 8
|
||||
@@ -68,7 +68,7 @@
|
||||
melee_damage_lower = 12
|
||||
melee_damage_upper = 12
|
||||
attacktext = "bites into"
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
speak_emote = list("chitters")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
aggro_vision_range = 9
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M as mob)
|
||||
..()
|
||||
if(M.a_intent == I_HARM)
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
Bruise()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
speak = list("HONK", "Honk!", "Welcome to clown planet!")
|
||||
emote_see = list("honks")
|
||||
speak_chance = 1
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = 0
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
response_harm = "hits the"
|
||||
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
|
||||
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
stop_automated_movement_when_pulled = 0
|
||||
health = 300
|
||||
maxHealth = 300
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
melee_damage_upper = 15
|
||||
attacktext = "punches"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
unsuitable_atmos_damage = 15
|
||||
faction = list("russian")
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
maxbodytemp = 350
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
a_intent = I_HARM //so they don't get pushed around
|
||||
a_intent = INTENT_HARM //so they don't get pushed around
|
||||
|
||||
environment_smash = 1
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_living = "angel"
|
||||
icon_dead = "angel"
|
||||
gender = NEUTER
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
|
||||
response_help = "touches"
|
||||
response_disarm = "pushes"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
melee_damage_upper = 10
|
||||
attacktext = "punches"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
unsuitable_atmos_damage = 15
|
||||
faction = list("syndicate")
|
||||
check_friendly_fire = 1
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
a_intent = I_HARM
|
||||
a_intent = INTENT_HARM
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 0
|
||||
|
||||
@@ -304,12 +304,12 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
if(health > 0)
|
||||
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
if(M == src || anchored)
|
||||
return
|
||||
if(!(status_flags & CANPUSH))
|
||||
@@ -326,7 +326,7 @@
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(I_HARM, I_DISARM)
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
@@ -338,13 +338,13 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
|
||||
if(I_HARM, I_DISARM)
|
||||
if(INTENT_HARM, INTENT_DISARM)
|
||||
M.do_attack_animation(src)
|
||||
var/damage = rand(15, 30)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
|
||||
@@ -357,7 +357,7 @@
|
||||
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
|
||||
switch(L.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
status_flags = 0
|
||||
anchored = 1
|
||||
AIStatus = AI_OFF
|
||||
a_intent = "harm"
|
||||
a_intent = INTENT_HARM
|
||||
stop_automated_movement = 1
|
||||
wander = 0
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
@@ -81,4 +81,4 @@
|
||||
/mob/living/simple_animal/hostile/spawner/mining/basilisk
|
||||
name = "basilisk den"
|
||||
desc = "A den housing a nest of basilisks, bring a coat."
|
||||
mob_type = /mob/living/simple_animal/hostile/asteroid/basilisk
|
||||
mob_type = /mob/living/simple_animal/hostile/asteroid/basilisk
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = I_HELP//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/a_intent = INTENT_HELP//Living
|
||||
var/m_intent = MOVE_INTENT_RUN//Living
|
||||
var/lastKnownIP = null
|
||||
var/atom/movable/buckled = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
@@ -196,5 +196,5 @@
|
||||
var/list/permanent_huds = list()
|
||||
|
||||
var/list/actions = list()
|
||||
|
||||
|
||||
var/list/progressbars = null //for stacking do_after bars
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
var/mob/living/carbon/human/affected = affecting
|
||||
var/mob/living/carbon/human/attacker = assailant
|
||||
switch(assailant.a_intent)
|
||||
if(I_HELP)
|
||||
if(INTENT_HELP)
|
||||
/*if(force_down)
|
||||
to_chat(assailant, "<span class='warning'>You no longer pin [affecting] to the ground.</span>")
|
||||
force_down = 0
|
||||
@@ -324,10 +324,10 @@
|
||||
//This specific example would allow you to stop pinning people to the floor without moving away from them.
|
||||
return
|
||||
|
||||
if(I_GRAB)
|
||||
if(INTENT_GRAB)
|
||||
return
|
||||
|
||||
if(I_HARM) //This checks that the user is on harm intent.
|
||||
if(INTENT_HARM) //This checks that the user is on harm intent.
|
||||
if(last_hit_zone == "head") //This checks the hitzone the user has selected. In this specific case, they have the head selected.
|
||||
if(affecting.lying)
|
||||
return
|
||||
@@ -368,7 +368,7 @@
|
||||
|
||||
//This specific example would allow you to squish people's eyes with a GRAB_NECK.
|
||||
|
||||
if(I_DISARM) //This checks that the user is on disarm intent.
|
||||
if(INTENT_DISARM) //This checks that the user is on disarm intent.
|
||||
/* if(state < GRAB_AGGRESSIVE)
|
||||
to_chat(assailant, "<span class='warning'>You require a better grab to do this.</span>")
|
||||
return
|
||||
|
||||
@@ -319,20 +319,20 @@ proc/muffledspeech(phrase)
|
||||
return 0
|
||||
|
||||
//converts intent-strings into numbers and back
|
||||
var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM)
|
||||
var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
/proc/intent_numeric(argument)
|
||||
if(istext(argument))
|
||||
switch(argument)
|
||||
if(I_HELP) return 0
|
||||
if(I_DISARM) return 1
|
||||
if(I_GRAB) return 2
|
||||
if(INTENT_HELP) return 0
|
||||
if(INTENT_DISARM) return 1
|
||||
if(INTENT_GRAB) return 2
|
||||
else return 3
|
||||
else
|
||||
switch(argument)
|
||||
if(0) return I_HELP
|
||||
if(1) return I_DISARM
|
||||
if(2) return I_GRAB
|
||||
else return I_HARM
|
||||
if(0) return INTENT_HELP
|
||||
if(1) return INTENT_DISARM
|
||||
if(2) return INTENT_GRAB
|
||||
else return INTENT_HARM
|
||||
|
||||
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
|
||||
/mob/verb/a_intent_change(input as text)
|
||||
@@ -341,7 +341,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM)
|
||||
|
||||
if(ishuman(src) || isalienadult(src) || isbrain(src))
|
||||
switch(input)
|
||||
if(I_HELP,I_DISARM,I_GRAB,I_HARM)
|
||||
if(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
a_intent = input
|
||||
if("right")
|
||||
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
|
||||
@@ -352,14 +352,14 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM)
|
||||
|
||||
else if(isrobot(src) || islarva(src))
|
||||
switch(input)
|
||||
if(I_HELP)
|
||||
a_intent = I_HELP
|
||||
if(I_HARM)
|
||||
a_intent = I_HARM
|
||||
if(INTENT_HELP)
|
||||
a_intent = INTENT_HELP
|
||||
if(INTENT_HARM)
|
||||
a_intent = INTENT_HARM
|
||||
if("right","left")
|
||||
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
|
||||
if(hud_used && hud_used.action_intent)
|
||||
if(a_intent == I_HARM)
|
||||
if(a_intent == INTENT_HARM)
|
||||
hud_used.action_intent.icon_state = "harm"
|
||||
else
|
||||
hud_used.action_intent.icon_state = "help"
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if("Drone")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
|
||||
|
||||
new_xeno.a_intent = I_HARM
|
||||
new_xeno.a_intent = INTENT_HARM
|
||||
new_xeno.key = key
|
||||
|
||||
to_chat(new_xeno, "<B>You are now an alien.</B>")
|
||||
@@ -187,7 +187,7 @@
|
||||
qdel(t)
|
||||
|
||||
var/mob/living/simple_animal/pet/corgi/new_corgi = new /mob/living/simple_animal/pet/corgi (loc)
|
||||
new_corgi.a_intent = I_HARM
|
||||
new_corgi.a_intent = INTENT_HARM
|
||||
new_corgi.key = key
|
||||
|
||||
to_chat(new_corgi, "<B>You are now a Corgi. Yap Yap!</B>")
|
||||
@@ -218,7 +218,7 @@
|
||||
var/mob/new_mob = new mobpath(src.loc)
|
||||
|
||||
new_mob.key = key
|
||||
new_mob.a_intent = I_HARM
|
||||
new_mob.a_intent = INTENT_HARM
|
||||
|
||||
|
||||
to_chat(new_mob, "You suddenly feel more... animalistic.")
|
||||
@@ -235,7 +235,7 @@
|
||||
var/mob/new_mob = new mobpath(src.loc)
|
||||
|
||||
new_mob.key = key
|
||||
new_mob.a_intent = I_HARM
|
||||
new_mob.a_intent = INTENT_HARM
|
||||
to_chat(new_mob, "You feel more... animalistic")
|
||||
new_mob.update_pipe_vision()
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
if(!istype(A, /mob/living/carbon/human)) // Special moves only work on humans.
|
||||
user.pointed(A)
|
||||
return 0
|
||||
if(user.a_intent == "help") // No special move for help intent.
|
||||
if(user.a_intent == INTENT_HELP) // No special move for help intent.
|
||||
user.pointed(A)
|
||||
return 0
|
||||
if(!(A in range(1,user))) // Is the target within one tile of us?
|
||||
@@ -173,10 +173,10 @@
|
||||
var/mob/living/carbon/human/target = A
|
||||
|
||||
switch(user.a_intent)
|
||||
if("disarm")
|
||||
if(INTENT_DISARM)
|
||||
user_martial_art.wrist_wrench(user, target)
|
||||
if("grab")
|
||||
if(INTENT_GRAB)
|
||||
user_martial_art.choke_hold(user, target)
|
||||
if("harm")
|
||||
if(INTENT_HARM)
|
||||
user_martial_art.palm_strike(user, target)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -525,7 +525,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
|
||||
if(!S)
|
||||
return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2)
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2)
|
||||
return ..()
|
||||
|
||||
if(S.burn_dam)
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
else if(TK in user.mutations)
|
||||
to_chat(user, "You telekinetically remove the light [fitting].")
|
||||
else
|
||||
if(user.a_intent == I_DISARM || user.a_intent == I_GRAB)
|
||||
if(user.a_intent == INTENT_DISARM || user.a_intent == INTENT_GRAB)
|
||||
to_chat(user, "You try to remove the light [fitting], but you burn your hand on it!")
|
||||
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
@@ -696,7 +696,7 @@
|
||||
if(!proximity) return
|
||||
if(istype(target, /obj/machinery/light))
|
||||
return
|
||||
if(user.a_intent != I_HARM)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
return
|
||||
|
||||
shatter()
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
// a reasonable approximation of movement speed
|
||||
var/mob_speed = M.movement_delay()
|
||||
switch(M.m_intent)
|
||||
if("run")
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(M.drowsyness > 0)
|
||||
mob_speed += 6
|
||||
mob_speed += config.run_speed - 1
|
||||
if("walk")
|
||||
if(MOVE_INTENT_WALK)
|
||||
mob_speed += config.walk_speed - 1
|
||||
mob_speed = BASE_MOVE_DELAY / max(1, BASE_MOVE_DELAY + mob_speed)
|
||||
speed = min(speed + inertia * mob_speed, mob_speed)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
return
|
||||
if(!ismob(target) || user.a_intent == "harm") //melee attack
|
||||
if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(target == user && user.zone_sel.selecting != "mouth") //so we can't shoot ourselves (unless mouth selected)
|
||||
return
|
||||
@@ -232,7 +232,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
feedback_add_details("gun_fired","[type]")
|
||||
|
||||
/obj/item/weapon/gun/attack(mob/M as mob, mob/user)
|
||||
if(user.a_intent == "harm") //Flogging
|
||||
if(user.a_intent == INTENT_HARM) //Flogging
|
||||
..()
|
||||
else
|
||||
return
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||
if(flag)
|
||||
if(!(target in user.contents) && ismob(target))
|
||||
if(user.a_intent == "harm") // Flogging action
|
||||
if(user.a_intent == INTENT_HARM) // Flogging action
|
||||
return
|
||||
|
||||
if(isliving(user))
|
||||
|
||||
@@ -243,7 +243,7 @@ proc/wabbajack(mob/living/M)
|
||||
M.create_attack_log("<font color='orange'>[M.real_name] ([M.ckey]) became [new_mob.real_name].</font>")
|
||||
new_mob.attack_log = M.attack_log
|
||||
|
||||
new_mob.a_intent = I_HARM
|
||||
new_mob.a_intent = INTENT_HARM
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
else
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
return 1
|
||||
|
||||
if (!is_type_in_list(I, blend_items) && !is_type_in_list(I, juice_items))
|
||||
if(user.a_intent == I_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Cannot refine into a reagent!</span>")
|
||||
|
||||
@@ -373,8 +373,8 @@
|
||||
color = "#FF83A5"
|
||||
|
||||
/datum/reagent/love/on_mob_life(mob/living/M)
|
||||
if(M.a_intent == I_HARM)
|
||||
M.a_intent = I_HELP
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
M.a_intent = INTENT_HELP
|
||||
|
||||
if(prob(8))
|
||||
var/lovely_phrase = pick("appreciated", "loved", "pretty good", "really nice", "pretty happy with yourself, even though things haven't always gone as well as they could")
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
update_move_direction()
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
|
||||
else if(user.a_intent != "harm")
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
if(user.drop_item())
|
||||
I.forceMove(loc)
|
||||
else
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
to_chat(M, mymessage)
|
||||
|
||||
/obj/spacepod/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(user.a_intent == I_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
..()
|
||||
deal_damage(W.force)
|
||||
else
|
||||
@@ -408,7 +408,7 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
|
||||
cargo_hold.max_combined_w_class += SPE.storage_mod["w_class"]
|
||||
|
||||
/obj/spacepod/attack_hand(mob/user as mob)
|
||||
if(user.a_intent == I_GRAB && unlocked)
|
||||
if(user.a_intent == INTENT_GRAB && unlocked)
|
||||
var/mob/target
|
||||
if(pilot)
|
||||
target = pilot
|
||||
|
||||
@@ -305,8 +305,8 @@ var/static/regex/multispin_words = regex("like a record baby")
|
||||
else if((findtext(message, walk_words)))
|
||||
for(var/V in listeners)
|
||||
var/mob/living/L = V
|
||||
if(L.m_intent != "walk")
|
||||
L.m_intent = "walk"
|
||||
if(L.m_intent != MOVE_INTENT_WALK)
|
||||
L.m_intent = MOVE_INTENT_WALK
|
||||
if(L.hud_used)
|
||||
L.hud_used.move_intent.icon_state = "walking"
|
||||
next_command = world.time + cooldown_meme
|
||||
@@ -315,8 +315,8 @@ var/static/regex/multispin_words = regex("like a record baby")
|
||||
else if((findtext(message, run_words)))
|
||||
for(var/V in listeners)
|
||||
var/mob/living/L = V
|
||||
if(L.m_intent != "run")
|
||||
L.m_intent = "run"
|
||||
if(L.m_intent != MOVE_INTENT_RUN)
|
||||
L.m_intent = MOVE_INTENT_RUN
|
||||
if(L.hud_used)
|
||||
L.hud_used.move_intent.icon_state = "running"
|
||||
next_command = world.time + cooldown_meme
|
||||
@@ -324,25 +324,25 @@ var/static/regex/multispin_words = regex("like a record baby")
|
||||
//HELP INTENT
|
||||
else if((findtext(message, helpintent_words)))
|
||||
for(var/mob/living/carbon/human/H in listeners)
|
||||
H.a_intent_change(I_HELP)
|
||||
H.a_intent_change(INTENT_HELP)
|
||||
next_command = world.time + cooldown_meme
|
||||
|
||||
//DISARM INTENT
|
||||
else if((findtext(message, disarmintent_words)))
|
||||
for(var/mob/living/carbon/human/H in listeners)
|
||||
H.a_intent_change(I_DISARM)
|
||||
H.a_intent_change(INTENT_DISARM)
|
||||
next_command = world.time + cooldown_meme
|
||||
|
||||
//GRAB INTENT
|
||||
else if((findtext(message, grabintent_words)))
|
||||
for(var/mob/living/carbon/human/H in listeners)
|
||||
H.a_intent_change(I_GRAB)
|
||||
H.a_intent_change(INTENT_GRAB)
|
||||
next_command = world.time + cooldown_meme
|
||||
|
||||
//HARM INTENT
|
||||
else if((findtext(message, harmintent_words)))
|
||||
for(var/mob/living/carbon/human/H in listeners)
|
||||
H.a_intent_change(I_HARM)
|
||||
H.a_intent_change(INTENT_HARM)
|
||||
next_command = world.time + cooldown_meme
|
||||
|
||||
//THROW/CATCH
|
||||
@@ -452,4 +452,4 @@ var/static/regex/multispin_words = regex("like a record baby")
|
||||
next_command = world.time + cooldown_none
|
||||
|
||||
message_admins("[key_name_admin(owner)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
|
||||
log_game("[key_name(owner)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
|
||||
log_game("[key_name(owner)] has said '[log_message]' with a Voice of God, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(target_zone == surgery.location)
|
||||
initiate(user, target, target_zone, tool, surgery)
|
||||
return 1//returns 1 so we don't stab the guy in the dick or wherever.
|
||||
if(isrobot(user) && user.a_intent != I_HARM) //to save asimov borgs a LOT of heartache
|
||||
if(isrobot(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user