mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Replaces intents with combat mode (#56601)
About The Pull Request
This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:
Disarm and Grab intents have been removed.
Harm/Help is now combat mode, toggled by F or 4 by default
The context/verb/popup menu now only works when you do shift+right-click
Right click is now disarm, both in and out of combat mode.
Grabbing is now on ctrl-click.
If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)
Minor interaction changes:
Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game
Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.
As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.
As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.
In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.
The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog
cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
minbodytemp = 0
|
||||
maxbodytemp = INFINITY
|
||||
unique_name = 1
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
see_in_dark = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
initial_language_holder = /datum/language_holder/empty
|
||||
|
||||
@@ -266,7 +266,9 @@
|
||||
/obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] is not ready yet.</span>")
|
||||
|
||||
/obj/item/gun/magic/tentacle/process_fire()
|
||||
/obj/item/gun/magic/tentacle/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
|
||||
var/obj/projectile/tentacle/tentacle_shot = chambered.BB //Gets the actual projectile we will fire
|
||||
tentacle_shot.fire_modifiers = params2list(params)
|
||||
. = ..()
|
||||
if(charges == 0)
|
||||
qdel(src)
|
||||
@@ -303,6 +305,8 @@
|
||||
hitsound = 'sound/weapons/thudswoosh.ogg'
|
||||
var/chain
|
||||
var/obj/item/ammo_casing/magic/tentacle/source //the item that shot it
|
||||
///Click params that were used to fire the tentacle shot
|
||||
var/list/fire_modifiers
|
||||
|
||||
/obj/projectile/tentacle/Initialize()
|
||||
source = loc
|
||||
@@ -354,39 +358,32 @@
|
||||
if(!L.anchored && !L.throwing)//avoid double hits
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
var/firer_intent = INTENT_HARM
|
||||
var/mob/M = firer
|
||||
if(istype(M))
|
||||
firer_intent = M.a_intent
|
||||
switch(firer_intent)
|
||||
if(INTENT_HELP)
|
||||
C.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
||||
C.throw_at(get_step_towards(H,C), 8, 2)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
if(INTENT_DISARM)
|
||||
var/obj/item/I = C.get_active_held_item()
|
||||
if(I)
|
||||
if(C.dropItemToGround(I))
|
||||
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
|
||||
on_hit(I) //grab the item as if you had hit it directly with the tentacle
|
||||
return BULLET_ACT_HIT
|
||||
else
|
||||
to_chat(firer, "<span class='warning'>You can't seem to pry [I] off [C]'s hands!</span>")
|
||||
return BULLET_ACT_BLOCK
|
||||
else
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
|
||||
var/firer_combat_mode = TRUE
|
||||
var/mob/living/living_shooter = firer
|
||||
if(istype(living_shooter))
|
||||
firer_combat_mode = living_shooter.combat_mode
|
||||
if(fire_modifiers && fire_modifiers["right"])
|
||||
var/obj/item/I = C.get_active_held_item()
|
||||
if(I)
|
||||
if(C.dropItemToGround(I))
|
||||
C.visible_message("<span class='danger'>[I] is yanked off [C]'s hand by [src]!</span>","<span class='userdanger'>A tentacle pulls [I] away from you!</span>")
|
||||
on_hit(I) //grab the item as if you had hit it directly with the tentacle
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
if(INTENT_GRAB)
|
||||
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
||||
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
|
||||
else
|
||||
to_chat(firer, "<span class='warning'>You can't seem to pry [I] off [C]'s hands!</span>")
|
||||
return BULLET_ACT_BLOCK
|
||||
else
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
|
||||
return BULLET_ACT_HIT
|
||||
if(firer_combat_mode)
|
||||
C.visible_message("<span class='danger'>[L] is thrown towards [H] by a tentacle!</span>","<span class='userdanger'>A tentacle grabs you and throws you towards [H]!</span>")
|
||||
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
|
||||
return BULLET_ACT_HIT
|
||||
else
|
||||
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
||||
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_grab, H, C))
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
if(INTENT_HARM)
|
||||
C.visible_message("<span class='danger'>[L] is thrown towards [H] by a tentacle!</span>","<span class='userdanger'>A tentacle grabs you and throws you towards [H]!</span>")
|
||||
C.throw_at(get_step_towards(H,C), 8, 2, H, TRUE, TRUE, callback=CALLBACK(src, .proc/tentacle_stab, H, C))
|
||||
return BULLET_ACT_HIT
|
||||
else
|
||||
L.visible_message("<span class='danger'>[L] is pulled by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
|
||||
L.throw_at(get_step_towards(H,L), 8, 2)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/static/list/blacklisted_turfs = typecacheof(list(/turf/closed,/turf/open/space,/turf/open/lava,/turf/open/chasm,/turf/open/floor/plating/rust))
|
||||
route = PATH_RUST
|
||||
|
||||
/datum/eldritch_knowledge/rust_fist/on_mansus_grasp(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/datum/eldritch_knowledge/rust_fist/on_mansus_grasp(atom/target, mob/living/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
var/check = FALSE
|
||||
if(ismob(target))
|
||||
@@ -28,7 +28,7 @@
|
||||
return FALSE
|
||||
else
|
||||
check = TRUE
|
||||
if(user.a_intent == INTENT_HARM || check)
|
||||
if(user.combat_mode || check)
|
||||
target.rust_heretic_act()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
icon_living = "morph"
|
||||
icon_dead = "morph_dead"
|
||||
speed = 2
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
stop_automated_movement = 1
|
||||
status_flags = CANPUSH
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
icon_living = "imp"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
|
||||
speed = 1
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
stop_automated_movement = TRUE
|
||||
status_flags = CANPUSH
|
||||
attack_sound = 'sound/magic/demon_attack1.ogg'
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
return NONE
|
||||
|
||||
/obj/structure/aquarium/interact(mob/user)
|
||||
if(!broken && user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(!broken && user.pulling && isliving(user.pulling))
|
||||
var/mob/living/living_pulled = user.pulling
|
||||
SEND_SIGNAL(living_pulled, COMSIG_AQUARIUM_BEFORE_INSERT_CHECK,src)
|
||||
var/datum/component/aquarium_content/content_component = living_pulled.GetComponent(/datum/component/aquarium_content)
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
/// Tries to put mob pulled by the user in the aquarium after a delay
|
||||
/obj/structure/aquarium/proc/try_to_put_mob_in(mob/user)
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
var/mob/living/living_pulled = user.pulling
|
||||
if(living_pulled.buckled || living_pulled.has_buckled_mobs())
|
||||
to_chat(user, "<span class='warning'>[living_pulled] is attached to something!</span>")
|
||||
|
||||
@@ -93,14 +93,14 @@
|
||||
if(a_right)
|
||||
a_right.dropped()
|
||||
|
||||
/obj/item/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||
/obj/item/assembly_holder/attack_hand(mob/living/user, modifiers)//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(a_left)
|
||||
a_left.attack_hand()
|
||||
a_left.attack_hand(user, modifiers)
|
||||
if(a_right)
|
||||
a_right.attack_hand()
|
||||
a_right.attack_hand(user, modifiers)
|
||||
|
||||
/obj/item/assembly_holder/screwdriver_act(mob/user, obj/item/tool)
|
||||
if(..())
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
|
||||
..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
|
||||
@@ -4,6 +4,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/client/parent
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/save_path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/max_save_slots = 3
|
||||
|
||||
@@ -702,6 +703,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Play Admin MIDIs:</b> <a href='?_src_=prefs;preference=hear_midis'>[(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play Lobby Music:</b> <a href='?_src_=prefs;preference=lobby_music'>[(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play End of Round Sounds:</b> <a href='?_src_=prefs;preference=endofround_sounds'>[(toggles & SOUND_ENDOFROUND) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play Combat Mode Sounds:</b> <a href='?_src_=prefs;preference=combat_mode_sound'>[(toggles & SOUND_COMBATMODE) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>See Pull Requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
|
||||
@@ -1766,6 +1768,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("endofround_sounds")
|
||||
toggles ^= SOUND_ENDOFROUND
|
||||
|
||||
if("combat_mode_sound")
|
||||
toggles ^= SOUND_COMBATMODE
|
||||
|
||||
if("ghost_ears")
|
||||
chat_toggles ^= CHAT_GHOSTEARS
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 38
|
||||
#define SAVEFILE_VERSION_MAX 39
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -87,6 +87,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if (!found_block_movement)
|
||||
LAZYADD(key_bindings["Ctrl"], "block_movement")
|
||||
|
||||
if (current_version < 39)
|
||||
LAZYADD(key_bindings["F"], "toggle_combat_mode")
|
||||
LAZYADD(key_bindings["4"], "toggle_combat_mode")
|
||||
|
||||
/datum/preferences/proc/update_character(current_version, savefile/S)
|
||||
return
|
||||
|
||||
@@ -133,7 +137,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
return
|
||||
if(fexists("data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"))
|
||||
path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
|
||||
return
|
||||
path = "data/player_saves/[ckey[1]]/[ckey]/[filename]"
|
||||
save_path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
|
||||
|
||||
/datum/preferences/proc/load_preferences()
|
||||
if(!path)
|
||||
@@ -273,7 +281,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/save_preferences()
|
||||
if(!path)
|
||||
return FALSE
|
||||
var/savefile/S = new /savefile(path)
|
||||
var/savefile/S = new /savefile()
|
||||
if(!S)
|
||||
return FALSE
|
||||
S.cd = "/"
|
||||
@@ -495,7 +503,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/save_character()
|
||||
if(!path)
|
||||
return FALSE
|
||||
var/savefile/S = new /savefile(path)
|
||||
var/savefile/S = new /savefile(save_path)
|
||||
if(!S)
|
||||
return FALSE
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
@@ -178,6 +178,20 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, toggleendofroundsounds)()
|
||||
/datum/verbs/menu/settings/sound/toggleendofroundsounds/Get_checked(client/C)
|
||||
return C.prefs.toggles & SOUND_ENDOFROUND
|
||||
|
||||
TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglecombatmodesound)()
|
||||
set name = "Hear/Silence Combat Mode Toggle Sound"
|
||||
set category = "Preferences"
|
||||
set desc = "Hear Combat Mode Toggle Sound"
|
||||
usr.client.prefs.toggles ^= SOUND_COMBATMODE
|
||||
usr.client.prefs.save_preferences()
|
||||
if(usr.client.prefs.toggles & SOUND_COMBATMODE)
|
||||
to_chat(usr, "You will now hear a sound when combat mode is turned on.")
|
||||
else
|
||||
to_chat(usr, "You will no longer hear a sound when combat mode is turned on.")
|
||||
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Combat Mode Toggle Sounds", "[usr.client.prefs.toggles & SOUND_COMBATMODE ? "Enabled" : "Disabled"]"))
|
||||
|
||||
/datum/verbs/menu/settings/sound/togglecombatmodesound/Get_checked(client/C)
|
||||
return C.prefs.toggles & SOUND_COMBATMODE
|
||||
|
||||
TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglemidis)()
|
||||
set name = "Hear/Silence Midis"
|
||||
|
||||
@@ -81,17 +81,7 @@
|
||||
|
||||
var/suicide_message
|
||||
|
||||
if(a_intent == INTENT_DISARM)
|
||||
if(prob(25))
|
||||
disarm_suicide() // Snowflake suicide for a tired joke.
|
||||
return //above proc handles logging and death
|
||||
suicide_message = pick("[src] is attempting to push [p_their()] own head off [p_their()] shoulders! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is pushing [p_their()] thumbs into [p_their()] eye sockets! It looks like [p_theyre()] trying to commit suicide.")
|
||||
else if(a_intent == INTENT_GRAB)
|
||||
suicide_message = pick("[src] is attempting to pull [p_their()] own head off! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is aggressively grabbing [p_their()] own neck! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is pulling [p_their()] eyes out of their sockets! It looks like [p_theyre()] trying to commit suicide.")
|
||||
else if(a_intent == INTENT_HELP)
|
||||
if(!combat_mode)
|
||||
var/obj/item/organ/brain/userbrain = getorgan(/obj/item/organ/brain)
|
||||
if(userbrain?.damage >= 75)
|
||||
suicide_message = "[src] pulls both arms outwards in front of [p_their()] chest and pumps them behind [p_their()] back, repeats this motion in a smaller range of motion \
|
||||
|
||||
@@ -121,13 +121,13 @@
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/attack(mob/attacker, mob/user, def_zone)
|
||||
if(user.a_intent != INTENT_HARM && ismoth(attacker))
|
||||
/obj/item/clothing/attack(mob/attacker, mob/living/user, params)
|
||||
if(!user.combat_mode && ismoth(attacker))
|
||||
if (isnull(moth_snack))
|
||||
moth_snack = new
|
||||
moth_snack.name = name
|
||||
moth_snack.clothing = WEAKREF(src)
|
||||
moth_snack.attack(attacker, user, def_zone)
|
||||
moth_snack.attack(attacker, user, params)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/item/clothing/neck/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(ishuman(M) && isliving(user))
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!user.combat_mode)
|
||||
var/body_part = parse_zone(user.zone_selected)
|
||||
|
||||
var/heart_strength = "<span class='danger'>no</span>"
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
//Pinning medals on people
|
||||
/obj/item/clothing/accessory/medal/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(ishuman(M) && (user.a_intent == INTENT_HELP))
|
||||
if(ishuman(M) && !user.combat_mode)
|
||||
|
||||
if(M.wear_suit)
|
||||
if((M.wear_suit.flags_inv & HIDEJUMPSUIT)) //Check if the jumpsuit is covered
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/living/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -28,7 +28,7 @@
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
var/log_object = "containing [reagentlist]"
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
if(user.combat_mode && !C.is_mouth_covered())
|
||||
reagents.trans_to(C, reagents.total_volume, transfered_by = user, methods = INGEST)
|
||||
C.visible_message("<span class='danger'>[user] smothers \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] smothers you with \the [src]!</span>", "<span class='hear'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_combat(user, C, "smothered", src, log_object)
|
||||
|
||||
@@ -15,13 +15,18 @@
|
||||
/obj/machinery/paystand/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/card/id))
|
||||
if(W == my_card)
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
var/list/items = list(
|
||||
"Rename" = image(icon = 'icons/obj/economy.dmi', icon_state = "name"),
|
||||
"Set the fee" = image(icon = 'icons/obj/economy.dmi', icon_state = "fee")
|
||||
)
|
||||
var/choice = show_radial_menu(user, src, items, null, require_near = TRUE, tooltips = TRUE)
|
||||
if(choice == "Rename")
|
||||
var/rename_msg = stripped_input(user, "Rename the Paystand:", "Paystand Naming", name)
|
||||
if(!rename_msg || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
name = rename_msg
|
||||
return
|
||||
else if(user.a_intent == INTENT_GRAB)
|
||||
else if(choice == "Set the fee")
|
||||
var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null
|
||||
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
@@ -136,4 +141,4 @@
|
||||
if(force_fee)
|
||||
. += "<span class='warning'>This paystand forces a payment of <b>[force_fee]</b> credit\s per swipe instead of a variable amount.</span>"
|
||||
if(user.get_active_held_item() == my_card)
|
||||
. += "<span class='notice'>Paystands can be edited through swiping your card with different intents. <b>Disarm</b> allows editing the name while <b>Grab</b> changes payment functionality.</span>"
|
||||
. += "<span class='notice'>Paystands can be edited through swiping your card.</span>"
|
||||
|
||||
@@ -653,7 +653,7 @@ This section is for the crystal monsters variations
|
||||
turns_per_move = 1
|
||||
speak_emote = list("resonates")
|
||||
emote_see = list("resonates")
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 1500
|
||||
healable = 0 //they're crystals how would bruise packs help them??
|
||||
|
||||
@@ -345,11 +345,11 @@
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/waterbottle/attack(mob/target, mob/user, def_zone)
|
||||
/obj/item/reagent_containers/food/drinks/waterbottle/attack(mob/target, mob/living/user, def_zone)
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
if(cap_on && reagents.total_volume && istype(target))
|
||||
to_chat(user, "<span class='warning'>You must remove the cap before you can do that!</span>")
|
||||
return
|
||||
@@ -359,8 +359,8 @@
|
||||
if(!cap_on)
|
||||
SplashReagents(target)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/waterbottle/afterattack(obj/target, mob/user, proximity)
|
||||
if(cap_on && (target.is_refillable() || target.is_drainable() || (reagents.total_volume && user.a_intent == INTENT_HARM)))
|
||||
/obj/item/reagent_containers/food/drinks/waterbottle/afterattack(obj/target, mob/living/user, proximity)
|
||||
if(cap_on && (target.is_refillable() || target.is_drainable() || (reagents.total_volume && !user.combat_mode)))
|
||||
to_chat(user, "<span class='warning'>You must remove the cap before you can do that!</span>")
|
||||
return
|
||||
|
||||
@@ -640,8 +640,8 @@
|
||||
sleep(20) //dramatic pause
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(istype(M, /mob/living/carbon) && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == BODY_ZONE_HEAD)
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/living/user)
|
||||
if(istype(M, /mob/living/carbon) && !reagents.total_volume && user.combat_mode && user.zone_selected == BODY_ZONE_HEAD)
|
||||
if(M == user)
|
||||
user.visible_message("<span class='warning'>[user] crushes the can of [src] on [user.p_their()] forehead!</span>", "<span class='notice'>You crush the can of [src] on your forehead.</span>")
|
||||
else
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM || !isGlass)
|
||||
if(!user.combat_mode || !isGlass)
|
||||
return ..()
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
|
||||
@@ -124,8 +124,8 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/attack(obj/target, mob/user)
|
||||
if(user.a_intent == INTENT_HARM && ismob(target) && target.reagents && reagents.total_volume)
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/attack(obj/target, mob/living/user)
|
||||
if(user.combat_mode && ismob(target) && target.reagents && reagents.total_volume)
|
||||
target.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto you!</span>")
|
||||
log_combat(user, target, "splashed", src)
|
||||
@@ -134,12 +134,12 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/afterattack(obj/target, mob/user, proximity)
|
||||
/obj/item/reagent_containers/food/drinks/drinkingglass/afterattack(obj/target, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1))
|
||||
return
|
||||
|
||||
else if(reagents.total_volume && user.a_intent == INTENT_HARM)
|
||||
else if(reagents.total_volume && user.combat_mode)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.expose(target, TOUCH)
|
||||
|
||||
@@ -107,7 +107,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
|
||||
/obj/machinery/deepfryer/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/deepfryer/attack_hand(mob/user)
|
||||
/obj/machinery/deepfryer/attack_hand(mob/living/user)
|
||||
if(frying)
|
||||
if(frying.loc == src)
|
||||
to_chat(user, "<span class='notice'>You eject [frying] from [src].</span>")
|
||||
@@ -122,7 +122,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
|
||||
frying_burnt = FALSE
|
||||
fry_loop.stop()
|
||||
return
|
||||
else if(user.pulling && user.a_intent == "grab" && iscarbon(user.pulling) && reagents.total_volume)
|
||||
else if(user.pulling && iscarbon(user.pulling) && reagents.total_volume)
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] cannot be used unless bolted to the ground!</span>")
|
||||
return
|
||||
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(!iscarbon(L))
|
||||
to_chat(user, "<span class='warning'>This item is not suitable for the gibber!</span>")
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
else
|
||||
icon_state = "mw"
|
||||
|
||||
/obj/machinery/microwave/attackby(obj/item/O, mob/user, params)
|
||||
/obj/machinery/microwave/attackby(obj/item/O, mob/living/user, params)
|
||||
if(operating)
|
||||
return
|
||||
if(default_deconstruction_crowbar(O))
|
||||
@@ -178,7 +178,7 @@
|
||||
to_chat(user, "<span class='notice'>You insert [loaded] items into \the [src].</span>")
|
||||
return
|
||||
|
||||
if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP)
|
||||
if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && !user.combat_mode)
|
||||
if(ingredients.len >= max_n_of_items)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full, you can't put anything in!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
continue
|
||||
return recipe
|
||||
|
||||
/obj/machinery/processor/attackby(obj/item/O, mob/user, params)
|
||||
/obj/machinery/processor/attackby(obj/item/O, mob/living/user, params)
|
||||
if(processing)
|
||||
to_chat(user, "<span class='warning'>[src] is in the process of processing!</span>")
|
||||
return TRUE
|
||||
@@ -89,18 +89,17 @@
|
||||
user.transferItemToLoc(O, src, TRUE)
|
||||
LAZYADD(processor_contents, O)
|
||||
return 1
|
||||
else if(!user.combat_mode)
|
||||
to_chat(user, "<span class='warning'>That probably won't blend!</span>")
|
||||
return 1
|
||||
else
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='warning'>That probably won't blend!</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/processor/interact(mob/user)
|
||||
if(processing)
|
||||
to_chat(user, "<span class='warning'>[src] is in the process of processing!</span>")
|
||||
return TRUE
|
||||
if(user.a_intent == INTENT_GRAB && ismob(user.pulling) && select_recipe(user.pulling))
|
||||
if(ismob(user.pulling) && select_recipe(user.pulling))
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(obj/item/O, mob/user, params)
|
||||
/obj/machinery/smartfridge/attackby(obj/item/O, mob/living/user, params)
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, O))
|
||||
cut_overlays()
|
||||
if(panel_open)
|
||||
@@ -125,7 +125,7 @@
|
||||
to_chat(user, "<span class='warning'>There is nothing in [O] to put in [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
to_chat(user, "<span class='warning'>\The [src] smartly refuses [O].</span>")
|
||||
updateUsrDialog()
|
||||
return FALSE
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
visible_message("<span class='warning'>[user] dunks [W] into \the [src]!</span>")
|
||||
|
||||
/obj/structure/holohoop/attack_hand(mob/user)
|
||||
/obj/structure/holohoop/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
var/mob/living/L = user.pulling
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
|
||||
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
/obj/machinery/biogenerator/attackby(obj/item/O, mob/living/user, params)
|
||||
if(user.combat_mode)
|
||||
return ..()
|
||||
|
||||
if(processing)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/graft/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/plant_analyzer) && user.a_intent == INTENT_HELP)
|
||||
if(istype(I, /obj/item/plant_analyzer) && !user.combat_mode)
|
||||
to_chat(user, get_graft_text())
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
. = ..()
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/bonfire/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/bonfire/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
|
||||
var/obj/item/stack/rods/R = W
|
||||
var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
|
||||
@@ -196,7 +196,7 @@
|
||||
if(W.get_temperature())
|
||||
StartBurning()
|
||||
if(grill)
|
||||
if(user.a_intent != INTENT_HARM && !(W.item_flags & ABSTRACT))
|
||||
if(!user.combat_mode && !(W.item_flags & ABSTRACT))
|
||||
if(user.temporarilyRemoveItemFromInventory(W))
|
||||
W.forceMove(get_turf(src))
|
||||
var/list/click_params = params2list(params)
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
myseed = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params)
|
||||
if (user.a_intent != INTENT_HARM)
|
||||
/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/living/user, params)
|
||||
if (!user.combat_mode)
|
||||
// handle opening the panel
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
return
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Extracting <b>[seed_multiplier]</b> seed(s) per piece of produce.<br>Machine can store up to <b>[max_seeds]%</b> seeds.</span>"
|
||||
|
||||
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params)
|
||||
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/living/user, params)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
|
||||
return
|
||||
@@ -114,7 +114,7 @@
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src.name].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
to_chat(user, "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -135,7 +135,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I) && user.a_intent == INTENT_HELP)
|
||||
if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I) && !user.combat_mode)
|
||||
var/obj/item/stack/sheet/inp = I
|
||||
points += inp.point_value * inp.amount
|
||||
return ..()
|
||||
|
||||
@@ -47,10 +47,10 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/user, obj/item/stack/I, breakdown_flags=NONE)
|
||||
/obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/living/user, obj/item/stack/I, breakdown_flags=NONE)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
// stolen from /datum/component/material_container/proc/OnAttackBy
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
if(user.combat_mode)
|
||||
return
|
||||
if(I.item_flags & ABSTRACT)
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
status_flags = CANSTUN|CANKNOCKDOWN|CANPUSH
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
faction = list("neutral")
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
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
|
||||
move_to_delay = 10
|
||||
@@ -126,7 +126,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
if(!M.combat_mode)
|
||||
toggle_mode()
|
||||
switch(mode)
|
||||
if(MINEDRONE_COLLECT)
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
if(GLOB.admin_notice)
|
||||
to_chat(src, "<span class='notice'><b>Admin Notice:</b>\n \t [GLOB.admin_notice]</span>")
|
||||
|
||||
to_chat(src, "<span class='notice'><b>Combat Mode Changes</b>\n \t</span>")
|
||||
to_chat(src, "<span class='notice'><b>READ THIS PR BEFORE PLAYING TODAY:</b> https://github.com/tgstation/tgstation/pull/56601 \n \t</span>")
|
||||
|
||||
var/spc = CONFIG_GET(number/soft_popcap)
|
||||
if(spc && living_player_count() >= spc)
|
||||
to_chat(src, "<span class='notice'><b>Server Notice:</b>\n \t [CONFIG_GET(string/soft_popcap_message)]</span>")
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
|
||||
stat = DEAD //we start dead by default
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM) //for mechas
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
/mob/living/brain/Initialize()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/mob/living/carbon/alien/get_status_tab_items()
|
||||
. = ..()
|
||||
. += "Intent: [a_intent]"
|
||||
. += "Combat mode: [combat_mode ? "On" : "Off"]"
|
||||
|
||||
/mob/living/carbon/alien/getTrail()
|
||||
if(getBruteLoss() < 200)
|
||||
|
||||
@@ -13,63 +13,53 @@
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M, modifiers)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
if(M.combat_mode)
|
||||
if(M == src && check_self_for_injuries())
|
||||
return
|
||||
set_resting(FALSE)
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustImmobilized(-60)
|
||||
AdjustParalyzed(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
else if(health > 0)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
adjustBruteLoss(1)
|
||||
log_combat(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
if ("help")
|
||||
if(M == src && check_self_for_injuries())
|
||||
return
|
||||
set_resting(FALSE)
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustImmobilized(-60)
|
||||
AdjustParalyzed(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
if(health > 0)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
adjustBruteLoss(1)
|
||||
log_combat(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
return attack_alien(L)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
. = ..()
|
||||
if(.) //to allow surgery to return properly.
|
||||
return FALSE
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
help_shake_act(M)
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
if ("harm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return TRUE
|
||||
if("disarm")
|
||||
if(M.combat_mode)
|
||||
if(modifiers && modifiers["right"])
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
return FALSE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return TRUE
|
||||
else
|
||||
help_shake_act(M)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/human/M)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
icon_state = "alien"
|
||||
pass_flags = PASSTABLE
|
||||
butcher_results = list(/obj/item/food/meat/slab/xeno = 5, /obj/item/stack/sheet/animalhide/xeno = 1)
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
|
||||
limb_destroyer = 1
|
||||
hud_type = /datum/hud/alien
|
||||
melee_damage_lower = 20 //Refers to unarmed damage, aliens do unarmed attacks.
|
||||
|
||||
@@ -14,31 +14,10 @@
|
||||
"<span class='userdanger'>[user] [hitverb]s you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You [hitverb] [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
if(..())
|
||||
switch(M.a_intent)
|
||||
if ("harm")
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] punches [src]!</span>", \
|
||||
"<span class='userdanger'>[M] punches you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
|
||||
Unconscious(40)
|
||||
visible_message("<span class='danger'>[M] knocks [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] knocks you down!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You knock [src] down!</span>")
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
log_combat(M, src, "attacked")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M]'s punch misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M]'s punch!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your punch misses [src]!</span>")
|
||||
|
||||
if ("disarm")
|
||||
if(M.combat_mode)
|
||||
if(modifiers && modifiers["right"])
|
||||
if (body_position == STANDING_UP)
|
||||
if (prob(5))
|
||||
Unconscious(40)
|
||||
@@ -47,19 +26,26 @@
|
||||
visible_message("<span class='danger'>[M] pushes [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] pushes you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You push [src] down!</span>")
|
||||
else
|
||||
if (prob(50))
|
||||
dropItemToGround(get_active_held_item())
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] disarms [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] fails to disarm [src]!</span>",\
|
||||
"<span class='danger'>[M] fails to disarm you!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>You fail to disarm [src]!</span>")
|
||||
|
||||
return TRUE
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] punches [src]!</span>", \
|
||||
"<span class='userdanger'>[M] punches you!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 9 || prob(5)))//Regular humans have a very small chance of knocking an alien down.
|
||||
Unconscious(40)
|
||||
visible_message("<span class='danger'>[M] knocks [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] knocks you down!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You knock [src] down!</span>")
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
log_combat(M, src, "attacked")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M]'s punch misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M]'s punch!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your punch misses [src]!</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
..(amount)
|
||||
|
||||
//can't equip anything
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id, params)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -65,14 +65,15 @@
|
||||
else
|
||||
mode() // Activate held item
|
||||
|
||||
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
|
||||
/mob/living/carbon/attackby(obj/item/I, mob/living/user, params)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(body_position == LYING_DOWN || !S.lying_required)
|
||||
if((S.self_operable || user != src) && (user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM))
|
||||
if(S.next_step(user,user.a_intent))
|
||||
var/list/modifiers = params2list(params)
|
||||
if((S.self_operable || user != src) && !user.combat_mode)
|
||||
if(S.next_step(user, modifiers))
|
||||
return 1
|
||||
|
||||
if(!all_wounds || !(user.a_intent == INTENT_HELP || user == src))
|
||||
if(!all_wounds || !(!user.combat_mode || user == src))
|
||||
return ..()
|
||||
|
||||
for(var/i in shuffle(all_wounds))
|
||||
@@ -454,7 +455,7 @@
|
||||
. = ..()
|
||||
. += add_abilities_to_panel()
|
||||
|
||||
/mob/living/carbon/attack_ui(slot)
|
||||
/mob/living/carbon/attack_ui(slot, params)
|
||||
if(!has_hand_for_held_index(active_hand_index))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
return //so we don't call the carbon's attack_hand().
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
. = TRUE
|
||||
@@ -156,8 +156,8 @@
|
||||
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(body_position == LYING_DOWN || !S.lying_required)
|
||||
if(user.a_intent == INTENT_HELP || user.a_intent == INTENT_DISARM)
|
||||
if(S.next_step(user, user.a_intent))
|
||||
if(!user.combat_mode)
|
||||
if(S.next_step(user, modifiers))
|
||||
return TRUE
|
||||
|
||||
for(var/i in all_wounds)
|
||||
@@ -165,13 +165,13 @@
|
||||
if(W.try_handling(user))
|
||||
return TRUE
|
||||
|
||||
if (user.apply_martial_art(src))
|
||||
if (user.apply_martial_art(src, modifiers))
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
|
||||
if(can_inject(M, TRUE))
|
||||
for(var/thing in diseases)
|
||||
@@ -184,7 +184,7 @@
|
||||
if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN)
|
||||
ContactContractDisease(D)
|
||||
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
if(!M.combat_mode)
|
||||
help_shake_act(M)
|
||||
return FALSE
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
*/
|
||||
/mob/living/carbon/proc/disarm(mob/living/carbon/target)
|
||||
if(zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
||||
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
|
||||
var/target_on_help_and_unarmed = !target.combat_mode && !target.get_active_held_item()
|
||||
if(target_on_help_and_unarmed || HAS_TRAIT(target, TRAIT_RESTRAINED))
|
||||
do_slap_animation(target)
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, TRUE, -1)
|
||||
@@ -450,7 +450,7 @@
|
||||
null, "<span class='hear'>You hear a soft patter.</span>", DEFAULT_MESSAGE_RANGE, list(M, src))
|
||||
to_chat(M, "<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>")
|
||||
to_chat(src, "<span class='notice'>[M] gives you a pat on the head to make you feel better! </span>")
|
||||
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
|
||||
to_chat(M, "<span class='warning'>[src] looks visibly upset as you pat [p_them()] on the head.</span>")
|
||||
|
||||
@@ -492,7 +492,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
|
||||
else if (hugger_mood.sanity >= SANITY_DISTURBED)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
|
||||
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
|
||||
to_chat(M, "<span class='warning'>[src] looks visibly upset as you hug [p_them()].</span>")
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
gender = MALE
|
||||
pressure_resistance = 15
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD,GLAND_HUD,NANITE_HUD,DIAG_NANITE_FULL_HUD)
|
||||
has_limbs = 1
|
||||
held_items = list(null, null)
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
if(src != user)
|
||||
if(HAS_TRAIT(user, TRAIT_EMPATH))
|
||||
if (a_intent != INTENT_HELP)
|
||||
if (combat_mode)
|
||||
msg += "[t_He] seem[p_s()] to be on guard.\n"
|
||||
if (getOxyLoss() >= 10)
|
||||
msg += "[t_He] seem[p_s()] winded.\n"
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/mob/living/carbon/human/get_status_tab_items()
|
||||
. = ..()
|
||||
. += "Intent: [a_intent]"
|
||||
. += "Combat mode: [combat_mode ? "On" : "Off"]"
|
||||
. += "Move Mode: [m_intent]"
|
||||
if (internal)
|
||||
if (!internal.air_contents)
|
||||
@@ -1036,7 +1036,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/mouse_buckle_handling(mob/living/M, mob/living/user)
|
||||
if(pulling != M || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS || a_intent != INTENT_GRAB)
|
||||
if(pulling != M || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS)
|
||||
return FALSE
|
||||
|
||||
//If they dragged themselves to you and you're currently aggressively grabbing them try to piggyback
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
SSblackbox.record_feedback("tally", "zone_targeted", 1, target_area)
|
||||
|
||||
// the attacked_by code varies among species
|
||||
return dna.species.spec_attacked_by(I, user, affecting, a_intent, src)
|
||||
return dna.species.spec_attacked_by(I, user, affecting, src)
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user)
|
||||
@@ -206,23 +206,21 @@
|
||||
to_chat(user, "<span class='danger'>You [hulk_verb] [src]!</span>")
|
||||
apply_damage(15, BRUTE, wound_bonus=10)
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/user)
|
||||
/mob/living/carbon/human/attack_hand(mob/user, modifiers)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
dna.species.spec_attack_hand(H, src)
|
||||
dna.species.spec_attack_hand(H, src, null, modifiers)
|
||||
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
..() //shaking
|
||||
return FALSE
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
|
||||
|
||||
if(modifiers && modifiers["right"]) //Always drop item in hand, if no item, get stunned instead.
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && !(I.item_flags & ABSTRACT) && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
@@ -244,6 +242,10 @@
|
||||
"<span class='userdanger'>[M] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You tackle [src] down!</span>")
|
||||
|
||||
if(!M.combat_mode)
|
||||
..() //shaking
|
||||
return FALSE
|
||||
|
||||
if(M.limb_destroyer)
|
||||
dismembering_strike(M, affecting.body_zone)
|
||||
|
||||
@@ -258,7 +260,7 @@
|
||||
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
if(check_shields(M, 0, "the M.name"))
|
||||
visible_message("<span class='danger'>[M] attempts to touch [src]!</span>", \
|
||||
"<span class='danger'>[M] attempts to touch you!</span>", "<span class='hear'>You hear a swoosh!</span>", null, M)
|
||||
@@ -267,7 +269,23 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
|
||||
if(modifiers && modifiers["right"]) //Always drop item in hand, if no item, get stun instead.
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] disarms [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
Paralyze(100)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You tackle [src] down!</span>")
|
||||
|
||||
if(M.combat_mode)
|
||||
if (w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/damage = prob(90) ? rand(M.melee_damage_lower, M.melee_damage_upper) : 0
|
||||
@@ -291,20 +309,7 @@
|
||||
return TRUE
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] disarms [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
Paralyze(100)
|
||||
log_combat(M, src, "tackled")
|
||||
visible_message("<span class='danger'>[M] tackles [src] down!</span>", \
|
||||
"<span class='userdanger'>[M] tackles you down!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", null, M)
|
||||
to_chat(M, "<span class='danger'>You tackle [src] down!</span>")
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD,ANTAG_HUD,GLAND_HUD,SENTIENT_DISEASE_HUD,FAN_HUD)
|
||||
hud_type = /datum/hud/human
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
|
||||
pressure_resistance = 25
|
||||
can_buckle = TRUE
|
||||
buckle_lying = 0
|
||||
|
||||
@@ -1418,7 +1418,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style, modifiers)
|
||||
if(!istype(M))
|
||||
return
|
||||
CHECK_DNA_AND_SPECIES(M)
|
||||
@@ -1428,27 +1428,24 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return
|
||||
if(M.mind)
|
||||
attacker_style = M.mind.martial_art
|
||||
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
|
||||
if((M != H) && M.combat_mode && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
|
||||
log_combat(M, H, "attempted to touch")
|
||||
H.visible_message("<span class='warning'>[M] attempts to touch [H]!</span>", \
|
||||
"<span class='danger'>[M] attempts to touch you!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>You attempt to touch [H]!</span>")
|
||||
return
|
||||
|
||||
SEND_SIGNAL(M, COMSIG_MOB_ATTACK_HAND, M, H, attacker_style)
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
help(M, H, attacker_style)
|
||||
|
||||
if("grab")
|
||||
grab(M, H, attacker_style)
|
||||
if(modifiers && modifiers["right"])
|
||||
disarm(M, H, attacker_style)
|
||||
return // dont attack after
|
||||
if(M.combat_mode)
|
||||
harm(M, H, attacker_style)
|
||||
else
|
||||
help(M, H, attacker_style)
|
||||
|
||||
if("harm")
|
||||
harm(M, H, attacker_style)
|
||||
|
||||
if("disarm")
|
||||
disarm(M, H, attacker_style)
|
||||
|
||||
/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
// Allows you to put in item-specific reactions based on species
|
||||
if(user != H)
|
||||
if(H.check_shields(I, I.force, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
|
||||
@@ -1470,7 +1467,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/Iwound_bonus = I.wound_bonus
|
||||
|
||||
// this way, you can't wound with a surgical tool on help intent if they have a surgery active and are lying down, so a misclick with a circular saw on the wrong limb doesn't bleed them dry (they still get hit tho)
|
||||
if((I.item_flags & SURGICAL_TOOL) && user.a_intent == INTENT_HELP && H.body_position == LYING_DOWN && (LAZYLEN(H.surgeries) > 0))
|
||||
if((I.item_flags & SURGICAL_TOOL) && !user.combat_mode && H.body_position == LYING_DOWN && (LAZYLEN(H.surgeries) > 0))
|
||||
Iwound_bonus = CANT_WOUND
|
||||
|
||||
var/weakness = check_species_weakness(I, user)
|
||||
@@ -2139,7 +2136,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
. |= BIO_JUST_BONE
|
||||
|
||||
///Species override for unarmed attacks because the attack_hand proc was made by a mouth-breathing troglodyte on a tricycle. Also to whoever thought it would be a good idea to make it so the original spec_unarmedattack was not actually linked to unarmed attack needs to be checked by a doctor because they clearly have a vast empty space in their head.
|
||||
/datum/species/proc/spec_unarmedattack(mob/living/carbon/human/user, atom/target)
|
||||
/datum/species/proc/spec_unarmedattack(mob/living/carbon/human/user, atom/target, modifiers)
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
@@ -350,10 +350,10 @@
|
||||
|
||||
/datum/species/golem/uranium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.a_intent != INTENT_HELP)
|
||||
if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.combat_mode)
|
||||
radiation_emission(H)
|
||||
|
||||
/datum/species/golem/uranium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/golem/uranium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && user != H)
|
||||
radiation_emission(H)
|
||||
@@ -466,10 +466,10 @@
|
||||
|
||||
/datum/species/golem/bluespace/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != INTENT_HELP)
|
||||
if(world.time > last_teleport + teleport_cooldown && M != H && M.combat_mode)
|
||||
reactive_teleport(H)
|
||||
|
||||
/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_teleport + teleport_cooldown && user != H)
|
||||
reactive_teleport(H)
|
||||
@@ -586,11 +586,11 @@
|
||||
|
||||
/datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown && M != H && M.a_intent != INTENT_HELP)
|
||||
if(world.time > last_banana + banana_cooldown && M != H && M.combat_mode)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
|
||||
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown && user != H)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
@@ -840,10 +840,10 @@
|
||||
|
||||
/datum/species/golem/bronze/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown && M.a_intent != INTENT_HELP)
|
||||
if(world.time > last_gong_time + gong_cooldown && M.combat_mode)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
@@ -906,7 +906,7 @@
|
||||
var/last_creation = 0
|
||||
var/brother_creation_cooldown = 300
|
||||
|
||||
/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
|
||||
/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(user != H)
|
||||
return FALSE //forced reproduction is rape.
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
C.butcher_results = null
|
||||
C.dna.remove_mutation(RACEMUT)
|
||||
|
||||
/datum/species/monkey/spec_unarmedattack(mob/living/carbon/human/user, atom/target)
|
||||
/datum/species/monkey/spec_unarmedattack(mob/living/carbon/human/user, atom/target, modifiers)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
if(!iscarbon(target))
|
||||
return TRUE
|
||||
var/mob/living/carbon/victim = target
|
||||
if(user.a_intent != INTENT_HARM || user.is_muzzled())
|
||||
if(user.is_muzzled())
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(victim))
|
||||
@@ -88,7 +88,7 @@
|
||||
var/datum/disease/bite_infection = d
|
||||
victim.ForceContractDisease(bite_infection)
|
||||
return TRUE
|
||||
target.attack_paw(user)
|
||||
target.attack_paw(user, modifiers)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
|
||||
. = ..()
|
||||
C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW
|
||||
C.set_combat_mode(TRUE) // THE SUFFERING MUST FLOW
|
||||
|
||||
//Zombies never actually die, they just fall down until they regenerate enough to rise back up.
|
||||
//They must be restrained, beheaded or gibbed to stop being a threat.
|
||||
|
||||
@@ -3,15 +3,3 @@
|
||||
adjustBruteLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/carbon/human/proc/disarm_suicide()
|
||||
var/suicide_message = "[src] is ripping [p_their()] own arms off! It looks like [p_theyre()] trying to commit suicide." //heheh get it?
|
||||
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
|
||||
|
||||
var/timer = 15
|
||||
for(var/obj/item/bodypart/thing in bodyparts)
|
||||
if(thing.body_part == ARM_LEFT || thing.body_part == ARM_RIGHT)
|
||||
addtimer(CALLBACK(thing, /obj/item/bodypart/.proc/dismember), timer)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/effects/cartoon_pop.ogg', 70), timer)
|
||||
timer += 15
|
||||
addtimer(CALLBACK(src, /mob/living/carbon/human/.proc/delayed_suicide, FALSE), timer-10)
|
||||
|
||||
@@ -122,12 +122,12 @@
|
||||
mob_swap = TRUE
|
||||
else
|
||||
//You can swap with the person you are dragging on grab intent, and restrained people in most cases
|
||||
if(M.pulledby == src && a_intent == INTENT_GRAB && !too_strong)
|
||||
if(M.pulledby == src && !too_strong)
|
||||
mob_swap = TRUE
|
||||
else if(
|
||||
!(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP))&&\
|
||||
((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || M.a_intent == INTENT_HELP) &&\
|
||||
(HAS_TRAIT(src, TRAIT_RESTRAINED) || a_intent == INTENT_HELP)
|
||||
((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || !combat_mode) &&\
|
||||
(HAS_TRAIT(src, TRAIT_RESTRAINED) || !combat_mode)
|
||||
)
|
||||
mob_swap = TRUE
|
||||
if(mob_swap)
|
||||
@@ -168,8 +168,10 @@
|
||||
if(HAS_TRAIT(L, TRAIT_PUSHIMMUNE))
|
||||
return TRUE
|
||||
//If they're a human, and they're not in help intent, block pushing
|
||||
if(ishuman(M) && (M.a_intent != INTENT_HELP))
|
||||
return TRUE
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/human = M
|
||||
if(human.combat_mode)
|
||||
return TRUE
|
||||
//anti-riot equipment is also anti-push
|
||||
for(var/obj/item/I in M.held_items)
|
||||
if(!istype(M, /obj/item/clothing))
|
||||
@@ -300,6 +302,7 @@
|
||||
M.LAssailant = usr
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
|
||||
SEND_SIGNAL(M, COMSIG_LIVING_GET_PULLED, src)
|
||||
//Share diseases that are spread by touch
|
||||
for(var/thing in diseases)
|
||||
@@ -362,7 +365,7 @@
|
||||
|
||||
if(istype(AM) && Adjacent(AM))
|
||||
start_pulling(AM)
|
||||
else
|
||||
else if(!combat_mode) //Don;'t cancel pulls if misclicking in combat mode.
|
||||
stop_pulling()
|
||||
|
||||
/mob/living/stop_pulling()
|
||||
@@ -1900,7 +1903,7 @@
|
||||
* It is also used to process martial art attacks by nonhumans, even against humans
|
||||
* Human vs human attacks are handled in species code right now.
|
||||
*/
|
||||
/mob/living/proc/apply_martial_art(mob/living/target)
|
||||
/mob/living/proc/apply_martial_art(mob/living/target, modifiers, is_grab)
|
||||
if(HAS_TRAIT(target, TRAIT_MARTIAL_ARTS_IMMUNE))
|
||||
return FALSE
|
||||
if(ishuman(target) && ishuman(src)) //Human vs human are handled in species code
|
||||
@@ -1908,15 +1911,16 @@
|
||||
var/datum/martial_art/style = mind?.martial_art
|
||||
var/attack_result = FALSE
|
||||
if (style)
|
||||
switch (a_intent)
|
||||
if (INTENT_GRAB)
|
||||
attack_result = style.grab_act(src, target)
|
||||
if (INTENT_HARM)
|
||||
if (HAS_TRAIT(src, TRAIT_PACIFISM))
|
||||
return FALSE
|
||||
attack_result = style.harm_act(src, target)
|
||||
if (INTENT_DISARM)
|
||||
attack_result = style.disarm_act(src, target)
|
||||
if (INTENT_HELP)
|
||||
attack_result = style.help_act(src, target)
|
||||
if (is_grab)
|
||||
attack_result = style.grab_act(src, target)
|
||||
if(modifiers && modifiers["right"])
|
||||
attack_result = style.disarm_act(src, target)
|
||||
if(combat_mode)
|
||||
if (HAS_TRAIT(src, TRAIT_PACIFISM))
|
||||
return FALSE
|
||||
attack_result = style.harm_act(src, target)
|
||||
else
|
||||
attack_result = style.help_act(src, target)
|
||||
|
||||
|
||||
return attack_result
|
||||
|
||||
@@ -68,6 +68,19 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/living/proc/set_combat_mode(new_mode, silent = TRUE)
|
||||
if(combat_mode == new_mode)
|
||||
return
|
||||
. = combat_mode
|
||||
combat_mode = new_mode
|
||||
if(hud_used?.action_intent)
|
||||
hud_used.action_intent.update_icon()
|
||||
if(silent || !(client?.prefs.toggles & SOUND_COMBATMODE))
|
||||
return
|
||||
if(combat_mode)
|
||||
playsound_local(src, 'sound/misc/ui_togglecombat.ogg', 25, FALSE, pressure_affected = FALSE) //Sound from interbay!
|
||||
else
|
||||
playsound_local(src, 'sound/misc/ui_toggleoffcombat.ogg', 25, FALSE, pressure_affected = FALSE) //Slightly modified version of the above
|
||||
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
if(isitem(AM))
|
||||
@@ -144,9 +157,6 @@
|
||||
return FALSE
|
||||
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state)
|
||||
return FALSE
|
||||
if(user.a_intent != INTENT_GRAB)
|
||||
to_chat(user, "<span class='warning'>You must be on grab intent to upgrade your grab further!</span>")
|
||||
return FALSE
|
||||
user.setGrabState(user.grab_state + 1)
|
||||
switch(user.grab_state)
|
||||
if(GRAB_AGGRESSIVE)
|
||||
@@ -223,95 +233,85 @@
|
||||
log_combat(M, src, "attacked")
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_hand(mob/living/carbon/human/user)
|
||||
/mob/living/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
. = ..()
|
||||
if (user.apply_martial_art(src))
|
||||
if (user.apply_martial_art(src, modifiers))
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/human/M)
|
||||
/mob/living/attack_paw(mob/living/carbon/human/M, modifiers)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return FALSE
|
||||
|
||||
if (M.apply_martial_art(src))
|
||||
if (M.apply_martial_art(src, modifiers))
|
||||
return TRUE
|
||||
|
||||
switch (M.a_intent)
|
||||
if (INTENT_HARM)
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.is_muzzled() || M.is_mouth_covered(FALSE, TRUE))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
log_combat(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
if (INTENT_GRAB)
|
||||
grabbedby(M)
|
||||
if(modifiers && modifiers["right"])
|
||||
if (M != src)
|
||||
M.disarm(src)
|
||||
return TRUE
|
||||
if (M.combat_mode)
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
if (INTENT_DISARM)
|
||||
if (M != src)
|
||||
M.disarm(src)
|
||||
return TRUE
|
||||
|
||||
if(M.is_muzzled() || M.is_mouth_covered(FALSE, TRUE))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
log_combat(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You bite [src]!</span>")
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [M.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
switch(L.a_intent)
|
||||
if("help")
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>", \
|
||||
"<span class='notice'>[L.name] rubs its head against you.</span>", null, null, L)
|
||||
to_chat(L, "<span class='notice'>You rub your head against [src].</span>")
|
||||
return FALSE
|
||||
if(L.combat_mode)
|
||||
if(HAS_TRAIT(L, TRAIT_PACIFISM))
|
||||
to_chat(L, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return
|
||||
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
log_combat(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, L)
|
||||
to_chat(L, "<span class='danger'>You bite [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
return TRUE
|
||||
else
|
||||
if(HAS_TRAIT(L, TRAIT_PACIFISM))
|
||||
to_chat(L, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return
|
||||
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
log_combat(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites you!</span>", "<span class='hear'>You hear a chomp!</span>", COMBAT_MESSAGE_RANGE, L)
|
||||
to_chat(L, "<span class='danger'>You bite [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, TRUE, -1)
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [L.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, L)
|
||||
to_chat(L, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
visible_message("<span class='danger'>[L.name]'s bite misses [src]!</span>", \
|
||||
"<span class='danger'>You avoid [L.name]'s bite!</span>", "<span class='hear'>You hear the sound of jaws snapping shut!</span>", COMBAT_MESSAGE_RANGE, L)
|
||||
to_chat(L, "<span class='warning'>Your bite misses [src]!</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>", \
|
||||
"<span class='notice'>[L.name] rubs its head against you.</span>", null, null, L)
|
||||
to_chat(L, "<span class='notice'>You rub your head against [src].</span>")
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe-like arm.</span>", \
|
||||
"<span class='notice'>[M] caresses you with its scythe-like arm.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You caress [src] with your scythe-like arm.</span>")
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
if(modifiers && modifiers["right"])
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
if(M.combat_mode)
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
return FALSE
|
||||
if("harm")
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src)
|
||||
return TRUE
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return TRUE
|
||||
M.do_attack_animation(src)
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe-like arm.</span>", \
|
||||
"<span class='notice'>[M] caresses you with its scythe-like arm.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You caress [src] with your scythe-like arm.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_hulk(mob/living/carbon/human/user)
|
||||
..()
|
||||
|
||||
@@ -159,6 +159,9 @@
|
||||
var/icon/head_icon = 'icons/mob/pets_held.dmi'//what it looks like on your head
|
||||
var/held_state = ""//icon state for the above
|
||||
|
||||
///If combat mode is on or not
|
||||
var/combat_mode = FALSE
|
||||
|
||||
/// Is this mob allowed to be buckled/unbuckled to/from things?
|
||||
var/can_buckle_to = TRUE
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
move_resist = MOVE_FORCE_OVERPOWERING
|
||||
density = TRUE
|
||||
status_flags = CANSTUN|CANPUSH
|
||||
a_intent = INTENT_HARM //so we always get pushed instead of trying to swap
|
||||
combat_mode = TRUE //so we always get pushed instead of trying to swap
|
||||
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
|
||||
see_in_dark = 8
|
||||
hud_type = /datum/hud/ai
|
||||
|
||||
@@ -40,23 +40,20 @@
|
||||
fold_in(force = 1)
|
||||
Paralyze(200)
|
||||
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user)
|
||||
switch(user.a_intent)
|
||||
if("help")
|
||||
visible_message("<span class='notice'>[user] gently pats [src] on the head, eliciting an off-putting buzzing from its holographic field.</span>")
|
||||
if("disarm")
|
||||
visible_message("<span class='notice'>[user] boops [src] on the head!</span>")
|
||||
if("harm")
|
||||
user.do_attack_animation(src)
|
||||
if (user.name == master)
|
||||
visible_message("<span class='notice'>Responding to its master's touch, [src] disengages its holochassis emitter, rapidly losing coherence.</span>")
|
||||
if(do_after(user, 1 SECONDS, src))
|
||||
fold_in()
|
||||
if(user.put_in_hands(card))
|
||||
user.visible_message("<span class='notice'>[user] promptly scoops up [user.p_their()] pAI's card.</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[user] stomps on [src]!.</span>")
|
||||
take_holo_damage(2)
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user, modifiers)
|
||||
if(user.combat_mode)
|
||||
user.do_attack_animation(src)
|
||||
if (user.name == master)
|
||||
visible_message("<span class='notice'>Responding to its master's touch, [src] disengages its holochassis emitter, rapidly losing coherence.</span>")
|
||||
if(do_after(user, 1 SECONDS, TRUE, src))
|
||||
fold_in()
|
||||
if(user.put_in_hands(card))
|
||||
user.visible_message("<span class='notice'>[user] promptly scoops up [user.p_their()] pAI's card.</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[user] stomps on [src]!.</span>")
|
||||
take_holo_damage(2)
|
||||
else
|
||||
visible_message("<span class='notice'>[user] gently pats [src] on the head, eliciting an off-putting buzzing from its holographic field.</span>")
|
||||
|
||||
/mob/living/silicon/pai/bullet_act(obj/projectile/Proj)
|
||||
if(Proj.stun)
|
||||
|
||||
@@ -861,7 +861,7 @@
|
||||
|
||||
/mob/living/silicon/robot/mouse_buckle_handling(mob/living/M, mob/living/user)
|
||||
//Don't try buckling on INTENT_HARM so that silicons can search people's inventories without loading them
|
||||
if(can_buckle && isliving(user) && isliving(M) && !(M in buckled_mobs) && ((user != src) || (a_intent != INTENT_HARM)))
|
||||
if(can_buckle && isliving(user) && isliving(M) && !(M in buckled_mobs) && ((user != src) || (!combat_mode)))
|
||||
return user_buckle_mob(M, user, check_loc = FALSE)
|
||||
|
||||
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, buckle_mob_flags= RIDER_NEEDS_ARM)
|
||||
|
||||
@@ -4,8 +4,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
/obj/item/clothing/head/chameleon/broken \
|
||||
)))
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
|
||||
if(W.tool_behaviour == TOOL_WELDER && (user.a_intent != INTENT_HARM || user == src))
|
||||
/mob/living/silicon/robot/attackby(obj/item/W, mob/living/user, params)
|
||||
if(W.tool_behaviour == TOOL_WELDER && (!user.combat_mode || user == src))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (!getBruteLoss())
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
@@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
if(W.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && user.a_intent == INTENT_HELP && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats))
|
||||
if(W.slot_flags & ITEM_SLOT_HEAD && hat_offset != INFINITY && !user.combat_mode && !is_type_in_typecache(W, GLOB.blacklisted_borg_hats))
|
||||
if(hat && HAS_TRAIT(hat, TRAIT_NODROP))
|
||||
to_chat(user, "<span class='warn'>You can't seem to remove [src]'s existing headwear!</span>")
|
||||
return
|
||||
@@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
if (user.temporarilyRemoveItemFromInventory(W, TRUE))
|
||||
place_on_head(W)
|
||||
return
|
||||
if(istype(W, /obj/item/defibrillator) && user.a_intent == "help")
|
||||
if(istype(W, /obj/item/defibrillator) && !user.combat_mode)
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='warning'>You must access the cyborg's internals!</span>")
|
||||
return
|
||||
@@ -235,8 +235,8 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if (M.a_intent == INTENT_DISARM)
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
if (modifiers && modifiers["right"])
|
||||
if(body_position == STANDING_UP)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
var/obj/item/I = get_active_held_item()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
see_in_dark = 8
|
||||
bubble_icon = "machine"
|
||||
weather_immunities = list("ash")
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
mob_biotypes = MOB_ROBOTIC
|
||||
deathsound = 'sound/voice/borg_deathsound.ogg'
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(L.a_intent == INTENT_HELP)
|
||||
if(!L.combat_mode)
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
|
||||
/mob/living/silicon/attack_hulk(mob/living/carbon/human/user)
|
||||
@@ -60,27 +60,25 @@
|
||||
to_chat(user, "<span class='danger'>You punch [src]!</span>")
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/silicon/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
. = FALSE
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, M) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
. = TRUE
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
visible_message("<span class='notice'>[M] pets [src].</span>", \
|
||||
"<span class='notice'>[M] pets you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You pet [src].</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
else
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 10, TRUE)
|
||||
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent!</span>", \
|
||||
"<span class='warning'>[M] punches you, but doesn't leave a dent!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src], but don't leave a dent!</span>")
|
||||
if(M.combat_mode)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 10, TRUE)
|
||||
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent!</span>", \
|
||||
"<span class='warning'>[M] punches you, but doesn't leave a dent!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You punch [src], but don't leave a dent!</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>[M] pets [src].</span>", \
|
||||
"<span class='notice'>[M] pets you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You pet [src].</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT_RND, "pet_borg", /datum/mood_event/pet_borg)
|
||||
|
||||
|
||||
/mob/living/silicon/attack_drone(mob/living/simple_animal/drone/M)
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(M.combat_mode)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,52 +1,48 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M)
|
||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M, modifiers)
|
||||
// so that martial arts don't double dip
|
||||
if (..())
|
||||
return TRUE
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if (stat == DEAD)
|
||||
return
|
||||
visible_message("<span class='notice'>[M] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M] [response_help_continuous] you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if(pet_bonus)
|
||||
funpet(M)
|
||||
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
var/shove_dir = get_dir(M, src)
|
||||
if(!Move(get_step(src, shove_dir), shove_dir))
|
||||
log_combat(M, src, "shoved", "failing to move it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src]!</span>",
|
||||
"<span class='danger'>You shove [src]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're shoved by [M.name]!</span>")
|
||||
return TRUE
|
||||
log_combat(M, src, "shoved", "pushing it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src], pushing [p_them()]!</span>",
|
||||
"<span class='danger'>You shove [src], pushing [p_them()]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're pushed by [M.name]!</span>")
|
||||
if(modifiers && modifiers["right"])
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
var/shove_dir = get_dir(M, src)
|
||||
if(!Move(get_step(src, shove_dir), shove_dir))
|
||||
log_combat(M, src, "shoved", "failing to move it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src]!</span>",
|
||||
"<span class='danger'>You shove [src]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're shoved by [M.name]!</span>")
|
||||
return TRUE
|
||||
log_combat(M, src, "shoved", "pushing it")
|
||||
M.visible_message("<span class='danger'>[M.name] shoves [src], pushing [p_them()]!</span>",
|
||||
"<span class='danger'>You shove [src], pushing [p_them()]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", COMBAT_MESSAGE_RANGE, list(src))
|
||||
to_chat(src, "<span class='userdanger'>You're pushed by [M.name]!</span>")
|
||||
return TRUE
|
||||
|
||||
if("harm")
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt [src]!</span>")
|
||||
return
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[M] [response_harm_continuous] [src]!</span>",\
|
||||
"<span class='userdanger'>[M] [response_harm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You [response_harm_simple] [src]!</span>")
|
||||
playsound(loc, attacked_sound, 25, TRUE, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
log_combat(M, src, "attacked")
|
||||
updatehealth()
|
||||
return TRUE
|
||||
if(!M.combat_mode)
|
||||
if (stat == DEAD)
|
||||
return
|
||||
visible_message("<span class='notice'>[M] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M] [response_help_continuous] you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if(pet_bonus)
|
||||
funpet(M)
|
||||
else
|
||||
if(HAS_TRAIT(M, TRAIT_PACIFISM))
|
||||
to_chat(M, "<span class='warning'>You don't want to hurt [src]!</span>")
|
||||
return
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
visible_message("<span class='danger'>[M] [response_harm_continuous] [src]!</span>",\
|
||||
"<span class='userdanger'>[M] [response_harm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
to_chat(M, "<span class='danger'>You [response_harm_simple] [src]!</span>")
|
||||
playsound(loc, attacked_sound, 25, TRUE, -1)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
log_combat(M, src, "attacked")
|
||||
updatehealth()
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
*This is used to make certain mobs (pet_bonus == TRUE) emote when pet, make a heart emoji at their location, and give the petter a moodlet.
|
||||
@@ -74,7 +70,7 @@
|
||||
var/damage = rand(1, 3)
|
||||
attack_threshold_check(damage)
|
||||
return 1
|
||||
if (M.a_intent == INTENT_HELP)
|
||||
if (!M.combat_mode)
|
||||
if (health > 0)
|
||||
visible_message("<span class='notice'>[M.name] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M.name] [response_help_continuous] you.</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
@@ -82,9 +78,9 @@
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
|
||||
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M, modifiers)
|
||||
if(..()) //if harm or disarm intent.
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(modifiers && modifiers["right"])
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
|
||||
visible_message("<span class='danger'>[M] [response_disarm_continuous] [name]!</span>", \
|
||||
"<span class='userdanger'>[M] [response_disarm_continuous] you!</span>", null, COMBAT_MESSAGE_RANGE, M)
|
||||
@@ -122,7 +118,7 @@
|
||||
return attack_threshold_check(damage)
|
||||
|
||||
/mob/living/simple_animal/attack_drone(mob/living/simple_animal/drone/M)
|
||||
if(M.a_intent == INTENT_HARM) //No kicking dogs even as a rogue drone. Use a weapon.
|
||||
if(M.combat_mode) //No kicking dogs even as a rogue drone. Use a weapon.
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == INTENT_HELP)
|
||||
if(!H.combat_mode)
|
||||
interact(H)
|
||||
else
|
||||
return ..()
|
||||
@@ -325,7 +325,7 @@
|
||||
to_chat(user, "<span class='notice'>Controls are now [locked ? "locked" : "unlocked"].</span>")
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/attackby(obj/item/W, mob/user, params)
|
||||
/mob/living/simple_animal/bot/attackby(obj/item/W, mob/living/user, params)
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(!locked)
|
||||
open = !open
|
||||
@@ -347,7 +347,7 @@
|
||||
ejectpai(user)
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
|
||||
if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode)
|
||||
if(health >= maxHealth)
|
||||
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
|
||||
return
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
weapon.attack(C, src)
|
||||
C.Knockdown(20)
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/user, params)
|
||||
/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/living/user, params)
|
||||
if(W.GetID())
|
||||
if(bot_core.allowed(user) && !open && !emagged)
|
||||
locked = !locked
|
||||
@@ -171,7 +171,7 @@
|
||||
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] doesn't seem to respect your authority.</span>")
|
||||
else if(istype(W, /obj/item/kitchen/knife) && user.a_intent != INTENT_HARM)
|
||||
else if(istype(W, /obj/item/kitchen/knife) && !user.combat_mode)
|
||||
to_chat(user, "<span class='notice'>You start attaching \the [W] to \the [src]...</span>")
|
||||
if(do_after(user, 25, target = src))
|
||||
deputize(W, user)
|
||||
|
||||
@@ -113,7 +113,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == "harm")
|
||||
if(H.combat_mode)
|
||||
retaliate(H)
|
||||
addtimer(CALLBACK(src, .proc/react_buzz), 5)
|
||||
return ..()
|
||||
|
||||
@@ -449,12 +449,12 @@
|
||||
if(damagetype_healer == "all" && treat_me_for.len)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H)
|
||||
/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H, modifiers)
|
||||
if(DOING_INTERACTION_WITH_TARGET(H, src))
|
||||
to_chat(H, "<span class='warning'>You're already interacting with [src].</span>")
|
||||
return
|
||||
|
||||
if(H.a_intent == INTENT_DISARM && mode != BOT_TIPPED)
|
||||
if(modifiers && modifiers["right"] && mode != BOT_TIPPED)
|
||||
H.visible_message("<span class='danger'>[H] begins tipping over [src].</span>", "<span class='warning'>You begin tipping over [src]...</span>")
|
||||
|
||||
if(world.time > last_tipping_action_voice + 15 SECONDS)
|
||||
@@ -467,7 +467,7 @@
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
tip_over(H)
|
||||
|
||||
else if(H.a_intent == INTENT_HELP && mode == BOT_TIPPED)
|
||||
else if(!H.combat_mode && mode == BOT_TIPPED)
|
||||
H.visible_message("<span class='notice'>[H] begins righting [src].</span>", "<span class='notice'>You begin righting [src]...</span>")
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
set_right(H)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
a_intent = INTENT_HARM //No swapping
|
||||
combat_mode = TRUE //No swapping
|
||||
buckle_lying = 0
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
buckle_prevents_pull = TRUE // No pulling loaded shit
|
||||
@@ -131,7 +131,7 @@
|
||||
..()
|
||||
reached_target = FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/attackby(obj/item/I, mob/user, params)
|
||||
/mob/living/simple_animal/bot/mulebot/attackby(obj/item/I, mob/living/user, params)
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
. = ..()
|
||||
if(open)
|
||||
@@ -148,7 +148,7 @@
|
||||
diag_hud_set_mulebotcell()
|
||||
visible_message("<span class='notice'>[user] inserts \a [cell] into [src].</span>",
|
||||
"<span class='notice'>You insert [cell] into [src].</span>")
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR && open && user.a_intent != INTENT_HARM)
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR && open && !user.combat_mode)
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't have a power cell!</span>")
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
data_hud_type = DATA_HUD_SECURITY_ADVANCED
|
||||
path_image_color = "#FF0000"
|
||||
|
||||
a_intent = "harm"
|
||||
combat_mode = TRUE
|
||||
|
||||
var/baton_type = /obj/item/melee/baton
|
||||
var/obj/item/weapon
|
||||
@@ -197,7 +197,7 @@ Auto Patrol: []"},
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
|
||||
if((H.a_intent == INTENT_HARM) || (H.a_intent == INTENT_DISARM))
|
||||
if(H.combat_mode)
|
||||
retaliate(H)
|
||||
if(special_retaliate_after_attack(H))
|
||||
return
|
||||
@@ -213,9 +213,9 @@ Auto Patrol: []"},
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/user, params)
|
||||
/mob/living/simple_animal/bot/secbot/attackby(obj/item/W, mob/living/user, params)
|
||||
..()
|
||||
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
|
||||
if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode) // Any intent but harm will heal, so we shouldn't get angry.
|
||||
return
|
||||
if(W.tool_behaviour != TOOL_SCREWDRIVER && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
|
||||
retaliate(user)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
speak_chance = 1
|
||||
icon = 'icons/mob/cult.dmi'
|
||||
speed = 0
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
stop_automated_movement = 1
|
||||
status_flags = CANPUSH
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
speak_chance = 1
|
||||
icon = 'icons/mob/eldritch_mobs.dmi'
|
||||
speed = 0
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
stop_automated_movement = 1
|
||||
AIStatus = AI_OFF
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
|
||||
@@ -317,6 +317,6 @@
|
||||
|
||||
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L)
|
||||
..()
|
||||
if(L.a_intent == INTENT_HARM && L.reagents && !stat)
|
||||
if(L.combat_mode && L.reagents && !stat)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
icon_state = "drone_maint_grey"
|
||||
icon_living = "drone_maint_grey"
|
||||
icon_dead = "drone_maint_dead"
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
health = 30
|
||||
maxHealth = 30
|
||||
unsuitable_atmos_damage = 0
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M)
|
||||
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M, modifiers)
|
||||
if(!stat && modifiers && modifiers["right"] && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>",
|
||||
"<span class='notice'>You tip over [src].</span>")
|
||||
to_chat(src, "<span class='userdanger'>You are tipped over by [M]!</span>")
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
///Give intense wisdom to the attacker if they're being friendly about it
|
||||
/mob/living/simple_animal/cow/wisdom/attack_hand(mob/living/carbon/M)
|
||||
if(!stat && M.a_intent == INTENT_HELP)
|
||||
if(!stat && !M.combat_mode)
|
||||
to_chat(M, "<span class='nicegreen'>[src] whispers you some intense wisdoms and then disappears!</span>")
|
||||
M.mind?.adjust_experience(pick(GLOB.skill_types), 500)
|
||||
do_smoke(1, get_turf(src))
|
||||
|
||||
@@ -209,8 +209,8 @@
|
||||
if (reagents?.has_reagent(/datum/reagent/yuck) || reagents?.has_reagent(/datum/reagent/fuel))
|
||||
. += "<span class='warning'>It's dripping with fuel and smells terrible.</span>"
|
||||
|
||||
/obj/item/food/deadmouse/attackby(obj/item/I, mob/user, params)
|
||||
if(I.get_sharpness() && user.a_intent == INTENT_HARM)
|
||||
/obj/item/food/deadmouse/attackby(obj/item/I, mob/living/user, params)
|
||||
if(I.get_sharpness() && user.combat_mode)
|
||||
if(isturf(loc))
|
||||
new /obj/item/food/meat/slab/mouse(loc)
|
||||
to_chat(user, "<span class='notice'>You butcher [src].</span>")
|
||||
|
||||
@@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
icon_living = "magicbase"
|
||||
icon_dead = "magicbase"
|
||||
speed = 0
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
stop_automated_movement = 1
|
||||
is_flying_animal = TRUE // Immunity to chasms and landmines, etc.
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Fire
|
||||
/mob/living/simple_animal/hostile/guardian/fire
|
||||
a_intent = INTENT_HELP
|
||||
combat_mode = FALSE
|
||||
melee_damage_lower = 7
|
||||
melee_damage_upper = 7
|
||||
attack_sound = 'sound/items/welder.ogg'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
armour_penetration = 100
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/ranged
|
||||
a_intent = INTENT_HELP
|
||||
combat_mode = FALSE
|
||||
friendly_verb_continuous = "quietly assesses"
|
||||
friendly_verb_simple = "quietly assess"
|
||||
melee_damage_lower = 10
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Healer
|
||||
/mob/living/simple_animal/hostile/guardian/healer
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
friendly_verb_continuous = "heals"
|
||||
friendly_verb_simple = "heal"
|
||||
speed = 0
|
||||
@@ -46,7 +46,7 @@
|
||||
/mob/living/simple_animal/hostile/guardian/healer/ToggleMode()
|
||||
if(src.loc == summoner)
|
||||
if(toggle)
|
||||
a_intent = INTENT_HARM
|
||||
set_combat_mode(TRUE)
|
||||
speed = 0
|
||||
damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7)
|
||||
melee_damage_lower = 15
|
||||
@@ -54,7 +54,7 @@
|
||||
to_chat(src, "<span class='danger'><B>You switch to combat mode.</span></B>")
|
||||
toggle = FALSE
|
||||
else
|
||||
a_intent = INTENT_HELP
|
||||
set_combat_mode(FALSE)
|
||||
speed = 1
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
|
||||
melee_damage_lower = 0
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
attack_verb_simple = "slash"
|
||||
speak_emote = list("hisses")
|
||||
bubble_icon = "alien"
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
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)
|
||||
faction = list(ROLE_ALIEN)
|
||||
@@ -151,7 +151,7 @@
|
||||
name = "lusty xenomorph maid"
|
||||
melee_damage_lower = 0
|
||||
melee_damage_upper = 0
|
||||
a_intent = INTENT_HELP
|
||||
combat_mode = FALSE
|
||||
friendly_verb_continuous = "caresses"
|
||||
friendly_verb_simple = "caress"
|
||||
obj_damage = 0
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/L) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
|
||||
..()
|
||||
if(L.a_intent == INTENT_HARM && L.reagents && !stat)
|
||||
if(L.combat_mode && L.reagents && !stat)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 1)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.1)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
robust_searching = 1
|
||||
stat_attack = HARD_CRIT
|
||||
status_flags = 0
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
sentience_type = SENTIENCE_BOSS
|
||||
gender = NEUTER
|
||||
var/list/boss_abilities = list() //list of /datum/action/boss
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
attack_verb_continuous = "slashes at"
|
||||
attack_verb_simple = "slash at"
|
||||
attack_sound = 'sound/weapons/circsawhit.ogg'
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/cat_butcher, /obj/item/circular_saw)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attack_verb_continuous = "staves"
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
speak_emote = list("chants")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
aggro_vision_range = 9
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
obj_damage = 30
|
||||
melee_damage_lower = 20
|
||||
melee_damage_upper = 25
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
faction = list("spiders")
|
||||
pass_flags = PASSTABLE
|
||||
move_to_delay = 6
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
dextrous = TRUE
|
||||
held_items = list(null, null)
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
|
||||
faction = list("jungle")
|
||||
robust_searching = TRUE
|
||||
stat_attack = HARD_CRIT
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
faction = list("hivebot")
|
||||
check_friendly_fire = 1
|
||||
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)
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM)
|
||||
minbodytemp = 0
|
||||
verb_say = "states"
|
||||
verb_ask = "queries"
|
||||
@@ -44,21 +43,19 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/Aggro()
|
||||
. = ..()
|
||||
a_intent_change(INTENT_HARM)
|
||||
set_combat_mode(TRUE)
|
||||
update_icons()
|
||||
if(prob(5))
|
||||
say(pick("INTRUDER DETECTED!", "CODE 7-34.", "101010!!"), forced = type)
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/LoseAggro()
|
||||
. = ..()
|
||||
a_intent_change(INTENT_HELP)
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/a_intent_change(input as text)
|
||||
. = ..()
|
||||
set_combat_mode(FALSE)
|
||||
update_icons()
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/update_icons()
|
||||
QDEL_NULL(alert_light)
|
||||
if(a_intent != INTENT_HELP)
|
||||
if(combat_mode)
|
||||
icon_state = "[initial(icon_state)]_attack"
|
||||
alert_light = mob_light(6, 0.4, COLOR_RED_LIGHT)
|
||||
else
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
mob_biotypes = NONE
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
attack_verb_continuous = "gores"
|
||||
attack_verb_simple = "gore"
|
||||
maxHealth = 100
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
response_harm_continuous = "strikes"
|
||||
response_harm_simple = "strike"
|
||||
status_flags = NONE
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
see_in_dark = 4
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Attack the weak point for massive damage."
|
||||
health = 1000
|
||||
maxHealth = 1000
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
sentience_type = SENTIENCE_BOSS
|
||||
environment_smash = ENVIRONMENT_SMASH_RWALLS
|
||||
mob_biotypes = MOB_ORGANIC|MOB_EPIC
|
||||
|
||||
@@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/xenobio/attack_hand(mob/living/carbon/human/M)
|
||||
. = ..()
|
||||
if(M.a_intent != "help")
|
||||
if(M.combat_mode)
|
||||
return
|
||||
toggle_open()
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
melee_damage_upper = 15
|
||||
attack_verb_continuous = "impales"
|
||||
attack_verb_simple = "impale"
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
speak_emote = list("telepathically cries")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
stat_attack = HARD_CRIT
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
attack_verb_continuous = "barrels into"
|
||||
attack_verb_simple = "barrel into"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = INTENT_HELP
|
||||
combat_mode = FALSE
|
||||
speak_emote = list("screeches")
|
||||
throw_message = "sinks in slowly, before being pushed out of "
|
||||
deathmessage = "stops moving as green liquid oozes from the carcass!"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
response_harm_simple = "squish"
|
||||
friendly_verb_continuous = "pinches"
|
||||
friendly_verb_simple = "pinch"
|
||||
a_intent = INTENT_HELP
|
||||
combat_mode = FALSE
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
stat_attack = HARD_CRIT
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
response_harm_continuous = "strikes"
|
||||
response_harm_simple = "strike"
|
||||
status_flags = 0
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
var/crusher_loot
|
||||
var/throw_message = "bounces off of"
|
||||
var/fromtendril = FALSE
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M)
|
||||
..()
|
||||
if(M.a_intent == INTENT_HARM)
|
||||
if(M.combat_mode)
|
||||
Bruise()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
attack_verb_continuous = "punches"
|
||||
attack_verb_simple = "punch"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
attack_verb_continuous = "slimes"
|
||||
attack_verb_simple = "slime"
|
||||
attack_sound = 'sound/effects/blobattack.ogg'
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
initial_language_holder = /datum/language_holder/slime
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
attack_verb_continuous = "punches"
|
||||
attack_verb_simple = "punch"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
a_intent = INTENT_HARM
|
||||
combat_mode = TRUE
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
speak_emote = list("yarrs")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user