From 692656b02d6136310f39452ba2462fa9e8128831 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:53:33 -0700 Subject: [PATCH] Whew --- code/_onclick/item_attack.dm | 7 +------ code/game/atoms.dm | 2 +- code/game/machinery/camera/camera.dm | 2 +- code/game/machinery/doors/firedoor.dm | 4 ++-- code/game/mecha/mecha_defense.dm | 2 +- code/game/objects/structures/grille.dm | 4 ++-- code/modules/antagonists/cult/cult_items.dm | 2 +- code/modules/antagonists/cult/cult_structures.dm | 2 +- code/modules/mining/aux_base.dm | 1 - code/modules/mining/lavaland/necropolis_chests.dm | 7 ++++--- code/modules/mob/living/carbon/carbon.dm | 4 ++-- code/modules/vore/eating/living.dm | 4 ++-- 12 files changed, 18 insertions(+), 23 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 24831877d4..e595a744ad 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -153,8 +153,7 @@ /mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) if(I.force < force_threshold || I.damtype == STAMINA) - playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1) - user.changeNext_move(I.click_delay) //pre_attacked_by not called + playsound(src, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1) else return ..() @@ -165,16 +164,12 @@ var/stamloss = user.getStaminaLoss() var/stam_mobility_mult = 1 - var/next_move_mult = 1 if(stamloss > STAMINA_NEAR_SOFTCRIT) //The more tired you are, the less damage you do. var/penalty = (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*STAM_CRIT_ITEM_ATTACK_PENALTY stam_mobility_mult -= penalty - next_move_mult += penalty*STAM_CRIT_ITEM_ATTACK_DELAY if(stam_mobility_mult > LYING_DAMAGE_PENALTY && !CHECK_MOBILITY(user, MOBILITY_STAND)) //damage penalty for fighting prone, doesn't stack with the above. stam_mobility_mult = LYING_DAMAGE_PENALTY . *= stam_mobility_mult - user.changeNext_move(I.click_delay*next_move_mult) - I.attack_delay_done = TRUE var/bad_trait if(!(I.item_flags & NO_COMBAT_MODE_FORCE_MODIFIER)) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e24da67611..da23910a0c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -219,7 +219,7 @@ /atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) SEND_SIGNAL(src, COMSIG_ATOM_HULK_ATTACK, user) if(does_attack_animation) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) log_combat(user, src, "punched", "hulk powers") user.do_attack_animation(src, ATTACK_EFFECT_SMASH) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 5a1547aae0..2795ba45a9 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -235,7 +235,7 @@ itemname = P.name info = P.notehtml to_chat(U, "You hold \the [itemname] up to the camera...") - U.changeNext_move(CLICK_CD_MELEE) + U.DelayNextAction(CLICK_CD_MELEE) for(var/mob/O in GLOB.player_list) if(isAI(O)) var/mob/living/silicon/ai/AI = O diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 0d1a25b6be..015bb0126a 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -24,6 +24,8 @@ armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 70) interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN air_tight = TRUE + attack_hand_is_action = TRUE + attack_hand_speed = CLICK_CD_MELEE var/emergency_close_timer = 0 var/nextstate = null var/boltslocked = TRUE @@ -89,7 +91,6 @@ stat |= NOPOWER /obj/machinery/door/firedoor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - if(!welded && !operating && !(stat & NOPOWER) && (!density || allow_hand_open(user))) add_fingerprint(user) if(density) @@ -100,7 +101,6 @@ return TRUE if(operating || !density) return - user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] bangs on \the [src].", "You bang on \the [src].") diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index f519814583..40336fb01e 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -251,7 +251,7 @@ return else if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) if(obj_integrity < max_integrity) if(W.use_tool(src, user, 0, volume=50, amount=1)) if (internal_damage & MECHA_INT_TANK_BREACH) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 8186deb062..1d3450097c 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -103,7 +103,7 @@ . = ..() if(.) return - if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) return user.do_attack_animation(src, ATTACK_EFFECT_KICK) user.visible_message("[user] hits [src].", null, null, COMBAT_MESSAGE_RANGE) @@ -112,7 +112,7 @@ take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_alien(mob/living/user) - if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) return user.do_attack_animation(src) user.visible_message("[user] mangles [src].", null, null, COMBAT_MESSAGE_RANGE) diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index 5b2dd7d007..733e8abf55 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -254,7 +254,7 @@ /datum/action/innate/cult/spin2win/Activate() cooldown = world.time + sword.spin_cooldown - holder.changeNext_move(50) + holder.DelayNextAction(50) holder.apply_status_effect(/datum/status_effect/sword_spin) sword.spinning = TRUE sword.block_chance = 100 diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 6f340b9271..5c6a0b3416 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -44,7 +44,7 @@ /obj/structure/destructible/cult/attack_animal(mob/living/simple_animal/M) if(istype(M, /mob/living/simple_animal/hostile/construct/builder)) if(obj_integrity < max_integrity) - M.changeNext_move(CLICK_CD_MELEE) + M.DelayNextAction(CLICK_CD_MELEE) obj_integrity = min(max_integrity, obj_integrity + 5) Beam(M, icon_state="sendbeam", time=4) M.visible_message("[M] repairs \the [src].", \ diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index 3ee284588d..006065d048 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -99,7 +99,6 @@ interface with the mining shuttle at the landing site if a mobile beacon is also say("Shuttle interface failed.") if(href_list["random"] && !possible_destinations) - usr.changeNext_move(CLICK_CD_RAPID) //Anti-spam var/list/all_mining_turfs = list() for (var/z_level in SSmapping.levels_by_trait(ZTRAIT_MINING)) all_mining_turfs += Z_TURFS(z_level) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 3b5ff71705..90e8b1d3ca 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -686,7 +686,7 @@ . = ..() if(.) transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5) - user.changeNext_move(CLICK_CD_MELEE * 0.25) + user.SetNextAction(CLICK_CD_MELEE * 0.25) /obj/item/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text) if(!supress_message_text) @@ -702,9 +702,10 @@ user.take_bodypart_damage(10) /obj/item/melee/transforming/cleaving_saw/melee_attack_chain(mob/user, atom/target, params) - ..() + . = ..() if(!active) - user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly + user.SetNextAction(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly + . |= MANUALLY_HANDLE_LAST_ACTION /obj/item/melee/transforming/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target) var/datum/status_effect/stacking/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index eed93ec78b..1d6ba1aec3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -377,7 +377,7 @@ if (W) W.layer = initial(W.layer) W.plane = initial(W.plane) - changeNext_move(0) + SetNextAction(0) if (legcuffed) var/obj/item/W = legcuffed legcuffed = null @@ -390,7 +390,7 @@ if (W) W.layer = initial(W.layer) W.plane = initial(W.plane) - changeNext_move(0) + SetNextAction(0) update_equipment_speed_mods() // In case cuffs ever change speed /mob/living/carbon/proc/clear_cuffs(obj/item/I, cuff_break) diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm index 1c9bf029ea..4df008f2c5 100644 --- a/code/modules/vore/eating/living.dm +++ b/code/modules/vore/eating/living.dm @@ -349,7 +349,7 @@ if(incapacitated(ignore_restraints = TRUE)) to_chat(src, "You can't do that while incapacitated.") return - if(next_move > world.time) + if(!CheckActionCooldown()) to_chat(src, "You can't do that so fast, slow down.") return @@ -366,7 +366,7 @@ if(QDELETED(tasted) || (tasted.ckey && !(tasted.client?.prefs.vore_flags & LICKABLE)) || !Adjacent(tasted) || incapacitated(ignore_restraints = TRUE)) return - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) visible_message("[src] licks [tasted]!","You lick [tasted]. They taste rather like [tasted.get_taste_message()].","Slurp!")