[READY FOR MERGE] The Giant Combat Reworks - Part 1: Goodbye stuns, hello staminacrit (#5463)
* part 1 - resist out of resting, move and interact with the world while resting, and stamina regen nerf * makes beepsky check for stuns instead of knockdowns, adds message for getting up, makes gravity reduce standup time, and more * sprinting, staminacrit, balance changes, and more * adds stamina modifier to clickdelay, makes items deal stamina damage to the user when attacking, buffs resting stamina regen * combat mode, ability to toggle right-click context menu on/off, basic combat mode QOL, lays groundwork for 2-handing any item combat mode toggle sound is from Interbay. * commits dme changes * unarmed combat stamina, ability to right click in combat mode, balance changes * tosses in the HUD icons for later-ish * rolls back admin.txt * lotsa UI stuff * stamina checks, some balance stuff * adds support for best ui, adds right click to flush disposals, removes aggressive grab pinning in favor of neckgrab chokeholding * quick dogborg patch while i figure out what do do with them * oops - fixes prefbreaking for screenshake * trying to sprint from an elevated surface onto lower ground will now knock you down * right click to pull fire alarm, lets you bully people by pulling chairs out form under them, makes attacking objects cost stamina * makes accidents during slipping less likely to occur while combat mode is active, makes tripping off elevated surfaces cause accidents * makes pumping shotguns cost a tiiiny bit of stamina * makes eyestabbing and batoning cost stamina * makes failing stamina checks error out properly, adds stamina check to shotgun pumping * adds stamina check for chair pulling * readds aggressive grab pinning * fixes bug with being buckled preventing interaction * adds recoveringstam check to incapacitated * reduces stamina cost for attacking * oh this too * fixes bug where you can get stuck in recoveringstam if your stamina suddenly becomes 0 while you're in staminacrit * makes monkey transformation inherit staminaloss * adds the ability to wave or shake your fist at someone via right click * grammar and span closing * 99 annoying little bugs on the wall, 99 annoying little bugs. take one down, pass it around, 864 gamebreaking bugs on the wall * more distant right-click emotes. * buffs standing stamina regen a tiiiiiiny bit * adds aiming down sights for guns, makes firing guns cause trace amounts of staminaloss * crusher powercreep - gives crushers the ability to heal staminaloss * item throwing buff * adds 1:1 HUD layout * hopefully fixes issue with recoveringstamcrit not updating * giant hipfire nerf * halves the effect of staminaloss on movement speed * makes stamina recover faster in staminacrit, makes it easier to get disarmed out of combat mode * get_weight(), movedelay health_deficiency tweaking, combat and resting checks for item attacking * makes staminacrit automatically disable combat mode, it's now impossible to enter combat mode while in stamcrit * adds stamina buffer, halves the time needed to stand up after resting, increases stam penalty for firing weapons, and more * tweaks stamina buffer drain rate a little * makes buffered staminaloss redirect stamina to the actual stamloss proc when empty, makes stamina buffer stat() more precise * removes stamina modifier for clickdelays, makes stunbatons deal extra staminaloss * makes electrodes deal a lil extra staminaloss * drones cannot resist a rest, so now only carbons are forced to rest * restricts aiming down sights to carbon mobs, adds stamina display to stat() * makes gun accuracy and stamcosts more flexible, decreases base inaccuracy penalty, makes borgs immune to inaccuracy penalties * nerfs inaccuracy penalties just a lil more, fixes blooddrunk miner eye depleting all your stamina * getting used to tortoisegit * readds temp dogborg buff * stamina and stamina buffer HUD displays. Stamina sprite from hippiestation * makes afterattack call properly again * decreases stamina buffer regen time to 3 seconds * Yknow what? decreases it to 2 seconds. That's 3 entire attacks worth of waiting * makes stamina buffer influence movespeed a lil * nerfs compiling errors * tweaks the icons a little * adds autostanding, adds delimiters to attempts to stand * makes automatic standup attempts a little clearer * rest button now toggles intent to rest, fixes perma rest * oop - quick fixes * Makes crushers ignore recoil stamina on lavaland, makes burstfiring weapons deal less staminaloss * buffs highlander sword * makes stamina have less of an impact on the health display * fixes dogborgs shoving other borgs into infinite stuns * You can no longer shoot over tables or shoot through windows while resting. Also buffs turrets
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/proc/tg_ui_icon_to_cit_ui(ui_style)
|
||||
switch(ui_style)
|
||||
if('icons/mob/screen_plasmafire.dmi')
|
||||
return 'modular_citadel/icons/ui/screen_plasmafire.dmi'
|
||||
if('icons/mob/screen_slimecore.dmi')
|
||||
return 'modular_citadel/icons/ui/screen_slimecore.dmi'
|
||||
if('icons/mob/screen_operative.dmi')
|
||||
return 'modular_citadel/icons/ui/screen_operative.dmi'
|
||||
if('icons/mob/screen_clockwork.dmi')
|
||||
return 'modular_citadel/icons/ui/screen_clockwork.dmi'
|
||||
else
|
||||
return 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
@@ -0,0 +1,74 @@
|
||||
/mob/proc/RightClickOn(atom/A, params) //mostly a copy-paste from ClickOn()
|
||||
var/list/modifiers = params2list(params)
|
||||
if(incapacitated(ignore_restraints = 1))
|
||||
return
|
||||
|
||||
face_atom(A)
|
||||
|
||||
if(next_move > world.time) // in the year 2000...
|
||||
return
|
||||
|
||||
if(!modifiers["catcher"] && A.IsObscured())
|
||||
return
|
||||
|
||||
if(ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
return M.click_action(A,src,params)
|
||||
|
||||
if(restrained())
|
||||
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
|
||||
RestrainedClickOn(A)
|
||||
return
|
||||
|
||||
if(in_throw_mode)
|
||||
throw_item(A)//todo: make it plausible to lightly toss items via right-click
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
if(W == A)
|
||||
if(!W.rightclick_attack_self(src))
|
||||
W.attack_self(src)
|
||||
update_inv_hands()
|
||||
return
|
||||
|
||||
//These are always reachable.
|
||||
//User itself, current loc, and user inventory
|
||||
if(DirectAccess(A))
|
||||
if(W)
|
||||
W.rightclick_melee_attack_chain(src, A, params)
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
if(!AltUnarmedAttack(A))
|
||||
UnarmedAttack(A)
|
||||
return
|
||||
|
||||
//Can't reach anything else in lockers or other weirdness
|
||||
if(!loc.AllowClick())
|
||||
return
|
||||
|
||||
//Standard reach turf to turf or reaching inside storage
|
||||
if(CanReach(A,W))
|
||||
if(W)
|
||||
W.rightclick_melee_attack_chain(src, A, params)
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
if(!AltUnarmedAttack(A,1))
|
||||
UnarmedAttack(A,1)
|
||||
else
|
||||
if(W)
|
||||
if(!W.altafterattack(A, src, FALSE, params))
|
||||
W.afterattack(A, src, FALSE, params)
|
||||
else
|
||||
if(!AltRangedAttack(A,params))
|
||||
RangedAttack(A,params)
|
||||
|
||||
/mob/proc/AltUnarmedAttack(atom/A, proximity_flag)
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return FALSE
|
||||
|
||||
/mob/proc/AltRangedAttack(atom/A, params)
|
||||
return FALSE
|
||||
@@ -0,0 +1,49 @@
|
||||
/obj/screen/mov_intent
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
|
||||
/obj/screen/sprintbutton
|
||||
name = "toggle sprint"
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
icon_state = "act_sprint"
|
||||
layer = ABOVE_HUD_LAYER - 0.1
|
||||
|
||||
/obj/screen/sprintbutton/Click()
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.togglesprint()
|
||||
|
||||
/obj/screen/sprintbutton/proc/insert_witty_toggle_joke_here(mob/living/carbon/human/H)
|
||||
if(!H)
|
||||
return
|
||||
if(H.sprinting)
|
||||
icon_state = "act_sprint_on"
|
||||
else
|
||||
icon_state = "act_sprint"
|
||||
|
||||
/obj/screen/restbutton
|
||||
name = "rest"
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
icon_state = "rest"
|
||||
|
||||
/obj/screen/restbutton/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/theuser = usr
|
||||
theuser.lay_down()
|
||||
|
||||
/obj/screen/combattoggle
|
||||
name = "toggle combat mode"
|
||||
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
|
||||
icon_state = "combat_off"
|
||||
|
||||
/obj/screen/combattoggle/Click()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_combat_mode()
|
||||
|
||||
/obj/screen/combattoggle/proc/rebasetointerbay(mob/living/carbon/C)
|
||||
if(!C)
|
||||
return
|
||||
if(C.combatmode)
|
||||
icon_state = "combat"
|
||||
else
|
||||
icon_state = "combat_off"
|
||||
@@ -0,0 +1,73 @@
|
||||
/datum/hud/var/obj/screen/staminas/staminas
|
||||
/datum/hud/var/obj/screen/staminabuffer/staminabuffer
|
||||
|
||||
/obj/screen/staminas
|
||||
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
|
||||
name = "stamina"
|
||||
icon_state = "stamina0"
|
||||
screen_loc = ui_stamina
|
||||
mouse_opacity = 0
|
||||
|
||||
/mob/living/carbon/human/proc/staminahudamount()
|
||||
if(stat == DEAD || recoveringstam)
|
||||
return "staminacrit"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
if(1 to 2)
|
||||
return "staminacrit"
|
||||
if(5)
|
||||
return "stamina0"
|
||||
else
|
||||
switch(100 - staminaloss)
|
||||
if(100 to INFINITY)
|
||||
return "stamina0"
|
||||
if(80 to 100)
|
||||
return "stamina1"
|
||||
if(60 to 80)
|
||||
return "stamina2"
|
||||
if(40 to 60)
|
||||
return "stamina3"
|
||||
if(20 to 40)
|
||||
return "stamina4"
|
||||
if(0 to 20)
|
||||
return "stamina5"
|
||||
else
|
||||
return "stamina6"
|
||||
|
||||
//stam buffer
|
||||
/obj/screen/staminabuffer
|
||||
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
|
||||
name = "stamina buffer"
|
||||
icon_state = "stambuffer0"
|
||||
screen_loc = ui_stamina
|
||||
layer = ABOVE_HUD_LAYER + 0.1
|
||||
mouse_opacity = 0
|
||||
|
||||
/mob/living/carbon/human/proc/staminabufferhudamount()
|
||||
if(stat == DEAD || recoveringstam)
|
||||
return "stambuffer7"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
if(1 to 2)
|
||||
return "stambuffer7"
|
||||
if(5)
|
||||
return "stambuffer0"
|
||||
else
|
||||
var/percentmult = 100/stambuffer
|
||||
switch(stambuffer*percentmult - bufferedstam*percentmult)
|
||||
if(95 to INFINITY)
|
||||
return "stambuffer0"
|
||||
if(90 to 95)
|
||||
return "stambuffer1"
|
||||
if(80 to 90)
|
||||
return "stambuffer2"
|
||||
if(60 to 80)
|
||||
return "stambuffer3"
|
||||
if(40 to 60)
|
||||
return "stambuffer4"
|
||||
if(20 to 40)
|
||||
return "stambuffer5"
|
||||
if(5 to 20)
|
||||
return "stambuffer6"
|
||||
else
|
||||
return "stambuffer7"
|
||||
@@ -0,0 +1,25 @@
|
||||
/obj/item/proc/rightclick_melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!pre_altattackby(target, user, params)) //Hey, does this item have special behavior that should override all normal right-click functionality?
|
||||
if(!target.altattackby(src, user, params)) //Does the target do anything special when we right-click on it?
|
||||
melee_attack_chain(user, target, params) //Ugh. Lame! I'm filing a legal complaint about the discrimination against the right mouse button!
|
||||
else
|
||||
altafterattack(target, user, TRUE, params)
|
||||
return
|
||||
|
||||
/obj/item/proc/pre_altattackby(atom/A, mob/living/user, params)
|
||||
return FALSE //return something other than false if you wanna override attacking completely
|
||||
|
||||
/atom/proc/altattackby(obj/item/W, mob/user, params)
|
||||
return FALSE //return something other than false if you wanna add special right-click behavior to objects.
|
||||
|
||||
/obj/item/proc/rightclick_attack_self(mob/user)
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/altafterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/getweight()
|
||||
if(total_mass)
|
||||
return total_mass
|
||||
else
|
||||
return w_class*1.25
|
||||
@@ -0,0 +1,29 @@
|
||||
/mob/living/carbon/human/AltUnarmedAttack(atom/A, proximity)
|
||||
if(!has_active_hand())
|
||||
to_chat(src, "<span class='notice'>You look at the state of the universe and sigh.</span>") //lets face it, people rarely ever see this message in its intended condition.
|
||||
return TRUE
|
||||
|
||||
if(!A.alt_attack_hand(src))
|
||||
A.attack_hand(src)
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/AltRangedAttack(atom/A, params)
|
||||
if(!has_active_hand())
|
||||
to_chat(src, "<span class='notice'>You ponder your life choices and sigh.</span>")
|
||||
return TRUE
|
||||
|
||||
if(!incapacitated())
|
||||
switch(a_intent)
|
||||
if(INTENT_HELP)
|
||||
visible_message("<span class='notice'>[src] waves to [A].</span>", "<span class='notice'>You wave to [A].</span>")
|
||||
if(INTENT_DISARM)
|
||||
visible_message("<span class='notice'>[src] shoos away [A].</span>", "<span class='notice'>You shoo away [A].</span>")
|
||||
if(INTENT_GRAB)
|
||||
visible_message("<span class='notice'>[src] beckons [A] to come.</span>", "<span class='notice'>You beckon [A] to come.</span>") //This sounds lewder than it actually is. Fuck.
|
||||
if(INTENT_HARM)
|
||||
visible_message("<span class='notice'>[src] shakes [p_their()] fist at [A].</span>", "<span class='notice'>You shake your fist at [A].</span>")
|
||||
return TRUE
|
||||
|
||||
/atom/proc/alt_attack_hand(mob/user)
|
||||
return FALSE
|
||||
@@ -0,0 +1,13 @@
|
||||
/datum/status_effect/incapacitating/knockdown/on_creation(mob/living/new_owner, set_duration, updating_canmove)
|
||||
if(iscarbon(new_owner) && isnum(set_duration))
|
||||
new_owner.resting = TRUE
|
||||
new_owner.adjustStaminaLoss(set_duration*0.25)
|
||||
if(set_duration > 80)
|
||||
set_duration = set_duration*0.15
|
||||
. = ..()
|
||||
return
|
||||
else if(updating_canmove)
|
||||
new_owner.update_canmove()
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
@@ -0,0 +1,10 @@
|
||||
/obj/machinery/firealarm/alt_attack_hand(mob/user)
|
||||
if(is_interactable() && !user.stat)
|
||||
var/area/A = get_area(src)
|
||||
if(istype(A))
|
||||
if(A.fire)
|
||||
reset()
|
||||
else
|
||||
alarm()
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/item
|
||||
var/total_mass
|
||||
@@ -0,0 +1,21 @@
|
||||
/obj/structure/chair/alt_attack_hand(mob/living/user)
|
||||
if(Adjacent(user) && istype(user))
|
||||
if(!item_chair || !user.can_hold_items() || !has_buckled_mobs() || buckled_mobs.len > 1 || dir != user.dir || flags_1 & NODECONSTRUCT_1)
|
||||
return TRUE
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return TRUE
|
||||
if(user.staminaloss >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")
|
||||
return TRUE
|
||||
var/mob/living/poordude = buckled_mobs[1]
|
||||
if(!istype(poordude))
|
||||
return TRUE
|
||||
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
|
||||
var/C = new item_chair(loc)
|
||||
user.put_in_hands(C)
|
||||
poordude.Knockdown(20)//rip in peace
|
||||
user.adjustStaminaLoss(5)
|
||||
unbuckle_all_mobs(TRUE)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
@@ -12,3 +12,11 @@
|
||||
/client/proc/is_mentor() // admins are mentors too.
|
||||
if(mentor_datum || check_rights_for(src, R_ADMIN,0))
|
||||
return TRUE
|
||||
|
||||
/client/verb/togglerightclickstuff()
|
||||
set category = "OOC"
|
||||
set name = "Toggle Rightclick"
|
||||
set desc = "Did the context menu get stuck on or off? Press this button."
|
||||
|
||||
show_popup_menus = !show_popup_menus
|
||||
to_chat(src, "<span class='notice'>The right-click context menu is now [show_popup_menus ? "enabled" : "disabled"].</span>")
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/damagescreenshake = 2
|
||||
var/arousable = TRUE
|
||||
var/widescreenpref = TRUE
|
||||
var/autostand = TRUE
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/mob/living/carbon/key_down(_key, client/user)
|
||||
switch(_key)
|
||||
if("C")
|
||||
toggle_combat_mode()
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,13 @@
|
||||
/mob/living/carbon/human/key_down(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/key_up(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,17 @@
|
||||
/mob/living/carbon
|
||||
var/combatmode = FALSE //literally lifeweb
|
||||
|
||||
/mob/living/carbon/proc/toggle_combat_mode()
|
||||
if(recoveringstam)
|
||||
return TRUE
|
||||
combatmode = !combatmode
|
||||
if(combatmode)
|
||||
playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
|
||||
else
|
||||
playsound_local(src, 'modular_citadel/sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
|
||||
if(client)
|
||||
client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
|
||||
selector.rebasetointerbay(src)
|
||||
return TRUE
|
||||
@@ -0,0 +1,10 @@
|
||||
/mob/living/carbon/adjustStaminaLossBuffered(amount, updating_stamina = 1)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
var/directstamloss = (bufferedstam + amount) - stambuffer
|
||||
if(directstamloss > 0)
|
||||
adjustStaminaLoss(directstamloss)
|
||||
bufferedstam = CLAMP(bufferedstam + amount, 0, stambuffer)
|
||||
stambufferregentime = world.time + 2 SECONDS
|
||||
if(updating_stamina)
|
||||
update_health_hud()
|
||||
@@ -2,4 +2,13 @@
|
||||
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling))
|
||||
vore_attack(user, pulling)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/alt_attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!dna.species.alt_spec_attack_hand(H, src))
|
||||
dna.species.spec_attack_hand(H, src)
|
||||
return TRUE
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/mob/living/carbon/human
|
||||
var/sprinting = FALSE
|
||||
|
||||
/mob/living/carbon/human/Move(NewLoc, direct)
|
||||
var/oldpseudoheight = pseudo_z_axis
|
||||
. = ..()
|
||||
if(. && sprinting && !resting && m_intent == MOVE_INTENT_RUN)
|
||||
adjustStaminaLossBuffered(0.3)
|
||||
if((oldpseudoheight - pseudo_z_axis) >= 8)
|
||||
to_chat(src, "<span class='warning'>You trip off of the elevated surface!</span>")
|
||||
for(var/obj/item/I in held_items)
|
||||
accident(I)
|
||||
Knockdown(80)
|
||||
|
||||
/mob/living/carbon/human/movement_delay()
|
||||
. = 0
|
||||
if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting)
|
||||
. += 1
|
||||
. += ..()
|
||||
|
||||
/mob/living/carbon/human/proc/togglesprint() // If you call this proc outside of hotkeys or clicking the HUD button, I'll be disappointed in you.
|
||||
sprinting = !sprinting
|
||||
if(!resting && m_intent == MOVE_INTENT_RUN && canmove)
|
||||
if(sprinting)
|
||||
playsound_local(src, 'modular_citadel/sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
|
||||
else
|
||||
playsound_local(src, 'modular_citadel/sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
|
||||
selector.insert_witty_toggle_joke_here(src)
|
||||
return TRUE
|
||||
@@ -3,10 +3,19 @@
|
||||
if(stat != DEAD)
|
||||
handle_arousal()
|
||||
. = ..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
|
||||
if(ismob(loc))
|
||||
return ONE_ATMOSPHERE
|
||||
if(istype(loc, /obj/item/device/dogborg/sleeper))
|
||||
return ONE_ATMOSPHERE
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/update_health_hud(shown_health_amount)
|
||||
. = ..()
|
||||
if(!client || !hud_used)
|
||||
return
|
||||
if(hud_used.staminas)
|
||||
hud_used.staminas.icon_state = staminahudamount()
|
||||
if(hud_used.staminabuffer)
|
||||
hud_used.staminabuffer.icon_state = staminabufferhudamount()
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/datum/species/proc/alt_spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
if(!istype(M))
|
||||
return TRUE
|
||||
CHECK_DNA_AND_SPECIES(M)
|
||||
CHECK_DNA_AND_SPECIES(H)
|
||||
|
||||
if(!istype(M)) //sanity check for drones.
|
||||
return TRUE
|
||||
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))
|
||||
add_logs(M, H, "attempted to touch")
|
||||
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
|
||||
return TRUE
|
||||
switch(M.a_intent)
|
||||
if("disarm")
|
||||
altdisarm(M, H, attacker_style)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(user.staminaloss >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
|
||||
return FALSE
|
||||
else if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
|
||||
return 0
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return 1
|
||||
else
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
|
||||
user.adjustStaminaLossBuffered(4) //CITADEL CHANGE - makes disarmspam cause staminaloss
|
||||
|
||||
if(target.w_uniform)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
var/randomized_zone = ran_zone(user.zone_selected)
|
||||
target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
|
||||
var/randn = rand(1, 100)
|
||||
if(user.resting)
|
||||
randn += 20 //Makes it plausible, but unlikely, to push someone over while resting
|
||||
if(!user.combatmode)
|
||||
randn += 25 //Makes it impossible to push actually push someone outside of combat mode
|
||||
|
||||
if(randn <= 25)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>",
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(40, KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
add_logs(user, target, "disarmed", " pushing them to the ground")
|
||||
return
|
||||
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] attempted to push [target]!</span>", \
|
||||
"<span class='userdanger'>[user] attemped to push [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
@@ -0,0 +1,2 @@
|
||||
/mob/living/proc/adjustStaminaLossBuffered(amount, updating_stamina = TRUE, forced = FALSE)
|
||||
return
|
||||
@@ -0,0 +1,122 @@
|
||||
/mob/living
|
||||
var/recoveringstam = FALSE
|
||||
var/bufferedstam = 0
|
||||
var/stambuffer = 20
|
||||
var/stambufferregentime
|
||||
var/aimingdownsights = FALSE
|
||||
var/attemptingstandup = FALSE
|
||||
var/intentionalresting = FALSE
|
||||
|
||||
/mob/living/movement_delay(ignorewalk = 0)
|
||||
. = ..()
|
||||
if(resting)
|
||||
. += 6
|
||||
|
||||
/atom
|
||||
var/pseudo_z_axis
|
||||
|
||||
/atom/proc/get_fake_z()
|
||||
return pseudo_z_axis
|
||||
|
||||
/obj/structure/table
|
||||
pseudo_z_axis = 8
|
||||
|
||||
/turf/open/get_fake_z()
|
||||
var/objschecked
|
||||
for(var/obj/structure/structurestocheck in contents)
|
||||
objschecked++
|
||||
if(structurestocheck.pseudo_z_axis)
|
||||
return structurestocheck.pseudo_z_axis
|
||||
if(objschecked >= 25)
|
||||
break
|
||||
return pseudo_z_axis
|
||||
|
||||
/mob/living/Move(atom/newloc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(makesfootstepsounds)
|
||||
CitFootstep(newloc)
|
||||
pseudo_z_axis = newloc.get_fake_z()
|
||||
pixel_z = pseudo_z_axis
|
||||
if(aimingdownsights)
|
||||
aimingdownsights = FALSE
|
||||
to_chat(src, "<span class='notice'>You are no longer aiming down your weapon's sights.</span>")
|
||||
|
||||
/mob/living/proc/lay_down()
|
||||
set name = "Rest"
|
||||
set category = "IC"
|
||||
|
||||
if(client && client.prefs && client.prefs.autostand)
|
||||
intentionalresting = !intentionalresting
|
||||
to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
|
||||
if(intentionalresting && !resting)
|
||||
resting = TRUE
|
||||
update_canmove()
|
||||
else
|
||||
resist_a_rest()
|
||||
else
|
||||
if(!resting)
|
||||
resting = TRUE
|
||||
to_chat(src, "<span class='notice'>You are now laying down.</span>")
|
||||
update_canmove()
|
||||
else
|
||||
resist_a_rest()
|
||||
|
||||
/mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks.
|
||||
if(!resting || stat || attemptingstandup)
|
||||
return FALSE
|
||||
if(ignoretimer)
|
||||
resting = FALSE
|
||||
update_canmove()
|
||||
return TRUE
|
||||
else
|
||||
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
|
||||
if(staminaloss >= STAMINA_SOFTCRIT)
|
||||
to_chat(src, "<span class='warning'>You're too exhausted to get up!")
|
||||
return FALSE
|
||||
attemptingstandup = TRUE
|
||||
var/health_deficiency = max((maxHealth - (health - staminaloss))*0.5, 0)
|
||||
if(!has_gravity())
|
||||
health_deficiency = health_deficiency*0.2
|
||||
totaldelay += health_deficiency
|
||||
var/standupwarning = "[src] and everyone around them should probably yell at the dev team"
|
||||
switch(health_deficiency)
|
||||
if(-INFINITY to 10)
|
||||
standupwarning = "[src] stands right up!"
|
||||
if(10 to 35)
|
||||
standupwarning = "[src] tries to stand up."
|
||||
if(35 to 60)
|
||||
standupwarning = "[src] slowly pushes [p_them()]self upright."
|
||||
if(60 to 80)
|
||||
standupwarning = "[src] weakly attempts to stand up."
|
||||
if(80 to INFINITY)
|
||||
standupwarning = "[src] struggles to stand up."
|
||||
var/usernotice = automatic ? "<span class='notice'>You are now getting up. (Auto)</span>" : "<span class='notice'>You are now getting up.</span>"
|
||||
visible_message("<span class='notice'>[standupwarning]</span>", usernotice, vision_distance = 5)
|
||||
if(do_after(src, totaldelay, target = src))
|
||||
resting = FALSE
|
||||
attemptingstandup = FALSE
|
||||
update_canmove()
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='notice'>[src] falls right back down.</span>", "<span class='notice'>You fall right back down.</span>")
|
||||
attemptingstandup = FALSE
|
||||
if(has_gravity())
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/update_stamina()
|
||||
var/total_health = (min(health*2,100) - staminaloss)
|
||||
if(staminaloss)
|
||||
if(!recoveringstam && total_health <= STAMINA_CRIT_TRADITIONAL && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
resting = TRUE
|
||||
if(combatmode)
|
||||
toggle_combat_mode()
|
||||
recoveringstam = TRUE
|
||||
update_canmove()
|
||||
if(recoveringstam && total_health >= STAMINA_SOFTCRIT_TRADITIONAL)
|
||||
to_chat(src, "<span class='notice'>You don't feel nearly as exhausted anymore.</span>")
|
||||
recoveringstam = FALSE
|
||||
update_canmove()
|
||||
update_health_hud()
|
||||
@@ -379,7 +379,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
|
||||
blocked = 1
|
||||
if(!blocked)
|
||||
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
|
||||
L.Knockdown(45)
|
||||
L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice.
|
||||
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1)
|
||||
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
|
||||
step_towards(src,L)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/mob/proc/use_that_empty_hand() //currently unused proc so i can implement 2-handing any item a lot easier in the future.
|
||||
return
|
||||
@@ -0,0 +1,36 @@
|
||||
/obj/item/gun/pre_altattackby(atom/A, mob/living/user, params)
|
||||
altafterattack(A, user, TRUE, params)
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters)
|
||||
if(istype(user))
|
||||
if(!user.aimingdownsights)
|
||||
user.visible_message("<span class='warning'>[user] brings [src]'s sights up to [user.p_their()] eyes, aiming directly at [target].</span>", "<span class='warning'>You bring [src]'s sights up to your eyes, aiming directly at [target].</span>")
|
||||
user.adjustStaminaLossBuffered(1)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] lowers [src].</span>", "<span class='notice'>You lower [src].</span>")
|
||||
user.aimingdownsights = !user.aimingdownsights
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/dropped(mob/living/user)
|
||||
. = ..()
|
||||
if(istype(user))
|
||||
user.aimingdownsights = FALSE
|
||||
|
||||
/obj/item/gun/proc/getstamcost(mob/living/carbon/user)
|
||||
if(user && user.has_gravity())
|
||||
return recoil
|
||||
else
|
||||
return recoil*5
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/getstamcost(mob/living/carbon/user)
|
||||
if(user && !lavaland_equipment_pressure_check(get_turf(user)))
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/proc/getinaccuracy(mob/living/user)
|
||||
if(!iscarbon(user) || user.aimingdownsights)
|
||||
return 0
|
||||
else
|
||||
return weapon_weight * 25
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/item/projectile/energy/electrode
|
||||
stamina = 30
|
||||
@@ -0,0 +1,6 @@
|
||||
/obj/machinery/disposal/bin/alt_attack_hand(mob/user)
|
||||
if(is_interactable() && !user.stat)
|
||||
flush = !flush
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
Reference in New Issue
Block a user