diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index b66118d3a8..24831877d4 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -80,7 +80,7 @@ user.do_attack_animation(M) M.attacked_by(src, user, attackchain_flags, damage_multiplier) - SetAttackCooldown(user, M) + ApplyAttackCooldown(user, M) log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") add_fingerprint(user) @@ -97,7 +97,7 @@ return user.do_attack_animation(O) O.attacked_by(src, user) - SetAttackCooldown(user, O) + ApplyAttackCooldown(user, O) var/weight = getweight(user, STAM_COST_ATTACK_OBJ_MULT) if(weight) user.adjustStaminaLossBuffered(weight)//CIT CHANGE - makes attacking things cause stamina loss diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index f0c6064bf8..640675bea5 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -268,6 +268,8 @@ gender = PLURAL max_integrity = 20 CanAtmosPass = ATMOS_PASS_DENSITY + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /obj/structure/foamedmetal/Initialize() . = ..() @@ -285,7 +287,6 @@ playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) /obj/structure/foamedmetal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) to_chat(user, "You hit [src] but bounce off it!") playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index ed2eb70cf6..9665768188 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -119,6 +119,8 @@ var/poison_type = "toxin" var/poison_per_bite = 5 var/list/faction = list("spiders") + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /obj/structure/spider/spiderling/Destroy() new/obj/item/reagent_containers/food/snacks/spiderling(get_turf(src)) @@ -155,7 +157,6 @@ /obj/structure/spider/spiderling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(user.a_intent != INTENT_HELP) - user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) user.visible_message("[user] splats [src].", "You splat [src].", "You hear a splat...") playsound(loc, 'sound/effects/snap.ogg', 25) diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 693df4bda0..a8ff7b9004 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -6,6 +6,8 @@ icon_state = "cutout_basic" w_class = WEIGHT_CLASS_BULKY resistance_flags = FLAMMABLE + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /// Possible restyles for the cutout, add an entry in change_appearance() if you add to here var/static/list/possible_appearances /// If the cutout is pushed over and has to be righted @@ -80,7 +82,6 @@ else if(I.hitsound) playsound(loc, I.hitsound, get_clamped_volume(), 1, -1) - user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) if(I.force) diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 4dcaed2cf7..592f238cec 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -188,4 +188,4 @@ else ..() else - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/grenades/flashbang.dm b/code/game/objects/items/grenades/flashbang.dm index f51db9fa4c..65dc3f41c0 100644 --- a/code/game/objects/items/grenades/flashbang.dm +++ b/code/game/objects/items/grenades/flashbang.dm @@ -116,9 +116,11 @@ /obj/item/grenade/primer/attack_self(mob/user) . = ..() if(active) + if(!user.CheckActionCooldown()) + return user.playsound_local(user, 'sound/misc/box_deploy.ogg', 50, TRUE) rots++ - user.changeNext_move(CLICK_CD_RAPID) + user.DelayNextAction(CLICK_CD_RAPID) /obj/item/grenade/primer/prime(mob/living/lanced_by) shrapnel_radius = round(rots / rots_per_mag) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 0d23b87681..0057bebf99 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -30,7 +30,7 @@ /obj/structure/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(structureclimber && structureclimber != user) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.do_attack_animation(src) structureclimber.DefaultCombatKnockdown(40) structureclimber.visible_message("[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].") diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 903a317c6c..ce11daec54 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -269,8 +269,7 @@ return else to_chat(user, "It feels slimy.") - user.changeNext_move(CLICK_CD_MELEE) - + user.DelayNextAction(CLICK_CD_MELEE) /obj/structure/alien/egg/proc/Grow() status = GROWN diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 20d3561f14..f545b183bf 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -635,8 +635,8 @@ anchored = TRUE pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density. max_integrity = 20 - clickdelay_attack_hand_is_action = TRUE - clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /obj/structure/rack/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 8303e29174..00cf65e7b1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -13,8 +13,8 @@ var/mob/living/swirlie = null //the mob being given a swirlie var/buildstacktype = /obj/item/stack/sheet/metal //they're metal now, shut up var/buildstackamount = 1 - clickdelay_attack_hand_is_action = TRUE - clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /obj/structure/toilet/Initialize() . = ..() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d4f16df756..88e7cab798 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -40,8 +40,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) rad_flags = RAD_PROTECT_CONTENTS flags_ricochet = RICOCHET_HARD ricochet_chance_mod = 0.4 - clickdelay_attack_hand_is_action = TRUE - clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE /// Electrochromatic status var/electrochromatic_status = NOT_ELECTROCHROMATIC diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index b3bea2201c..6f8e9e703f 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -22,37 +22,6 @@ show_air_status_to(target, usr) SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Air Status") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/fix_next_move() - set category = "Debug" - set name = "Unfreeze Everyone" - var/largest_move_time = 0 - var/largest_click_time = 0 - var/mob/largest_move_mob = null - var/mob/largest_click_mob = null - for(var/mob/M in world) - if(!M.client) - continue - if(M.next_move >= largest_move_time) - largest_move_mob = M - if(M.next_move > world.time) - largest_move_time = M.next_move - world.time - else - largest_move_time = 1 - if(M.next_click >= largest_click_time) - largest_click_mob = M - if(M.next_click > world.time) - largest_click_time = M.next_click - world.time - else - largest_click_time = 0 - log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.next_click] world.time = [world.time]") - M.next_move = 1 - M.next_click = 0 - message_admins("[ADMIN_LOOKUPFLW(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [DisplayTimeText(largest_move_time)]!") - message_admins("[ADMIN_LOOKUPFLW(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [DisplayTimeText(largest_click_time)]!") - message_admins("world.time = [world.time]") - SSblackbox.record_feedback("tally", "admin_verb", 1, "Unfreeze Everyone") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - /client/proc/radio_report() set category = "Debug" set name = "Radio report" diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index 2764005c14..edc1abbf5a 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -521,7 +521,6 @@ changeNext_move(CLICK_CD_MELEE) target.ex_act(EXPLODE_LIGHT) - /mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(mob/living/target) if(target == src) return diff --git a/code/modules/cargo/coupon.dm b/code/modules/cargo/coupon.dm index c8d4b8618e..1c1f2a36e1 100644 --- a/code/modules/cargo/coupon.dm +++ b/code/modules/cargo/coupon.dm @@ -8,7 +8,7 @@ icon = 'icons/obj/card.dmi' item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_TINY - attack_cooldown = CLICK_CD_MELEE + attack_speed = CLICK_CD_RAPID var/datum/supply_pack/discounted_pack var/discount_pct_off = 0.05 var/obj/machinery/computer/cargo/inserted_console @@ -35,6 +35,7 @@ if(discount_pct_off == COUPON_OMEN) to_chat(user, "\The [O] validates the coupon as authentic, but refuses to accept it...") O.say("Coupon fulfillment already in progress...") + user.DelayNextAction() return inserted_console = O diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 695d25dbf4..9e8e8946f2 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -107,11 +107,7 @@ /obj/item/clothing/suit/space/hardsuit/Initialize() if(jetpack && ispath(jetpack)) jetpack = new jetpack(src) - . = ..() - -/obj/item/clothing/suit/space/hardsuit/attack_self(mob/user) - user.changeNext_move(CLICK_CD_MELEE) - ..() + return ..() /obj/item/clothing/suit/space/hardsuit/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/tank/jetpack/suit)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 971e1ed7d0..e7e01b438d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -273,7 +273,7 @@ return stop_pulling() - changeNext_move(CLICK_CD_GRABBING) + DelayNextAction(CLICK_CD_GRABBING) if(AM.pulledby) if(!supress_message) @@ -688,7 +688,7 @@ if(do_resist()) MarkResistTime() - changeNext_move(CLICK_CD_RESIST) + DelayNextAction(CLICK_CD_RESIST) /// The actual proc for resisting. Return TRUE to give CLICK_CD_RESIST clickdelay. /mob/living/proc/do_resist() @@ -732,7 +732,7 @@ if(CHECK_MOBILITY(src, MOBILITY_USE) && resist_embedded()) //Citadel Change for embedded removal memes - requires being able to use items. // DO NOT GIVE DEFAULT CLICKDELAY - This is a combat action. - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) return FALSE resist_restraints() //trying to remove cuffs. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 51cff93ceb..a265771024 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -289,7 +289,6 @@ /mob/living/silicon/robot/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weldingtool) && (user.a_intent != INTENT_HARM || user == src)) - user.changeNext_move(CLICK_CD_MELEE) if (!getBruteLoss()) to_chat(user, "[src] is already in good condition!") return diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index a596200d6e..1e50aaeef1 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -331,7 +331,6 @@ user.visible_message("[user] uses [W] to pull [paicard] out of [bot_name]!","You pull [paicard] out of [bot_name] with [W].") ejectpai(user) else - user.changeNext_move(CLICK_CD_MELEE) if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM) if(health >= maxHealth) to_chat(user, "[src] does not need a repair!") diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index f1e45d0717..96f2c04598 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -467,7 +467,7 @@ /datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L) . = ..() L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/skooma) - L.next_move_modifier *= 2 + L.action_cooldown_mod *= 2 if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.physiology) @@ -480,7 +480,7 @@ /datum/reagent/drug/skooma/on_mob_end_metabolize(mob/living/L) . = ..() L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/skooma) - L.next_move_modifier *= 0.5 + L.action_cooldown_mod *= 0.5 if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.physiology) @@ -542,13 +542,13 @@ /datum/reagent/syndicateadrenals/on_mob_metabolize(mob/living/M) . = ..() if(istype(M)) - M.next_move_modifier *= 0.5 + M.action_cooldown_mod *= 0.5 to_chat(M, "You feel an intense surge of energy rushing through your veins.") /datum/reagent/syndicateadrenals/on_mob_end_metabolize(mob/living/M) . = ..() if(istype(M)) - M.next_move_modifier *= 2 + M.action_cooldown_mod *= 2 to_chat(M, "You feel as though the world around you is going faster.") /datum/reagent/syndicateadrenals/overdose_start(mob/living/M) diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index 2465b63800..f0f98a5fa5 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -73,8 +73,8 @@ /obj/item/organ/liver/proc/sizeMoveMod(value, mob/living/carbon/C) if(cachedmoveCalc == value) return - C.next_move_modifier /= cachedmoveCalc - C.next_move_modifier *= value + C.action_cooldown_mod /= cachedmoveCalc + C.action_cooldown_mod *= value cachedmoveCalc = value /obj/item/organ/liver/fly diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index df178b53a0..8f9d553ec7 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -63,7 +63,7 @@ . += "cart_buffer" /obj/vehicle/ridden/janicart/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - else if(mybag) + if(mybag) mybag.forceMove(get_turf(user)) user.put_in_hands(mybag) mybag = null diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm index 8ef302e904..a16cefb8f8 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm @@ -195,14 +195,14 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING if (playerClone == TRUE)//If the player made a clone with it, then thats all they get. playerClone = FALSE return - if (M.next_move_modifier == 4 && !M.has_status_effect(/datum/status_effect/chem/SGDF))//checks if they're ingested over 20u of the stuff, but fell short of the required 30u to make a clone. + if (M.action_cooldown_mod == 4 && !M.has_status_effect(/datum/status_effect/chem/SGDF))//checks if they're ingested over 20u of the stuff, but fell short of the required 30u to make a clone. to_chat(M, "You feel the cells begin to merge with your body, unable to reach nucleation, they instead merge with your body, healing any wounds.") M.adjustCloneLoss(-10, 0) //I don't want to make Rezadone obsolete. M.adjustBruteLoss(-25, 0)// Note that this takes a long time to apply and makes you fat and useless when it's in you, I don't think this small burst of healing will be useful considering how long it takes to get there. M.adjustFireLoss(-25, 0) M.blood_volume += 250 M.heal_bodypart_damage(1,1) - M.next_move_modifier = 1 + M.action_cooldown_mod = 1 if (M.nutrition < 1500) M.adjust_nutrition(250) else if (unitCheck == TRUE && !M.has_status_effect(/datum/status_effect/chem/SGDF))// If they're ingested a little bit (10u minimum), then give them a little healing. @@ -211,7 +211,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING M.adjustBruteLoss(-10, 0) M.adjustFireLoss(-10, 0) M.blood_volume += 100 - M.next_move_modifier = 1 + M.action_cooldown_mod = 1 if (M.nutrition < 1500) M.adjust_nutrition(500) @@ -325,7 +325,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING M.adjust_nutrition(M.nutrition/5) if(50) to_chat(M, "The synethic cells begin to merge with your body, it feels like your body is made of a viscous water, making your movements difficult.") - M.next_move_modifier = 4//If this makes you fast then please fix it, it should make you slow!! + M.action_cooldown_mod = 4//If this makes you fast then please fix it, it should make you slow!! if(51 to 73) M.adjust_nutrition(M.nutrition/2) if(74) @@ -339,7 +339,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING if (!M.reagents.has_reagent(/datum/reagent/medicine/pen_acid))//Counterplay is pent.) message_admins("(non-infectious) SDZF: Zombie spawned at [M] [COORD(M)]!") M.set_nutrition(startHunger - 500) //YOU BEST BE RUNNING AWAY AFTER THIS YOU BADDIE - M.next_move_modifier = 1 + M.action_cooldown_mod = 1 to_chat(M, "Your body splits away from the cell clone of yourself, your attempted clone birthing itself violently from you as it begins to shamble around, a terrifying abomination of science.") M.visible_message("[M] suddenly shudders, and splits into a funky smelling copy of themselves!") M.emote("scream") diff --git a/tgstation.dme b/tgstation.dme index 50999a9da4..630ee96b42 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -256,6 +256,7 @@ #include "code\_onclick\hud\screen_objects\sprint.dm" #include "code\_onclick\hud\screen_objects\stamina.dm" #include "code\_onclick\hud\screen_objects\storage.dm" +#include "code\_onclick\hud\screen_objects\vore.dm" #include "code\controllers\admin.dm" #include "code\controllers\configuration_citadel.dm" #include "code\controllers\controller.dm"