Replace magic intent words with defines, grab fixes

This commit does the following:
 - Replaces all instances of magic intent words, like "harm" and
 "help" with defines, I_HELP, I_DISARM, I_GRAB, I_HARM

 - Fixes a few manual grab instances left over in attack_alien, they
 will now used grabbedby()
This commit is contained in:
Tigercat2000
2015-09-07 11:51:00 -07:00
parent e97e6d1cc9
commit be92665871
74 changed files with 233 additions and 282 deletions
@@ -16,7 +16,7 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if ("help")
if (I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
@@ -24,7 +24,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 ("grab")
if (I_GRAB)
src.grabbedby(M)
return 1
@@ -53,11 +53,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("help")
if(I_HELP)
help_shake_act(M)
if("grab")
if(I_GRAB)
src.grabbedby(M)
if ("harm", "disarm")
if (I_HARM, I_DISARM)
return 1
return 0
@@ -198,13 +198,13 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
grabbedby(M)
if ("harm")
if (I_HARM)
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
@@ -229,7 +229,7 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if ("disarm")
if (I_DISARM)
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Paralyse(2)
@@ -265,7 +265,7 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if ("help")
if (I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
@@ -291,7 +291,7 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
if(I_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -159,22 +159,11 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if (I_GRAB)
grabbedby(M)
else
M.do_attack_animation(src)
@@ -216,7 +205,7 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
+16 -16
View File
@@ -181,7 +181,7 @@
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
if((tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
@@ -414,7 +414,7 @@
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
if(I_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -431,7 +431,7 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted()
/mob/living/carbon/human/proc/is_loyalty_implanted()
for(var/L in contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/obj/item/organ/external/O in organs)
@@ -694,7 +694,7 @@
// if looting pockets with gloves, do it quietly
if(href_list["pockets"])
if(isanimal(usr))
if(isanimal(usr))
return //animals cannot strip people
if(frozen)
@@ -726,19 +726,19 @@
// Update strip window
if(usr.machine == src && in_range(src, usr))
show_inv(usr)
else if(!pickpocket)
// Display a warning if the user mocks up
src << "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>"
// if looting id with gloves, do it quietly - this allows pickpocket gloves to take/place id stealthily - Bone White
if(href_list["item"])
if(isanimal(usr))
if(isanimal(usr))
return //animals cannot strip people
if(frozen)
usr << "\red Do not attempt to strip frozen people."
return
return
var/itemTarget = href_list["item"]
if(itemTarget == "id")
if(pickpocket)
@@ -1158,7 +1158,7 @@
if(!fail_msg)
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
user << "<span class='alert'>[fail_msg]</span>"
/mob/living/carbon/human/proc/check_has_mouth()
// Todo, check stomach organ when implemented.
var/obj/item/organ/external/head/H = get_organ("head")
@@ -1170,7 +1170,7 @@
if(stat==DEAD)return
if(!check_has_mouth())
return
return
if(!lastpuke)
lastpuke = 1
@@ -1517,16 +1517,16 @@
W.add_fingerprint(src)
// Allows IPC's to change their monitor display
// Allows IPC's to change their monitor display
/mob/living/carbon/human/proc/change_monitor()
set category = "IC"
set category = "IC"
set name = "Change Monitor Display"
set desc = "Change the display on your monitor."
if(stat || paralysis || stunned || weakened)
src << "<span class='warning'>You cannot change your monitor display in your current state.</span>"
return
return
var/list/hair = list()
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
@@ -1540,7 +1540,7 @@
h_style = new_style
update_hair()
//Putting a couple of procs here that I don't know where else to dump.
//Mostly going to be used for Vox and Vox Armalis, but other human mobs might like them (for adminbuse).
/mob/living/carbon/human/proc/leap()
@@ -4,12 +4,12 @@
return 0
switch(M.a_intent)
if ("help")
if (I_HELP)
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if (I_GRAB)
grabbedby(M)
if("harm")
if(I_HARM)
M.do_attack_animation(src)
if (w_uniform)
w_uniform.add_fingerprint(M)
@@ -30,7 +30,7 @@
apply_effect(4, WEAKEN, armor_block)
updatehealth()
if("disarm")
if(I_DISARM)
M.do_attack_animation(src)
var/randn = rand(1, 100)
if (randn <= 80)
@@ -58,7 +58,7 @@
species.handle_attack_hand(src,M)
switch(M.a_intent)
if("help")
if(I_HELP)
if(health >= config.health_threshold_crit)
help_shake_act(M)
add_logs(src, M, "shaked")
@@ -88,14 +88,14 @@
add_logs(src, M, "CPRed")
return 1
if("grab")
if(I_GRAB)
if(attacker_style && attacker_style.grab_act(H, src))
return 1
else
src.grabbedby(M)
return 1
if("harm")
if(I_HARM)
if(attacker_style && attacker_style.harm_act(H, src))
return 1
else
@@ -163,7 +163,7 @@
forcesay(hit_appends)
if("disarm")
if(I_DISARM)
if(attacker_style && attacker_style.disarm_act(H, src))
return 1
else
@@ -35,10 +35,10 @@ emp_act
if(check_shields(P.damage, "the [P.name]", P))
P.on_hit(src, 100, def_zone)
return 2
var/obj/item/organ/external/organ = get_organ(check_zone(def_zone))
if(isnull(organ))
return
return
//Shrapnel
if (P.damage_type == BRUTE)
@@ -221,7 +221,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/butch/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == "harm")
if((istype(I, /obj/item/weapon/butch/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == I_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
@@ -465,7 +465,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 == "harm")
if(M.occupant.a_intent == I_HARM)
if(M.damtype == "brute")
step_away(src,M,15)
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
@@ -493,7 +493,7 @@ emp_act
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
else
..()
@@ -51,7 +51,7 @@
C << "<span class='danger'>It feels like part of you has died.</span>"
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
if(M.a_intent == "harm")
if(M.a_intent == I_HARM)
if(H.handcuffed)
if(!(locate(H.internal_organs_by_name["antennae"]) in H.internal_organs)) return
var/turf/p_loc = M.loc
@@ -270,7 +270,7 @@
switch(L.a_intent)
if("help")
if(I_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -366,22 +366,11 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if (I_GRAB)
grabbedby(M)
else
M.do_attack_animation(src)
@@ -427,10 +416,10 @@
return
switch(M.a_intent)
if ("help")
if (I_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("harm")
if (I_HARM)
M.do_attack_animation(src)
if (prob(95))
attacked += 10
@@ -450,21 +439,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 ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
if (I_GRAB)
grabbedby(M)
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'> [M] has grabbed [name] passively!</span>")
if ("disarm")
if (I_DISARM)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
+3 -3
View File
@@ -146,7 +146,7 @@
src.pinned += O
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == "harm")
if(M.occupant.a_intent == I_HARM)
if(M.damtype == "brute")
step_away(src,M,15)
switch(M.damtype)
@@ -168,9 +168,9 @@
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
else
step_away(src,M)
add_logs(M.occupant, src, "pushed", object=M, admin=0)
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
+3 -3
View File
@@ -91,7 +91,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default
src.verbs |= silicon_subsystems
/mob/living/silicon/ai/proc/remove_ai_verbs()
src.verbs -= ai_verbs_default
src.verbs -= silicon_subsystems
@@ -551,7 +551,7 @@ var/list/ai_verbs_default = list(
switch(M.a_intent)
if ("help")
if (I_HELP)
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
else //harm
@@ -960,7 +960,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/is_in_chassis()
return istype(loc, /turf)
/mob/living/silicon/ai/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
if(!..())
return
@@ -338,7 +338,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
if(ishuman(user))
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
user.visible_message("\blue [user.name] pats [src.name] on the head.")
return
@@ -346,7 +346,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
if(!istype(user, /mob/living/silicon))
switch(user.a_intent)
if("disarm")
if(I_DISARM)
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [user.name] ([user.ckey])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) disarmed [src.name] ([src.ckey])")
+4 -4
View File
@@ -231,7 +231,7 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1)
@@ -281,7 +281,7 @@
medicalActive2 = null
medical_cannotfind = 0
nanomanager.update_uis(src)
usr << "<span class='notice'>You reset your record-viewing software.</span>"
usr << "<span class='notice'>You reset your record-viewing software.</span>"
/mob/living/silicon/pai/cancel_camera()
set category = "pAI Commands"
@@ -554,12 +554,12 @@
/mob/living/silicon/pai/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
if(H.a_intent == I_HELP)
get_scooped(H)
//return
else
return ..()
/mob/living/silicon/pai/on_forcemove(atom/newloc)
if(card)
card.loc = newloc
@@ -45,7 +45,7 @@
//Actual picking-up event.
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
get_scooped(M)
..()
+18 -26
View File
@@ -73,11 +73,11 @@ var/list/robot_verbs_default = list(
var/braintype = "Cyborg"
var/base_icon = ""
var/crisis = 0
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
var/lamp_recharging = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
var/jetpackoverlay = 0
var/magpulse = 0
@@ -163,8 +163,8 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/SetName(pickedName as text)
custom_name = pickedName
updatename()
updatename()
/mob/living/silicon/robot/proc/sync()
if(lawupdate && connected_ai)
lawsync()
@@ -578,8 +578,8 @@ var/list/robot_verbs_default = list(
return
if (istype(W, /obj/item/weapon/weldingtool) && user.a_intent == "help")
if(W == module_active)
if (istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
if(W == module_active)
return
if (!getBruteLoss())
user << "<span class='notice'>Nothing to fix!</span>"
@@ -597,7 +597,7 @@ var/list/robot_verbs_default = list(
return
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == "help" && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == I_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
if (!getFireLoss())
user << "<span class='notice'>Nothing to fix!</span>"
return
@@ -825,23 +825,15 @@ var/list/robot_verbs_default = list(
switch(M.a_intent)
if ("help")
if (I_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 ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
if (I_GRAB)
grabbedby(M)
M.put_in_active_hand(G)
G.synch()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has grabbed [src] passively!</span>")
if ("harm")
if (I_HARM)
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
@@ -857,7 +849,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 ("disarm")
if (I_DISARM)
if(!(lying))
M.do_attack_animation(src)
if (prob(85))
@@ -923,7 +915,7 @@ var/list/robot_verbs_default = list(
update_icons()
if(!opened && (!istype(user, /mob/living/silicon)))
if (user.a_intent == "help")
if (user.a_intent == I_HELP)
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
@@ -986,7 +978,7 @@ var/list/robot_verbs_default = list(
icon_state = "[base_icon]-roll"
else
icon_state = base_icon
if(jetpackoverlay)
overlays += "minerjetpack-[icon_state]"
update_fire()
@@ -1124,7 +1116,7 @@ var/list/robot_verbs_default = list(
if(lamp_button)
lamp_button.icon_state = "lamp[lamp_intensity]"
update_icons()
update_icons()
/mob/living/silicon/robot/Move(a, b, flag)
@@ -1188,7 +1180,7 @@ var/list/robot_verbs_default = list(
// Instead of being listed as "deactivated". The downside is that I'm going
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
/mob/living/silicon/robot/proc/ResetSecurityCodes()
set category = "Robot Commands"
set name = "Reset Identity Codes"
@@ -1368,7 +1360,7 @@ var/list/robot_verbs_default = list(
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
/mob/living/silicon/robot/proc/disconnect_from_ai()
if(connected_ai)
sync() // One last sync attempt
@@ -1381,4 +1373,4 @@ var/list/robot_verbs_default = list(
connected_ai = AI
connected_ai.connected_robots |= src
notify_ai(1)
sync()
sync()
@@ -42,7 +42,7 @@
icon_living = "brainslug"
icon_dead = "brainslug_dead"
speed = 5
a_intent = "harm"
a_intent = I_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attacktext = "nips"
@@ -10,7 +10,7 @@
response_harm = "punches"
icon_dead = "shade_dead"
speed = 0
a_intent = "harm"
a_intent = I_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
@@ -595,8 +595,8 @@
/mob/living/simple_animal/pet/corgi/attack_hand(mob/living/carbon/human/M)
. = ..()
switch(M.a_intent)
if("help") wuv(1,M)
if("harm") wuv(-1,M)
if(I_HELP) wuv(1,M)
if(I_HARM) wuv(-1,M)
/mob/living/simple_animal/pet/corgi/proc/wuv(change, mob/M)
if(change)
@@ -50,7 +50,7 @@
/mob/living/simple_animal/diona/attack_hand(mob/living/carbon/human/M as mob)
//Let people pick the little buggers up.
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
if(M.species && M.species.name == "Diona")
M << "You feel your being twine with that of [src] as it merges with your biomass."
src << "You feel your being twine with that of [M] as you merge with its biomass."
@@ -137,7 +137,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 == "disarm" && icon_state != icon_dead)
if(!stat && M.a_intent == I_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
@@ -19,7 +19,7 @@
melee_damage_upper = 25
attacktext = "slashes"
speak_emote = list("hisses")
a_intent = "harm"
a_intent = I_HARM
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 0
max_oxy = 0
@@ -17,7 +17,7 @@
response_disarm = "shoves"
response_harm = "strikes"
status_flags = 0
a_intent = "harm"
a_intent = I_HARM
var/throw_message = "bounces off of"
var/icon_aggro = null // for swapping to when we get aggressive
see_in_dark = 8
@@ -73,7 +73,7 @@
melee_damage_lower = 12
melee_damage_upper = 12
attacktext = "bites into"
a_intent = "harm"
a_intent = I_HARM
speak_emote = list("chitters")
attack_sound = 'sound/weapons/bladeslice.ogg'
ranged_cooldown_cap = 4
@@ -140,7 +140,7 @@
melee_damage_upper = 0
attacktext = "barrels into"
attack_sound = 'sound/weapons/punch1.ogg'
a_intent = "help"
a_intent = I_HELP
speak_emote = list("screeches")
throw_message = "sinks in slowly, before being pushed out of "
status_flags = CANPUSH
@@ -138,7 +138,7 @@
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M as mob)
..()
if(M.a_intent == "harm")
if(M.a_intent == I_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 = "harm"
a_intent = I_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 = "harm"
a_intent = I_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 = "harm"
a_intent = I_HARM
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife
min_oxy = 5
@@ -30,7 +30,7 @@
max_co2 = 0
max_tox = 0
a_intent = "harm" //so they don't get pushed around
a_intent = I_HARM //so they don't get pushed around
environment_smash = 1
@@ -8,7 +8,7 @@
icon_living = "angelseen"
icon_dead = "angelseen"
gender = NEUTER
a_intent = "harm"
a_intent = I_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 = "harm"
a_intent = I_HARM
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
var/weapon1
var/weapon2
@@ -87,9 +87,9 @@
return
/mob/living/simple_animal/Life()
if(paralysis || stunned || weakened || buckled || resting)
if(paralysis || stunned || weakened || buckled || resting)
canmove = 0
else
else
canmove = 1
//Health
@@ -107,7 +107,7 @@
if(health > maxHealth)
health = maxHealth
if(resting && icon_resting && stat != DEAD)
icon_state = icon_resting
else if(icon_resting && stat != DEAD)
@@ -292,12 +292,12 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if (health > 0)
visible_message("<span class='notice'> [M] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if("grab")
if(I_GRAB)
if (M == src || anchored)
return
if (!(status_flags & CANPUSH))
@@ -314,7 +314,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if("harm", "disarm")
if(I_HARM, I_DISARM)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
playsound(loc, "punch", 25, 1, -1)
@@ -326,26 +326,13 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("grab")
if(M == src || anchored)
return
if(!(status_flags & CANPUSH))
return
if (I_GRAB)
grabbedby(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if("harm", "disarm")
if(I_HARM, I_DISARM)
M.do_attack_animation(src)
var/damage = rand(15, 30)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
@@ -358,7 +345,7 @@
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
if(I_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -14,7 +14,7 @@
icon_state = "daemon"
icon_living = "daemon"
speed = 1
a_intent = "harm"
a_intent = I_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/misc/demon_attack1.ogg'
+1 -1
View File
@@ -114,7 +114,7 @@
var/losebreath = 0.0//Carbon
var/intent = null//Living
var/shakecamera = 0
var/a_intent = "help"//Living
var/a_intent = I_HELP//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null
+4 -4
View File
@@ -316,7 +316,7 @@
var/mob/living/carbon/human/affected = affecting
var/mob/living/carbon/human/attacker = assailant
switch(assailant.a_intent)
if("help")
if(I_HELP)
/*if(force_down)
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("grab")
if(I_GRAB)
return
if("harm") //This checks that the user is on harm intent.
if(I_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
@@ -367,7 +367,7 @@
M << "\red You go blind!"*///This is a demonstration of adding a new damaging type based on intent as well as hitzone.
//This specific example would allow you to squish people's eyes with a GRAB_NECK.
if("disarm") //This checks that the user is on disarm intent.
if(I_DISARM) //This checks that the user is on disarm intent.
/* if(state < GRAB_AGGRESSIVE)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
+19 -20
View File
@@ -96,7 +96,7 @@ proc/isembryo(A)
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
/mob/proc/isSynthetic()
return 0
@@ -174,17 +174,17 @@ proc/isAntag(A)
if(C.mind && C.mind.special_role)
return 1
return 0
proc/isNonCrewAntag(A)
if(!isAntag(A))
return 0
var/mob/living/carbon/C = A
var/special_role = C.mind.special_role
var/list/crew_roles = list("traitor", "Changeling", "Vampire", "Cultist", "Head Revolutionary", "Revolutionary", "malfunctioning AI", "Shadowling", "loyalist", "mutineer", "Response Team")
if((special_role in crew_roles))
return 0
return 1
proc/isnewplayer(A)
@@ -394,20 +394,20 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo
return 0
//converts intent-strings into numbers and back
var/list/intents = list("help","disarm","grab","harm")
var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM)
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
if("help") return 0
if("disarm") return 1
if("grab") return 2
if(I_HELP) return 0
if(I_DISARM) return 1
if(I_GRAB) return 2
else return 3
else
switch(argument)
if(0) return "help"
if(1) return "disarm"
if(2) return "grab"
else return "harm"
if(0) return I_HELP
if(1) return I_DISARM
if(2) return I_GRAB
else return I_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)
@@ -416,7 +416,7 @@ var/list/intents = list("help","disarm","grab","harm")
if(ishuman(src) || isalienadult(src) || isbrain(src))
switch(input)
if("help","disarm","grab","harm")
if(I_HELP,I_DISARM,I_GRAB,I_HARM)
a_intent = input
if("right")
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
@@ -427,14 +427,14 @@ var/list/intents = list("help","disarm","grab","harm")
else if(isrobot(src) || islarva(src))
switch(input)
if("help")
a_intent = "help"
if("harm")
a_intent = "harm"
if(I_HELP)
a_intent = I_HELP
if(I_HARM)
a_intent = I_HARM
if("right","left")
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
if(hud_used && hud_used.action_intent)
if(a_intent == "harm")
if(a_intent == I_HARM)
hud_used.action_intent.icon_state = "harm"
else
hud_used.action_intent.icon_state = "help"
@@ -527,7 +527,7 @@ var/list/intents = list("help","disarm","grab","harm")
O << "<span class='ghostalert'>[message]<span>"
if(ghost_sound)
O << sound(ghost_sound)
/mob/proc/switch_to_camera(var/obj/machinery/camera/C)
if (!C.can_use() || stat || (get_dist(C, src) > 1 || machine != src || blinded || !canmove))
return 0
@@ -541,4 +541,3 @@ var/list/intents = list("help","disarm","grab","harm")
eyeobj.setLoc(get_turf(C))
client.eye = eyeobj
return 1
+5 -5
View File
@@ -40,7 +40,7 @@
O.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
O.loc = loc
O.viruses = viruses
O.a_intent = "harm"
O.a_intent = I_HARM
if (client)
@@ -259,7 +259,7 @@
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.a_intent = "harm"
new_xeno.a_intent = I_HARM
new_xeno.key = key
new_xeno << "<B>You are now an alien.</B>"
@@ -318,7 +318,7 @@
qdel(t)
var/mob/living/simple_animal/pet/corgi/new_corgi = new /mob/living/simple_animal/pet/corgi (loc)
new_corgi.a_intent = "harm"
new_corgi.a_intent = I_HARM
new_corgi.key = key
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
@@ -353,7 +353,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "harm"
new_mob.a_intent = I_HARM
new_mob << "You suddenly feel more... animalistic."
@@ -374,7 +374,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "harm"
new_mob.a_intent = I_HARM
new_mob << "You feel more... animalistic"
new_mob.update_pipe_vision()