relatively small 71 file 700 lines changed refactor/rework to combat mode/sprint and some miscellaneous things that totally aren't important (#11376)

* combat refactoring

* i hate this

* mobility flags part 2 time xd

* whew

* stuff

* a

* ok

* changes

* Wew

* k

* add flags

* FUCKYOUVORE

* fixes

* typo

* no using this in hard stamcrit

* update icon

* woopsy

* . = ..()

* sigh

* Update living_combat.dm

* wew

* wups

* fix

* i hate you

* wrong button

* k

* ok

* bet

* k

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* early returns

* skreee

* agony

* k

* k

* k

* k

* wack

* compile

* wack

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
kevinz000
2020-03-21 16:04:26 +01:00
committed by GitHub
co-authored by Ghom
parent 84a44e226c
commit 0e3193e929
79 changed files with 788 additions and 486 deletions
+25 -16
View File
@@ -17,6 +17,7 @@
owner.update_stat()
/datum/status_effect/incapacitating/on_remove()
. = ..()
owner.update_mobility()
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
owner.update_stat()
@@ -86,6 +87,15 @@
if(prob(10) && owner.health > owner.crit_threshold)
owner.emote("snore")
/datum/status_effect/staggered
id = "staggered"
blocks_sprint = TRUE
/datum/status_effect/staggered/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
return ..()
/obj/screen/alert/status_effect/asleep
name = "Asleep"
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
@@ -101,10 +111,6 @@
if(isnum(set_duration))
duration = set_duration
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(C.combatmode)
C.toggle_combat_mode(TRUE)
/datum/status_effect/no_combat_mode/mesmerize
id = "Mesmerize"
@@ -143,8 +149,6 @@
last_tick = world.time
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(C.combatmode)
C.toggle_combat_mode(TRUE)
C.add_movespeed_modifier("[MOVESPEED_ID_TASED_STATUS]_[id]", TRUE, priority = slowdown_priority, override = TRUE, multiplicative_slowdown = slowdown, blacklisted_movetypes = affect_crawl? NONE : CRAWLING)
/datum/status_effect/electrode/on_remove()
@@ -174,15 +178,6 @@
blocks_combatmode = TRUE
stamdmg_per_ds = 1
/datum/status_effect/electrode/no_combat_mode/on_creation(mob/living/new_owner, set_duration)
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE))
return
if(C.combatmode)
C.toggle_combat_mode(TRUE)
//OTHER DEBUFFS
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
id = "his_wrath"
@@ -220,6 +215,7 @@
alerttooltipstyle = "clockcult"
/datum/status_effect/belligerent/on_apply()
. = ..()
return do_movement_toggle(TRUE)
/datum/status_effect/belligerent/tick()
@@ -250,6 +246,7 @@
/datum/status_effect/belligerent/on_remove()
if(owner.m_intent == MOVE_INTENT_WALK)
owner.toggle_move_intent()
return ..()
/datum/status_effect/maniamotor
id = "maniamotor"
@@ -349,6 +346,7 @@
alert_type = null
/datum/status_effect/cultghost/on_apply()
. = ..()
owner.see_invisible = SEE_INVISIBLE_OBSERVER
owner.see_in_dark = 2
@@ -370,6 +368,7 @@
hammer_synced = new_hammer_synced
/datum/status_effect/crusher_mark/on_apply()
. = ..()
if(owner.mob_size >= MOB_SIZE_LARGE)
marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
marked_underlay.pixel_x = -owner.pixel_x
@@ -451,6 +450,7 @@
qdel(src)
/datum/status_effect/saw_bleed/on_remove()
. = ..()
if(needs_to_bleed)
var/turf/T = get_turf(owner)
new /obj/effect/temp_visual/bleed/explode(T)
@@ -509,6 +509,7 @@
return ..()
/datum/status_effect/necropolis_curse/on_remove()
. = ..()
remove_curse(curse_flags)
/datum/status_effect/necropolis_curse/proc/apply_curse(set_curse)
@@ -598,6 +599,7 @@
old_oxyloss = owner.getOxyLoss()
/datum/status_effect/kindle/on_remove()
. = ..()
owner.visible_message("<span class='warning'>The light in [owner]'s eyes fades!</span>", \
"<span class='boldannounce'>You snap out of your daze!</span>")
@@ -617,11 +619,13 @@
alert_type = /obj/screen/alert/status_effect/ichorial_stain
/datum/status_effect/ichorial_stain/on_apply()
. = ..()
owner.visible_message("<span class='danger'>[owner] gets back up, [owner.p_their()] body dripping blue ichor!</span>", \
"<span class='userdanger'>Thick blue ichor covers your body; you can't be revived like this again until it dries!</span>")
return TRUE
/datum/status_effect/ichorial_stain/on_remove()
. = ..()
owner.visible_message("<span class='danger'>The blue ichor on [owner]'s body dries out!</span>", \
"<span class='boldnotice'>The ichor on your body is dry - you can now be revived by vitality matrices again!</span>")
@@ -643,6 +647,7 @@
owner.add_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF, multiplicative_slowdown = 1, movetypes = GROUND)
/datum/status_effect/electrostaff/on_remove()
. = ..()
owner.remove_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF)
//GOLEM GANG
@@ -694,6 +699,7 @@ datum/status_effect/pacify
/datum/status_effect/pacify/on_remove()
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "status_effect")
return ..()
/datum/status_effect/trance
id = "trance"
@@ -715,6 +721,7 @@ datum/status_effect/pacify
owner.dizziness = 20
/datum/status_effect/trance/on_apply()
. = ..()
if(!iscarbon(owner))
return FALSE
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
@@ -735,6 +742,7 @@ datum/status_effect/pacify
owner.dizziness = 0
owner.remove_client_colour(/datum/client_colour/monochrome/trance)
to_chat(owner, "<span class='warning'>You snap out of your trance!</span>")
return ..()
/datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args)
if(!owner.can_hear())
@@ -820,8 +828,9 @@ datum/status_effect/pacify
return
var/mob/living/carbon/human/H = owner
H.something_horrible(kill_either_way)
return ..()
/obj/screen/alert/status_effect/dna_melt
name = "Genetic Breakdown"
desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate."
icon_state = "dna_melt"
icon_state = "dna_melt"