From 8d5d194a263d214e8ee8b709e6fb5476f811ca18 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 00:30:56 -0700 Subject: [PATCH 001/142] hahahahaha --- code/__DEFINES/misc.dm | 5 + code/_onclick/hud/alert.dm | 17 ++ .../mood_events/generic_negative_events.dm | 10 ++ code/modules/clothing/shoes/_shoes.dm | 166 ++++++++++++++++++ code/modules/clothing/shoes/miscellaneous.dm | 14 ++ .../mob/living/carbon/carbon_defines.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 12 +- icons/mob/screen_alert.dmi | Bin 108227 -> 108534 bytes 8 files changed, 224 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 2ec21c83b3..dc0fd9dba8 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -534,3 +534,8 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define LOOT_RESTRICTION_CKEY 2 #define LOOT_RESTRICTION_MIND_PILE 3 //limited to the current pile. #define LOOT_RESTRICTION_CKEY_PILE 4 //Idem + +//stages of shoe tying-ness +#define SHOES_UNTIED 0 +#define SHOES_TIED 1 +#define SHOES_KNOTTED 2 diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 11531a701e..f465705569 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -612,6 +612,23 @@ so as to remain in compliance with the most up-to-date laws." if(L.last_special <= world.time) return L.resist_buckle() +/obj/screen/alert/shoes/untied + name = "Untied Shoes" + desc = "Your shoes are untied! Click the alert or your shoes to tie them." + icon_state = "shoealert" + +/obj/screen/alert/shoes/knotted + name = "Knotted Shoes" + desc = "Someone tied your shoelaces together! Click the alert or your shoes to undo the knot." + icon_state = "shoealert" + +/obj/screen/alert/shoes/Click() + var/mob/living/carbon/C = usr + if(!istype(C) || !C.can_resist() || C != owner || !C.shoes) + return + C.changeNext_move(CLICK_CD_RESIST) + C.shoes.handle_tying(C) + // PRIVATE = only edit, use, or override these if you're editing the system as a whole // Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index f5692c297a..73d59aa0de 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -270,3 +270,13 @@ description = "I've produced better art than that from my ass.\n" mood_change = -2 timeout = 1200 + +/datum/mood_event/tripped + description = "I can't believe I fell for the oldest trick in the book!\n" + mood_change = -6 + timeout = 2 MINUTES + +/datum/mood_event/untied + description = "I hate when my shoes come untied!\n" + mood_change = -3 + timeout = 1 MINUTES diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 447a531717..7eb5fab312 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -20,6 +20,15 @@ var/last_blood_DNA = "" //same as last one var/last_blood_color = "" + ///Whether these shoes have laces that can be tied/untied + var/can_be_tied = TRUE + ///Are we currently tied? Can either be SHOES_UNTIED, SHOES_TIED, or SHOES_KNOTTED + var/tied = SHOES_TIED + ///How long it takes to lace/unlace these shoes + var/lace_time = 5 SECONDS + ///any alerts we have active + var/obj/screen/alert/our_alert + /obj/item/clothing/shoes/ComponentInitialize() . = ..() RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood) @@ -43,6 +52,15 @@ playsound(user, 'sound/weapons/genhit2.ogg', 50, 1) return(BRUTELOSS) +/obj/item/clothing/shoes/examine(mob/user) + . = ..() + + if(!ishuman(loc)) + return ..() + if(tied == SHOES_UNTIED) + . += "The shoelaces are untied." + else if(tied == SHOES_KNOTTED) + . += "The shoelaces are all knotted together." /obj/item/clothing/shoes/transfer_blood_dna(list/blood_dna, diseases) ..() @@ -74,6 +92,9 @@ worn_y_dimension -= (offset * 2) user.update_inv_shoes() equipped_before_drop = TRUE + if(can_be_tied && tied == SHOES_UNTIED) + our_alert = user.throw_alert("shoealert", /obj/screen/alert/shoes/untied) + RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/check_trip, override=TRUE) /obj/item/clothing/shoes/proc/restore_offsets(mob/user) equipped_before_drop = FALSE @@ -81,6 +102,8 @@ worn_y_dimension = world.icon_size /obj/item/clothing/shoes/dropped(mob/user) + if(our_alert && our_alert.owner == user) + user.clear_alert("shoealert") if(offset && equipped_before_drop) restore_offsets(user) . = ..() @@ -101,3 +124,146 @@ /obj/item/proc/negates_gravity() return FALSE + +/** + * adjust_laces adjusts whether our shoes (assuming they can_be_tied) and tied, untied, or knotted + * + * In addition to setting the state, it will deal with getting rid of alerts if they exist, as well as registering and unregistering the stepping signals + * + * Arguments: + * * + * * state: SHOES_UNTIED, SHOES_TIED, or SHOES_KNOTTED, depending on what you want them to become + * * user: used to check to see if we're the ones unknotting our own laces + */ +/obj/item/clothing/shoes/proc/adjust_laces(state, mob/user) + if(!can_be_tied) + return + + var/mob/living/carbon/human/our_guy + if(ishuman(loc)) + our_guy = loc + + tied = state + if(tied == SHOES_TIED) + if(our_guy) + our_guy.clear_alert("shoealert") + UnregisterSignal(src, COMSIG_SHOES_STEP_ACTION) + else + if(tied == SHOES_UNTIED && our_guy && user == our_guy) + our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied) // if we're the ones unknotting our own laces, of course we know they're untied + RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/check_trip, override=TRUE) + +/** + * handle_tying deals with all the actual tying/untying/knotting, inferring your intent from who you are in relation to the state of the laces + * + * If you're the wearer, you want them to move towards tied-ness (knotted -> untied -> tied). If you're not, you're pranking them, so you're moving towards knotted-ness (tied -> untied -> knotted) + * + * Arguments: + * * + * * user: who is the person interacting with the shoes? + */ +/obj/item/clothing/shoes/proc/handle_tying(mob/living/carbon/human/user) + ///our_guy here is the wearer, if one exists (and he must exist, or we don't care) + var/mob/living/carbon/human/our_guy = loc + if(!istype(our_guy)) + return + + if(user == loc && tied != SHOES_TIED) // if they're our own shoes, go tie-wards + user.visible_message("[user] begins [tied ? "unknotting" : "tying"] the laces of [user.p_their()] [src.name].", "You begin [tied ? "unknotting" : "tying"] the laces of your [src.name]...") + + if(do_after(user, lace_time, needhand=TRUE, target=src)) + to_chat(user, "You [tied ? "unknot" : "tie"] the laces of your [src.name].") + if(tied == SHOES_UNTIED) + adjust_laces(SHOES_TIED, user) + else + adjust_laces(SHOES_UNTIED, user) + + else // if they're someone else's shoes, go knot-wards + if(user.mobility_flags & MOBILITY_STAND) + to_chat(user, "You must be on the floor to interact with [src]!") + return + if(tied == SHOES_KNOTTED) + to_chat(user, "The laces on [loc]'s [src.name] are already a hopelessly tangled mess!") + return + + var/mod_time = lace_time + to_chat(user, "You quietly set to work [tied ? "untying" : "knotting"] [loc]'s [src.name]...") + if(HAS_TRAIT(user, TRAIT_CLUMSY)) // based clowns trained their whole lives for this + mod_time *= 0.75 + + if(do_after(user, mod_time, needhand=TRUE, target=src)) + to_chat(user, "You [tied ? "untie" : "knot"] the laces on [loc]'s [src.name].") + if(tied == SHOES_UNTIED) + adjust_laces(SHOES_KNOTTED, user) + else + adjust_laces(SHOES_UNTIED, user) + else // if one of us moved + user.visible_message("[our_guy] stamps on [user]'s hand, mid-shoelace [tied ? "knotting" : "untying"]!", "Ow! [our_guy] stamps on your hand!", user) + to_chat(our_guy, "You stamp on [user]'s hand! What the- they were [tied ? "knotting" : "untying"] your shoelaces!") + user.emote("scream") + var/obj/item/bodypart/ouchie = user.get_bodypart(pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) + if(ouchie) + ouchie.receive_damage(15) + user.Paralyze(5) + +/** + * check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble + */ +/obj/item/clothing/shoes/proc/check_trip() + var/mob/living/carbon/human/our_guy = loc + if(!istype(our_guy)) // are they REALLY /our guy/? + return + + if(tied == SHOES_KNOTTED) + our_guy.Paralyze(5) + our_guy.Knockdown(10) + our_guy.visible_message("[our_guy] trips on [our_guy.p_their()] knotted shoelaces and falls! What a klutz!", "You trip on your knotted shoelaces and fall over!") + SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "trip", /datum/mood_event/tripped) // well we realized they're knotted now! + our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/knotted) + else if(tied == SHOES_UNTIED) + var/wiser = TRUE // did we stumble and realize our laces are undone? + switch(rand(1, 1000)) + if(1) // .1% chance to trip and fall over (note these are per step while our laces are undone) + our_guy.Paralyze(5) + our_guy.Knockdown(10) + our_guy.visible_message("[our_guy] trips on [our_guy.p_their()] untied shoelaces and falls! What a klutz!", "You trip on your untied shoelaces and fall over!") + if(2 to 5) // .4% chance to stumble and lurch forward + our_guy.throw_at(get_step(our_guy, our_guy.dir), 3, 2) + to_chat(our_guy, "You stumble on your untied shoelaces and lurch forward!") + if(6 to 13) // .7% chance to stumble and fling what we're holding + var/have_anything = FALSE + for(var/obj/item/I in our_guy.held_items) + have_anything = TRUE + our_guy.accident(I) + to_chat(our_guy, "You trip on your shoelaces a bit[have_anything ? ", flinging what you were holding" : ""]!") + if(14 to 25) // 1.3ish% chance to stumble and be a bit off balance (like being disarmed) + to_chat(our_guy, "You stumble a bit on your untied shoelaces!") + if(!our_guy.has_movespeed_modifier(MOVESPEED_ID_SHOVE)) + our_guy.add_movespeed_modifier(MOVESPEED_ID_SHOVE, multiplicative_slowdown = SHOVE_SLOWDOWN_STRENGTH) + addtimer(CALLBACK(our_guy, /mob/living/carbon/human/proc/clear_shove_slowdown), SHOVE_SLOWDOWN_LENGTH) + if(26 to 1000) + wiser = FALSE + + if(wiser) + SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "untied", /datum/mood_event/untied) // well we realized they're untied now! + our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied) + + +/obj/item/clothing/shoes/attack_hand(mob/living/carbon/human/user) + if(!istype(user)) + return ..() + if(loc == user && tied != SHOES_TIED) + handle_tying(user) + return + ..() + +/obj/item/clothing/shoes/attack_self(mob/user) + . = ..() + + to_chat(user, "You begin [tied ? "untying" : "tying"] the laces on [src]...") + if(do_after(user, lace_time, needhand=TRUE, target=src)) + to_chat(user, "You [tied ? "untie" : "tie"] the laces on [src].") + if(tied == SHOES_UNTIED) + adjust_laces(SHOES_TIED, user) + else + adjust_laces(SHOES_UNTIED, user) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index b68bef6329..bc71214e03 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -17,6 +17,7 @@ resistance_flags = NONE permeability_coefficient = 0.05 //Thick soles, and covers the ankle pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_delay = 12 SECONDS /obj/item/clothing/shoes/combat/sneakboots name = "insidious sneakboots" @@ -49,6 +50,7 @@ strip_delay = 50 equip_delay_other = 50 permeability_coefficient = 0.9 + can_be_tied = FALSE /obj/item/clothing/shoes/sandal/marisa desc = "A pair of magic black shoes." @@ -73,6 +75,7 @@ resistance_flags = NONE armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 75) custom_price = PRICE_ABOVE_EXPENSIVE + can_be_tied = FALSE /obj/item/clothing/shoes/galoshes/dry name = "absorbent galoshes" @@ -99,6 +102,7 @@ icon_state = "clown_shoes" slowdown = SHOES_SLOWDOWN+1 pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes/clown + lace_time = 20 SECONDS // how the hell do these laces even work?? /obj/item/clothing/shoes/clown_shoes/Initialize() . = ..() @@ -130,6 +134,7 @@ resistance_flags = NONE permeability_coefficient = 0.05 //Thick soles, and covers the ankle pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_time = 12 SECONDS /obj/item/clothing/shoes/jackboots/fast slowdown = -1 @@ -144,6 +149,7 @@ heat_protection = FEET|LEGS max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_time = 8 SECONDS /obj/item/clothing/shoes/winterboots/ice_boots name = "ice hiking boots" @@ -177,6 +183,7 @@ strip_delay = 40 equip_delay_other = 40 pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_time = 8 SECONDS /obj/item/clothing/shoes/workboots/mining name = "mining boots" @@ -196,6 +203,7 @@ min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT heat_protection = FEET max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT + lace_time = 10 SECONDS /obj/item/clothing/shoes/cult/alt name = "cultist boots" @@ -226,12 +234,14 @@ strip_delay = 100 equip_delay_other = 100 permeability_coefficient = 0.9 + can_be_tied = FALSE /obj/item/clothing/shoes/griffin name = "griffon boots" desc = "A pair of costume boots fashioned after bird talons." icon_state = "griffinboots" pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_time = 8 SECONDS /obj/item/clothing/shoes/bhop name = "jump boots" @@ -284,6 +294,7 @@ desc = "A giant, clunky pair of shoes crudely made out of bronze. Why would anyone wear these?" icon = 'icons/obj/clothing/clockwork_garb.dmi' icon_state = "clockwork_treads" + lace_time = 8 SECONDS /obj/item/clothing/shoes/bronze/Initialize() . = ..() @@ -358,6 +369,7 @@ icon_state = "rus_shoes" item_state = "rus_shoes" pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes + lace_time = 8 SECONDS // kevin is into feet /obj/item/clothing/shoes/wraps @@ -365,6 +377,7 @@ desc = "Ankle coverings. These ones have a golden design." icon_state = "gildedcuffs" body_parts_covered = FALSE + can_be_tied = FALSE /obj/item/clothing/shoes/wraps/silver name = "silver leg wraps" @@ -385,6 +398,7 @@ name = "cowboy boots" desc = "A standard pair of brown cowboy boots." icon_state = "cowboyboots" + can_be_tied = FALSE /obj/item/clothing/shoes/cowboyboots/black name = "black cowboy boots" diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 15413f76d4..74f8134d9c 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -24,7 +24,7 @@ var/obj/item/head = null var/obj/item/gloves = null //only used by humans - var/obj/item/shoes = null //only used by humans. + var/obj/item/clothing/shoes/shoes = null //only used by humans. var/obj/item/clothing/glasses/glasses = null //only used by humans. var/obj/item/ears = null //only used by humans. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a2d53f6f0a..75f4193edc 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -168,7 +168,11 @@ if(SLOT_SHOES in obscured) dat += "Shoes:Obscured" else - dat += "Shoes:[(shoes && !(shoes.item_flags & ABSTRACT)) ? shoes : "Empty"]" + dat += "Shoes:[(shoes && !(shoes.item_flags & ABSTRACT)) ? shoes : "Empty"]" + if(shoes && shoes.can_be_tied && shoes.tied != SHOES_KNOTTED) + dat += " [shoes.tied ? "Untie shoes" : "Knot shoes"]" + + dat += "" if(SLOT_GLOVES in obscured) dat += "Gloves:Obscured" @@ -292,6 +296,12 @@ if (!strip_silence) to_chat(src, "You feel your [pocket_side] pocket being fumbled with!") + if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY, null, FALSE) + // separate from first canusetopic + var/mob/living/user = usr + if(istype(user) && href_list["shoes"] && (user.mobility_flags & MOBILITY_USE)) // we need to be on the ground, so we'll be a bit looser + shoes.handle_tying(usr) + ..() //CITADEL CHANGE - removes a tab from behind this ..() so that flavortext can actually be examined diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index 60fe2f9839ebb172b3b7f0365f3635fb2ed8c872..30c23601a5edb51ba42b433f668236e0723072ba 100644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Q^#*jiWw0;bXt;m*t;^KxUMPx9y}@Pr zTPY$+DRBe(;%)ji3KA!u7glMuB%AX9E+hbK1Cd-xPfFMtZjAR-2TS>YBoQZ zm+6Zu^rhH31f*0#2v@kS5^0)QYbA}wIB}d<*A4B&M0mOW4L!lz_5Z#Z>A%1FBSzeA zhkO`A^FYavRrK2yun=E`-<`;iw#iqnxeRi(<3s8faa1h1? Date: Sat, 11 Jul 2020 00:37:56 -0700 Subject: [PATCH 002/142] more --- code/__DEFINES/admin.dm | 1 + code/__DEFINES/mobs.dm | 1 + code/__HELPERS/do_after.dm | 30 +++++++++ code/game/atoms.dm | 8 +++ code/modules/admin/verbs/randomverbs.dm | 26 +++++++- code/modules/clothing/shoes/_shoes.dm | 66 ++++++++++++------- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/mob_defines.dm | 3 + 8 files changed, 112 insertions(+), 25 deletions(-) diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index e8e75c132a..3d2dae2076 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -74,6 +74,7 @@ #define ADMIN_PUNISHMENT_MAZING "Puzzle" #define ADMIN_PUNISHMENT_PIE "Cream Pie" #define ADMIN_PUNISHMENT_CUSTOM_PIE "Custom Cream Pie" +#define ADMIN_PUNISHMENT_SHOES "Knot Shoes" #define AHELP_ACTIVE 1 #define AHELP_CLOSED 2 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 42139cdeda..0801da6911 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -305,6 +305,7 @@ #define GRAB_PIXEL_SHIFT_NECK 16 #define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return; +#define INTERACTING_WITH(X, Y) (Y in X.do_afters) /// Field of vision defines. #define FOV_90_DEGREES 90 diff --git a/code/__HELPERS/do_after.dm b/code/__HELPERS/do_after.dm index f1f483c345..b2202ec9ae 100644 --- a/code/__HELPERS/do_after.dm +++ b/code/__HELPERS/do_after.dm @@ -166,6 +166,9 @@ var/target_loc = target.loc + LAZYADD(user.do_afters, target) + LAZYADD(target.targeted_by, user) + var/holding = user.get_active_held_item() var/datum/progressbar/progbar if (progress) @@ -184,6 +187,10 @@ if(uninterruptible) continue + if(!(target in user.do_afters)) + . = FALSE + break + if(drifting && !user.inertia_dir) drifting = 0 user_loc = user.loc @@ -194,6 +201,9 @@ if (progress) qdel(progbar) + if(!QDELETED(target)) + LAZYREMOVE(user.do_afters, target) + LAZYREMOVE(target.targeted_by, user) //some additional checks as a callback for for do_afters that want to break on losing health or on the mob taking action /mob/proc/break_do_after_checks(list/checked_health, check_clicks) @@ -216,6 +226,10 @@ if(target && !isturf(target)) Tloc = target.loc + if(target) + LAZYADD(user.do_afters, target) + LAZYADD(target.targeted_by, user) + var/atom/Uloc = user.loc var/drifting = 0 @@ -260,6 +274,10 @@ . = 0 break + if(target && !(target in user.do_afters)) + . = 0 + break + if(needhand) //This might seem like an odd check, but you can still need a hand even when it's empty //i.e the hand is used to pull some item/tool out of the construction @@ -273,6 +291,10 @@ if (progress) qdel(progbar) + if(!QDELETED(target)) + LAZYREMOVE(user.do_afters, target) + LAZYREMOVE(target.targeted_by, user) + /mob/proc/do_after_coefficent() // This gets added to the delay on a do_after, default 1 . = 1 return @@ -291,6 +313,8 @@ var/list/originalloc = list() for(var/atom/target in targets) originalloc[target] = target.loc + LAZYADD(user.do_afters, target) + LAZYADD(target.targeted_by, user) var/holding = user.get_active_held_item() var/datum/progressbar/progbar @@ -321,3 +345,9 @@ break mainloop if(progbar) qdel(progbar) + + for(var/thing in targets) + var/atom/target = thing + if(!QDELETED(target)) + LAZYREMOVE(user.do_afters, target) + LAZYREMOVE(target.targeted_by, user) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 5d29ef1598..e8e98aed78 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -70,6 +70,9 @@ /// A luminescence-shifted value of the last color calculated for chatmessage overlays var/chat_color_darkened + ///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy() + var/list/targeted_by + /atom/New(loc, ...) //atom creation method that preloads variables at creation if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() @@ -142,6 +145,11 @@ LAZYCLEARLIST(overlays) LAZYCLEARLIST(priority_overlays) + for(var/i in targeted_by) + var/mob/M = i + LAZYREMOVE(M.do_afters, src) + targeted_by = null + QDEL_NULL(light) return ..() diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index d335cfb171..cd36d66841 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1276,7 +1276,20 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits if(!check_rights(R_ADMIN) || !check_rights(R_FUN)) return - var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_CUSTOM_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD) + var/list/punishment_list = list( + ADMIN_PUNISHMENT_PIE, + ADMIN_PUNISHMENT_CUSTOM_PIE, + ADMIN_PUNISHMENT_FIREBALL, + ADMIN_PUNISHMENT_LIGHTNING, + ADMIN_PUNISHMENT_BRAINDAMAGE, + ADMIN_PUNISHMENT_BSA, + ADMIN_PUNISHMENT_GIB, + ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, + ADMIN_PUNISHMENT_SUPPLYPOD, + ADMIN_PUNISHMENT_MAZING, + ADMIN_PUNISHMENT_ROD, + ADMIN_PUNISHMENT_SHOES + ) var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list @@ -1355,6 +1368,17 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits A.reagents.add_reagent(chosen_id, amount) A.splat(target) + if(ADMIN_PUNISHMENT_SHOES) + if(!iscarbon(target)) + to_chat(usr,"This must be used on a carbon mob.", confidential = TRUE) + return + var/mob/living/carbon/C = target + var/obj/item/clothing/shoes/sick_kicks = C.shoes + if(!sick_kicks?.can_be_tied) + to_chat(usr,"[C] does not have knottable shoes!", confidential = TRUE) + return + sick_kicks.adjust_laces(SHOES_KNOTTED) + punish_log(target, punishment) /client/proc/punish_log(var/whom, var/punishment) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 7eb5fab312..d0ce472137 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -125,7 +125,6 @@ /obj/item/proc/negates_gravity() return FALSE -/** * adjust_laces adjusts whether our shoes (assuming they can_be_tied) and tied, untied, or knotted * * In addition to setting the state, it will deal with getting rid of alerts if they exist, as well as registering and unregistering the stepping signals @@ -162,16 +161,23 @@ * * * * user: who is the person interacting with the shoes? */ -/obj/item/clothing/shoes/proc/handle_tying(mob/living/carbon/human/user) +/obj/item/clothing/shoes/proc/handle_tying(mob/user) ///our_guy here is the wearer, if one exists (and he must exist, or we don't care) var/mob/living/carbon/human/our_guy = loc if(!istype(our_guy)) return + if(!in_range(user, our_guy)) + to_chat(user, "You aren't close enough to interact with [src]'s laces!") + return + if(user == loc && tied != SHOES_TIED) // if they're our own shoes, go tie-wards + if(INTERACTING_WITH(user, our_guy)) + to_chat(user, "You're already interacting with [src]!") + return user.visible_message("[user] begins [tied ? "unknotting" : "tying"] the laces of [user.p_their()] [src.name].", "You begin [tied ? "unknotting" : "tying"] the laces of your [src.name]...") - if(do_after(user, lace_time, needhand=TRUE, target=src)) + if(do_after(user, lace_time, needhand=TRUE, target=our_guy, extra_checks=CALLBACK(src, .proc/still_shoed, our_guy))) to_chat(user, "You [tied ? "unknot" : "tie"] the laces of your [src.name].") if(tied == SHOES_UNTIED) adjust_laces(SHOES_TIED, user) @@ -179,36 +185,43 @@ adjust_laces(SHOES_UNTIED, user) else // if they're someone else's shoes, go knot-wards - if(user.mobility_flags & MOBILITY_STAND) + var/mob/living/L = user + if(istype(L) && (L.mobility_flags & MOBILITY_STAND)) to_chat(user, "You must be on the floor to interact with [src]!") return if(tied == SHOES_KNOTTED) to_chat(user, "The laces on [loc]'s [src.name] are already a hopelessly tangled mess!") return + if(INTERACTING_WITH(user, our_guy)) + to_chat(user, "You're already interacting with [src]!") + return var/mod_time = lace_time to_chat(user, "You quietly set to work [tied ? "untying" : "knotting"] [loc]'s [src.name]...") if(HAS_TRAIT(user, TRAIT_CLUMSY)) // based clowns trained their whole lives for this mod_time *= 0.75 - if(do_after(user, mod_time, needhand=TRUE, target=src)) + if(do_after(user, mod_time, needhand=TRUE, target=our_guy, extra_checks=CALLBACK(src, .proc/still_shoed, our_guy))) to_chat(user, "You [tied ? "untie" : "knot"] the laces on [loc]'s [src.name].") if(tied == SHOES_UNTIED) adjust_laces(SHOES_KNOTTED, user) else adjust_laces(SHOES_UNTIED, user) else // if one of us moved - user.visible_message("[our_guy] stamps on [user]'s hand, mid-shoelace [tied ? "knotting" : "untying"]!", "Ow! [our_guy] stamps on your hand!", user) - to_chat(our_guy, "You stamp on [user]'s hand! What the- they were [tied ? "knotting" : "untying"] your shoelaces!") + user.visible_message("[our_guy] stamps on [user]'s hand, mid-shoelace [tied ? "knotting" : "untying"]!", "Ow! [our_guy] stamps on your hand!", list(our_guy)) + to_chat(our_guy, "You stamp on [user]'s hand! What the- [user.p_they()] [user.p_were()] [tied ? "knotting" : "untying"] your shoelaces!") user.emote("scream") - var/obj/item/bodypart/ouchie = user.get_bodypart(pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) - if(ouchie) - ouchie.receive_damage(15) - user.Paralyze(5) + if(istype(L)) + var/obj/item/bodypart/ouchie = L.get_bodypart(pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) + if(ouchie) + ouchie.receive_damage(brute = 10, stamina = 40) + L.Paralyze(10) -/** - * check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble - */ +///checking to make sure we're still on the person we're supposed to be, for lacing do_after's +/obj/item/clothing/shoes/proc/still_shoed(mob/living/carbon/our_guy) + return (loc == our_guy) + +///check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble /obj/item/clothing/shoes/proc/check_trip() var/mob/living/carbon/human/our_guy = loc if(!istype(our_guy)) // are they REALLY /our guy/? @@ -220,30 +233,35 @@ our_guy.visible_message("[our_guy] trips on [our_guy.p_their()] knotted shoelaces and falls! What a klutz!", "You trip on your knotted shoelaces and fall over!") SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "trip", /datum/mood_event/tripped) // well we realized they're knotted now! our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/knotted) + else if(tied == SHOES_UNTIED) var/wiser = TRUE // did we stumble and realize our laces are undone? switch(rand(1, 1000)) if(1) // .1% chance to trip and fall over (note these are per step while our laces are undone) our_guy.Paralyze(5) our_guy.Knockdown(10) + SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "trip", /datum/mood_event/tripped) // well we realized they're knotted now! our_guy.visible_message("[our_guy] trips on [our_guy.p_their()] untied shoelaces and falls! What a klutz!", "You trip on your untied shoelaces and fall over!") + if(2 to 5) // .4% chance to stumble and lurch forward our_guy.throw_at(get_step(our_guy, our_guy.dir), 3, 2) to_chat(our_guy, "You stumble on your untied shoelaces and lurch forward!") + if(6 to 13) // .7% chance to stumble and fling what we're holding var/have_anything = FALSE for(var/obj/item/I in our_guy.held_items) have_anything = TRUE our_guy.accident(I) to_chat(our_guy, "You trip on your shoelaces a bit[have_anything ? ", flinging what you were holding" : ""]!") + if(14 to 25) // 1.3ish% chance to stumble and be a bit off balance (like being disarmed) to_chat(our_guy, "You stumble a bit on your untied shoelaces!") - if(!our_guy.has_movespeed_modifier(MOVESPEED_ID_SHOVE)) - our_guy.add_movespeed_modifier(MOVESPEED_ID_SHOVE, multiplicative_slowdown = SHOVE_SLOWDOWN_STRENGTH) + if(!our_guy.has_movespeed_modifier(/datum/movespeed_modifier/shove)) + our_guy.add_movespeed_modifier(/datum/movespeed_modifier/shove) addtimer(CALLBACK(our_guy, /mob/living/carbon/human/proc/clear_shove_slowdown), SHOVE_SLOWDOWN_LENGTH) + if(26 to 1000) wiser = FALSE - if(wiser) SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "untied", /datum/mood_event/untied) // well we realized they're untied now! our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied) @@ -252,7 +270,7 @@ /obj/item/clothing/shoes/attack_hand(mob/living/carbon/human/user) if(!istype(user)) return ..() - if(loc == user && tied != SHOES_TIED) + if(loc == user && tied != SHOES_TIED && (user.mobility_flags & MOBILITY_USE)) handle_tying(user) return ..() @@ -260,10 +278,12 @@ /obj/item/clothing/shoes/attack_self(mob/user) . = ..() + if(INTERACTING_WITH(user, src)) + to_chat(user, "You're already interacting with [src]!") + return + to_chat(user, "You begin [tied ? "untying" : "tying"] the laces on [src]...") - if(do_after(user, lace_time, needhand=TRUE, target=src)) + + if(do_after(user, lace_time, needhand=TRUE, target=src,extra_checks=CALLBACK(src, .proc/still_shoed, user))) to_chat(user, "You [tied ? "untie" : "tie"] the laces on [src].") - if(tied == SHOES_UNTIED) - adjust_laces(SHOES_TIED, user) - else - adjust_laces(SHOES_UNTIED, user) + adjust_laces(tied ? SHOES_TIED : SHOES_UNTIED, user) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 75f4193edc..3cb61f1240 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -296,7 +296,7 @@ if (!strip_silence) to_chat(src, "You feel your [pocket_side] pocket being fumbled with!") - if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY, null, FALSE) + if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY, null, FALSE)) // separate from first canusetopic var/mob/living/user = usr if(istype(user) && href_list["shoes"] && (user.mobility_flags & MOBILITY_USE)) // we need to be on the ground, so we'll be a bit looser diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index dbf7b7f350..de69afbe7e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -156,3 +156,6 @@ var/typing_indicator_timerid /// Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays. var/typing_indicator_current + + ///For storing what do_after's someone has, in case we want to restrict them to only one of a certain do_after at a time + var/list/do_afters From ed847b1a58516452f5d6baf102771b7d513d54b4 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 00:42:13 -0700 Subject: [PATCH 003/142] compile --- code/modules/clothing/shoes/_shoes.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index d0ce472137..d17eed1ef7 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -125,6 +125,7 @@ /obj/item/proc/negates_gravity() return FALSE +/** * adjust_laces adjusts whether our shoes (assuming they can_be_tied) and tied, untied, or knotted * * In addition to setting the state, it will deal with getting rid of alerts if they exist, as well as registering and unregistering the stepping signals From cc2e9530b104be89a58186627bdebb585b78cbe0 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 00:44:17 -0700 Subject: [PATCH 004/142] fix --- code/_onclick/hud/alert.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- code/modules/clothing/shoes/miscellaneous.dm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index f465705569..64a30e0e55 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -624,7 +624,7 @@ so as to remain in compliance with the most up-to-date laws." /obj/screen/alert/shoes/Click() var/mob/living/carbon/C = usr - if(!istype(C) || !C.can_resist() || C != owner || !C.shoes) + if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes) return C.changeNext_move(CLICK_CD_RESIST) C.shoes.handle_tying(C) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index d17eed1ef7..0b66c1f4b6 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -102,7 +102,7 @@ worn_y_dimension = world.icon_size /obj/item/clothing/shoes/dropped(mob/user) - if(our_alert && our_alert.owner == user) + if(our_alert && our_alert.mob_viewer == user) user.clear_alert("shoealert") if(offset && equipped_before_drop) restore_offsets(user) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index bc71214e03..b0d760ebd9 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -17,7 +17,7 @@ resistance_flags = NONE permeability_coefficient = 0.05 //Thick soles, and covers the ankle pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes - lace_delay = 12 SECONDS + lace_time = 12 SECONDS /obj/item/clothing/shoes/combat/sneakboots name = "insidious sneakboots" From 98e727ec033cf5797398280d58055164e8e23dd8 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 00:55:23 -0700 Subject: [PATCH 005/142] ok --- code/modules/admin/verbs/randomverbs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index cd36d66841..dcf74db154 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1370,12 +1370,12 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits if(ADMIN_PUNISHMENT_SHOES) if(!iscarbon(target)) - to_chat(usr,"This must be used on a carbon mob.", confidential = TRUE) + to_chat(usr,"This must be used on a carbon mob.") return var/mob/living/carbon/C = target var/obj/item/clothing/shoes/sick_kicks = C.shoes if(!sick_kicks?.can_be_tied) - to_chat(usr,"[C] does not have knottable shoes!", confidential = TRUE) + to_chat(usr,"[C] does not have knottable shoes!") return sick_kicks.adjust_laces(SHOES_KNOTTED) From 6fbe083e1325ec5e31770b686873e715f10e5b11 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 07:03:41 -0700 Subject: [PATCH 006/142] ok --- code/modules/clothing/shoes/_shoes.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 0b66c1f4b6..8de65b3a06 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -102,7 +102,7 @@ worn_y_dimension = world.icon_size /obj/item/clothing/shoes/dropped(mob/user) - if(our_alert && our_alert.mob_viewer == user) + if(our_alert && (our_alert.mob_viewer == user)) user.clear_alert("shoealert") if(offset && equipped_before_drop) restore_offsets(user) @@ -287,4 +287,4 @@ if(do_after(user, lace_time, needhand=TRUE, target=src,extra_checks=CALLBACK(src, .proc/still_shoed, user))) to_chat(user, "You [tied ? "untie" : "tie"] the laces on [src].") - adjust_laces(tied ? SHOES_TIED : SHOES_UNTIED, user) \ No newline at end of file + adjust_laces(tied ? SHOES_TIED : SHOES_UNTIED, user) From de8ac9896a0762628f29b70532cc63550550e51f Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 11 Jul 2020 07:13:56 -0700 Subject: [PATCH 007/142] sigh --- code/_onclick/hud/alert.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 64a30e0e55..26731efd6b 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -22,7 +22,7 @@ if(alerts[category]) thealert = alerts[category] if(thealert.override_alerts) - return 0 + return thealert if(new_master && new_master != thealert.master) WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [thealert.master]") @@ -36,7 +36,7 @@ clear_alert(category) return .() else //no need to update - return 0 + return thealert else thealert = new type() thealert.override_alerts = override From fcb7d44eb3a9be0af27729d85e965e2b600efd39 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Thu, 16 Jul 2020 00:35:54 +0000 Subject: [PATCH 008/142] Automatic changelog compile [ci skip] --- html/changelog.html | 16 ++++++++++++++++ html/changelogs/.all_changelog.yml | 11 +++++++++++ html/changelogs/AutoChangeLog-pr-12738.yml | 5 ----- html/changelogs/AutoChangeLog-pr-12774.yml | 4 ---- html/changelogs/AutoChangeLog-pr-12782.yml | 4 ---- html/changelogs/AutoChangeLog-pr-12783.yml | 4 ---- 6 files changed, 27 insertions(+), 17 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-12738.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12774.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12782.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12783.yml diff --git a/html/changelog.html b/html/changelog.html index e5b5c98aa1..ccfb04740f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,22 @@ -->
+

16 July 2020

+

DeltaFire15 updated:

+
    +
  • Fixes a zeolite runtime caused by a missing check.
  • +
+

Sneakyrat6 updated:

+
    +
  • Fixes being able to meta people real name with OOC Notes
  • +
+

timothyteakettle updated:

+
    +
  • travelling traders from another dimension can now visit the station in search of something specific, and reward you for giving it to them
  • +
  • small error with pet carrier logic fixed and also making sure simple mobs are catered for properly inside bluespace jars
  • +
  • fixes coin related issue
  • +
+

15 July 2020

Sonic121x updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index dd0a479114..662e458972 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -26361,3 +26361,14 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. 2020-07-15: Sonic121x: - bugfix: Paramedic jumpsuit +2020-07-16: + DeltaFire15: + - bugfix: Fixes a zeolite runtime caused by a missing check. + Sneakyrat6: + - bugfix: Fixes being able to meta people real name with OOC Notes + timothyteakettle: + - rscadd: travelling traders from another dimension can now visit the station in + search of something specific, and reward you for giving it to them + - bugfix: small error with pet carrier logic fixed and also making sure simple mobs + are catered for properly inside bluespace jars + - bugfix: fixes coin related issue diff --git a/html/changelogs/AutoChangeLog-pr-12738.yml b/html/changelogs/AutoChangeLog-pr-12738.yml deleted file mode 100644 index 883e4a10ac..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12738.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - rscadd: "travelling traders from another dimension can now visit the station in search of something specific, and reward you for giving it to them" - - bugfix: "small error with pet carrier logic fixed and also making sure simple mobs are catered for properly inside bluespace jars" diff --git a/html/changelogs/AutoChangeLog-pr-12774.yml b/html/changelogs/AutoChangeLog-pr-12774.yml deleted file mode 100644 index 85373e1b9a..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12774.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "DeltaFire15" -delete-after: True -changes: - - bugfix: "Fixes a zeolite runtime caused by a missing check." diff --git a/html/changelogs/AutoChangeLog-pr-12782.yml b/html/changelogs/AutoChangeLog-pr-12782.yml deleted file mode 100644 index 07200e4345..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12782.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "fixes coin related issue" diff --git a/html/changelogs/AutoChangeLog-pr-12783.yml b/html/changelogs/AutoChangeLog-pr-12783.yml deleted file mode 100644 index b9641493c6..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12783.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Sneakyrat6" -delete-after: True -changes: - - bugfix: "Fixes being able to meta people real name with OOC Notes" From 771a28e6853d4931883972c8bbbfcb8dfff7a7cd Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 17:48:51 -0700 Subject: [PATCH 009/142] oh boy --- code/_onclick/click.dm | 35 ------------ code/datums/status_effects/status_effect.dm | 7 --- code/modules/mob/clickdelay.dm | 59 +++++++++++++++++++++ tgstation.dme | 1 + 4 files changed, 60 insertions(+), 42 deletions(-) create mode 100644 code/modules/mob/clickdelay.dm diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 01261677d9..f476d40a70 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -1,38 +1,3 @@ -/* - Click code cleanup - ~Sayu -*/ - -// 1 decisecond click delay (above and beyond mob/next_move) -//This is mainly modified by click code, to modify click delays elsewhere, use next_move and changeNext_move() -/mob/var/next_click = 0 - -// THESE DO NOT EFFECT THE BASE 1 DECISECOND DELAY OF NEXT_CLICK -/mob/var/next_move_adjust = 0 //Amount to adjust action/click delays by, + or - -/mob/var/next_move_modifier = 1 //Value to multiply action/click delays by - - -//Delays the mob's next click/action by num deciseconds -// eg: 10-3 = 7 deciseconds of delay -// eg: 10*0.5 = 5 deciseconds of delay -// DOES NOT EFFECT THE BASE 1 DECISECOND DELAY OF NEXT_CLICK - -/mob/proc/timeToNextMove() - return max(0, next_move - world.time) - -/mob/proc/changeNext_move(num) - next_move = world.time + ((num+next_move_adjust)*next_move_modifier) - -/mob/living/changeNext_move(num) - last_click_move = next_move - var/mod = next_move_modifier - var/adj = next_move_adjust - for(var/i in status_effects) - var/datum/status_effect/S = i - mod *= S.nextmove_modifier() - adj += S.nextmove_adjust() - next_move = world.time + ((num + adj)*mod) - /* Before anything else, defer these calls to a per-mobtype handler. This allows us to remove istype() spaghetti code, but requires the addition of other handler procs to simplify it. diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 12c223f500..3bf09007df 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -90,13 +90,6 @@ return duration = world.time + original_duration -//clickdelay/nextmove modifiers! -/datum/status_effect/proc/nextmove_modifier() - return 1 - -/datum/status_effect/proc/nextmove_adjust() - return 0 - //////////////// // ALERT HOOK // //////////////// diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm new file mode 100644 index 0000000000..a4303691b6 --- /dev/null +++ b/code/modules/mob/clickdelay.dm @@ -0,0 +1,59 @@ +/** + * CLICKDELAY HANDLING SYSTEM + * How this works is mobs can never do actions until their next_action is at or below world.time, but things can specify extra cooldown + * to check for either from the time of last_action or from the end of next_action. + * + * Clickdelay should always be checked via [CheckActionCooldown()], never manually! + */ + +/mob + // CLICKDELAY AND RELATED + /// Last time we clicked. No clicking twice in one tick, please! This should be directly set and checked. + var/last_click = 0 + + /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set. This should only be checked using [CheckActionCooldown()]. + var/last_action = 0 + /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. + var/next_action = 0 + /// Simple modification variable added to next action on adjust. This should only be manually modified via addition. + var/next_action_adjust = 0 + /// Simple modification variable multiplied to next action modifier on adjust. This should only be manually modified using multipliers. + var/next_action_mult = 1 + /// Simple modification variable added to amount when checking time since last action using [CheckActionCooldown()]. This should only be manually modified via addition. + var/last_action_adjust = 0 + /// Simple modification variable multiplied to amount when checking time since last action using [CheckActionCooldown()]. This should only be manually modified using multipliers. + var/last_action_mult = 1 + + /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should be directly set. This should only be checked using [CheckResistCooldown()]. + var/last_resist = 0 + /// How long we should wait before allowing another resist. This should only be manually modified using multipliers. + var/resist_cooldown = 10 + +/** + * Applies a delay to next_action before we can do our next action. + * + * @params + * * amount - Amount to delay by + * * ignore_mod - ignores next action adjust and mult + */ +/mob/proc/DelayNextAction(amount, ignore_mod = FALSE) + next_action = max(next_action, world.time + (ignore_mod? amount : (amount * next_action_mult + next_action_adjust))) + +/** + * Checks if we can do another action. + * Returns TRUE if we can and FALSE if we cannot. + * + * @params + * * cooldown - Time required since last action. Defaults to 0.5 + * * from_next_action - Defaults to FALSE. Should we check from the tail end of next_action instead of last_action? + * * ignore_mod - Defaults to FALSE. Ignore all adjusts and multipliers. Do not use this unless you know what you are doing and have a good reason. + * * ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused. + */ +/mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE) + return (ignore_next_action || (world.time >= next_action)) && (world.time >= ((from_next_action? next_action : last_action) + max(0, ignore_mod? cooldown : (cooldown * last_action_mult + last_action_adjust)))) + +/** + * Checks if we can resist again. + */ +/mob/proc/CheckResistCooldown() + return (world.time >= (last_resist + resist_cooldown)) diff --git a/tgstation.dme b/tgstation.dme index 430e8d8db6..f5081b4a94 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2304,6 +2304,7 @@ #include "code\modules\mining\lavaland\ash_flora.dm" #include "code\modules\mining\lavaland\necropolis_chests.dm" #include "code\modules\mining\lavaland\ruins\gym.dm" +#include "code\modules\mob\clickdelay.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" From 1ba6777b35af1ed51de842f980cb0178e7109e91 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 17:49:06 -0700 Subject: [PATCH 010/142] Whew --- code/modules/mob/mob_defines.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index dbf7b7f350..c78732db49 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -35,7 +35,6 @@ var/list/logging = list() var/atom/machine = null - var/next_move = null var/create_area_cooldown /// Whether or not the mob is currently being transformed into another mob or into another state of being. This will prevent it from moving or doing realistically anything. /// Don't you DARE use this for a cheap way to ensure someone is stunned in your code. From 3d65be4ee956ae787e50faf7c68239176287e02d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:03:17 -0700 Subject: [PATCH 011/142] sigh --- code/modules/mob/clickdelay.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index a4303691b6..072e1e31b1 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -11,7 +11,7 @@ /// Last time we clicked. No clicking twice in one tick, please! This should be directly set and checked. var/last_click = 0 - /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set. This should only be checked using [CheckActionCooldown()]. + /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()]. var/last_action = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. var/next_action = 0 @@ -27,7 +27,7 @@ /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should be directly set. This should only be checked using [CheckResistCooldown()]. var/last_resist = 0 /// How long we should wait before allowing another resist. This should only be manually modified using multipliers. - var/resist_cooldown = 10 + var/resist_cooldown = CLICK_CD_BREAKOUT /** * Applies a delay to next_action before we can do our next action. @@ -35,8 +35,11 @@ * @params * * amount - Amount to delay by * * ignore_mod - ignores next action adjust and mult + * * considered_action - Defaults to TRUE - If TRUE, sets last_action to world.time. */ -/mob/proc/DelayNextAction(amount, ignore_mod = FALSE) +/mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE) + if(considered_action) + last_action = world.time next_action = max(next_action, world.time + (ignore_mod? amount : (amount * next_action_mult + next_action_adjust))) /** From 7c5d4f863d10b3d3772ff29cda2a419cf72db600 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:10:21 -0700 Subject: [PATCH 012/142] click cd breakout --- code/__DEFINES/combat.dm | 1 - code/game/machinery/dna_scanner.dm | 3 +-- code/game/machinery/gulag_teleporter.dm | 3 +-- code/game/machinery/hypnochair.dm | 3 +-- code/game/machinery/suit_storage_unit.dm | 3 +-- code/game/objects/effects/spiders.dm | 3 +-- code/game/objects/items/bodybag.dm | 3 +-- .../game/objects/items/devices/dogborg_sleeper.dm | 3 +-- code/game/objects/items/implants/implantchair.dm | 5 ++--- code/game/objects/items/pet_carrier.dm | 3 +-- .../objects/structures/crates_lockers/closets.dm | 6 ++---- code/game/objects/structures/morgue.dm | 3 +-- .../structures/transit_tubes/transit_tube_pod.dm | 3 +-- .../antagonists/abductor/machinery/experiment.dm | 3 +-- .../machinery/components/unary_devices/cryo.dm | 3 +-- code/modules/mob/clickdelay.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 15 +++------------ code/modules/mob/living/carbon/human/human.dm | 3 +-- code/modules/mob/living/carbon/monkey/combat.dm | 3 +-- code/modules/mob/living/living.dm | 2 +- code/modules/research/nanites/nanite_chamber.dm | 3 +-- code/modules/research/nanites/public_chamber.dm | 3 +-- code/modules/vore/eating/belly_obj.dm | 2 -- 23 files changed, 25 insertions(+), 56 deletions(-) diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index dff52f4748..a8c2703bc9 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -108,7 +108,6 @@ #define CLICK_CD_RANGE 4 #define CLICK_CD_RAPID 2 #define CLICK_CD_CLICK_ABILITY 6 -#define CLICK_CD_BREAKOUT 100 #define CLICK_CD_HANDCUFFED 10 #define CLICK_CD_RESIST 20 #define CLICK_CD_GRABBING 10 diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 4b2ba85d11..fc8513d6cd 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -76,8 +76,7 @@ if(!locked) open_machine() return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index fb41ac986d..0fcfe382d0 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -101,8 +101,7 @@ The console is located at computer/gulag_teleporter.dm if(!locked) open_machine() return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/hypnochair.dm b/code/game/machinery/hypnochair.dm index 1b57f61b79..ff162b7788 100644 --- a/code/game/machinery/hypnochair.dm +++ b/code/game/machinery/hypnochair.dm @@ -178,8 +178,7 @@ icon_state += "_occupied" /obj/machinery/hypnochair/container_resist(mob/living/user) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(600)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index cf6b2b4bf4..805018efae 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -301,8 +301,7 @@ open_machine() dump_contents() return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the doors of [src]!", \ "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 14b3c4e73e..785e20f586 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -252,8 +252,7 @@ /obj/structure/spider/cocoon/container_resist(mob/living/user) var/breakout_time = 600 - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time to_chat(user, "You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)") visible_message("You see something struggling and writhing in \the [src]!") if(do_after(user,(breakout_time), target = src)) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index dbc66b1899..827999d3d1 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -71,8 +71,7 @@ if(user.incapacitated()) to_chat(user, "You can't get out while you're restrained like this!") return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time to_chat(user, "You claw at the fabric of [src], trying to tear it open...") to_chat(loc, "Someone starts trying to break free of [src]!") if(!do_after(user, 200, target = src)) diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm index 41a12136ef..dac597e137 100644 --- a/code/game/objects/items/devices/dogborg_sleeper.dm +++ b/code/game/objects/items/devices/dogborg_sleeper.dm @@ -116,8 +116,7 @@ if(!hound) go_out(user) return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time if(user.a_intent == INTENT_HELP) return var/voracious = TRUE diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 3ea27c84bb..9e9596e8d2 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -121,8 +121,7 @@ update_icon() /obj/machinery/implantchair/container_resist(mob/living/user) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") @@ -191,4 +190,4 @@ brainwash(C, objective) message_admins("[ADMIN_LOOKUPFLW(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") log_game("[key_name(user)] brainwashed [key_name(C)] with objective '[objective]'.") - return TRUE \ No newline at end of file + return TRUE diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 8b322d20cb..f9a5dedab0 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -133,8 +133,7 @@ remove_occupant(user) return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time if(user.mob_size <= MOB_SIZE_SMALL) to_chat(user, "You begin to try escaping the [src] and start fumbling for the lock switch... (This will take some time.)") to_chat(loc, "You see [user] attempting to unlock the [src]!") diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 5da04a6686..9b28e22028 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -506,8 +506,7 @@ if(opened) return if(ismovable(loc)) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time var/atom/movable/AM = loc AM.relay_container_resist(user, src) return @@ -516,8 +515,7 @@ return //okay, so the closet is either welded or locked... resist!!! - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("[src] begins to shake violently!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear banging from [src].") diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 79a7ce0519..6b58b3d600 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -106,8 +106,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an if(!locked) open() return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message(null, \ "You lean on the back of [src] and start pushing the tray open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 36539ae1e4..d0c9dd93e6 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -69,8 +69,7 @@ empty_pod() return if(!moving) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time to_chat(user, "You start trying to escape from the pod...") if(do_after(user, 600, target = src)) to_chat(user, "You manage to open the pod.") diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index f92cb987d0..6d5b18d637 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -47,8 +47,7 @@ to_chat(user, "[src]'s door won't budge!") /obj/machinery/abductor/experiment/container_resist(mob/living/user) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 1f9e4ccac3..e77d553da9 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -262,8 +262,7 @@ return occupant /obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user) - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the glass of [src]!", \ "You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 072e1e31b1..fa549460e1 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -27,7 +27,7 @@ /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should be directly set. This should only be checked using [CheckResistCooldown()]. var/last_resist = 0 /// How long we should wait before allowing another resist. This should only be manually modified using multipliers. - var/resist_cooldown = CLICK_CD_BREAKOUT + var/resist_cooldown = CLICK_CD_RESIST /** * Applies a delay to next_action before we can do our next action. diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8472c8bdae..eebbd72815 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -298,8 +298,7 @@ if(handcuffed) var/obj/item/restraints/O = src.get_item_by_slot(SLOT_HANDCUFFED) buckle_cd = O.breakouttime - changeNext_move(min(CLICK_CD_BREAKOUT, buckle_cd)) - last_special = world.time + min(CLICK_CD_BREAKOUT, buckle_cd) + last_resist = world.time visible_message("[src] attempts to unbuckle [p_them()]self!", \ "You attempt to unbuckle yourself... (This will take around [round(buckle_cd/600,1)] minute\s, and you need to stay still.)") if(do_after(src, buckle_cd, 0, target = src, required_mobility_flags = MOBILITY_RESIST)) @@ -327,12 +326,9 @@ "You extinguish yourself.") ExtinguishMob() -/mob/living/carbon/resist_restraints(ignore_delay = FALSE) +/mob/living/carbon/resist_restraints() var/obj/item/I = null var/type = 0 - if(!ignore_delay && (last_special > world.time)) - to_chat(src, "You don't have the energy to resist your restraints that fast!") - return if(handcuffed) I = handcuffed type = 1 @@ -340,12 +336,7 @@ I = legcuffed type = 2 if(I) - if(type == 1) - changeNext_move(min(CLICK_CD_BREAKOUT, I.breakouttime)) - last_special = world.time + CLICK_CD_BREAKOUT - if(type == 2) - changeNext_move(min(CLICK_CD_RANGE, I.breakouttime)) - last_special = world.time + CLICK_CD_RANGE + last_resist = world.time cuff_resist(I) /mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a2d53f6f0a..a7fbeaabcd 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -733,8 +733,7 @@ /mob/living/carbon/human/resist_restraints() if(wear_suit && wear_suit.breakouttime) - changeNext_move(CLICK_CD_BREAKOUT) - last_special = world.time + CLICK_CD_BREAKOUT + last_resist = world.time cuff_resist(wear_suit) else ..() diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 149ec5f0e3..d55521b6a8 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -90,8 +90,7 @@ else if(legcuffed) I = legcuffed if(I) - changeNext_move(CLICK_CD_BREAKOUT) - last_special = world.time + CLICK_CD_BREAKOUT + last_resist = world.time cuff_resist(I) /mob/living/carbon/monkey/proc/should_target(var/mob/living/L) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c7ed6e743d..3ec7283ccb 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -676,7 +676,7 @@ ..(pressure_difference, direction, pressure_resistance_prob_delta) /mob/living/can_resist() - return !((next_move > world.time) || !CHECK_MOBILITY(src, MOBILITY_RESIST)) + return !(CheckResistCooldown() || !CHECK_MOBILITY(src, MOBILITY_RESIST)) /// Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true. /mob/living/verb/resist() diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index 4a980a0436..9beb02d6c8 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -150,8 +150,7 @@ return if(busy) return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 76392c66e9..8d3bcf8de5 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -130,8 +130,7 @@ return if(busy) return - user.changeNext_move(CLICK_CD_BREAKOUT) - user.last_special = world.time + CLICK_CD_BREAKOUT + user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/modules/vore/eating/belly_obj.dm b/code/modules/vore/eating/belly_obj.dm index 50cdc32bf6..a367abb098 100644 --- a/code/modules/vore/eating/belly_obj.dm +++ b/code/modules/vore/eating/belly_obj.dm @@ -542,8 +542,6 @@ if (!(R in contents)) return // User is not in this belly - R.changeNext_move(CLICK_CD_BREAKOUT*0.5) - if(owner.stat) //If owner is stat (dead, KO) we can actually escape to_chat(R,"You attempt to climb out of \the [lowertext(name)]. (This will take around [escapetime/10] seconds.)") to_chat(owner,"Someone is attempting to climb out of your [lowertext(name)]!") From 0b98b0409b08ef44308cf23cb4122563abf32581 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:29:09 -0700 Subject: [PATCH 013/142] sigh --- code/_onclick/click.dm | 12 +++++---- code/_onclick/hud/alert.dm | 6 ++--- code/_onclick/item_attack.dm | 7 +++--- code/game/objects/items.dm | 11 +-------- code/game/objects/items/mop.dm | 4 +-- code/game/objects/items/signs.dm | 1 - code/game/objects/structures/grille.dm | 8 +++--- code/game/objects/structures/holosign.dm | 2 +- code/game/turfs/simulated/walls.dm | 11 +++++---- code/modules/mob/clickdelay.dm | 31 ++++++++++++++++++++++++ 10 files changed, 60 insertions(+), 33 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index f476d40a70..a9bc57d520 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -76,7 +76,7 @@ face_atom(A) - if(next_move > world.time) // in the year 2000... + if(!CheckActionCooldown()) return if(!modifiers["catcher"] && A.IsObscured()) @@ -108,8 +108,9 @@ if(W) W.melee_attack_chain(src, A, params) else - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE)) + return + DelayNextAction() UnarmedAttack(A) return @@ -122,8 +123,9 @@ if(W) W.melee_attack_chain(src, A, params) else - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE)) + return + DelayNextAction() UnarmedAttack(A, 1) else if(W) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 11531a701e..66c75bfb58 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -272,7 +272,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.changeNext_move(CLICK_CD_RESIST) + L.last_resist = world.time if(CHECK_MOBILITY(L, MOBILITY_MOVE)) return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt. @@ -600,7 +600,7 @@ so as to remain in compliance with the most up-to-date laws." var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.changeNext_move(CLICK_CD_RESIST) + L.last_resist = world.time if(CHECK_MOBILITY(L, MOBILITY_MOVE) && (L.last_special <= world.time)) return L.resist_restraints() @@ -608,7 +608,7 @@ so as to remain in compliance with the most up-to-date laws." var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.changeNext_move(CLICK_CD_RESIST) + L.last_resist = world.time if(L.last_special <= world.time) return L.resist_buckle() diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index bef06a69e9..f0667c71f1 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -21,6 +21,7 @@ return if(QDELETED(src) || QDELETED(target)) return + PostattackClickdelaySet(user, target)) afterattack(target, user, TRUE, params) /// Like melee_attack_chain but for ranged. @@ -41,6 +42,9 @@ /obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby! if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK) return TRUE + if(!PreatackClickdelayCheck(user, A)) + return TRUE + PreattackClickdelaySet(user, A) return FALSE //return TRUE to avoid calling attackby after this proc does stuff // No comment @@ -55,10 +59,7 @@ /mob/living/attackby(obj/item/I, mob/living/user, params, attackchain_flags, damage_multiplier) if(..()) return TRUE - I.attack_delay_done = FALSE //Should be set TRUE in pre_attacked_by() . = I.attack(src, user, attackchain_flags, damage_multiplier) - if(!I.attack_delay_done) //Otherwise, pre_attacked_by() should handle it. - user.changeNext_move(I.click_delay) /obj/item/proc/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 90e232938c..75115795c6 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -58,15 +58,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb /// How long, in deciseconds, this staggers for, if null it will autocalculate from w_class and force. Unlike total mass this supports 0 and negatives. var/stagger_force - /** - * Set FALSE and then checked at the end of on mob/living/attackby(), set TRUE on living/pre_attacked_by(). - * Should it be FALSE by the end of the item/attack(), that means the item overrode the standard attack behaviour - * and the user still needs the delay applied. We can't be using return values since that'll stop afterattack() from being triggered. - */ - var/attack_delay_done = FALSE - ///next_move click/attack delay of this item. - var/click_delay = CLICK_CD_MELEE - var/slot_flags = 0 //This is used to determine on which slots an item can fit. var/current_equipped_slot pass_flags = PASSTABLE @@ -1113,4 +1104,4 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb jostle_pain_mult = (!isnull(embedding["jostle_pain_mult"]) ? embedding["jostle_pain_mult"] : EMBEDDED_JOSTLE_PAIN_MULTIPLIER),\ pain_stam_pct = (!isnull(embedding["pain_stam_pct"]) ? embedding["pain_stam_pct"] : EMBEDDED_PAIN_STAM_PCT),\ embed_chance_turf_mod = (!isnull(embedding["embed_chance_turf_mod"]) ? embedding["embed_chance_turf_mod"] : EMBED_CHANCE_TURF_MOD)) - return TRUE \ No newline at end of file + return TRUE diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index 3a06c7d7fe..b420bfc002 100644 --- a/code/game/objects/items/mop.dm +++ b/code/game/objects/items/mop.dm @@ -58,7 +58,7 @@ if(T) user.visible_message("[user] cleans \the [T] with [src].", "You clean \the [T] with [src].") clean(T) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.do_attack_animation(T, used_item = src) if(istype(L)) L.adjustStaminaLossBuffered(stamusage) @@ -128,4 +128,4 @@ return ..() /obj/item/mop/advanced/cyborg - insertable = FALSE \ No newline at end of file + insertable = FALSE diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index cf7373b700..67bc28b2ea 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -40,4 +40,3 @@ user.visible_message("[user] waves around \the \"[label]\" sign.") else user.visible_message("[user] waves around blank sign.") - user.changeNext_move(CLICK_CD_MELEE) \ No newline at end of file diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 20151a0bdb..936b9248e8 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -103,7 +103,8 @@ . = ..() if(.) return - user.changeNext_move(CLICK_CD_MELEE) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return user.do_attack_animation(src, ATTACK_EFFECT_KICK) user.visible_message("[user] hits [src].", null, null, COMBAT_MESSAGE_RANGE) log_combat(user, src, "hit") @@ -111,8 +112,9 @@ take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_alien(mob/living/user) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] mangles [src].", null, null, COMBAT_MESSAGE_RANGE) if(!shock(user, 70)) take_damage(20, BRUTE, "melee", 1) @@ -134,7 +136,7 @@ . = . || (mover.pass_flags & PASSGRILLE) /obj/structure/grille/attackby(obj/item/W, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) add_fingerprint(user) if(istype(W, /obj/item/wirecutters)) if(!shock(user, 100)) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index c49159a992..8d2f7bcbf7 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -30,7 +30,7 @@ if(.) return user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) take_damage(5 , BRUTE, "melee", 1) /obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index b01a1df2c0..6ac3ca086b 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -113,12 +113,11 @@ return FALSE /turf/closed/wall/attack_paw(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) return attack_hand(user) - /turf/closed/wall/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return M.do_attack_animation(src) if((M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS)) playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) @@ -141,13 +140,15 @@ . = ..() if(.) return - user.changeNext_move(CLICK_CD_MELEE) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return to_chat(user, "You push the wall but nothing happens!") playsound(src, 'sound/weapons/genhit.ogg', 25, 1) add_fingerprint(user) /turf/closed/wall/attackby(obj/item/W, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index fa549460e1..513bafaa32 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -60,3 +60,34 @@ */ /mob/proc/CheckResistCooldown() return (world.time >= (last_resist + resist_cooldown)) + +/obj/item + // Standard clickdelay variables + /// Amount of time to check for from a mob's last attack, checked before an attack happens + var/preattack_cooldown_check = CLICK_CD_MELEE + /// Amount of time to delay a mob's next attack, added after an attack happens + var/postattack_cooldown_penalty = 0 + /// This item bypasses any click delay mods + var/clickdelay_mod_bypass = FALSE + /// This item checks clickdelay from a user's delayed next action variable rather than the last time they attacked. + var/clickdelay_from_next_action = FALSE + /// This item ignores next action delays. + var/clickdelay_ignores_next_action = FALSE + +/** + * Checks if a user's clickdelay is met for a standard attack + */ +/obj/item/proc/PreattackClickdelayCheck(mob/user, atom/target) + return user.CheckActionCooldown(action_cooldown_preattack, clickdelay_from_next_action, clickdelay_mod_bypass, clickdelay_ignores_next_action) + +/** + * Called if check is successful before the attack happens. + */ +/obj/item/proc/PreattackClickdelaySet(mob/user, atom/target) + user.DelayNextAction(0, FALSe, TRUE) + +/** + * Called after a successful attack to set a mob's clickdelay. + */ +/obj/item/proc/PostattackClickdelaySet(mob/user, atom/target) + user.DelayNextAction(postattack_cooldown_penalty, clickdelay_mod_bypass, FALSE) From 0c6368e3e791af9cf90c886618c2fb9d7354d1b2 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:34:16 -0700 Subject: [PATCH 014/142] e --- code/_onclick/item_attack.dm | 2 +- code/modules/mob/clickdelay.dm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index f0667c71f1..c26b35616f 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -21,7 +21,7 @@ return if(QDELETED(src) || QDELETED(target)) return - PostattackClickdelaySet(user, target)) + PostattackClickdelaySet(user, target) afterattack(target, user, TRUE, params) /// Like melee_attack_chain but for ranged. diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 513bafaa32..20eb72be4a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -73,6 +73,8 @@ var/clickdelay_from_next_action = FALSE /// This item ignores next action delays. var/clickdelay_ignores_next_action = FALSE + /// This item sets clickdelay in preattack rather than post attack. This means it's set in a melee attack even if the user doesn't bash or bop it against something. + var/clickdelay_set_on_pre_attack = FALSE /** * Checks if a user's clickdelay is met for a standard attack @@ -84,7 +86,8 @@ * Called if check is successful before the attack happens. */ /obj/item/proc/PreattackClickdelaySet(mob/user, atom/target) - user.DelayNextAction(0, FALSe, TRUE) + if(clickdelay_set_on_pre_attack) + user.DelayNextAction(0, FALSe, TRUE) /** * Called after a successful attack to set a mob's clickdelay. From 1a040dd2a695defd993c806ffc9192d40b4bbe10 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:44:17 -0700 Subject: [PATCH 015/142] changes --- code/_onclick/other_mobs.dm | 7 ++++++- code/game/machinery/dna_scanner.dm | 1 - code/game/machinery/gulag_teleporter.dm | 1 - code/game/machinery/hypnochair.dm | 1 - code/game/machinery/suit_storage_unit.dm | 1 - code/game/objects/effects/spiders.dm | 3 --- code/game/objects/items/bodybag.dm | 1 - code/game/objects/items/devices/dogborg_sleeper.dm | 1 - code/game/objects/items/implants/implantchair.dm | 1 - code/game/objects/items/pet_carrier.dm | 1 - code/game/objects/structures/crates_lockers/closets.dm | 2 -- code/game/objects/structures/morgue.dm | 1 - .../objects/structures/transit_tubes/transit_tube_pod.dm | 1 - .../modules/antagonists/abductor/machinery/experiment.dm | 1 - .../machinery/components/unary_devices/cryo.dm | 1 - code/modules/mob/clickdelay.dm | 9 +++++++++ code/modules/mob/living/living.dm | 2 ++ code/modules/paperwork/paperbin.dm | 3 ++- code/modules/reagents/reagent_containers/rags.dm | 2 +- code/modules/research/nanites/nanite_chamber.dm | 1 - code/modules/research/nanites/public_chamber.dm | 1 - 21 files changed, 20 insertions(+), 22 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 059f9d518e..7e74dc0e71 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -26,7 +26,12 @@ return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) - A.attack_hand(src) + if(!CheckActionCooldown(A.clickdelay_attack_hand_preattack_cooldown)) + if(A.clickdelay_attack_hand_is_action && A.clickdelay_attack_hand_set_preattack) + DelayNextAction() + A.attack_hand(src) + if(A.clickdelay_attack_hand_is_action && !A.clickdelay_attack_hand_set_preattack) + DelayNextAction() //Return TRUE to cancel other attack hand effects that respect it. /atom/proc/attack_hand(mob/user) diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index fc8513d6cd..6c5ea7d518 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -76,7 +76,6 @@ if(!locked) open_machine() return - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 0fcfe382d0..da64699dd4 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -101,7 +101,6 @@ The console is located at computer/gulag_teleporter.dm if(!locked) open_machine() return - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/hypnochair.dm b/code/game/machinery/hypnochair.dm index ff162b7788..64d60ac778 100644 --- a/code/game/machinery/hypnochair.dm +++ b/code/game/machinery/hypnochair.dm @@ -178,7 +178,6 @@ icon_state += "_occupied" /obj/machinery/hypnochair/container_resist(mob/living/user) - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(600)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 805018efae..97b4b0eaef 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -301,7 +301,6 @@ open_machine() dump_contents() return - user.last_resist = world.time user.visible_message("You see [user] kicking against the doors of [src]!", \ "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 785e20f586..a23e6811f5 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -252,7 +252,6 @@ /obj/structure/spider/cocoon/container_resist(mob/living/user) var/breakout_time = 600 - user.last_resist = world.time to_chat(user, "You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)") visible_message("You see something struggling and writhing in \the [src]!") if(do_after(user,(breakout_time), target = src)) @@ -260,8 +259,6 @@ return qdel(src) - - /obj/structure/spider/cocoon/Destroy() var/turf/T = get_turf(src) src.visible_message("\The [src] splits open.") diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 827999d3d1..428efe4abe 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -71,7 +71,6 @@ if(user.incapacitated()) to_chat(user, "You can't get out while you're restrained like this!") return - user.last_resist = world.time to_chat(user, "You claw at the fabric of [src], trying to tear it open...") to_chat(loc, "Someone starts trying to break free of [src]!") if(!do_after(user, 200, target = src)) diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm index dac597e137..d8abccb336 100644 --- a/code/game/objects/items/devices/dogborg_sleeper.dm +++ b/code/game/objects/items/devices/dogborg_sleeper.dm @@ -116,7 +116,6 @@ if(!hound) go_out(user) return - user.last_resist = world.time if(user.a_intent == INTENT_HELP) return var/voracious = TRUE diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 9e9596e8d2..b3c1f79e94 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -121,7 +121,6 @@ update_icon() /obj/machinery/implantchair/container_resist(mob/living/user) - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index f9a5dedab0..f2994c0b97 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -133,7 +133,6 @@ remove_occupant(user) return - user.last_resist = world.time if(user.mob_size <= MOB_SIZE_SMALL) to_chat(user, "You begin to try escaping the [src] and start fumbling for the lock switch... (This will take some time.)") to_chat(loc, "You see [user] attempting to unlock the [src]!") diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 9b28e22028..732b4db14f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -506,7 +506,6 @@ if(opened) return if(ismovable(loc)) - user.last_resist = world.time var/atom/movable/AM = loc AM.relay_container_resist(user, src) return @@ -515,7 +514,6 @@ return //okay, so the closet is either welded or locked... resist!!! - user.last_resist = world.time user.visible_message("[src] begins to shake violently!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear banging from [src].") diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 6b58b3d600..3c2f5ef49e 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -106,7 +106,6 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an if(!locked) open() return - user.last_resist = world.time user.visible_message(null, \ "You lean on the back of [src] and start pushing the tray open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index d0c9dd93e6..cf68341b2c 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -69,7 +69,6 @@ empty_pod() return if(!moving) - user.last_resist = world.time to_chat(user, "You start trying to escape from the pod...") if(do_after(user, 600, target = src)) to_chat(user, "You manage to open the pod.") diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index 6d5b18d637..de350db8ab 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -47,7 +47,6 @@ to_chat(user, "[src]'s door won't budge!") /obj/machinery/abductor/experiment/container_resist(mob/living/user) - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index e77d553da9..ad47a111c5 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -262,7 +262,6 @@ return occupant /obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user) - user.last_resist = world.time user.visible_message("You see [user] kicking against the glass of [src]!", \ "You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 20eb72be4a..cfbfdeeb3a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -61,6 +61,15 @@ /mob/proc/CheckResistCooldown() return (world.time >= (last_resist + resist_cooldown)) +/atom + // Standard clickdelay variables + /// Amount of time to check for from a mob's last attack to allow an attack_hand(). + var/clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE + /// Should we set last action before or after attack hand passes? + var/clickdelay_attack_hand_set_preattack = FALSE + /// Should we set last action for attack hand? + var/clickdelay_attack_hand_is_action = FALSE + /obj/item // Standard clickdelay variables /// Amount of time to check for from a mob's last attack, checked before an attack happens diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3ec7283ccb..695ee4fa5f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -687,10 +687,12 @@ return if(do_resist()) + last_resist = world.time changeNext_move(CLICK_CD_RESIST) /// The actual proc for resisting. Return TRUE to give clickdelay. /mob/living/proc/do_resist() + set waitfor = FALSE // some of these sleep. SEND_SIGNAL(src, COMSIG_LIVING_RESIST, src) //resisting grabs (as if it helps anyone...) // only works if you're not cuffed. diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index b8bcbedbbe..517a12029e 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -11,6 +11,8 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 8 + clickdelay_attack_hand_is_action = TRUE + clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE var/papertype = /obj/item/paper var/total_paper = 30 var/list/papers = list() @@ -64,7 +66,6 @@ /obj/item/paper_bin/attack_hand(mob/user) if(user.lying) return - user.changeNext_move(CLICK_CD_MELEE) if(bin_pen) var/obj/item/pen/P = bin_pen P.add_fingerprint(user) diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm index c6903ff7b4..1debfa7d8d 100644 --- a/code/modules/reagents/reagent_containers/rags.dm +++ b/code/modules/reagents/reagent_containers/rags.dm @@ -189,4 +189,4 @@ extinguish_efficiency = 5 action_speed = 15 damp_threshold = 0.8 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet. \ No newline at end of file + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet. diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index 9beb02d6c8..01513a0b41 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -150,7 +150,6 @@ return if(busy) return - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 8d3bcf8de5..b7a8db4080 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -130,7 +130,6 @@ return if(busy) return - user.last_resist = world.time user.visible_message("You see [user] kicking against the door of [src]!", \ "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") From b1ccccb322b0080f0def51a255bfd89c9a025f2f Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 18:51:16 -0700 Subject: [PATCH 016/142] more --- code/_onclick/ai.dm | 4 ---- code/_onclick/click.dm | 6 ------ code/_onclick/cyborg.dm | 6 +----- code/game/machinery/wishgranter.dm | 6 ++++-- code/game/objects/items/courtroom.dm | 4 ++-- code/modules/client/client_defines.dm | 3 +++ code/modules/client/client_procs.dm | 3 +++ code/modules/mob/clickdelay.dm | 3 --- 8 files changed, 13 insertions(+), 22 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 02cbd6bea5..948c0129ae 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -19,10 +19,6 @@ A.move_camera_by_click() /mob/living/silicon/ai/ClickOn(var/atom/A, params) - if(world.time <= next_click) - return - next_click = world.time + 1 - if(!can_interact_with(A)) return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index a9bc57d520..ec5cc09717 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -34,10 +34,6 @@ * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ /mob/proc/ClickOn( atom/A, params ) - if(world.time <= next_click) - return - next_click = world.time + world.tick_lag - if(check_click_intercept(params,A)) return @@ -272,7 +268,6 @@ var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling) if(C && C.chosen_sting) C.chosen_sting.try_to_sting(src,A) - next_click = world.time + 5 return swap_hand() @@ -345,7 +340,6 @@ var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling) if(C && C.chosen_sting) C.chosen_sting.try_to_sting(src,A) - next_click = world.time + 5 return ..() diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 9fcccedf1a..d825c10a95 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -7,10 +7,6 @@ */ /mob/living/silicon/robot/ClickOn(var/atom/A, var/params) - if(world.time <= next_click) - return - next_click = world.time + 1 - if(check_click_intercept(params,A)) return @@ -37,7 +33,7 @@ CtrlClickOn(A) return - if(next_move >= world.time) + if(!CheckActionCooldown()) return face_atom(A) // change direction to face what you clicked on diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index dcd86c9f24..a8446fd14a 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -31,7 +31,8 @@ user.dna.add_mutation(XRAY) user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(TK) - user.next_move_modifier *= 0.5 //half the delay between attacks! + user.last_action_mult *= 0.5 + user.next_action_mult *= 0.5 to_chat(user, "Things around you feel slower!") charges-- insisting = FALSE @@ -101,7 +102,8 @@ to_chat(user, "[killreward] materializes into your hands!") else to_chat(user, "[killreward] materializes onto the floor.") - user.next_move_modifier *= 0.8 //20% less delay between attacks! + user.last_action_mult *= 0.8 //20% less delay between attacks! + user.next_action_mult *= 0.8 to_chat(user, "Things around you feel slightly slower!") var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc) killwish.maxHealth = 1500 diff --git a/code/game/objects/items/courtroom.dm b/code/game/objects/items/courtroom.dm index c0e81ed3d5..13b83c9425 100644 --- a/code/game/objects/items/courtroom.dm +++ b/code/game/objects/items/courtroom.dm @@ -32,6 +32,6 @@ if(istype(I, /obj/item/gavelhammer)) playsound(loc, 'sound/items/gavel.ogg', 100, 1) user.visible_message("[user] strikes [src] with [I].") - user.changeNext_move(CLICK_CD_MELEE) + return TRUE else - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 7f1ba86ff5..ae48fddfb4 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -30,6 +30,9 @@ var/move_delay = 0 var/area = null + /// Last time we Click()ed. No clicking twice in one tick! + var/last_click = 0 + /////////////// //SOUND STUFF// /////////////// diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 8ae002dd2f..b1ded0cd1b 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -772,6 +772,9 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) ip_intel = res.intel /client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE) + if(last_click > world.time - world.tick_lag) + return + last_click = world.time var/ab = FALSE var/list/L = params2list(params) if (object && object == middragatom && L["left"]) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index cfbfdeeb3a..b83f8c8405 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -8,9 +8,6 @@ /mob // CLICKDELAY AND RELATED - /// Last time we clicked. No clicking twice in one tick, please! This should be directly set and checked. - var/last_click = 0 - /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()]. var/last_action = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. From 910869d6bf99683a3a3bc0fb6e89a0eaf8126e0f Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 19:44:12 -0700 Subject: [PATCH 017/142] more --- code/_onclick/click.dm | 13 ++++----- code/_onclick/hud/action_button.dm | 3 -- code/_onclick/hud/screen_objects.dm | 12 +------- code/_onclick/item_attack.dm | 9 ++---- code/game/machinery/wishgranter.dm | 6 ++-- .../clothing/glasses/disablerglasses.dm | 6 ++-- code/modules/clothing/gloves/miscellaneous.dm | 4 +-- code/modules/mob/clickdelay.dm | 28 +++++++++++-------- .../simple_animal/guardian/types/standard.dm | 2 +- .../reagents/reagent_containers/spray.dm | 4 ++- code/modules/spells/spell.dm | 5 ---- code/modules/station_goals/dna_vault.dm | 2 +- modular_citadel/code/_onclick/click.dm | 4 +-- 13 files changed, 41 insertions(+), 57 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index ec5cc09717..7ea0098661 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -33,7 +33,7 @@ * item/afterattack(atom,user,adjacent,params) - used both ranged and adjacent * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ -/mob/proc/ClickOn( atom/A, params ) +/mob/proc/ClickOn( atom/A, params) if(check_click_intercept(params,A)) return @@ -83,7 +83,7 @@ return M.click_action(A,src,params) if(restrained()) - changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow + DelayNextAction(CLICK_CD_HANDCUFFED) RestrainedClickOn(A) return @@ -104,9 +104,7 @@ if(W) W.melee_attack_chain(src, A, params) else - if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE)) - return - DelayNextAction() + DelayNextAction(ismob(A)? 8 : 0) UnarmedAttack(A) return @@ -119,9 +117,8 @@ if(W) W.melee_attack_chain(src, A, params) else - if(ismob(A) && !CheckActionCooldown(CLICK_CD_MELEE)) - return - DelayNextAction() + DelayNextAction(ismob(A)? 8 : 0) + DelayNextAction(ismob(A)? 8 : 0) UnarmedAttack(A, 1) else if(W) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 0ed3a9cf26..8a66374029 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -56,9 +56,6 @@ if(id && usr.client) //try to (un)remember position usr.client.prefs.action_buttons_screen_locs["[name]_[id]"] = locked ? moved : null return TRUE - if(usr.next_click > world.time) - return - usr.next_click = world.time + 1 linked_action.Trigger() return TRUE diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 0088dde15a..9d810cdc07 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -47,17 +47,7 @@ name = "swap hand" /obj/screen/swap_hand/Click() - // At this point in client Click() code we have passed the 1/10 sec check and little else - // We don't even know if it's a middle click - if(world.time <= usr.next_move) - return 1 - - if(usr.incapacitated()) - return 1 - - if(ismob(usr)) - var/mob/M = usr - M.swap_hand() + usr.swap_hand() return 1 /obj/screen/craft diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index c26b35616f..8bbefff9a2 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -21,7 +21,6 @@ return if(QDELETED(src) || QDELETED(target)) return - PostattackClickdelaySet(user, target) afterattack(target, user, TRUE, params) /// Like melee_attack_chain but for ranged. @@ -81,6 +80,7 @@ user.do_attack_animation(M) M.attacked_by(src, user, attackchain_flags, damage_multiplier) + PostattackClickdelaySet(user, M) log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") add_fingerprint(user) @@ -96,8 +96,8 @@ if(item_flags & NOBLUDGEON) return user.do_attack_animation(O) - if(!O.attacked_by(src, user)) - user.changeNext_move(click_delay) + O.attacked_by(src, user) + PostattackClickdelaySet(user, O) var/weight = getweight(user, STAM_COST_ATTACK_OBJ_MULT) if(weight) user.adjustStaminaLossBuffered(weight)//CIT CHANGE - makes attacking things cause stamina loss @@ -110,12 +110,9 @@ var/bad_trait var/stamloss = user.getStaminaLoss() - 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 totitemdamage *= 1 - penalty - next_move_mult += penalty*STAM_CRIT_ITEM_ATTACK_DELAY - user.changeNext_move(I.click_delay*next_move_mult) if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) bad_trait = SKILL_COMBAT_MODE //blacklist combat skills. diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index a8446fd14a..10b56b3945 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -31,8 +31,7 @@ user.dna.add_mutation(XRAY) user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(TK) - user.last_action_mult *= 0.5 - user.next_action_mult *= 0.5 + user.action_cooldown_mod = 0.5 to_chat(user, "Things around you feel slower!") charges-- insisting = FALSE @@ -102,8 +101,7 @@ to_chat(user, "[killreward] materializes into your hands!") else to_chat(user, "[killreward] materializes onto the floor.") - user.last_action_mult *= 0.8 //20% less delay between attacks! - user.next_action_mult *= 0.8 + user.action_cooldown_mod = 0.5 to_chat(user, "Things around you feel slightly slower!") var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc) killwish.maxHealth = 1500 diff --git a/code/modules/clothing/glasses/disablerglasses.dm b/code/modules/clothing/glasses/disablerglasses.dm index a46e4c8339..51fb1cec87 100644 --- a/code/modules/clothing/glasses/disablerglasses.dm +++ b/code/modules/clothing/glasses/disablerglasses.dm @@ -4,7 +4,9 @@ var/beamtype = /obj/item/projectile/beam/disabler //change for adminbus /obj/item/clothing/glasses/hud/security/sunglasses/disablers/ranged_attack(mob/living/carbon/human/user,atom/A, params) - user.changeNext_move(CLICK_CD_RANGE) + if(!user.CheckActionCooldown(CLICK_CD_RANGE)) + return + user.last_action = world.time var/obj/item/projectile/beam/disabler/LE = new beamtype( loc ) playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1) LE.firer = src @@ -12,4 +14,4 @@ LE.preparePixelProjectile(A, src, params) LE.fire() return TRUE - //shamelessly copied \ No newline at end of file + //shamelessly copied diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index a8017631bd..f6706eb3de 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -105,7 +105,7 @@ return var/mob/living/M = loc - M.changeNext_move(CLICK_CD_RAPID) + M.SetNextAction(CLICK_CD_RAPID) if(warcry) M.say("[warcry]", ignore_spam = TRUE, forced = TRUE) @@ -135,7 +135,7 @@ if(target.stat != CONSCIOUS) //Can't hug people who are dying/dead return FALSE else - M.changeNext_move(CLICK_CD_RAPID) + M.SetNextAction(CLICK_CD_RAPID) return FALSE diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index b83f8c8405..7c2c639b5a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -12,14 +12,12 @@ var/last_action = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. var/next_action = 0 - /// Simple modification variable added to next action on adjust. This should only be manually modified via addition. - var/next_action_adjust = 0 - /// Simple modification variable multiplied to next action modifier on adjust. This should only be manually modified using multipliers. - var/next_action_mult = 1 - /// Simple modification variable added to amount when checking time since last action using [CheckActionCooldown()]. This should only be manually modified via addition. - var/last_action_adjust = 0 - /// Simple modification variable multiplied to amount when checking time since last action using [CheckActionCooldown()]. This should only be manually modified using multipliers. - var/last_action_mult = 1 + /// Simple modification variable multiplied to next action modifier on adjust and on checking time since last action using [CheckActionCooldown()]. + /// This should only be manually modified using multipliers. + var/action_cooldown_mod = 0.5 + /// Simple modification variable added to amounton adjust and on checking time since last action using [CheckActionCooldown()]. + /// This should only be manually modified via addition. + var/action_cooldown_adjust = 0 /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should be directly set. This should only be checked using [CheckResistCooldown()]. var/last_resist = 0 @@ -37,7 +35,15 @@ /mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE) if(considered_action) last_action = world.time - next_action = max(next_action, world.time + (ignore_mod? amount : (amount * next_action_mult + next_action_adjust))) + next_action = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + +/** + * Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can. + */ +/mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE) + if(considered_action) + last_action = world.time + next_action = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) /** * Checks if we can do another action. @@ -50,7 +56,7 @@ * * ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused. */ /mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE) - return (ignore_next_action || (world.time >= next_action)) && (world.time >= ((from_next_action? next_action : last_action) + max(0, ignore_mod? cooldown : (cooldown * last_action_mult + last_action_adjust)))) + return (ignore_next_action || (world.time >= next_action)) && (world.time >= ((from_next_action? next_action : last_action) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) /** * Checks if we can resist again. @@ -93,7 +99,7 @@ */ /obj/item/proc/PreattackClickdelaySet(mob/user, atom/target) if(clickdelay_set_on_pre_attack) - user.DelayNextAction(0, FALSe, TRUE) + user.DelayNextAction(0, FALSE, TRUE) /** * Called after a successful attack to set a mob's clickdelay. diff --git a/code/modules/mob/living/simple_animal/guardian/types/standard.dm b/code/modules/mob/living/simple_animal/guardian/types/standard.dm index 2285167df5..d7970daa29 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/standard.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/standard.dm @@ -3,7 +3,7 @@ melee_damage_lower = 20 melee_damage_upper = 20 obj_damage = 80 - next_move_modifier = 0.5 //attacks 50% faster + action_cooldown_mod = 0.5 //attacks 50% faster environment_smash = ENVIRONMENT_SMASH_WALLS playstyle_string = "As a standard type you have no special abilities, but take half damage and have powerful attack capable of smashing through walls." magic_fluff_string = "..And draw the Assistant, faceless and generic, but never to be underestimated." diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 7fea8250d9..9b25a80680 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -27,6 +27,8 @@ /obj/item/reagent_containers/spray/afterattack(atom/A, mob/user) . = ..() + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return if(istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics)) return @@ -50,7 +52,7 @@ spray(A) playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6) - user.changeNext_move(CLICK_CD_RANGE*2) + user.last_action = world.time user.newtonian_move(get_dir(A, user)) var/turf/T = get_turf(src) if(reagents.has_reagent(/datum/reagent/toxin/acid)) diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index 21552f7e87..57502e2cd5 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -56,11 +56,6 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th to_chat(caller, "[caller.ranged_ability.name] has been disabled.") caller.ranged_ability.remove_ranged_ability() return TRUE //TRUE for failed, FALSE for passed. - if(ranged_clickcd_override >= 0) - ranged_ability_user.next_click = world.time + ranged_clickcd_override - else - ranged_ability_user.next_click = world.time + CLICK_CD_CLICK_ABILITY - ranged_ability_user.face_atom(A) return FALSE /obj/effect/proc_holder/proc/add_ranged_ability(mob/living/user, msg, forced) diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 6c21456e63..64a1de8857 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -279,5 +279,5 @@ H.add_movespeed_modifier(/datum/movespeed_modifier/dna_vault_speedup) if(VAULT_QUICK) to_chat(H, "Your arms move as fast as lightning.") - H.next_move_modifier = 0.5 + H.action_cooldown_mod = 0.5 power_lottery[H] = list() diff --git a/modular_citadel/code/_onclick/click.dm b/modular_citadel/code/_onclick/click.dm index 004cc2fe80..b6e0afa8b6 100644 --- a/modular_citadel/code/_onclick/click.dm +++ b/modular_citadel/code/_onclick/click.dm @@ -5,7 +5,7 @@ face_atom(A) - if(next_move > world.time) // in the year 2000... + if(!CheckActionCooldown()) return if(!modifiers["catcher"] && A.IsObscured()) @@ -16,7 +16,7 @@ return M.click_action(A,src,params) if(restrained()) - changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow + DelayNextAction(CLICK_CD_HANDCUFFED) RestrainedClickOn(A) return From 55f8e37544b347e6798e06d42fc361f06056def3 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Jul 2020 20:26:11 -0700 Subject: [PATCH 018/142] sigh --- code/_onclick/click.dm | 6 ++---- code/game/objects/obj_defense.dm | 6 ++++-- code/game/objects/structures/manned_turret.dm | 4 ---- code/game/objects/structures/tables_racks.dm | 3 ++- code/game/objects/structures/watercloset.dm | 4 ++-- code/game/objects/structures/window.dm | 6 +++--- code/game/turfs/simulated/wall/reinf_walls.dm | 4 +++- code/modules/antagonists/swarmer/swarmer.dm | 3 ++- code/modules/mob/living/brain/brain_item.dm | 2 +- .../simple_animal/hostile/megafauna/blood_drunk_miner.dm | 2 +- .../particle_accelerator/particle_accelerator.dm | 1 - modular_citadel/code/_onclick/click.dm | 6 ++---- 12 files changed, 22 insertions(+), 25 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 7ea0098661..2d264a3561 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -104,7 +104,6 @@ if(W) W.melee_attack_chain(src, A, params) else - DelayNextAction(ismob(A)? 8 : 0) UnarmedAttack(A) return @@ -117,13 +116,13 @@ if(W) W.melee_attack_chain(src, A, params) else - DelayNextAction(ismob(A)? 8 : 0) DelayNextAction(ismob(A)? 8 : 0) UnarmedAttack(A, 1) else if(W) W.ranged_attack_chain(src, A, params) else + DelayNextAction(ismob(A)? 8 : 0) RangedAttack(A,params) //Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it @@ -230,8 +229,7 @@ in human click code to allow glove touches only at melee range. */ /mob/proc/UnarmedAttack(atom/A, proximity_flag) - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(ismob(A)? 8 : 0) return /* diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 1203c5a1df..0c07eb3431 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -105,9 +105,11 @@ /obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) //used by attack_alien, attack_animal, and attack_slime if(SEND_SIGNAL(src, COMSIG_OBJ_ATTACK_GENERIC, user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration) & COMPONENT_STOP_GENERIC_ATTACK) return FALSE + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - return take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user), armor_penetration) + . = take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user), armor_penetration) + user.DelayNextAction() /obj/attack_alien(mob/living/carbon/alien/humanoid/user) if(attack_generic(user, 60, BRUTE, "melee", 0)) diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index 79489e4ae6..e8fbafa42b 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -198,10 +198,6 @@ /obj/item/gun_control/CanItemAutoclick() return TRUE -/obj/item/gun_control/attack_obj(obj/O, mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - O.attacked_by(src, user) - /obj/item/gun_control/attack(mob/living/M, mob/living/user) M.lastattacker = user.real_name M.lastattackerckey = user.ckey diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 777be608b5..15e1bb7030 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -635,6 +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 /obj/structure/rack/examine(mob/user) . = ..() @@ -682,7 +684,6 @@ return if(CHECK_MULTIPLE_BITFIELDS(user.mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) || user.get_num_legs() < 2) return - user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_KICK) user.visible_message("[user] kicks [src].", null, null, COMBAT_MESSAGE_RANGE) take_damage(rand(4,8), BRUTE, "melee", 1) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index acb88fbb1d..30c4696af3 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -13,6 +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 /obj/structure/toilet/Initialize() . = ..() @@ -31,13 +33,11 @@ if(.) return if(swirlie) - user.changeNext_move(CLICK_CD_MELEE) playsound(src.loc, "swing_hit", 25, 1) swirlie.visible_message("[user] slams the toilet seat onto [swirlie]'s head!", "[user] slams the toilet seat onto your head!", "You hear reverberating porcelain.") swirlie.adjustBruteLoss(5) else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) - user.changeNext_move(CLICK_CD_MELEE) var/mob/living/GM = user.pulling if(user.grab_state >= GRAB_AGGRESSIVE) if(GM.loc != get_turf(src)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 17031a51df..31f6df009d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -40,6 +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 /// Electrochromatic status var/electrochromatic_status = NOT_ELECTROCHROMATIC @@ -157,7 +159,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) return 1 /obj/structure/window/attack_tk(mob/user) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.visible_message("Something knocks on [src].") add_fingerprint(user) playsound(src, 'sound/effects/Glassknock.ogg', 50, 1) @@ -173,7 +175,6 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) return if(!can_be_reached(user)) return - user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] knocks on [src].") add_fingerprint(user) playsound(src, 'sound/effects/Glassknock.ogg', 50, 1) @@ -842,7 +843,6 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) return add_fingerprint(user) if(user.a_intent != INTENT_HARM) - user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] knocks on [src].") playsound(src, "pageturn", 50, 1) else diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index a1d2c1757c..6b41f41763 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -36,7 +36,8 @@ new /obj/item/stack/sheet/metal(src, 2) /turf/closed/wall/r_wall/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) + if(!M.CheckActionCooldown()) + return M.do_attack_animation(src) if(!M.environment_smash) return @@ -46,6 +47,7 @@ else playsound(src, 'sound/effects/bang.ogg', 50, 1) to_chat(M, "This wall is far too strong for you to destroy.") + M.DelayNextAction() /turf/closed/wall/r_wall/try_destroy(obj/item/I, mob/user, turf/T) if(istype(I, /obj/item/pickaxe/drill/jackhammer)) diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index d0e36394ab..cef4fb2d62 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -158,10 +158,11 @@ face_atom(A) if(!isturf(loc)) return - if(next_move > world.time) + if(!CheckActionCooldown()) return if(!A.Adjacent(src)) return + DelayNextAction() A.swarmer_act(src) /atom/proc/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 4fda02317e..add379a9c1 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -102,7 +102,7 @@ to_chat(brainmob, "You feel slightly disoriented. That's normal when you're just a brain.") /obj/item/organ/brain/attackby(obj/item/O, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) if(brainmob) O.attack(brainmob, user) //Oh noooeeeee diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 3ef4ef9be9..edfabca7e7 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -70,7 +70,7 @@ Difficulty: Medium /obj/item/melee/transforming/cleaving_saw/miner/attack(mob/living/target, mob/living/carbon/human/user) target.add_stun_absorption("miner", 10, INFINITY) - ..() + . = ..() target.stun_absorption -= "miner" /obj/item/projectile/kinetic/miner diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index e33116b02c..528a3abb8b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -103,7 +103,6 @@ did_something = TRUE if(did_something) - user.changeNext_move(CLICK_CD_MELEE) update_state() update_icon() return diff --git a/modular_citadel/code/_onclick/click.dm b/modular_citadel/code/_onclick/click.dm index b6e0afa8b6..2b48d5474a 100644 --- a/modular_citadel/code/_onclick/click.dm +++ b/modular_citadel/code/_onclick/click.dm @@ -38,8 +38,7 @@ if(W) W.rightclick_melee_attack_chain(src, A, params) else - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(ismob(A)? 8 : 0) if(!AltUnarmedAttack(A)) UnarmedAttack(A) return @@ -53,8 +52,7 @@ if(W) W.rightclick_melee_attack_chain(src, A, params) else - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(ismob(A)? 8 : 0) if(!AltUnarmedAttack(A,1)) UnarmedAttack(A,1) else From ae83a6df0242bdece63b67df183cff21cf2fba38 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Jul 2020 19:51:17 -0700 Subject: [PATCH 019/142] fix --- code/_onclick/hud/alert.dm | 12 ++++----- code/modules/mob/clickdelay.dm | 26 ++++++++++++++++--- code/modules/mob/living/carbon/carbon.dm | 10 +++---- code/modules/mob/living/carbon/human/human.dm | 2 +- .../mob/living/carbon/monkey/combat.dm | 2 +- code/modules/mob/living/living.dm | 13 +++++----- 6 files changed, 38 insertions(+), 27 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 66c75bfb58..9182360c5d 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -272,7 +272,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.last_resist = world.time + L.MarkResistTime() if(CHECK_MOBILITY(L, MOBILITY_MOVE)) return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt. @@ -600,17 +600,15 @@ so as to remain in compliance with the most up-to-date laws." var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.last_resist = world.time - if(CHECK_MOBILITY(L, MOBILITY_MOVE) && (L.last_special <= world.time)) - return L.resist_restraints() + L.MarkResistTime() + return L.resist_restraints() /obj/screen/alert/restrained/buckled/Click() var/mob/living/L = usr if(!istype(L) || !L.can_resist()) return - L.last_resist = world.time - if(L.last_special <= world.time) - return L.resist_buckle() + L.MarkResistTime() + return L.resist_buckle() // PRIVATE = only edit, use, or override these if you're editing the system as a whole diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 7c2c639b5a..6f181eaf64 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -8,21 +8,28 @@ /mob // CLICKDELAY AND RELATED + // Generic clickdelay - Hybrid time-since-last-attack and time-to-next-attack system. + // next_action is a hard cooldown, as Click()s will not pass unless it is passed. + // last_action is not a hard cooldown and different items can check for different delays. /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()]. var/last_action = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. var/next_action = 0 /// Simple modification variable multiplied to next action modifier on adjust and on checking time since last action using [CheckActionCooldown()]. /// This should only be manually modified using multipliers. - var/action_cooldown_mod = 0.5 - /// Simple modification variable added to amounton adjust and on checking time since last action using [CheckActionCooldown()]. + var/action_cooldown_mod = 1 + /// Simple modification variable added to amount on adjust and on checking time since last action using [CheckActionCooldown()]. /// This should only be manually modified via addition. var/action_cooldown_adjust = 0 - /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should be directly set. This should only be checked using [CheckResistCooldown()]. + // Resisting - While resisting will give generic clickdelay, it is also on its own resist delay system. However, resisting does not check generic movedelay. + // Resist cooldown should only be set at the start of a resist chain - whether this is clicking an alert button, pressing or hotkeying the resist button, or moving to resist out of a locker. + /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should only be set using [MarkResistTime()]. This should only be checked using [CheckResistCooldown()]. var/last_resist = 0 /// How long we should wait before allowing another resist. This should only be manually modified using multipliers. var/resist_cooldown = CLICK_CD_RESIST + /// Minimum world time for another resist. + var/next_resist = 0 /** * Applies a delay to next_action before we can do our next action. @@ -62,7 +69,18 @@ * Checks if we can resist again. */ /mob/proc/CheckResistCooldown() - return (world.time >= (last_resist + resist_cooldown)) + return (world.time >= next_resist) + +/** + * Mark the last resist as now. + * + * @params + * * extra_cooldown - Extra cooldown to apply to next_resist. Defaults to this mob's resist_cooldown. + * * override - Defaults to FALSE - if TRUE, extra_cooldown will replace the old next_resist even if the old is longer. + */ +/mob/proc/MarkResistTime(extra_cooldown = resist_cooldown, override = FALSE) + last_resist = world.time + next_resist = override? (world.time + extra_cooldown) : max(next_resist, world.time + extra_cooldown) /atom // Standard clickdelay variables diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index eebbd72815..eed93ec78b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -292,13 +292,11 @@ return if(restrained()) // too soon. - if(last_special > world.time) - return var/buckle_cd = 600 if(handcuffed) var/obj/item/restraints/O = src.get_item_by_slot(SLOT_HANDCUFFED) buckle_cd = O.breakouttime - last_resist = world.time + MarkResistTime() visible_message("[src] attempts to unbuckle [p_them()]self!", \ "You attempt to unbuckle yourself... (This will take around [round(buckle_cd/600,1)] minute\s, and you need to stay still.)") if(do_after(src, buckle_cd, 0, target = src, required_mobility_flags = MOBILITY_RESIST)) @@ -312,14 +310,12 @@ buckled.user_unbuckle_mob(src,src) /mob/living/carbon/resist_fire() - if(last_special > world.time) - return fire_stacks -= 5 DefaultCombatKnockdown(60, TRUE, TRUE) spin(32,2) visible_message("[src] rolls on the floor, trying to put [p_them()]self out!", \ "You stop, drop, and roll!") - last_special = world.time + 30 + MarkResistCooldown(30) sleep(30) if(fire_stacks <= 0) visible_message("[src] has successfully extinguished [p_them()]self!", \ @@ -336,7 +332,7 @@ I = legcuffed type = 2 if(I) - last_resist = world.time + MarkResistTime() cuff_resist(I) /mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a7fbeaabcd..9464670884 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -733,7 +733,7 @@ /mob/living/carbon/human/resist_restraints() if(wear_suit && wear_suit.breakouttime) - last_resist = world.time + MarkResistTime() cuff_resist(wear_suit) else ..() diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index d55521b6a8..03e9c90b1c 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -90,7 +90,7 @@ else if(legcuffed) I = legcuffed if(I) - last_resist = world.time + MarkResistTime() cuff_resist(I) /mob/living/carbon/monkey/proc/should_target(var/mob/living/L) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 695ee4fa5f..6cd0bd7d4f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -687,10 +687,10 @@ return if(do_resist()) - last_resist = world.time + MarkResistTime() changeNext_move(CLICK_CD_RESIST) -/// The actual proc for resisting. Return TRUE to give clickdelay. +/// The actual proc for resisting. Return TRUE to give CLICK_CD_RESIST clickdelay. /mob/living/proc/do_resist() set waitfor = FALSE // some of these sleep. SEND_SIGNAL(src, COMSIG_LIVING_RESIST, src) @@ -703,7 +703,7 @@ return old_gs? TRUE : FALSE // unbuckling yourself. stops the chain if you try it. - if(buckled && last_special <= world.time) + if(buckled) log_combat(src, buckled, "resisted buckle") return resist_buckle() @@ -735,10 +735,9 @@ changeNext_move(CLICK_CD_MELEE) return FALSE - if(last_special <= world.time) - resist_restraints() //trying to remove cuffs. - // DO NOT GIVE CLICKDELAY - last_special handles this. - return FALSE + resist_restraints() //trying to remove cuffs. + // DO NOT GIVE CLICKDELAY - last_special handles this. + return FALSE /// Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly. /mob/proc/attempt_resist_grab(moving_resist, forced, log = TRUE) From 6ab250dd038a7a9fa0732d522bf59002e318f4b2 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 10:13:50 -0700 Subject: [PATCH 020/142] sigh --- code/_onclick/ai.dm | 2 +- code/_onclick/click.dm | 27 ++++++---- code/_onclick/cyborg.dm | 2 +- code/modules/mob/clickdelay.dm | 60 +++++++++++++++++++---- code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/living_defines.dm | 1 - 6 files changed, 71 insertions(+), 23 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 948c0129ae..79058f7b19 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -70,7 +70,7 @@ CtrlClickOn(A) return - if(world.time <= next_move) + if(!CheckActionCooldown(immediate = TRUE)) return if(aicamera.in_camera_mode) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 2d264a3561..c909ce03d8 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -10,7 +10,7 @@ /atom/Click(location,control,params) if(flags_1 & INITIALIZED_1) SEND_SIGNAL(src, COMSIG_CLICK, location, control, params, usr) - usr.ClickOn(src, params) + usr.CommonClickOn(src, params) /atom/DblClick(location,control,params) if(flags_1 & INITIALIZED_1) @@ -20,6 +20,21 @@ if(flags_1 & INITIALIZED_1) usr.MouseWheelOn(src, delta_x, delta_y, params) +/** + * Common mob click code + */ +/mob/proc/CommonClickOn(atom/A, params) + set waitfor = FALSE // oh no you don't + if(mob_transforming) + return + if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) + return + if(ClickOn(A, params)) + FlushLastAction() + else + DiscardLastAction() + + /* Standard mob ClickOn() Handles exceptions: Buildmode, middle click, modified clicks, mech actions @@ -37,12 +52,6 @@ if(check_click_intercept(params,A)) return - if(mob_transforming) - return - - if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) - return - var/list/modifiers = params2list(params) if(modifiers["shift"] && modifiers["middle"]) ShiftMiddleClickOn(A) @@ -72,7 +81,7 @@ face_atom(A) - if(!CheckActionCooldown()) + if(!CheckActionCooldown(immediate = TRUE)) return if(!modifiers["catcher"] && A.IsObscured()) @@ -85,7 +94,7 @@ if(restrained()) DelayNextAction(CLICK_CD_HANDCUFFED) RestrainedClickOn(A) - return + return TRUE if(in_throw_mode) throw_item(A) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index d825c10a95..c9e53fc10e 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -33,7 +33,7 @@ CtrlClickOn(A) return - if(!CheckActionCooldown()) + if(!CheckActionCooldown(immediate = TRUE)) return face_atom(A) // change direction to face what you clicked on diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 6f181eaf64..82b0e851af 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -13,8 +13,18 @@ // last_action is not a hard cooldown and different items can check for different delays. /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()]. var/last_action = 0 + /** + * The difference between the above and this is this is set immediately before even the pre-attack begins to ensure clickdelay is respected. + * Then, it is flushed or discarded using [FlushLastAttack()] or [DiscardLastAttack()] respectively. + */ + + var/last_action_immediate = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. var/next_action = 0 + /// Ditto + var/next_action_immediate = 0 + /// Default clickdelay for an UnarmedAttack() that successfully passes. Respects action_cooldown_mod. + var/unarmed_attack_speed = CLICK_CD_MELEE /// Simple modification variable multiplied to next action modifier on adjust and on checking time since last action using [CheckActionCooldown()]. /// This should only be manually modified using multipliers. var/action_cooldown_mod = 1 @@ -24,11 +34,14 @@ // Resisting - While resisting will give generic clickdelay, it is also on its own resist delay system. However, resisting does not check generic movedelay. // Resist cooldown should only be set at the start of a resist chain - whether this is clicking an alert button, pressing or hotkeying the resist button, or moving to resist out of a locker. - /// Special clickdelay variable for resisting. Last time we did a special action like resisting. This should only be set using [MarkResistTime()]. This should only be checked using [CheckResistCooldown()]. + /* + * Special clickdelay variable for resisting. Last time we did a special action like resisting. This should only be set using [MarkResistTime()]. + * Use [CheckResistCooldown()] to check cooldowns, this should only be used for the resist action bar visual. + */ var/last_resist = 0 /// How long we should wait before allowing another resist. This should only be manually modified using multipliers. var/resist_cooldown = CLICK_CD_RESIST - /// Minimum world time for another resist. + /// Minimum world time for another resist. This should only be checked using [CheckResistCooldown()]. var/next_resist = 0 /** @@ -38,19 +51,30 @@ * * amount - Amount to delay by * * ignore_mod - ignores next action adjust and mult * * considered_action - Defaults to TRUE - If TRUE, sets last_action to world.time. + * * immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack. */ -/mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE) +/mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) if(considered_action) - last_action = world.time - next_action = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + (immediate? last_action_immediate : last_action) = world.time + (immediate? next_action_immediate : next_action) = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + +/** + * Get estimated time of next attack. + */ +/mob/proc/EstimatedNextActionTime() + var/attack_speed = unarmed_attack_speed + var/obj/item/I = get_active_held_item() + if(I) + attack_speed = I.attack_speed + return max(next_action, last_action + attack_speed) /** * Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can. */ -/mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE) +/mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) if(considered_action) - last_action = world.time - next_action = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + (immediate? last_action_immediate : last_action) = world.time + (immediate? next_action_immediate : next_action) = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) /** * Checks if we can do another action. @@ -61,9 +85,25 @@ * * from_next_action - Defaults to FALSE. Should we check from the tail end of next_action instead of last_action? * * ignore_mod - Defaults to FALSE. Ignore all adjusts and multipliers. Do not use this unless you know what you are doing and have a good reason. * * ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused. + * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. */ -/mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE) - return (ignore_next_action || (world.time >= next_action)) && (world.time >= ((from_next_action? next_action : last_action) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) +/mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) + return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ + (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) + +/** + * Flushes last_action and next_action + */ +/mob/proc/FlushCurrentAction() + last_action = last_action_immediate + next_action = next_action_immediate + +/** + * Discards last_action and next_action + */ +/mob/proc/DiscardCurrentAction() + last_action_immediate = last_action + next_action_immediate = next_action /** * Checks if we can resist again. diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6cd0bd7d4f..a4a800e9c4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -736,7 +736,7 @@ return FALSE resist_restraints() //trying to remove cuffs. - // DO NOT GIVE CLICKDELAY - last_special handles this. + // DO NOT GIVE CLICKDELAY return FALSE /// Proc to resist a grab. moving_resist is TRUE if this began by someone attempting to move. Return FALSE if still grabbed/failed to break out. Use this instead of resist_grab() directly. diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index b037221e2c..5495d37297 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -53,7 +53,6 @@ var/hallucination = 0 //Directly affects how long a mob will hallucinate for - var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out. var/timeofdeath = 0 //Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects. From 984796b8c6b2cd6097cf8fec2c4d94b484eb5058 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 10:46:52 -0700 Subject: [PATCH 021/142] sigh --- code/__DEFINES/_flags/_flags.dm | 8 ----- code/__DEFINES/_flags/return_values.dm | 17 ++++++++++ code/__DEFINES/misc/return_values.dm | 3 -- code/_onclick/click.dm | 6 ++-- code/_onclick/cyborg.dm | 4 +-- .../_onclick/hud/screen_objects}/sprint.dm | 0 .../_onclick/hud/screen_objects}/stamina.dm | 0 .../_onclick/hud/screen_objects/vore.dm | 0 code/_onclick/item_attack.dm | 34 +++++++++---------- .../click.dm => code/_onclick/right_click.dm | 2 -- .../_onclick/right_item_attack.dm | 0 .../_onclick/right_other_mobs.dm | 0 code/modules/cargo/coupon.dm | 1 + code/modules/mob/clickdelay.dm | 23 ++++--------- code/modules/power/lighting.dm | 4 +-- code/modules/projectiles/gun.dm | 3 +- tgstation.dme | 11 +++--- 17 files changed, 53 insertions(+), 63 deletions(-) create mode 100644 code/__DEFINES/_flags/return_values.dm delete mode 100644 code/__DEFINES/misc/return_values.dm rename {modular_citadel/code/_onclick/hud => code/_onclick/hud/screen_objects}/sprint.dm (100%) rename {modular_citadel/code/_onclick/hud => code/_onclick/hud/screen_objects}/stamina.dm (100%) rename modular_citadel/code/_onclick/hud/screen_objects.dm => code/_onclick/hud/screen_objects/vore.dm (100%) rename modular_citadel/code/_onclick/click.dm => code/_onclick/right_click.dm (95%) rename modular_citadel/code/_onclick/item_attack.dm => code/_onclick/right_item_attack.dm (100%) rename modular_citadel/code/_onclick/other_mobs.dm => code/_onclick/right_other_mobs.dm (100%) diff --git a/code/__DEFINES/_flags/_flags.dm b/code/__DEFINES/_flags/_flags.dm index 3a31eebb19..0734feaa42 100644 --- a/code/__DEFINES/_flags/_flags.dm +++ b/code/__DEFINES/_flags/_flags.dm @@ -138,14 +138,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL | MOBILITY_RESIST) #define MOBILITY_FLAGS_ANY_INTERACTION (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_UI | MOBILITY_STORAGE) -// melee_attack_chain() attackchain_flags -/// The attack is from a parry counterattack. -#define ATTACKCHAIN_PARRY_COUNTERATTACK (1<<0) - -// UnarmedAttack() flags -/// Attack is from a parry counterattack -#define UNARMED_ATTACK_PARRY (1<<0) - /// If the thing can reflect light (lasers/energy) #define RICOCHET_SHINY (1<<0) /// If the thing can reflect matter (bullets/bomb shrapnel) diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm new file mode 100644 index 0000000000..dd15ff6268 --- /dev/null +++ b/code/__DEFINES/_flags/return_values.dm @@ -0,0 +1,17 @@ +// melee_attack_chain() attackchain_flags +/// The attack is from a parry counterattack. +#define ATTACKCHAIN_PARRY_COUNTERATTACK (1<<0) + +// melee_attack_chain(), attackby(), pre_attack(), afterattack(), and tool_act() return values. +/// Stop the attack chain if still in melee_attack_chain() +#define STOP_ATTACK_PROC_CHAIN (1<<0) +/// This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced. +#define DISCARD_LAST_ACTION (1<<1) + +// UnarmedAttack() flags +/// Attack is from a parry counterattack +#define UNARMED_ATTACK_PARRY (1<<0) + +// obj/item/dropped() +/// dropped() relocated this item, return FALSE for doUnEquip. +#define ITEM_RELOCATED_BY_DROPPED "relocated_by_dropped" diff --git a/code/__DEFINES/misc/return_values.dm b/code/__DEFINES/misc/return_values.dm deleted file mode 100644 index d55f603de9..0000000000 --- a/code/__DEFINES/misc/return_values.dm +++ /dev/null @@ -1,3 +0,0 @@ -// obj/item/dropped -/// dropped() relocated this item, return FALSE for doUnEquip. -#define ITEM_RELOCATED_BY_DROPPED "relocated_by_dropped" diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 45fc2187e6..5d11889ad3 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -111,7 +111,7 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - W.melee_attack_chain(src, A, params) + . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else UnarmedAttack(A) return @@ -123,15 +123,13 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - W.melee_attack_chain(src, A, params) + . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - DelayNextAction(ismob(A)? 8 : 0) UnarmedAttack(A, 1) else if(W) W.ranged_attack_chain(src, A, params) else - DelayNextAction(ismob(A)? 8 : 0) RangedAttack(A,params) //Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 49941237f6..0bd085d506 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -77,7 +77,7 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) if(A == loc || (A in loc) || (A in contents)) - W.melee_attack_chain(src, A, params) + . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) return if(!isturf(loc)) @@ -86,7 +86,7 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc)) if(isturf(A) || isturf(A.loc)) if(A.Adjacent(src)) // see adjacent.dm - W.melee_attack_chain(src, A, params) + . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) return else W.afterattack(A, src, 0, params) diff --git a/modular_citadel/code/_onclick/hud/sprint.dm b/code/_onclick/hud/screen_objects/sprint.dm similarity index 100% rename from modular_citadel/code/_onclick/hud/sprint.dm rename to code/_onclick/hud/screen_objects/sprint.dm diff --git a/modular_citadel/code/_onclick/hud/stamina.dm b/code/_onclick/hud/screen_objects/stamina.dm similarity index 100% rename from modular_citadel/code/_onclick/hud/stamina.dm rename to code/_onclick/hud/screen_objects/stamina.dm diff --git a/modular_citadel/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects/vore.dm similarity index 100% rename from modular_citadel/code/_onclick/hud/screen_objects.dm rename to code/_onclick/hud/screen_objects/vore.dm diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 8bbefff9a2..b66118d3a8 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -13,15 +13,15 @@ if(!CHECK_MOBILITY(L, MOBILITY_USE) && !(flags & ATTACKCHAIN_PARRY_COUNTERATTACK)) to_chat(L, "You are unable to swing [src] right now!") return - if(tool_behaviour && target.tool_act(user, src, tool_behaviour)) + if(tool_behaviour && ((. = target.tool_act(user, src, tool_behaviour)) & STOP_ATTACK_PROC_CHAIN)) return - if(pre_attack(target, user, params)) + if((. |= pre_attack(target, user, params)) & STOP_ATTACK_PROC_CHAIN) return - if(target.attackby(src, user, params, flags, damage_multiplier)) + if((. |= target.attackby(src, user, params, flags, damage_multiplier)) & STOP_ATTACK_PROC_CHAIN) return if(QDELETED(src) || QDELETED(target)) return - afterattack(target, user, TRUE, params) + . |= afterattack(target, user, TRUE, params) /// Like melee_attack_chain but for ranged. /obj/item/proc/ranged_attack_chain(mob/user, atom/target, params) @@ -40,25 +40,25 @@ /obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby! if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK) - return TRUE - if(!PreatackClickdelayCheck(user, A)) - return TRUE - PreattackClickdelaySet(user, A) - return FALSE //return TRUE to avoid calling attackby after this proc does stuff + return STOP_ATTACK_PROC_CHAIN + if(!CheckAttackCooldown(user, A)) + return STOP_ATTACK_PROC_CHAIN // No comment /atom/proc/attackby(obj/item/W, mob/user, params) if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK) - return TRUE - return FALSE + return STOP_ATTACK_PROC_CHAIN /obj/attackby(obj/item/I, mob/living/user, params) - return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user)) + . = ..() + if(obj_flags & CAN_BE_HIT) + . |= I.attack_obj(src, user) /mob/living/attackby(obj/item/I, mob/living/user, params, attackchain_flags, damage_multiplier) - if(..()) - return TRUE - . = I.attack(src, user, attackchain_flags, damage_multiplier) + . = ..() + if(. & STOP_ATTACK_PROC_CHAIN) + return + . |= I.attack(src, user, attackchain_flags, damage_multiplier) /obj/item/proc/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK) @@ -80,7 +80,7 @@ user.do_attack_animation(M) M.attacked_by(src, user, attackchain_flags, damage_multiplier) - PostattackClickdelaySet(user, M) + SetAttackCooldown(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) - PostattackClickdelaySet(user, O) + SetAttackCooldown(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/modular_citadel/code/_onclick/click.dm b/code/_onclick/right_click.dm similarity index 95% rename from modular_citadel/code/_onclick/click.dm rename to code/_onclick/right_click.dm index 2b48d5474a..cba4dac263 100644 --- a/modular_citadel/code/_onclick/click.dm +++ b/code/_onclick/right_click.dm @@ -38,7 +38,6 @@ if(W) W.rightclick_melee_attack_chain(src, A, params) else - DelayNextAction(ismob(A)? 8 : 0) if(!AltUnarmedAttack(A)) UnarmedAttack(A) return @@ -52,7 +51,6 @@ if(W) W.rightclick_melee_attack_chain(src, A, params) else - DelayNextAction(ismob(A)? 8 : 0) if(!AltUnarmedAttack(A,1)) UnarmedAttack(A,1) else diff --git a/modular_citadel/code/_onclick/item_attack.dm b/code/_onclick/right_item_attack.dm similarity index 100% rename from modular_citadel/code/_onclick/item_attack.dm rename to code/_onclick/right_item_attack.dm diff --git a/modular_citadel/code/_onclick/other_mobs.dm b/code/_onclick/right_other_mobs.dm similarity index 100% rename from modular_citadel/code/_onclick/other_mobs.dm rename to code/_onclick/right_other_mobs.dm diff --git a/code/modules/cargo/coupon.dm b/code/modules/cargo/coupon.dm index c77050c530..c8d4b8618e 100644 --- a/code/modules/cargo/coupon.dm +++ b/code/modules/cargo/coupon.dm @@ -8,6 +8,7 @@ icon = 'icons/obj/card.dmi' item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_TINY + attack_cooldown = CLICK_CD_MELEE var/datum/supply_pack/discounted_pack var/discount_pct_off = 0.05 var/obj/machinery/computer/cargo/inserted_console diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 82b0e851af..80fe01a2da 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -133,34 +133,25 @@ /obj/item // Standard clickdelay variables - /// Amount of time to check for from a mob's last attack, checked before an attack happens - var/preattack_cooldown_check = CLICK_CD_MELEE - /// Amount of time to delay a mob's next attack, added after an attack happens - var/postattack_cooldown_penalty = 0 + /// Amount of time to check for from a mob's last attack, checked before an attack happens. Lower = faster attacks + var/attack_speed = CLICK_CD_MELEE + /// Amount of time to hard-stagger (no clicking at all) the mob when attacking. Lower = better + var/attack_unwieldlyness = 0 /// This item bypasses any click delay mods var/clickdelay_mod_bypass = FALSE /// This item checks clickdelay from a user's delayed next action variable rather than the last time they attacked. var/clickdelay_from_next_action = FALSE /// This item ignores next action delays. var/clickdelay_ignores_next_action = FALSE - /// This item sets clickdelay in preattack rather than post attack. This means it's set in a melee attack even if the user doesn't bash or bop it against something. - var/clickdelay_set_on_pre_attack = FALSE /** - * Checks if a user's clickdelay is met for a standard attack + * Checks if a user's clickdelay is met for a standard attack, this is called before an attack happens. */ -/obj/item/proc/PreattackClickdelayCheck(mob/user, atom/target) +/obj/item/proc/CheckAttackCooldown(mob/user, atom/target) return user.CheckActionCooldown(action_cooldown_preattack, clickdelay_from_next_action, clickdelay_mod_bypass, clickdelay_ignores_next_action) -/** - * Called if check is successful before the attack happens. - */ -/obj/item/proc/PreattackClickdelaySet(mob/user, atom/target) - if(clickdelay_set_on_pre_attack) - user.DelayNextAction(0, FALSE, TRUE) - /** * Called after a successful attack to set a mob's clickdelay. */ -/obj/item/proc/PostattackClickdelaySet(mob/user, atom/target) +/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) user.DelayNextAction(postattack_cooldown_penalty, clickdelay_mod_bypass, FALSE) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index f911a6a4e4..77e41f5f57 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -812,11 +812,11 @@ return /obj/item/light/attack(mob/living/M, mob/living/user, def_zone) - ..() + . = ..() shatter() /obj/item/light/attack_obj(obj/O, mob/living/user) - ..() + . = ..() shatter() /obj/item/light/proc/shatter() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b90f0aee0d..21bc3da4ba 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -366,8 +366,7 @@ /obj/item/gun/attack_obj(obj/O, mob/user) if(user.a_intent == INTENT_HARM) if(bayonet) - O.attackby(bayonet, user) - return TRUE + return O.attackby(bayonet, user) return ..() /obj/item/gun/attackby(obj/item/I, mob/user, params) diff --git a/tgstation.dme b/tgstation.dme index 53fb12e152..f72dcc0f65 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -123,6 +123,7 @@ #include "code\__DEFINES\_flags\do_after.dm" #include "code\__DEFINES\_flags\item_flags.dm" #include "code\__DEFINES\_flags\obj_flags.dm" +#include "code\__DEFINES\_flags\return_values.dm" #include "code\__DEFINES\_flags\shields.dm" #include "code\__DEFINES\admin\keybindings.dm" #include "code\__DEFINES\chemistry\reactions.dm" @@ -134,7 +135,6 @@ #include "code\__DEFINES\dcs\signals.dm" #include "code\__DEFINES\mapping\maploader.dm" #include "code\__DEFINES\material\worth.dm" -#include "code\__DEFINES\misc\return_values.dm" #include "code\__DEFINES\mobs\slowdowns.dm" #include "code\__DEFINES\research\stock_parts.dm" #include "code\__DEFINES\skills\defines.dm" @@ -219,6 +219,8 @@ #include "code\_onclick\observer.dm" #include "code\_onclick\other_mobs.dm" #include "code\_onclick\overmind.dm" +#include "code\_onclick\right_click.dm" +#include "code\_onclick\right_item_attack.dm" #include "code\_onclick\telekinesis.dm" #include "code\_onclick\hud\_defines.dm" #include "code\_onclick\hud\action_button.dm" @@ -251,6 +253,7 @@ #include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\swarmer.dm" +#include "code\_onclick\hud\screen_objects\sprint.dm" #include "code\_onclick\hud\screen_objects\storage.dm" #include "code\controllers\admin.dm" #include "code\controllers\configuration_citadel.dm" @@ -3424,12 +3427,6 @@ #include "interface\menu.dm" #include "interface\stylesheet.dm" #include "interface\skin.dmf" -#include "modular_citadel\code\_onclick\click.dm" -#include "modular_citadel\code\_onclick\item_attack.dm" -#include "modular_citadel\code\_onclick\other_mobs.dm" -#include "modular_citadel\code\_onclick\hud\screen_objects.dm" -#include "modular_citadel\code\_onclick\hud\sprint.dm" -#include "modular_citadel\code\_onclick\hud\stamina.dm" #include "modular_citadel\code\datums\components\souldeath.dm" #include "modular_citadel\code\datums\status_effects\chems.dm" #include "modular_citadel\code\game\objects\cit_screenshake.dm" From 924309aab81727ba1c98ee71c52b0f1bc1aaea9c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:11:12 -0700 Subject: [PATCH 022/142] changeS --- code/__DEFINES/_flags/return_values.dm | 2 ++ code/_onclick/click.dm | 20 ++++++++++++-------- code/_onclick/cyborg.dm | 11 +++++++++-- code/_onclick/right_click.dm | 10 ++++++++-- tgstation.dme | 1 + 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm index dd15ff6268..d70fb7a8ce 100644 --- a/code/__DEFINES/_flags/return_values.dm +++ b/code/__DEFINES/_flags/return_values.dm @@ -7,6 +7,8 @@ #define STOP_ATTACK_PROC_CHAIN (1<<0) /// This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced. #define DISCARD_LAST_ACTION (1<<1) +/// Override automatic last_action set. There's usually a safety net in that attempting to attack a mob will set last_action even if the item itself doesn't specifically set it. If this is present, that doesn't happen. +#define MANUALLY_HANDLE_LAST_ACTION (1<<2) // UnarmedAttack() flags /// Attack is from a parry counterattack diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5d11889ad3..a1824f64b1 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -30,9 +30,9 @@ if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) return if(ClickOn(A, params)) - FlushLastAction() + FlushCurrentAction() else - DiscardLastAction() + DiscardCurrentAction() /* @@ -49,6 +49,7 @@ * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ /mob/proc/ClickOn( atom/A, params) + set waitfor = FALSE if(check_click_intercept(params,A)) return @@ -73,8 +74,7 @@ return if(modifiers["right"]) //CIT CHANGE - allows right clicking to perform actions - RightClickOn(A,params) //CIT CHANGE - ditto - return //CIT CHANGE - ditto + return RightClickOn(A,params) //CIT CHANGE - ditto if(incapacitated(ignore_restraints = 1)) return @@ -111,7 +111,10 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) else UnarmedAttack(A) return @@ -123,7 +126,10 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) else UnarmedAttack(A, 1) else @@ -236,8 +242,6 @@ in human click code to allow glove touches only at melee range. */ /mob/proc/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) - if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) /* Ranged unarmed attack: diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 0bd085d506..36dd598377 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -7,6 +7,7 @@ */ /mob/living/silicon/robot/ClickOn(var/atom/A, var/params) + set waitfor = FALSE if(check_click_intercept(params,A)) return @@ -77,7 +78,10 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) if(A == loc || (A in loc) || (A in contents)) - . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) return if(!isturf(loc)) @@ -86,7 +90,10 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc)) if(isturf(A) || isturf(A.loc)) if(A.Adjacent(src)) // see adjacent.dm - . = !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) return else W.afterattack(A, src, 0, params) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index cba4dac263..85b0affdb9 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -36,7 +36,10 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - W.rightclick_melee_attack_chain(src, A, params) + . = W.rightclick_melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A)) UnarmedAttack(A) @@ -49,7 +52,10 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - W.rightclick_melee_attack_chain(src, A, params) + . = W.rightclick_melee_attack_chain(src, A, params) + if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) + DelayNextAction() + . = !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A,1)) UnarmedAttack(A,1) diff --git a/tgstation.dme b/tgstation.dme index f72dcc0f65..50999a9da4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -254,6 +254,7 @@ #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\swarmer.dm" #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\controllers\admin.dm" #include "code\controllers\configuration_citadel.dm" From d43a5cae26e62875956debe3d668f8b83dc21827 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:19:20 -0700 Subject: [PATCH 023/142] let's refactor attack_hand. --- code/game/objects/items/eightball.dm | 2 +- code/modules/mob/clickdelay.dm | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/eightball.dm b/code/game/objects/items/eightball.dm index 837f57ceb5..dbc4c297ca 100644 --- a/code/game/objects/items/eightball.dm +++ b/code/game/objects/items/eightball.dm @@ -229,4 +229,4 @@ else votes[selected_answer] += 1 voted[user.ckey] = selected_answer - . = TRUE \ No newline at end of file + . = TRUE diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 80fe01a2da..5cecf70cfd 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -124,12 +124,13 @@ /atom // Standard clickdelay variables + // These 3 are all handled at base of atom/attack_hand so uh.. yeah. Make sure that's called. /// Amount of time to check for from a mob's last attack to allow an attack_hand(). - var/clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE - /// Should we set last action before or after attack hand passes? - var/clickdelay_attack_hand_set_preattack = FALSE + var/attack_hand_speed = CLICK_CD_MELEE + /// Amount of time to hard stagger (no clicking at all) the mob post attack_hand(). Lower = better + var/attack_hand_unwieldlyness = 0 /// Should we set last action for attack hand? - var/clickdelay_attack_hand_is_action = FALSE + var/attack_hand_is_action = FALSE /obj/item // Standard clickdelay variables @@ -148,10 +149,10 @@ * Checks if a user's clickdelay is met for a standard attack, this is called before an attack happens. */ /obj/item/proc/CheckAttackCooldown(mob/user, atom/target) - return user.CheckActionCooldown(action_cooldown_preattack, clickdelay_from_next_action, clickdelay_mod_bypass, clickdelay_ignores_next_action) + return user.CheckActionCooldown(attack_speed, clickdelay_from_next_action, clickdelay_mod_bypass, clickdelay_ignores_next_action) /** * Called after a successful attack to set a mob's clickdelay. */ /obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) - user.DelayNextAction(postattack_cooldown_penalty, clickdelay_mod_bypass, FALSE) + user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, FALSE) From 98d3ac80d993d8288e746a1b24cb331d2afa3807 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:25:17 -0700 Subject: [PATCH 024/142] :pika: --- code/_onclick/click.dm | 1 - code/_onclick/other_mobs.dm | 12 +++++++--- code/datums/brain_damage/special.dm | 3 +-- code/game/gamemodes/gangs/dominator.dm | 2 +- code/game/gamemodes/sandbox/airlock_maker.dm | 2 +- code/game/machinery/PDApainter.dm | 5 +--- code/game/machinery/airlock_control.dm | 5 +--- code/game/machinery/aug_manipulator.dm | 5 +--- code/game/machinery/buttons.dm | 2 +- code/game/machinery/cell_charger.dm | 5 +--- .../machinery/computer/arcade/misc_arcade.dm | 2 +- .../machinery/computer/camera_advanced.dm | 5 +--- code/game/machinery/defibrillator_mount.dm | 2 +- code/game/machinery/dish_drive.dm | 2 +- code/game/machinery/doors/airlock.dm | 5 +--- code/game/machinery/doors/door.dm | 5 +--- code/game/machinery/doors/firedoor.dm | 5 +--- code/game/machinery/firealarm.dm | 2 +- code/game/machinery/harvester.dm | 2 +- code/game/machinery/hologram.dm | 2 +- code/game/machinery/igniter.dm | 5 +--- code/game/machinery/iv_drip.dm | 5 +--- .../porta_turret/portable_turret_construct.dm | 5 +--- .../porta_turret/portable_turret_cover.dm | 5 +--- code/game/machinery/recharger.dm | 5 +--- code/game/machinery/syndicatebeacon.dm | 5 +--- code/game/machinery/washing_machine.dm | 5 +--- code/game/machinery/wishgranter.dm | 2 +- code/game/mecha/mecha_defense.dm | 2 +- code/game/objects/buckling.dm | 2 +- code/game/objects/effects/contraband.dm | 5 +--- .../objects/effects/decals/cleanable/misc.dm | 5 +--- .../effects/effect_system/effects_foam.dm | 5 +--- code/game/objects/effects/portals.dm | 5 +--- code/game/objects/effects/spiders.dm | 2 +- code/game/objects/items.dm | 5 +--- code/game/objects/items/cardboard_cutouts.dm | 3 +-- code/game/objects/items/defib.dm | 3 +-- .../objects/items/devices/chameleonproj.dm | 3 +-- .../game/objects/items/devices/polycircuit.dm | 2 +- code/game/objects/items/devices/powersink.dm | 5 +--- .../items/devices/radio/electropack.dm | 5 ++-- .../objects/items/devices/radio/intercom.dm | 5 +--- .../items/devices/reverse_bear_trap.dm | 2 +- .../objects/items/devices/taperecorder.dm | 3 +-- .../objects/items/devices/transfer_valve.dm | 2 +- code/game/objects/items/handcuffs.dm | 2 +- code/game/objects/items/melee/misc.dm | 2 +- code/game/objects/items/shooting_range.dm | 5 +--- code/game/objects/items/stacks/bscrystal.dm | 3 +-- code/game/objects/items/stacks/medical.dm | 2 +- code/game/objects/items/stacks/stack.dm | 3 +-- code/game/objects/items/storage/secure.dm | 5 +--- code/game/objects/items/tanks/watertank.dm | 2 +- code/game/objects/items/toys.dm | 8 ++----- code/game/objects/structures.dm | 5 +--- code/game/objects/structures/aliens.dm | 2 +- code/game/objects/structures/barsigns.dm | 5 +--- code/game/objects/structures/bedsheet_bin.dm | 5 +--- .../structures/crates_lockers/closets.dm | 5 +--- .../crates_lockers/closets/genpop.dm | 2 +- .../structures/crates_lockers/crates.dm | 5 +--- .../structures/crates_lockers/crates/large.dm | 2 +- code/game/objects/structures/displaycase.dm | 5 +--- code/game/objects/structures/divine.dm | 4 ++-- code/game/objects/structures/dresser.dm | 2 +- code/game/objects/structures/extinguisher.dm | 5 +--- code/game/objects/structures/false_walls.dm | 4 ++-- code/game/objects/structures/femur_breaker.dm | 2 +- code/game/objects/structures/fence.dm | 2 +- code/game/objects/structures/fireaxe.dm | 5 +--- code/game/objects/structures/flora.dm | 2 +- code/game/objects/structures/fluff.dm | 2 +- .../objects/structures/ghost_role_spawners.dm | 5 +--- code/game/objects/structures/grille.dm | 2 +- code/game/objects/structures/guillotine.dm | 2 +- code/game/objects/structures/guncase.dm | 5 +--- code/game/objects/structures/headpike.dm | 5 +--- code/game/objects/structures/holosign.dm | 6 ++--- code/game/objects/structures/janicart.dm | 5 +--- code/game/objects/structures/kitchen_spike.dm | 3 +-- code/game/objects/structures/ladders.dm | 5 +--- code/game/objects/structures/life_candle.dm | 5 +--- code/game/objects/structures/mineral_doors.dm | 5 +--- code/game/objects/structures/mirror.dm | 10 ++------ code/game/objects/structures/morgue.dm | 10 ++------ code/game/objects/structures/spirit_board.dm | 5 +--- code/game/objects/structures/statues.dm | 4 ++-- code/game/objects/structures/tables_racks.dm | 4 ++-- code/game/objects/structures/target_stake.dm | 5 +--- .../structures/transit_tubes/station.dm | 5 +--- code/game/objects/structures/watercloset.dm | 17 ++++--------- code/game/objects/structures/window.dm | 10 ++------ .../game/turfs/simulated/floor/light_floor.dm | 5 +--- .../turfs/simulated/floor/mineral_floor.dm | 4 ++-- .../game/turfs/simulated/floor/reinf_floor.dm | 5 +--- .../turfs/simulated/wall/mineral_walls.dm | 2 +- code/game/turfs/simulated/walls.dm | 5 +--- code/game/turfs/turf.dm | 5 +--- .../antagonists/abductor/machinery/console.dm | 5 +--- .../abductor/machinery/dispenser.dm | 5 +--- .../abductor/machinery/experiment.dm | 5 +--- .../bloodsucker/objects/bloodsucker_crypt.dm | 4 ++-- .../changeling/powers/transform.dm | 24 +++++++------------ .../clock_effects/city_of_cogs_rift.dm | 3 +-- .../clockcult/clock_effects/clock_sigils.dm | 3 +-- .../clock_effects/spatial_gateway.dm | 3 +-- .../clockcult/clock_items/clockwork_slab.dm | 3 +-- .../clock_items/construct_chassis.dm | 3 +-- .../clock_structures/clockwork_obelisk.dm | 2 +- .../clock_structures/eminence_spire.dm | 2 +- .../clock_structures/heralds_beacon.dm | 2 +- .../clockcult/clock_structures/mania_motor.dm | 2 +- .../clock_structures/trap_triggers/lever.dm | 2 +- .../trap_triggers/repeater.dm | 2 +- code/modules/antagonists/cult/runes.dm | 2 +- .../devil/true_devil/_true_devil.dm | 2 +- code/modules/antagonists/swarmer/swarmer.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- code/modules/assembly/holder.dm | 2 +- code/modules/assembly/infrared.dm | 2 +- code/modules/assembly/mousetrap.dm | 3 +-- code/modules/awaymissions/capture_the_flag.dm | 8 ++----- code/modules/awaymissions/corpse.dm | 3 +-- code/modules/clothing/head/misc_special.dm | 2 +- code/modules/clothing/neck/_neck.dm | 2 +- code/modules/events/immovable_rod.dm | 2 +- code/modules/events/spacevine.dm | 3 +-- code/modules/events/travelling_trader.dm | 2 +- .../kitchen_machinery/deep_fryer.dm | 2 +- .../kitchen_machinery/gibber.dm | 5 +--- .../kitchen_machinery/grill.dm | 2 +- code/modules/food_and_drinks/pizzabox.dm | 3 +-- code/modules/holiday/halloween/bartholomew.dm | 2 +- code/modules/holiday/halloween/jacqueen.dm | 6 ++--- code/modules/holodeck/items.dm | 7 ++---- code/modules/holodeck/turfs.dm | 2 +- code/modules/hydroponics/fermenting_barrel.dm | 2 +- code/modules/hydroponics/grown/chili.dm | 5 +--- code/modules/hydroponics/grown/towercap.dm | 5 +--- code/modules/hydroponics/hydroponics.dm | 5 +--- .../integrated_electronics/core/assemblies.dm | 2 +- code/modules/library/lib_items.dm | 2 +- code/modules/library/lib_machines.dm | 5 +--- code/modules/mining/abandoned_crates.dm | 3 +-- code/modules/mining/aux_base.dm | 5 +--- .../mining/equipment/marker_beacons.dm | 2 +- code/modules/mining/equipment/survival_pod.dm | 5 +--- code/modules/mining/laborcamp/laborstacker.dm | 5 +--- code/modules/mining/lavaland/ash_flora.dm | 5 +--- code/modules/mining/lavaland/ruins/gym.dm | 4 ++-- code/modules/mining/mine_items.dm | 3 +-- code/modules/mining/minebot.dm | 2 +- code/modules/mining/satchel_ore_boxdm.dm | 5 +--- .../mob/living/carbon/alien/alien_defense.dm | 2 +- .../carbon/alien/humanoid/humanoid_defense.dm | 2 +- .../carbon/alien/larva/larva_defense.dm | 2 +- .../living/carbon/alien/special/facehugger.dm | 3 +-- .../mob/living/carbon/carbon_defense.dm | 3 +-- .../mob/living/carbon/human/human_defense.dm | 2 +- .../mob/living/carbon/monkey/combat.dm | 2 +- .../living/carbon/monkey/monkey_defense.dm | 2 +- code/modules/mob/living/living_defense.dm | 2 +- .../mob/living/silicon/pai/pai_defense.dm | 3 +-- .../mob/living/silicon/robot/robot_defense.dm | 3 +-- .../mob/living/silicon/silicon_defense.dm | 2 +- .../living/simple_animal/animal_defense.dm | 2 +- .../mob/living/simple_animal/bot/bot.dm | 2 +- .../mob/living/simple_animal/bot/ed209bot.dm | 2 +- .../mob/living/simple_animal/bot/honkbot.dm | 2 +- .../mob/living/simple_animal/bot/medbot.dm | 2 +- .../mob/living/simple_animal/bot/secbot.dm | 2 +- .../mob/living/simple_animal/friendly/cat.dm | 2 +- .../simple_animal/friendly/farm_animals.dm | 2 +- .../simple_animal/guardian/types/explosive.dm | 3 +-- .../mob/living/simple_animal/hostile/bear.dm | 2 +- .../hostile/megafauna/colossus.dm | 5 +--- .../hostile/mining_mobs/elites/elite.dm | 2 +- .../living/simple_animal/hostile/mushroom.dm | 2 +- .../simple_animal/hostile/netherworld.dm | 2 +- .../simple_animal/hostile/retaliate/clown.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 2 +- .../mob/living/simple_animal/slime/slime.dm | 2 +- .../computers/item/laptop.dm | 5 +--- .../computers/machinery/modular_computer.dm | 1 - code/modules/paperwork/filingcabinet.dm | 5 ++-- code/modules/paperwork/paper_cutter.dm | 5 +--- code/modules/paperwork/paperbin.dm | 5 ++-- code/modules/photography/photos/frame.dm | 8 ++----- code/modules/pool/pool_drain.dm | 2 +- code/modules/pool/pool_main.dm | 2 +- code/modules/pool/pool_structures.dm | 4 ++-- code/modules/power/apc.dm | 5 +--- code/modules/power/cable.dm | 5 +--- code/modules/power/floodlight.dm | 5 +--- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/lighting.dm | 2 +- .../power/singularity/containment_field.dm | 3 +-- code/modules/power/singularity/singularity.dm | 2 +- code/modules/power/supermatter/supermatter.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 3 +-- .../projectiles/guns/ballistic/automatic.dm | 3 +-- .../guns/ballistic/laser_gatling.dm | 3 +-- .../reagents/reagent_containers/hypospray.dm | 2 +- .../reagents/reagent_containers/maunamug.dm | 2 +- .../reagents/reagent_containers/syringes.dm | 3 +-- code/modules/reagents/reagent_dispenser.dm | 2 +- code/modules/recycling/conveyor2.dm | 5 +--- .../xenobiology/crossbreeding/_clothing.dm | 4 ++-- .../lavalandruin_code/elephantgraveyard.dm | 2 +- .../ruins/objects_and_mobs/necropolis_gate.dm | 6 ++--- .../ruins/objects_and_mobs/sin_ruins.dm | 2 +- .../ruins/spaceruin_code/hilbertshotel.dm | 2 +- code/modules/shuttle/custom_shuttle.dm | 2 +- code/modules/shuttle/navigation_computer.dm | 2 +- .../shuttle_creator_console.dm | 2 +- .../spell_types/spacetime_distortion.dm | 3 +-- code/modules/vehicles/cars/car.dm | 2 +- code/modules/vehicles/pimpin_ride.dm | 5 +--- .../code/modules/reagents/objects/clothes.dm | 2 +- .../code/modules/reagents/objects/items.dm | 2 +- 221 files changed, 262 insertions(+), 542 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index a1824f64b1..900123320e 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -33,7 +33,6 @@ FlushCurrentAction() else DiscardCurrentAction() - /* Standard mob ClickOn() diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index ae10358b66..bda18cfb24 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -28,13 +28,19 @@ SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) A.attack_hand(src, intent, flags) -//Return TRUE to cancel other attack hand effects that respect it. /atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = FALSE if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND) - . = TRUE + return + if(attack_hand_speed) + if(!user.CheckActionCooldown(attack_hand_speed)) + return + attack_hand(user, act_intent, unarmed_attack_flags) + if(attack_hand_unwieldlyness) + user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) + +/atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) . = _try_interact(user) diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm index 13cf2add97..7cc5348a0a 100644 --- a/code/datums/brain_damage/special.dm +++ b/code/datums/brain_damage/special.dm @@ -103,8 +103,7 @@ . = ..() QDEL_IN(src, 300) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/hallucination/simple/bluespace_stream/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/hallucination/simple/bluespace_stream/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user != seer || !linked_to) return var/slip_in_message = pick("slides sideways in an odd way, and disappears", "jumps into an unseen dimension",\ diff --git a/code/game/gamemodes/gangs/dominator.dm b/code/game/gamemodes/gangs/dominator.dm index b4028dc0fd..a7e44ef325 100644 --- a/code/game/gamemodes/gangs/dominator.dm +++ b/code/game/gamemodes/gangs/dominator.dm @@ -149,7 +149,7 @@ add_fingerprint(user) return ..() -/obj/machinery/dominator/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/dominator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(operating || (stat & BROKEN)) examine(user) return diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm index ddb622ab08..3d8eb7f7fc 100644 --- a/code/game/gamemodes/sandbox/airlock_maker.dm +++ b/code/game/gamemodes/sandbox/airlock_maker.dm @@ -7,7 +7,7 @@ /obj/structure/door_assembly var/datum/airlock_maker/maker = null -/obj/structure/door_assembly/attack_hand() +/obj/structure/door_assembly/on_attack_hand() . = ..() if(.) return diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 634ed2da48..6bac63dff0 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -107,10 +107,7 @@ stat |= BROKEN update_icon() -/obj/machinery/pdapainter/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/pdapainter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!storedpda) to_chat(user, "[src] is empty.") diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 31fdf675ca..4b5e4088d7 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -122,10 +122,7 @@ else icon_state = "airlock_sensor_off" -/obj/machinery/airlock_sensor/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/airlock_sensor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/datum/signal/signal = new(list( "tag" = master_tag, "command" = "cycle" diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index d13c167a22..28733a6b6c 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -100,10 +100,7 @@ stat |= BROKEN update_icon() -/obj/machinery/aug_manipulator/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/aug_manipulator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) if(storedpart) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 4661e1bd8f..b5031b68a1 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -138,7 +138,7 @@ var/obj/item/assembly/control/A = device A.id = "[idnum][id]" -/obj/machinery/button/attack_hand(mob/user) +/obj/machinery/button/on_attack_hand(mob/user) . = ..() if(.) return diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 01f73a3c75..effd70e9ab 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -79,10 +79,7 @@ charging = null update_icon() -/obj/machinery/cell_charger/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/cell_charger/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!charging) return diff --git a/code/game/machinery/computer/arcade/misc_arcade.dm b/code/game/machinery/computer/arcade/misc_arcade.dm index 9b7d3d3f6f..24516740f9 100644 --- a/code/game/machinery/computer/arcade/misc_arcade.dm +++ b/code/game/machinery/computer/arcade/misc_arcade.dm @@ -8,7 +8,7 @@ icon_state = "arcade" circuit = /obj/item/circuitboard/computer/arcade/amputation -/obj/machinery/computer/arcade/amputation/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/computer/arcade/amputation/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!iscarbon(user)) return var/mob/living/carbon/c_user = user diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 9f1390c69b..32dbfba989 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -103,10 +103,7 @@ return FALSE return ..() -/obj/machinery/computer/camera_advanced/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/computer/camera_advanced/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(current_user) to_chat(user, "The console is already in use!") return diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index f91fd66fb5..677cbe1208 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -59,7 +59,7 @@ return defib.get_cell() //defib interaction -/obj/machinery/defibrillator_mount/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/defibrillator_mount/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(!defib) to_chat(user, "There's no defibrillator unit loaded!") return diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm index 5bf16d4638..3cfd8fdfc4 100644 --- a/code/game/machinery/dish_drive.dm +++ b/code/game/machinery/dish_drive.dm @@ -31,7 +31,7 @@ if(user.Adjacent(src)) . += "Alt-click it to beam its contents to any nearby disposal bins." -/obj/machinery/dish_drive/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/dish_drive/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(!contents.len) to_chat(user, "There's nothing in [src]!") return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index a950cb7e7d..85307e5b6e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -763,10 +763,7 @@ /obj/machinery/door/airlock/attack_paw(mob/user) return attack_hand(user) -/obj/machinery/door/airlock/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/door/airlock/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!(issilicon(user) || IsAdminGhost(user))) if(src.isElectrified()) if(src.shock(user, 100)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index baf8c35f46..800651eab7 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -140,10 +140,7 @@ do_animate("deny") return -/obj/machinery/door/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/door/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return try_to_activate_door(user) /obj/machinery/door/attack_tk(mob/user) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 4855280b86..0d1a25b6be 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -88,10 +88,7 @@ else stat |= NOPOWER -/obj/machinery/door/firedoor/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/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) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 4c68d0b0b5..000b3dc7b5 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -141,7 +141,7 @@ if(user) log_game("[user] reset a fire alarm at [COORD(src)]") -/obj/machinery/firealarm/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/firealarm/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(buildstage != 2) return ..() add_fingerprint(user) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 8cb7ca1e8d..191967ac1a 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -50,7 +50,7 @@ harvesting = FALSE warming_up = FALSE -/obj/machinery/harvester/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/harvester/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(state_open) close_machine() else if(!harvesting) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index f43114f7cb..25f4248d6d 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -78,7 +78,7 @@ GLOBAL_LIST_EMPTY(network_holopads) new_disk.forceMove(src) disk = new_disk -/obj/machinery/holopad/tutorial/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/holopad/tutorial/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!istype(user)) return if(user.incapacitated() || !is_operational()) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 7cf21ed767..ba4d01cfe5 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -26,10 +26,7 @@ on = TRUE icon_state = "igniter1" -/obj/machinery/igniter/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/igniter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) use_power(50) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 5eb3de3e3b..f1bbd9a31e 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -158,10 +158,7 @@ attached.transfer_blood_to(beaker, amount) update_icon() -/obj/machinery/iv_drip/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/iv_drip/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!ishuman(user)) return if(attached) diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm index bf70ee8a9d..59a4446420 100644 --- a/code/game/machinery/porta_turret/portable_turret_construct.dm +++ b/code/game/machinery/porta_turret/portable_turret_construct.dm @@ -168,10 +168,7 @@ return ..() -/obj/machinery/porta_turret_construct/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/porta_turret_construct/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) switch(build_step) if(PTURRET_GUN_EQUIPPED) build_step = PTURRET_INTERNAL_ARMOUR_ON diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 3899f07685..e0746bda78 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -31,10 +31,7 @@ return parent_turret.attack_ai(user) -/obj/machinery/porta_turret_cover/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/porta_turret_cover/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return parent_turret.attack_hand(user) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 5d0d39e3a4..1d118023c9 100755 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -108,10 +108,7 @@ return ..() -/obj/machinery/recharger/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/recharger/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) if(charging) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 8b9aa64c58..1b3f942c51 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -68,10 +68,7 @@ GLOBAL_VAR_INIT(singularity_counter, 0) /obj/machinery/power/singularity_beacon/attack_ai(mob/user) return -/obj/machinery/power/singularity_beacon/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/power/singularity_beacon/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(anchored) return active ? Deactivate(user) : Activate(user) else diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 9e277b9d8e..3441ac7eaa 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -297,10 +297,7 @@ GLOBAL_LIST_INIT(dye_registry, list( else return ..() -/obj/machinery/washing_machine/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/washing_machine/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(busy) to_chat(user, "[src] is busy.") return diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 10b56b3945..c2eb5c1413 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -10,7 +10,7 @@ var/charges = 1 var/insisting = 0 -/obj/machinery/wish_granter/attack_hand(mob/living/carbon/user) +/obj/machinery/wish_granter/on_attack_hand(mob/living/carbon/user) if(charges <= 0) to_chat(user, "The Wish Granter lies silent.") return diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index dedbef1906..27bfcb6bd9 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -54,7 +54,7 @@ . *= booster_damage_modifier -/obj/mecha/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/mecha/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index eabbdfad88..36e7496bd3 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -9,7 +9,7 @@ var/buckle_prevents_pull = FALSE //Interaction -/atom/movable/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/atom/movable/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index e4f1c854d0..8e2f39d0df 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -101,10 +101,7 @@ to_chat(user, "You carefully remove the poster from the wall.") roll_and_drop(user.loc) -/obj/structure/sign/poster/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/sign/poster/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(ruined) return visible_message("[user] rips [src] in a single, decisive motion!" ) diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index 01f0b6f957..044c5c6e86 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -137,10 +137,7 @@ random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4") beauty = -150 -/obj/effect/decal/cleanable/vomit/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/effect/decal/cleanable/vomit/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(ishuman(user)) var/mob/living/carbon/human/H = user if(isflyperson(H)) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 0cf95ea263..f0c6064bf8 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -284,10 +284,7 @@ /obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) -/obj/structure/foamedmetal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/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!") diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index e363529c46..0b227be247 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -60,10 +60,7 @@ /obj/effect/portal/attack_tk(mob/user) return -/obj/effect/portal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/effect/portal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(get_turf(user) == get_turf(src)) teleport(user) if(Adjacent(user)) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 00d6d31ad0..ed2eb70cf6 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -152,7 +152,7 @@ else ..() -/obj/structure/spider/spiderling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/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) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 7bda35ebe9..4a00678726 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -304,10 +304,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb add_fingerprint(usr) return ..() -/obj/item/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!user) return if(anchored) diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 3d444b7eca..693df4bda0 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -43,8 +43,7 @@ "Monkey" = image(icon = src.icon, icon_state = "cutout_monky"), )) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/cardboard_cutout/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/cardboard_cutout/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.a_intent == INTENT_HELP || pushed_over) return ..() user.visible_message("[user] pushes over [src]!", "You push over [src]!") diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index e15dc72838..767f8fc395 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -77,8 +77,7 @@ /obj/item/defibrillator/ui_action_click() toggle_paddles() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/defibrillator/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/defibrillator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user) if(slot_flags == ITEM_SLOT_BACK) if(user.get_item_by_slot(SLOT_BACK) == src) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 57443de973..a45f26062b 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -132,8 +132,7 @@ /obj/effect/dummy/chameleon/attackby() master.disrupt() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/dummy/chameleon/attack_hand() +/obj/effect/dummy/chameleon/on_attack_hand() master.disrupt() /obj/effect/dummy/chameleon/attack_animal() diff --git a/code/game/objects/items/devices/polycircuit.dm b/code/game/objects/items/devices/polycircuit.dm index a9f7cd46c8..0308f19b5f 100644 --- a/code/game/objects/items/devices/polycircuit.dm +++ b/code/game/objects/items/devices/polycircuit.dm @@ -11,7 +11,7 @@ /obj/item/stack/circuit_stack/attack_self(mob/user)// Prevents the crafting menu, and tells you how to use it. to_chat(user, "You can't use [src] by itself, you'll have to try and remove one of these circuits by hand... carefully.") -/obj/item/stack/circuit_stack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/stack/circuit_stack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/mob/living/carbon/human/H = user if(!user.get_inactive_held_item() == src) return ..() diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index ec59009794..c3127c246f 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -97,10 +97,7 @@ GLOBAL_LIST_EMPTY(power_sinks) /obj/item/powersink/attack_ai() return -/obj/item/powersink/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/powersink/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) switch(mode) if(DISCONNECTED) ..() diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index cdb8c09527..0cf7ceb55b 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -31,8 +31,7 @@ SSradio.remove_object(src, frequency) . = ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/electropack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/electropack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) var/mob/living/carbon/C = user if(src == C.back) @@ -162,7 +161,7 @@ materials = list(/datum/material/iron = 5000, /datum/material/glass =2000) category = list("hacked", "Misc") -/obj/item/electropack/shockcollar/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/electropack/shockcollar/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.get_item_by_slot(SLOT_NECK)) to_chat(user, "The collar is fastened tight! You'll need help taking this off!") return diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index ec19c0c05e..8657684ff4 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -86,10 +86,7 @@ /obj/item/radio/intercom/attack_ai(mob/user) interact(user) -/obj/item/radio/intercom/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/radio/intercom/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) interact(user) /obj/item/radio/intercom/interact(mob/user) diff --git a/code/game/objects/items/devices/reverse_bear_trap.dm b/code/game/objects/items/devices/reverse_bear_trap.dm index 46b9547e9d..f2a0ea5450 100644 --- a/code/game/objects/items/devices/reverse_bear_trap.dm +++ b/code/game/objects/items/devices/reverse_bear_trap.dm @@ -45,7 +45,7 @@ to_chat(loc, "*ding*") addtimer(CALLBACK(src, .proc/snap), 2) -/obj/item/reverse_bear_trap/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/reverse_bear_trap/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) var/mob/living/carbon/C = user if(C.get_item_by_slot(SLOT_HEAD) == src) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 5765ac71f1..cef06bfde8 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -54,8 +54,7 @@ mytape.ruin() //Fires destroy the tape ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/taperecorder/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/taperecorder/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user) if(mytape) if(!user.is_holding(src)) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index ccf9dcd253..c791b7e323 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -79,7 +79,7 @@ if(attached_device) attached_device.Crossed(AM) -/obj/item/transfer_valve/attack_hand()//Triggers mousetraps +/obj/item/transfer_valve/on_attack_hand()//Triggers mousetraps . = ..() if(.) return diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index e3388b12eb..4c9ea06620 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -320,7 +320,7 @@ do_sparks(1, TRUE, src) qdel(src) -/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/restraints/legcuffs/beartrap/energy/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) Crossed(user) //honk . = ..() diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index b2e463e89e..daeb4adb8f 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -621,7 +621,7 @@ to_chat(user, "[target] doesn't seem to want to get on [src]!") update_icon() -/obj/item/melee/roastingstick/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/melee/roastingstick/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) ..() if (held_sausage) user.put_in_hands(held_sausage) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index 7fd37053b1..ced0ee3160 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -31,10 +31,7 @@ to_chat(user, "You slice off [src]'s uneven chunks of aluminium and scorch marks.") return TRUE -/obj/item/target/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/target/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(pinnedLoc) pinnedLoc.removeTarget(user) diff --git a/code/game/objects/items/stacks/bscrystal.dm b/code/game/objects/items/stacks/bscrystal.dm index c142db6530..3b4be37cee 100644 --- a/code/game/objects/items/stacks/bscrystal.dm +++ b/code/game/objects/items/stacks/bscrystal.dm @@ -74,8 +74,7 @@ /obj/item/stack/sheet/bluespace_crystal/attack_self(mob/user)// to prevent the construction menu from ever happening to_chat(user, "You cannot crush the polycrystal in-hand, try breaking one off.") -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/stack/sheet/bluespace_crystal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.get_inactive_held_item() == src) if(zero_amount()) return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 866f067b69..01b3e8b606 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -280,7 +280,7 @@ return . = ..() -/obj/item/stack/medical/mesh/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/stack/medical/mesh/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!is_open & user.get_inactive_held_item() == src) to_chat(user, "You need to open [src] first.") return diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index df9807b524..e44dbf1c59 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -389,8 +389,7 @@ merge(AM) . = ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/stack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/stack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.get_inactive_held_item() == src) if(zero_amount()) return diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 6061feb893..4e6a0b3463 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -205,10 +205,7 @@ new /obj/item/paper(src) new /obj/item/pen(src) -/obj/item/storage/secure/safe/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/storage/secure/safe/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return attack_self(user) /obj/item/storage/secure/safe/HoS diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 0a7eefb786..16a91b6358 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -72,7 +72,7 @@ QDEL_NULL(noz) return ..() -/obj/item/watertank/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/watertank/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if (user.get_item_by_slot(user.getBackSlot()) == src) toggle_mister(user) else diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index fe2e0df2eb..e69bb1ffa0 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -574,10 +574,7 @@ else . = ..() -/obj/item/toy/prize/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/toy/prize/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user) attack_self(user) @@ -811,9 +808,8 @@ cards += "Ace of Clubs" cards += "Ace of Diamonds" -//ATTACK HAND IGNORING PARENT RETURN VALUE //ATTACK HAND NOT CALLING PARENT -/obj/item/toy/cards/deck/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/toy/cards/deck/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) draw_card(user) /obj/item/toy/cards/deck/proc/draw_card(mob/user) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index cce4955210..0d23b87681 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -28,10 +28,7 @@ queue_smooth_neighbors(src) return ..() -/obj/structure/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/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.do_attack_animation(src) diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index a6cd8df746..903a317c6c 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -249,7 +249,7 @@ /obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user) return attack_hand(user) -/obj/structure/alien/egg/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/alien/egg/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 7ea678cae4..905888c904 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -52,10 +52,7 @@ /obj/structure/sign/barsign/attack_ai(mob/user) return attack_hand(user) -/obj/structure/sign/barsign/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/sign/barsign/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!allowed(user)) to_chat(user, "Access denied.") return diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index e45ddf650c..45cac650b8 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -311,10 +311,7 @@ LINEN BINS /obj/structure/bedsheetbin/attack_paw(mob/user) return attack_hand(user) -/obj/structure/bedsheetbin/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/bedsheetbin/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.incapacitated()) return if(amount >= 1) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 672bd49632..d94d77527a 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -458,10 +458,7 @@ return container_resist(user) -/obj/structure/closet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/closet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.lying && get_dist(src, user) > 0) return diff --git a/code/game/objects/structures/crates_lockers/closets/genpop.dm b/code/game/objects/structures/crates_lockers/closets/genpop.dm index 04c2f37b0f..7be12a4819 100644 --- a/code/game/objects/structures/crates_lockers/closets/genpop.dm +++ b/code/game/objects/structures/crates_lockers/closets/genpop.dm @@ -91,7 +91,7 @@ locked = TRUE return ..() -/obj/structure/closet/secure_closet/genpop/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/closet/secure_closet/genpop/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.lying && get_dist(src, user) > 0) return diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 99bce305f8..7d80a28b13 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -41,10 +41,7 @@ if(manifest) . += "manifest" -/obj/structure/closet/crate/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/closet/crate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(manifest) tear_manifest(user) diff --git a/code/game/objects/structures/crates_lockers/crates/large.dm b/code/game/objects/structures/crates_lockers/crates/large.dm index d8c2f7f91c..3cee96e435 100644 --- a/code/game/objects/structures/crates_lockers/crates/large.dm +++ b/code/game/objects/structures/crates_lockers/crates/large.dm @@ -8,7 +8,7 @@ delivery_icon = "deliverybox" integrity_failure = 0 //Makes the crate break when integrity reaches 0, instead of opening and becoming an invisible sprite. -/obj/structure/closet/crate/large/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/closet/crate/large/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) if(manifest) tear_manifest(user) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 4db889b392..6159e69780 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -157,10 +157,7 @@ /obj/structure/displaycase/attack_paw(mob/user) return attack_hand(user) -/obj/structure/displaycase/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/displaycase/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.changeNext_move(CLICK_CD_MELEE) if (showpiece && (broken || open)) to_chat(user, "You deactivate the hover field built into the case.") diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index 5afe97f669..f64397df09 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -7,7 +7,7 @@ density = FALSE can_buckle = 1 -/obj/structure/sacrificealtar/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/sacrificealtar/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return @@ -30,7 +30,7 @@ var/time_between_uses = 1800 var/last_process = 0 -/obj/structure/healingfountain/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/healingfountain/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index bacb6fc92b..f073c6c263 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -19,7 +19,7 @@ new /obj/item/stack/sheet/mineral/wood(drop_location(), 10) qdel(src) -/obj/structure/dresser/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/dresser/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(. || !ishuman(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index a279070e69..84926ccfb0 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -69,10 +69,7 @@ return ..() -/obj/structure/extinguisher_cabinet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/extinguisher_cabinet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscyborg(user) || isalien(user)) return if(stored_extinguisher) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index eaa6e574cd..b654f4f5c0 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -41,7 +41,7 @@ new /obj/structure/falsewall/brass(loc) qdel(src) -/obj/structure/falsewall/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/falsewall/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(opening) return . = ..() @@ -180,7 +180,7 @@ radiate() return ..() -/obj/structure/falsewall/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/falsewall/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) radiate() . = ..() diff --git a/code/game/objects/structures/femur_breaker.dm b/code/game/objects/structures/femur_breaker.dm index 1fa21d119e..2ac56ec4fb 100644 --- a/code/game/objects/structures/femur_breaker.dm +++ b/code/game/objects/structures/femur_breaker.dm @@ -32,7 +32,7 @@ if (LAZYLEN(buckled_mobs)) . += "Someone appears to be strapped in. You can help them unbuckle, or activate the femur breaker." -/obj/structure/femur_breaker/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/femur_breaker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) // Currently being used diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 5803fb1306..f90161f587 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -120,7 +120,7 @@ open = TRUE density = TRUE -/obj/structure/fence/door/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/fence/door/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(can_open(user)) toggle(user) diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index de88372b1e..412730910f 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -105,10 +105,7 @@ fireaxe = null qdel(src) -/obj/structure/fireaxecabinet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/fireaxecabinet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(open || broken) if(fireaxe) user.put_in_hands(fireaxe) diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 6d72bb58b2..b587e57c3a 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -65,7 +65,7 @@ var/gift_type = /obj/item/a_gift/anything var/list/ckeys_that_took = list() -/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/flora/tree/pine/xmas/presents/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/fluff.dm b/code/game/objects/structures/fluff.dm index 1dcda6eb50..bd7ddb36d5 100644 --- a/code/game/objects/structures/fluff.dm +++ b/code/game/objects/structures/fluff.dm @@ -110,7 +110,7 @@ desc = "Space Jesus is my copilot." icon_state = "driverseat" -/obj/structure/fluff/bus/passable/seat/driver/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/fluff/bus/passable/seat/driver/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) playsound(src, 'sound/items/carhorn.ogg', 50, 1) . = ..() diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 03bcdde57c..4d500837d9 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -186,10 +186,7 @@ else new_spawn.mind.assigned_role = "Free Golem" -/obj/effect/mob_spawn/human/golem/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/effect/mob_spawn/human/golem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(isgolem(user) && can_transfer) var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No") if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK)) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 19a52f5a56..8186deb062 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -99,7 +99,7 @@ ..(user, 1) return TRUE -/obj/structure/grille/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/grille/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index a335906744..beabad905a 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -51,7 +51,7 @@ if (LAZYLEN(buckled_mobs)) . += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine." -/obj/structure/guillotine/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/guillotine/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) // Currently being used by something diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 1cab600fb1..e7ff9d4abf 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -53,10 +53,7 @@ else return ..() -/obj/structure/guncase/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/guncase/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscyborg(user) || isalien(user)) return if(contents.len && open) diff --git a/code/game/objects/structures/headpike.dm b/code/game/objects/structures/headpike.dm index 7a67387a8e..6aed11701d 100644 --- a/code/game/objects/structures/headpike.dm +++ b/code/game/objects/structures/headpike.dm @@ -37,10 +37,7 @@ MA.pixel_y = 12 . += H -/obj/structure/headpike/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/headpike/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) to_chat(user, "You take down [src].") if(victim) victim.forceMove(drop_location()) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 41ecd721ed..dc5355e9d8 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -25,7 +25,7 @@ projector = null return ..() -/obj/structure/holosign/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/holosign/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return @@ -162,7 +162,7 @@ return TRUE //nice or benign diseases! return TRUE -/obj/structure/holosign/barrier/medical/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/holosign/barrier/medical/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(CanPass(user) && user.a_intent == INTENT_HELP) force_allaccess = !force_allaccess to_chat(user, "You [force_allaccess ? "deactivate" : "activate"] the biometric scanners.") //warning spans because you can make the station sick! @@ -182,7 +182,7 @@ /obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown() shockcd = FALSE -/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/holosign/barrier/cyborg/hacked/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 72487ddc16..10a9f2afd4 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -91,10 +91,7 @@ else return ..() -/obj/structure/janitorialcart/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/janitorialcart/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/list/items = list() if(mybag) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 5706f79192..a23dd3a21e 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -60,8 +60,7 @@ deconstruct(TRUE) return TRUE -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/kitchenspike/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/kitchenspike/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs()) var/mob/living/L = user.pulling if(HAS_TRAIT(user, TRAIT_PACIFISM) && L.stat != DEAD) diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 6037183cc9..e844461952 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -122,10 +122,7 @@ return FALSE return TRUE -/obj/structure/ladder/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/ladder/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) use(user) /obj/structure/ladder/attack_paw(mob/user) diff --git a/code/game/objects/structures/life_candle.dm b/code/game/objects/structures/life_candle.dm index ddd334a9e4..adda7b2afc 100644 --- a/code/game/objects/structures/life_candle.dm +++ b/code/game/objects/structures/life_candle.dm @@ -24,10 +24,7 @@ var/respawn_time = 50 var/respawn_sound = 'sound/magic/staff_animation.ogg' -/obj/structure/life_candle/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/life_candle/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!user.mind) return if(user.mind in linked_minds) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index cca41b4e11..b2f1de8750 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -50,10 +50,7 @@ /obj/structure/mineral_door/attack_paw(mob/user) return attack_hand(user) -/obj/structure/mineral_door/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/mineral_door/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return TryToSwitchState(user) /obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index b1829054ce..237cfdbf0b 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -15,10 +15,7 @@ if(icon_state == "mirror_broke" && !broken) obj_break(null, mapload) -/obj/structure/mirror/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/mirror/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(broken || !Adjacent(user)) return @@ -118,10 +115,7 @@ choosable_races += S.id ..() -/obj/structure/mirror/magic/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/mirror/magic/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!ishuman(user)) return diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index ce8323d399..91664cb2aa 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -58,10 +58,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/attack_paw(mob/user) return attack_hand(user) -/obj/structure/bodycontainer/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/bodycontainer/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(locked) to_chat(user, "It's locked.") return @@ -328,10 +325,7 @@ GLOBAL_LIST_EMPTY(crematoriums) /obj/structure/tray/attack_paw(mob/user) return attack_hand(user) -/obj/structure/tray/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/tray/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if (src.connected) connected.close() add_fingerprint(user) diff --git a/code/game/objects/structures/spirit_board.dm b/code/game/objects/structures/spirit_board.dm index 3a415b84a9..1b3093e4e7 100644 --- a/code/game/objects/structures/spirit_board.dm +++ b/code/game/objects/structures/spirit_board.dm @@ -14,10 +14,7 @@ desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"." return ..() -/obj/structure/spirit_board/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/spirit_board/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) spirit_board_pick_letter(user) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 1d7ba1d993..f8b54d04b6 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -74,7 +74,7 @@ radiate() ..() -/obj/structure/statue/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/statue/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) radiate() . = ..() @@ -240,7 +240,7 @@ honk() return ..() -/obj/structure/statue/bananium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/statue/bananium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) honk() . = ..() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 7569b10fdd..20d3561f14 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -60,7 +60,7 @@ /obj/structure/table/attack_paw(mob/user) return attack_hand(user) -/obj/structure/table/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/table/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(Adjacent(user) && user.pulling) if(isliving(user.pulling)) var/mob/living/pushed_mob = user.pulling @@ -678,7 +678,7 @@ /obj/structure/rack/attack_paw(mob/living/user) attack_hand(user) -/obj/structure/rack/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/rack/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index a08d5c95c1..c5f3a089f7 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -48,10 +48,7 @@ handle_density() to_chat(user, "You slide the target into the stake.") -/obj/structure/target_stake/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/target_stake/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(pinned_target) removeTarget(user) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 7f597857d9..3a5eb135f4 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -58,10 +58,7 @@ qdel(R) -/obj/structure/transit_tube/station/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/transit_tube/station/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!pod_moving) if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) if(open_status == STATION_TUBE_OPEN) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 6e39bee927..8303e29174 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -28,7 +28,7 @@ AM.forceMove(loc) return ..() -/obj/structure/toilet/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/toilet/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return @@ -174,10 +174,7 @@ ..() hiddenitem = new /obj/item/reagent_containers/food/urinalcake -/obj/structure/urinal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/urinal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) var/mob/living/GM = user.pulling if(user.grab_state >= GRAB_AGGRESSIVE) @@ -492,7 +489,7 @@ var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 1 -/obj/structure/sink/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/sink/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return @@ -707,8 +704,7 @@ icon_state = "puddle" resistance_flags = UNACIDABLE -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/sink/puddle/attack_hand(mob/M) +/obj/structure/sink/puddle/on_attack_hand(mob/M) icon_state = "puddle-splash" . = ..() icon_state = "puddle" @@ -784,10 +780,7 @@ return TRUE -/obj/structure/curtain/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/curtain/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) playsound(loc, 'sound/effects/curtain.ogg', 50, 1) toggle() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 8a27604e97..d4f16df756 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -169,10 +169,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) return 1 . = ..() -/obj/structure/window/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/window/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!can_be_reached(user)) return user.visible_message("[user] knocks on [src].") @@ -837,10 +834,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) for (var/i in 1 to rand(1,4)) . += new /obj/item/paper/natural(location) -/obj/structure/window/paperframe/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/window/paperframe/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) if(user.a_intent != INTENT_HARM) user.visible_message("[user] knocks on [src].") diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 4f7aa9e492..4bca25f96c 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -52,10 +52,7 @@ set_light(0) return ..() -/turf/open/floor/light/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/turf/open/floor/light/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!can_modify_colour) return if(!on) diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index 9a227d2594..8e0230a2b0 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -149,7 +149,7 @@ if(!.) honk() -/turf/open/floor/mineral/bananium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/open/floor/mineral/bananium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) .=..() if(!.) honk() @@ -202,7 +202,7 @@ if(!.) radiate() -/turf/open/floor/mineral/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/open/floor/mineral/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) .=..() if(!.) radiate() diff --git a/code/game/turfs/simulated/floor/reinf_floor.dm b/code/game/turfs/simulated/floor/reinf_floor.dm index b050d8fb89..03045674e4 100644 --- a/code/game/turfs/simulated/floor/reinf_floor.dm +++ b/code/game/turfs/simulated/floor/reinf_floor.dm @@ -89,10 +89,7 @@ /turf/open/floor/engine/attack_paw(mob/user) return attack_hand(user) -/turf/open/floor/engine/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/turf/open/floor/engine/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.Move_Pulled(src) //air filled floors; used in atmos pressure chambers diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm index c8afe628db..4466511acd 100644 --- a/code/game/turfs/simulated/wall/mineral_walls.dm +++ b/code/game/turfs/simulated/wall/mineral_walls.dm @@ -72,7 +72,7 @@ return return -/turf/closed/wall/mineral/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/closed/wall/mineral/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) radiate() . = ..() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 03f2c504c2..92a156cf82 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -136,10 +136,7 @@ to_chat(user, text("You punch the wall.")) return TRUE -/turf/closed/wall/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/turf/closed/wall/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!M.CheckActionCooldown(CLICK_CD_MELEE)) return to_chat(user, "You push the wall but nothing happens!") diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 02c12a9744..55d945535d 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -122,10 +122,7 @@ requires_activation = FALSE ..() -/turf/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/turf/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.Move_Pulled(src) /turf/proc/multiz_turf_del(turf/T, dir) diff --git a/code/modules/antagonists/abductor/machinery/console.dm b/code/modules/antagonists/abductor/machinery/console.dm index 9c9715ee43..6a981b36dc 100644 --- a/code/modules/antagonists/abductor/machinery/console.dm +++ b/code/modules/antagonists/abductor/machinery/console.dm @@ -24,10 +24,7 @@ var/obj/machinery/computer/camera_advanced/abductor/camera var/list/datum/icon_snapshot/disguises = list() -/obj/machinery/abductor/console/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/abductor/console/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!HAS_TRAIT(user, TRAIT_ABDUCTOR_TRAINING) && !HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_TRAINING)) to_chat(user, "You start mashing alien buttons at random!") if(do_after(user,100, target = src)) diff --git a/code/modules/antagonists/abductor/machinery/dispenser.dm b/code/modules/antagonists/abductor/machinery/dispenser.dm index ef423b6379..90dcf6626f 100644 --- a/code/modules/antagonists/abductor/machinery/dispenser.dm +++ b/code/modules/antagonists/abductor/machinery/dispenser.dm @@ -22,10 +22,7 @@ gland_colors[i] = random_color() amounts[i] = rand(1,5) -/obj/machinery/abductor/gland_dispenser/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/abductor/gland_dispenser/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!isabductor(user)) return user.set_machine(src) diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index c84dc722e4..bc58cf45f0 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -21,10 +21,7 @@ return close_machine(target) -/obj/machinery/abductor/experiment/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/abductor/experiment/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) experimentUI(user) diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index 9301d0c239..9af2553644 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -217,7 +217,7 @@ return FALSE return ..() -/obj/structure/bloodsucker/vassalrack/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/bloodsucker/vassalrack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) //. = ..() // Taken from sacrificial altar in divine.dm //if(.) // return @@ -469,7 +469,7 @@ . += {"This is a magical candle which drains at the sanity of the fools who havent yet accepted your master, as long as it is active.\n You can turn it on and off by clicking on it while you are next to it"} */ -/obj/structure/bloodsucker/candelabrum/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/bloodsucker/candelabrum/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/datum/antagonist/vassal/T = user.mind.has_antag_datum(ANTAG_DATUM_VASSAL) if(AmBloodsucker(user) || istype(T)) toggle() diff --git a/code/modules/antagonists/changeling/powers/transform.dm b/code/modules/antagonists/changeling/powers/transform.dm index c0979b6936..8e3a36740b 100644 --- a/code/modules/antagonists/changeling/powers/transform.dm +++ b/code/modules/antagonists/changeling/powers/transform.dm @@ -17,8 +17,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/glasses/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/glasses/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -33,8 +32,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/under/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/under/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -50,8 +48,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/suit/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/suit/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -65,8 +62,7 @@ . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/head/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/head/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -81,8 +77,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/shoes/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/shoes/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -97,8 +92,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/gloves/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/gloves/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -113,8 +107,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/mask/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/mask/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) @@ -131,8 +124,7 @@ ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/changeling/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/changeling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.mind && user.mind.has_antag_datum(/datum/antagonist/changeling)) to_chat(user, "You reabsorb [src] into your body.") qdel(src) diff --git a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm index 21d0035ef1..3ea4668df8 100644 --- a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm +++ b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm @@ -36,8 +36,7 @@ return . = ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/clockwork/city_of_cogs_rift/attack_hand(atom/movable/AM) +/obj/effect/clockwork/city_of_cogs_rift/on_attack_hand(atom/movable/AM) beckon(AM) /obj/effect/clockwork/city_of_cogs_rift/Bumped(atom/movable/AM) diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 90c4bdf8de..4b5523d640 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -27,8 +27,7 @@ /obj/effect/clockwork/sigil/attack_tk(mob/user) return //you can't tk stomp sigils, but you can hit them with something -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/clockwork/sigil/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/clockwork/sigil/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user) && !user.stat) if(is_servant_of_ratvar(user) && user.a_intent != INTENT_HARM) return ..() diff --git a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm index 9106015c0a..ca5efe1d37 100644 --- a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm +++ b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm @@ -63,8 +63,7 @@ user.forceMove(get_turf(linked_gateway)) ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/clockwork/spatial_gateway/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/clockwork/spatial_gateway/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(!uses) return FALSE if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm index d0d3bafe06..2daf5189e4 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm @@ -57,8 +57,7 @@ to_chat(user, "[src] falls dark. It appears you weren't worthy.") return ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clockwork/slab/debug/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clockwork/slab/debug/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(!is_servant_of_ratvar(user)) add_servant_of_ratvar(user) return ..() diff --git a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm index 7578d41b15..19c29762bf 100644 --- a/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm +++ b/code/modules/antagonists/clockcult/clock_items/construct_chassis.dm @@ -31,8 +31,7 @@ . = ..() clockwork_desc = initial(clockwork_desc) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clockwork/construct_chassis/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clockwork/construct_chassis/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(w_class >= WEIGHT_CLASS_HUGE) to_chat(user, "[src] is too cumbersome to carry! Drag it around instead!") return diff --git a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm index 8c529d43a6..f87f96b240 100644 --- a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm +++ b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm @@ -41,7 +41,7 @@ affected += try_use_power(MIN_CLOCKCULT_POWER*4) return affected -/obj/structure/destructible/clockwork/powered/clockwork_obelisk/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/powered/clockwork_obelisk/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm index 2c84a5b332..77a629145d 100644 --- a/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm +++ b/code/modules/antagonists/clockcult/clock_structures/eminence_spire.dm @@ -11,7 +11,7 @@ var/selection_timer //Timer ID; this is canceled if the vote is canceled var/kingmaking -/obj/structure/destructible/clockwork/eminence_spire/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/eminence_spire/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm index 385b9a5431..44c7f78380 100644 --- a/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm +++ b/code/modules/antagonists/clockcult/clock_structures/heralds_beacon.dm @@ -58,7 +58,7 @@ . += "There are [time_remaining] second[time_remaining != 1 ? "s" : ""] remaining to vote." . += "There are [voters.len]/[votes_needed] votes to activate the beacon!" -/obj/structure/destructible/clockwork/heralds_beacon/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/heralds_beacon/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm index 24d0651444..40cadb53a2 100644 --- a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm +++ b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm @@ -30,7 +30,7 @@ toggle() return TRUE -/obj/structure/destructible/clockwork/powered/mania_motor/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/powered/mania_motor/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/lever.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/lever.dm index d4a02cc3e1..55347685f4 100644 --- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/lever.dm +++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/lever.dm @@ -6,7 +6,7 @@ max_integrity = 75 icon_state = "lever" -/obj/structure/destructible/clockwork/trap/trigger/lever/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/trap/trigger/lever/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/repeater.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/repeater.dm index e7d4e18c43..7a528786e2 100644 --- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/repeater.dm +++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/repeater.dm @@ -6,7 +6,7 @@ max_integrity = 15 //Fragile! icon_state = "repeater" -/obj/structure/destructible/clockwork/trap/trigger/repeater/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/destructible/clockwork/trap/trigger/repeater/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 9b77e70a73..3ea160c5cc 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -67,7 +67,7 @@ Runes can either be invoked by one's self or with many different cultists. Each to_chat(user, "You disrupt the magic of [src] with [I].") qdel(src) -/obj/effect/rune/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/rune/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm index 7d7031dad4..272b154828 100644 --- a/code/modules/antagonists/devil/true_devil/_true_devil.dm +++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm @@ -144,7 +144,7 @@ /mob/living/carbon/true_devil/resist_fire() //They're immune to fire. -/mob/living/carbon/true_devil/attack_hand(mob/living/carbon/human/M) +/mob/living/carbon/true_devil/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) switch(M.a_intent) diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index 89352d81bd..2764005c14 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -36,7 +36,7 @@ if(A) notify_ghosts("A swarmer shell has been created in [A.name].", 'sound/effects/bin_close.ogg', source = src, action = NOTIFY_ATTACK, flashwindow = FALSE, ignore_dnr_observers = TRUE) -/obj/effect/mob_spawn/swarmer/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/mob_spawn/swarmer/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 36c444f02d..2a1b13df79 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -90,7 +90,7 @@ if(bombassembly) bombassembly.on_found(finder) -/obj/item/onetankbomb/attack_hand() //also for mousetraps +/obj/item/onetankbomb/on_attack_hand() //also for mousetraps . = ..() if(.) return diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index c960a7f039..bf56449a0c 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -87,7 +87,7 @@ if(a_right) a_right.dropped(user) -/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/on_attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess . = ..() if(.) return diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 8cb6eb66fb..6e8e2846a2 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -125,7 +125,7 @@ return refreshBeam() -/obj/item/assembly/infra/attack_hand() +/obj/item/assembly/infra/on_attack_hand() . = ..() refreshBeam() diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 90d4662c15..2c005b971d 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -84,8 +84,7 @@ playsound(src, 'sound/weapons/handcuffs.ogg', 30, TRUE, -3) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/assembly/mousetrap/attack_hand(mob/living/carbon/human/user) +/obj/item/assembly/mousetrap/on_attack_hand(mob/living/carbon/human/user) if(armed) if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) var/which_hand = BODY_ZONE_PRECISE_L_HAND diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index 03c0f5178a..3426208fae 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -53,8 +53,7 @@ to_chat(M, "\The [src] has been returned to base!") STOP_PROCESSING(SSobj, src) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/ctf/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/ctf/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(!is_ctf_target(user) && !anyonecanpickup) to_chat(user, "Non players shouldn't be moving the flag!") return @@ -679,10 +678,7 @@ /obj/machinery/control_point/attackby(mob/user, params) capture(user) -/obj/machinery/control_point/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/control_point/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) capture(user) /obj/machinery/control_point/proc/capture(mob/user) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 4b2f1e9962..e68c45a84c 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -594,8 +594,7 @@ assignedrole = "Space Bar Patron" job_description = "Space Bar Patron" -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/mob_spawn/human/alive/space_bar_patron/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/mob_spawn/human/alive/space_bar_patron/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)",,"Yes","No") if(despawn == "No" || !loc || !Adjacent(user)) return diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 54561c8a24..d9fbd01314 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -287,7 +287,7 @@ if(!target.IsUnconscious()) to_chat(target, "Your zealous conspirationism rapidly dissipates as the donned hat warps up into a ruined mess. All those theories starting to sound like nothing but a ridicolous fanfare.") -/obj/item/clothing/head/foilhat/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/head/foilhat/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!warped && iscarbon(user)) var/mob/living/carbon/C = user if(src == C.head) diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index c3934aa78c..51a526d089 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -219,7 +219,7 @@ lock = TRUE return -/obj/item/clothing/neck/petcollar/locked/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/neck/petcollar/locked/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user && user.get_item_by_slot(SLOT_NECK) && lock != FALSE) to_chat(user, "The collar is locked! You'll need unlock the collar before you can take it off!") return diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index cf2ac93360..89511a7b15 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -143,7 +143,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(L && (L.density || prob(10))) L.ex_act(EXPLODE_HEAVY) -obj/effect/immovablerod/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +obj/effect/immovablerod/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(ishuman(user)) var/mob/living/carbon/human/U = user if(U.job in list("Research Director")) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index ad786561f4..dbda71cff3 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -345,8 +345,7 @@ for(var/datum/spacevine_mutation/SM in mutations) SM.on_cross(src, AM) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/spacevine/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/spacevine/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) for(var/datum/spacevine_mutation/SM in mutations) SM.on_hit(src, user) user_unbuckle_mob(user, user) diff --git a/code/modules/events/travelling_trader.dm b/code/modules/events/travelling_trader.dm index b7afc3440e..9b9e01fd26 100644 --- a/code/modules/events/travelling_trader.dm +++ b/code/modules/events/travelling_trader.dm @@ -60,7 +60,7 @@ input_speech = replacetext(input_speech, "given_item", given_item.name) return input_speech -/mob/living/carbon/human/dummy/travelling_trader/attack_hand(mob/living/carbon/human/H) +/mob/living/carbon/human/dummy/travelling_trader/on_attack_hand(mob/living/carbon/human/H) if(active && last_speech + 3 < world.realtime) //can only talk once per 3 seconds, to avoid spam last_speech = world.realtime if(initial_speech) diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index d05f0b334f..42005340bd 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -134,7 +134,7 @@ God bless America. /obj/machinery/deepfryer/attack_ai(mob/user) return -/obj/machinery/deepfryer/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/deepfryer/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(frying) if(frying.loc == src) to_chat(user, "You eject [frying] from [src].") diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 53da7326a2..e4148d849a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -63,10 +63,7 @@ /obj/machinery/gibber/relaymove(mob/living/user) go_out() -/obj/machinery/gibber/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/gibber/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(stat & (NOPOWER|BROKEN)) return if(operating) diff --git a/code/modules/food_and_drinks/kitchen_machinery/grill.dm b/code/modules/food_and_drinks/kitchen_machinery/grill.dm index a5a90b33e4..09e1d7b1c6 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/grill.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/grill.dm @@ -107,7 +107,7 @@ /obj/machinery/grill/attack_ai(mob/user) return -/obj/machinery/grill/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/grill/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(grilled_item) to_chat(user, "You take out [grilled_item] from [src].") grilled_item.forceMove(drop_location()) diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index 006c3fb6ad..a2603d07ab 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -106,8 +106,7 @@ START_PROCESSING(SSobj, src) update_icon() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/pizzabox/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/pizzabox/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.get_inactive_held_item() != src) return ..() if(open) diff --git a/code/modules/holiday/halloween/bartholomew.dm b/code/modules/holiday/halloween/bartholomew.dm index eb90a0c82d..c9a4a946a3 100644 --- a/code/modules/holiday/halloween/bartholomew.dm +++ b/code/modules/holiday/halloween/bartholomew.dm @@ -31,7 +31,7 @@ return say("It doesn't seem like that's magical enough!") -/obj/item/barthpot/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/barthpot/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!active) say("Meow!") return diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm index 01e71d1129..4561e0ae3e 100644 --- a/code/modules/holiday/halloween/jacqueen.dm +++ b/code/modules/holiday/halloween/jacqueen.dm @@ -76,7 +76,7 @@ health = 25 poof() -/mob/living/simple_animal/jacq/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/jacq/on_attack_hand(mob/living/carbon/human/M) if(!active) say("Hello there [gender_check(M)]!") return ..() @@ -406,14 +406,14 @@ . = ..() ADD_TRAIT(src, TRAIT_NODROP, GLUED_ITEM_TRAIT) -/obj/item/clothing/suit/ghost_sheet/sticky/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/suit/ghost_sheet/sticky/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) to_chat(user, "Boooooo~!") return else ..() -/obj/item/clothing/suit/ghost_sheet/sticky/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/suit/ghost_sheet/sticky/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) to_chat(user, "Boooooo~!") return diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index b6c89bcf0e..e4564ecb7e 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -105,10 +105,7 @@ if(user.transferItemToLoc(W, drop_location())) visible_message(" [user] dunks [W] into \the [src]!") -/obj/structure/holohoop/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/holohoop/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) var/mob/living/L = user.pulling if(user.grab_state < GRAB_AGGRESSIVE) @@ -164,7 +161,7 @@ /obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob, params) to_chat(user, "The device is a solid button, there's nothing you can do with it!") -/obj/machinery/readybutton/attack_hand(mob/user as mob) +/obj/machinery/readybutton/on_attack_hand(mob/user as mob) . = ..() if(.) return diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index f686bee63a..169c9061d3 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -134,7 +134,7 @@ tiled_dirt = FALSE baseturfs = /turf/open/floor/holofloor/snow -/turf/open/floor/holofloor/snow/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/open/floor/holofloor/snow/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 70e204a14f..76e36a1725 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -56,7 +56,7 @@ else return ..() -/obj/structure/fermenting_barrel/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/fermenting_barrel/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) open = !open if(open) DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE) diff --git a/code/modules/hydroponics/grown/chili.dm b/code/modules/hydroponics/grown/chili.dm index 42674029fb..1f60afe655 100644 --- a/code/modules/hydroponics/grown/chili.dm +++ b/code/modules/hydroponics/grown/chili.dm @@ -80,10 +80,7 @@ foodtype = FRUIT wine_power = 50 -/obj/item/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/reagent_containers/food/snacks/grown/ghost_chili/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if( ismob(loc) ) held_mob = loc START_PROCESSING(SSobj, src) diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 55adab9dcb..cf7d879d9a 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -205,10 +205,7 @@ return ..() -/obj/structure/bonfire/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/bonfire/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(burning) to_chat(user, "You need to extinguish [src] before removing the logs!") return diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index b673937c9c..06179d1087 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -888,10 +888,7 @@ return ..() -/obj/machinery/hydroponics/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/hydroponics/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(issilicon(user)) //How does AI know what plant is? return if(harvest) diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index c3e0a7abcc..c85e5cc2ca 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -611,7 +611,7 @@ return ..() -/obj/item/electronic_assembly/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/electronic_assembly/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(anchored) attack_self(user) return diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index e5d9672d4a..80ce2522ff 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -112,7 +112,7 @@ else return ..() -/obj/structure/bookcase/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/bookcase/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(. || !istype(user)) return diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index f65ea27216..f777246453 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -523,10 +523,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums else return ..() -/obj/machinery/libraryscanner/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/libraryscanner/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) usr.set_machine(src) var/dat = "" // if(cache) diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index d2da0f779e..8c9b0b53e1 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -149,8 +149,7 @@ if(100) new /obj/item/clothing/head/bearpelt(src) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/closet/crate/secure/loot/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/closet/crate/secure/loot/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(locked) to_chat(user, "The crate is locked with a Deca-code lock.") var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index bf7a966f7d..3ee284588d 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -275,10 +275,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also var/anti_spam_cd = 0 //The linking process might be a bit intensive, so this here to prevent over use. var/console_range = 15 //Wifi range of the beacon to find the aux base console -/obj/structure/mining_shuttle_beacon/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/mining_shuttle_beacon/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(anchored) to_chat(user, "Landing zone already set.") return diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index ae2889e8a2..a2a6d64b68 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( icon_state = "[initial(icon_state)][lowertext(picked_color)]-on" set_light(light_range, light_power, GLOB.marker_beacon_colors[picked_color]) -/obj/structure/marker_beacon/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/marker_beacon/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 79d138f290..061d0266b1 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -167,10 +167,7 @@ qdel(src) return TRUE -/obj/item/gps/computer/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/gps/computer/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) attack_self(user) //Bed diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index c0d63fab9c..4d0b7dff21 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -141,10 +141,7 @@ GLOBAL_LIST(labor_sheet_values) icon_state = "console" density = FALSE -/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/mineral/labor_points_checker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.examinate(src) /obj/machinery/mineral/labor_points_checker/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index e39b833793..9710773309 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -62,10 +62,7 @@ else return ..() -/obj/structure/flora/ash/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/flora/ash/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!harvested && !needs_sharp_harvest) user.visible_message("[user] starts to harvest from [src].","You begin to harvest from [src].") if(do_after(user, harvest_time, target = src)) diff --git a/code/modules/mining/lavaland/ruins/gym.dm b/code/modules/mining/lavaland/ruins/gym.dm index d454c3d118..c26631be74 100644 --- a/code/modules/mining/lavaland/ruins/gym.dm +++ b/code/modules/mining/lavaland/ruins/gym.dm @@ -8,7 +8,7 @@ var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\ 'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg') -/obj/structure/punching_bag/attack_hand(mob/user as mob) +/obj/structure/punching_bag/on_attack_hand(mob/user as mob) . = ..() if(.) return @@ -29,7 +29,7 @@ /obj/structure/weightmachine/proc/AnimateMachine(mob/living/user) return -/obj/structure/weightmachine/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/weightmachine/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 6567793b80..143aba3fe4 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -79,8 +79,7 @@ no_destination_swap = 1 var/static/list/dumb_rev_heads = list() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/machinery/computer/shuttle/mining/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/computer/shuttle/mining/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(is_station_level(user.z) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads)) to_chat(user, "You get a feeling that leaving the station might be a REALLY dumb idea...") dumb_rev_heads += user.mind diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index fb37dcbca0..627d79d6ba 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -118,7 +118,7 @@ deathmessage = "blows apart!" ..() -/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/hostile/mining_drone/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) return diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index f9d18fecc2..ae42ca4745 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -38,10 +38,7 @@ ui_interact(user) . = ..() -/obj/structure/ore_box/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/ore_box/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(Adjacent(user)) ui_interact(user) diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 5b92bf3dea..a2883ddeb2 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -45,7 +45,7 @@ In all, this is a lot like the monkey code. /N return attack_alien(L) -/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M) +/mob/living/carbon/alien/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) //To allow surgery to return properly. return diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index 5ebf6210d0..8177360d4a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -21,7 +21,7 @@ "[user] has [hitverb] [src]!", null, COMBAT_MESSAGE_RANGE) return 1 -/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M) +/mob/living/carbon/alien/humanoid/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) //To allow surgery to return properly. return diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index 7dabcf5abf..5832996a2c 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -1,6 +1,6 @@ -/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M) +/mob/living/carbon/alien/larva/on_attack_hand(mob/living/carbon/human/M) . = ..() if(. || M.a_intent == INTENT_HELP || M.a_intent == INTENT_GRAB) return diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index c5a69553aa..ad8828572c 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -58,8 +58,7 @@ /obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens return attack_hand(user) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/clothing/mask/facehugger/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/mask/facehugger/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if((stat == CONSCIOUS && !sterile) && !isalien(user)) if(Leap(user)) return diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 054c1a6857..e5bc7ea21e 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -111,8 +111,7 @@ /mob/living/carbon/attack_drone(mob/living/simple_animal/drone/user) 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, act_intent, unarmed_attack_flags) +/mob/living/carbon/on_attack_hand(mob/living/carbon/human/user, act_intent, unarmed_attack_flags) . = ..() if(.) //was the attack blocked? return diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 79dd318b20..670d8e9c67 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -108,7 +108,7 @@ adjustBruteLoss(15) return 1 -/mob/living/carbon/human/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/mob/living/carbon/human/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) //To allow surgery to return properly. return diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 03e9c90b1c..13d234092c 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -353,7 +353,7 @@ battle_screech() a_intent = INTENT_HARM -/mob/living/carbon/monkey/attack_hand(mob/living/L) +/mob/living/carbon/monkey/on_attack_hand(mob/living/L) if(L.a_intent == INTENT_HARM && prob(MONKEY_RETALIATE_HARM_PROB)) retaliate(L) else if(L.a_intent == INTENT_DISARM && prob(MONKEY_RETALIATE_DISARM_PROB)) diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm index 8f862af8fa..16b3c1a79e 100644 --- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm +++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm @@ -42,7 +42,7 @@ adjustBruteLoss(15) return TRUE -/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M) +/mob/living/carbon/monkey/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) //To allow surgery to return properly. return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index b15275d57b..64835358db 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -270,7 +270,7 @@ user.set_pull_offsets(src, grab_state) return 1 -/mob/living/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/mob/living/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) ..() //Ignoring parent return value here. SEND_SIGNAL(src, COMSIG_MOB_ATTACK_HAND, user) if((user != src) && act_intent != INTENT_HELP && (mob_run_block(user, 0, user.name, ATTACK_TYPE_UNARMED | ATTACK_TYPE_MELEE | ((unarmed_attack_flags & UNARMED_ATTACK_PARRY)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE), null, user, check_zone(user.zone_selected), null) & BLOCK_SUCCESS)) diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index dcb7ac66c9..64509d2deb 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -28,8 +28,7 @@ fold_in(force = 1) DefaultCombatKnockdown(200) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/user) +/mob/living/silicon/pai/on_attack_hand(mob/living/carbon/human/user) switch(user.a_intent) if(INTENT_HELP) visible_message("[user] gently pats [src] on the head, eliciting an off-putting buzzing from its holographic field.", diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index e337618e4b..746c4f469d 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -62,8 +62,7 @@ return -//ATTACK HAND IGNORING PARENT RETURN VALUE -/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user) +/mob/living/silicon/robot/on_attack_hand(mob/living/carbon/human/user) add_fingerprint(user) if(opened && !wiresexposed && cell && !issilicon(user)) cell.update_icon() diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 0850f0f886..8be2183d3b 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -70,7 +70,7 @@ return TRUE return FALSE -/mob/living/silicon/attack_hand(mob/living/carbon/human/M) +/mob/living/silicon/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) //the attack was blocked return diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 278bb37d0d..b003e066ef 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -1,6 +1,6 @@ -/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) //the attack was blocked return diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index a347b04e50..a596200d6e 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -286,7 +286,7 @@ return TRUE //Successful completion. Used to prevent child process() continuing if this one is ended early. -/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H) +/mob/living/simple_animal/bot/on_attack_hand(mob/living/carbon/human/H) if(H.a_intent == INTENT_HELP) interact(H) else diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 1f81e8db29..96af6d2876 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -177,7 +177,7 @@ Auto Patrol[]"}, target = H mode = BOT_HUNT -/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H) +/mob/living/simple_animal/bot/ed209/on_attack_hand(mob/living/carbon/human/H) if(H.a_intent == INTENT_HARM) retaliate(H) return ..() diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 43f18d3890..0ee600ed1d 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -112,7 +112,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, target = H mode = BOT_HUNT -/mob/living/simple_animal/bot/honkbot/attack_hand(mob/living/carbon/human/H) +/mob/living/simple_animal/bot/honkbot/on_attack_hand(mob/living/carbon/human/H) if(H.a_intent == INTENT_HARM) retaliate(H) addtimer(CALLBACK(src, .proc/react_buzz), 5) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index f998f58f02..fb5a889d89 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -604,7 +604,7 @@ /mob/living/simple_animal/bot/medbot/proc/get_healchem_toxin(mob/M) return HAS_TRAIT(M, TRAIT_TOXINLOVER)? treatment_tox_toxlover : treatment_tox -/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H) +/mob/living/simple_animal/bot/medbot/on_attack_hand(mob/living/carbon/human/H) if(H.a_intent == INTENT_DISARM && mode != BOT_TIPPED) H.visible_message("[H] begins tipping over [src].", "You begin tipping over [src]...") diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index cfff3eb751..2576ddec4e 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -173,7 +173,7 @@ Auto Patrol: []"}, /mob/living/simple_animal/bot/secbot/proc/special_retaliate_after_attack(mob/user) //allows special actions to take place after being attacked. return -/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H) +/mob/living/simple_animal/bot/secbot/on_attack_hand(mob/living/carbon/human/H) if((H.a_intent == INTENT_HARM) || (H.a_intent == INTENT_DISARM)) retaliate(H) if(special_retaliate_after_attack(H)) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index d30fa1b49f..c21875d1db 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -283,7 +283,7 @@ if(!D.is_decorated) D.decorate_donut() -/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L) +/mob/living/simple_animal/pet/cat/cak/on_attack_hand(mob/living/L) . = ..() if(.) //the attack was blocked return diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 1f733a4d55..51e7ee6c03 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -166,7 +166,7 @@ if(stat == CONSCIOUS) udder.generateMilk(milk_reagent) -/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M) +/mob/living/simple_animal/cow/on_attack_hand(mob/living/carbon/M) if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead) M.visible_message("[M] tips over [src].", "You tip over [src].") diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index d396434708..4e6923615d 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -86,8 +86,7 @@ /obj/guardian_bomb/attackby(mob/living/user) detonate(user) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/guardian_bomb/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/guardian_bomb/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) detonate(user) /obj/guardian_bomb/examine(mob/user) diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 5dbf3e8e3b..8180d7dfc5 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -131,7 +131,7 @@ mob/living/simple_animal/hostile/bear/butter //The mighty companion to Cak. Seve if(health < maxHealth) heal_overall_damage(10) //Fast life regen, makes it hard for you to get eaten to death. -/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. +/mob/living/simple_animal/hostile/bear/butter/on_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) L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 1) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index aa4ff328b5..18abb019d3 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -385,10 +385,7 @@ Difficulty: Very Hard if(isliving(speaker)) ActivationReaction(speaker, ACTIVATE_SPEECH) -/obj/machinery/anomalous_crystal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/anomalous_crystal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) ActivationReaction(user, ACTIVATE_TOUCH) /obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 982b91c2c9..87ec79abcf 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -148,7 +148,7 @@ While using this makes the system rely on OnFire, it still gives options for tim desc = "You're not quite sure how a signal can be menacing." invisibility = 100 -/obj/structure/elite_tumor/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/elite_tumor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(ishuman(user)) switch(activity) diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 4c9afd3784..9101430ccc 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -170,7 +170,7 @@ Bruise() ..() -/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/hostile/mushroom/on_attack_hand(mob/living/carbon/human/M) . = ..() if(.) // the attack was blocked return diff --git a/code/modules/mob/living/simple_animal/hostile/netherworld.dm b/code/modules/mob/living/simple_animal/hostile/netherworld.dm index 3620e3ee5f..e21e3e0693 100644 --- a/code/modules/mob/living/simple_animal/hostile/netherworld.dm +++ b/code/modules/mob/living/simple_animal/hostile/netherworld.dm @@ -86,7 +86,7 @@ .=..() START_PROCESSING(SSprocessing, src) -/obj/structure/spawner/nether/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/spawner/nether/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.visible_message("[user] is violently pulled into the link!", \ "Touching the portal, you are quickly pulled through into a world of unimaginable horror!") contents.Add(user) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 03aac4037a..e8137feeb1 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -47,7 +47,7 @@ else clear_alert("temp") -/mob/living/simple_animal/hostile/retaliate/clown/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/hostile/retaliate/clown/on_attack_hand(mob/living/carbon/human/M) ..() playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index de8a6fb6a0..4fcb1ed5bf 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -271,7 +271,7 @@ * Attack responces */ //Humans, monkeys, aliens -/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M) +/mob/living/simple_animal/parrot/on_attack_hand(mob/living/carbon/M) ..() if(client) return diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index f7876b3516..baa8882980 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -296,7 +296,7 @@ discipline_slime(user) return ..() -/mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M) +/mob/living/simple_animal/slime/on_attack_hand(mob/living/carbon/human/M) if(buckled) M.do_attack_animation(src, ATTACK_EFFECT_DISARM) if(buckled == M) diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm index 4e4c1fcdce..4781cbd8bc 100644 --- a/code/modules/modular_computers/computers/item/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop.dm @@ -64,10 +64,7 @@ return M.put_in_hand(src, H.held_index) -/obj/item/modular_computer/laptop/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/modular_computer/laptop/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(screen_on && isturf(loc)) return attack_self(user) diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 89c6166a0d..7e384c3ddd 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -100,7 +100,6 @@ if(cpu) return cpu.AltClick(user) -//ATTACK HAND IGNORING PARENT RETURN VALUE // On-click handling. Turns on the computer if it's off and opens the GUI. /obj/machinery/modular_computer/interact(mob/user) if(cpu) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index b368589bc3..b8f2c95762 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -137,7 +137,7 @@ virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. -/obj/structure/filingcabinet/security/attack_hand() +/obj/structure/filingcabinet/security/on_attack_hand() populate() . = ..() @@ -170,8 +170,7 @@ virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/filingcabinet/medical/attack_hand() +/obj/structure/filingcabinet/medical/on_attack_hand() populate() . = ..() diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 770a6682e0..3937720f74 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -66,10 +66,7 @@ return ..() -/obj/item/papercutter/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/papercutter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) add_fingerprint(user) if(!storedcutter) to_chat(user, "The cutting blade is gone! You can't use [src] now.") diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 2931110882..53b7aafd0c 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -62,8 +62,7 @@ /obj/item/paper_bin/attack_paw(mob/user) return attack_hand(user) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/paper_bin/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/paper_bin/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.lying) return if(bin_pen) @@ -149,7 +148,7 @@ papertype = /obj/item/paper/natural resistance_flags = FLAMMABLE -/obj/item/paper_bin/bundlenatural/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/paper_bin/bundlenatural/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) ..() if(total_paper < 1) qdel(src) diff --git a/code/modules/photography/photos/frame.dm b/code/modules/photography/photos/frame.dm index 6f7bc643c8..d306c46815 100644 --- a/code/modules/photography/photos/frame.dm +++ b/code/modules/photography/photos/frame.dm @@ -21,8 +21,7 @@ to_chat(user, "\The [src] already contains a photo.") ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/wallframe/picture/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/wallframe/picture/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.get_inactive_held_item() != src) ..() return @@ -141,10 +140,7 @@ ..() -/obj/structure/sign/picture_frame/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/structure/sign/picture_frame/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(framed) framed.show(user) diff --git a/code/modules/pool/pool_drain.dm b/code/modules/pool/pool_drain.dm index 8deb9b1ffe..527c25b9f0 100644 --- a/code/modules/pool/pool_drain.dm +++ b/code/modules/pool/pool_drain.dm @@ -154,7 +154,7 @@ else new /mob/living/simple_animal/hostile/shark/laser(loc) -/obj/machinery/pool/filter/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/pool/filter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) to_chat(user, "You search the filter.") for(var/obj/O in contents) O.forceMove(loc) diff --git a/code/modules/pool/pool_main.dm b/code/modules/pool/pool_main.dm index 30d1744b57..98189cc8a4 100644 --- a/code/modules/pool/pool_main.dm +++ b/code/modules/pool/pool_main.dm @@ -177,7 +177,7 @@ else return ..() -/turf/open/pool/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/open/pool/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/pool/pool_structures.dm b/code/modules/pool/pool_structures.dm index 6b71e95639..ec5d455958 100644 --- a/code/modules/pool/pool_structures.dm +++ b/code/modules/pool/pool_structures.dm @@ -11,7 +11,7 @@ layer = ABOVE_MOB_LAYER dir = EAST -/obj/structure/pool/ladder/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/pool/ladder/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return @@ -52,7 +52,7 @@ user.pixel_x = initial_px user.pixel_y = initial_py -/obj/structure/pool/Lboard/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/pool/Lboard/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) var/mob/living/carbon/jumper = user if(jumping) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 19e32bae0b..9d97f401c8 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -833,10 +833,7 @@ // attack with hand - remove cell (if cover open) or interact with the APC -/obj/machinery/power/apc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/power/apc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(opened && (!issilicon(user))) if(cell) user.visible_message("[user] removes \the [cell] from [src]!","You remove \the [cell].") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index c8b02669e8..6dcb08512c 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -564,10 +564,7 @@ By design, d1 is the smallest direction and d2 is the highest icon_state = "[initial(item_state)][amount < 3 ? amount : ""]" name = "cable [amount < 3 ? "piece" : "coil"]" -/obj/item/stack/cable_coil/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/item/stack/cable_coil/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/obj/item/stack/cable_coil/new_cable = ..() if(istype(new_cable)) new_cable.color = color diff --git a/code/modules/power/floodlight.dm b/code/modules/power/floodlight.dm index 2bd4c04402..466030b83c 100644 --- a/code/modules/power/floodlight.dm +++ b/code/modules/power/floodlight.dm @@ -92,10 +92,7 @@ else . = ..() -/obj/machinery/power/floodlight/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/power/floodlight/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) var/current = setting if(current == 1) current = light_setting_list.len diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 76154907ae..30a7aa152b 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne /obj/machinery/gravity_generator/part/get_status() return main_part?.get_status() -/obj/machinery/gravity_generator/part/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/gravity_generator/part/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return main_part.attack_hand(user) /obj/machinery/gravity_generator/part/set_broken() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 77e41f5f57..2ecc8f44d0 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -595,7 +595,7 @@ // attack with hand - remove tube/bulb // if hands aren't protected and the light is on, burn the player -/obj/machinery/light/attack_hand(mob/living/carbon/human/user) +/obj/machinery/light/on_attack_hand(mob/living/carbon/human/user) . = ..() if(.) return diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 5ef66e26d9..dfb51df9cf 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -21,8 +21,7 @@ FG2.fields -= src return ..() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/machinery/field/containment/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/field/containment/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(get_dist(src, user) > 1) return FALSE else diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 96f8b4e996..cc3a19cf55 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -59,7 +59,7 @@ last_failed_movement = direct return 0 -/obj/singularity/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/singularity/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) consume(user) return TRUE diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 823ba75e43..8559b8ba45 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -571,7 +571,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/attack_ai(mob/user) return -/obj/machinery/power/supermatter_crystal/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/power/supermatter_crystal/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index e5dc056011..e4ab2df038 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -97,8 +97,7 @@ w_class += S.w_class //so pistols do not fit in pockets when suppressed update_icon() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/gun/ballistic/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/gun/ballistic/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc == user) if(suppressed && can_unsuppress) var/obj/item/suppressor/S = suppressed diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 89e30e765b..b31fd2d1e0 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -327,8 +327,7 @@ . = ..() update_icon() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/gun/ballistic/automatic/l6_saw/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/gun/ballistic/automatic/l6_saw/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(loc != user) ..() return //let them pick it up diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index c2dd5bb42d..244bc5b124 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -29,8 +29,7 @@ /obj/item/minigunpack/process() overheat = max(0, overheat - heat_diffusion) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/minigunpack/attack_hand(var/mob/living/carbon/user) +/obj/item/minigunpack/on_attack_hand(var/mob/living/carbon/user) if(src.loc == user) if(!armed) if(user.get_item_by_slot(SLOT_BACK) == src) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index efdd137ece..9784f062a3 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -354,7 +354,7 @@ obj_flags |= EMAGGED return TRUE -/obj/item/hypospray/mkii/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/hypospray/mkii/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() //Don't bother changing this or removing it from containers will break. /obj/item/hypospray/mkii/attack(obj/item/I, mob/user, params) diff --git a/code/modules/reagents/reagent_containers/maunamug.dm b/code/modules/reagents/reagent_containers/maunamug.dm index 1600699226..3dfac8a631 100644 --- a/code/modules/reagents/reagent_containers/maunamug.dm +++ b/code/modules/reagents/reagent_containers/maunamug.dm @@ -88,7 +88,7 @@ user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") update_icon() -/obj/item/reagent_containers/glass/maunamug/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/reagent_containers/glass/maunamug/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) if(cell && open) cell.update_icon() user.put_in_hands(cell) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 4ab1470667..52284b2c11 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -42,8 +42,7 @@ mode = !mode update_icon() -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/item/reagent_containers/syringe/attack_hand() +/obj/item/reagent_containers/syringe/on_attack_hand() . = ..() update_icon() diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 0131e6d028..819012a61a 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -79,7 +79,7 @@ else . += "There are no paper cups left." -/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/reagent_dispensers/water_cooler/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index d8cb462c97..b81c3b88f8 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -174,10 +174,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) return ..() // attack with hand, move pulled object onto conveyor -/obj/machinery/conveyor/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/machinery/conveyor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) user.Move_Pulled(src) // make the conveyor broken diff --git a/code/modules/research/xenobiology/crossbreeding/_clothing.dm b/code/modules/research/xenobiology/crossbreeding/_clothing.dm index 996b84131f..1ac09652b5 100644 --- a/code/modules/research/xenobiology/crossbreeding/_clothing.dm +++ b/code/modules/research/xenobiology/crossbreeding/_clothing.dm @@ -57,7 +57,7 @@ Slimecrossing Armor light_color = newcolor set_light(5) -/obj/structure/light_prism/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/light_prism/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) to_chat(user, "You dispel [src]") qdel(src) @@ -118,7 +118,7 @@ Slimecrossing Armor ..() REMOVE_TRAIT(user, TRAIT_PACIFISM, "peaceflower_[REF(src)]") -/obj/item/clothing/head/peaceflower/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/head/peaceflower/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) var/mob/living/carbon/C = user if(src == C.head) diff --git a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm index 65530031c0..088683ccd2 100644 --- a/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm +++ b/code/modules/ruins/lavalandruin_code/elephantgraveyard.dm @@ -73,7 +73,7 @@ create_reagents(20) reagents.add_reagent(dispensedreagent, 20) -/obj/structure/sink/oil_well/attack_hand(mob/M) +/obj/structure/sink/oil_well/on_attack_hand(mob/M) flick("puddle-oil-splash",src) reagents.reaction(M, TOUCH, 20) //Covers target in 20u of oil. to_chat(M, "You touch the pool of oil, only to get oil all over yourself. It would be wise to wash this off with water.") diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index e6f87eea13..fd2f4377e7 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -87,8 +87,7 @@ else return QDEL_HINT_LETMELIVE -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/necropolis_gate/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/necropolis_gate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(locked || uses == 0) to_chat(user, "It's [open ? "stuck open":"locked"].") return @@ -166,8 +165,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) else return QDEL_HINT_LETMELIVE -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/necropolis_gate/legion_gate/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/necropolis_gate/legion_gate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!open && !changing_openness) var/safety = alert(user, "You think this might be a bad idea...", "Knock on the door?", "Proceed", "Abort") if(safety == "Abort" || !in_range(src, user) || !src || open || changing_openness || user.incapacitated()) diff --git a/code/modules/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/ruins/objects_and_mobs/sin_ruins.dm index 8a98a1939f..e87382cd6a 100644 --- a/code/modules/ruins/objects_and_mobs/sin_ruins.dm +++ b/code/modules/ruins/objects_and_mobs/sin_ruins.dm @@ -57,7 +57,7 @@ canvas rotting away and contents vanishing.") qdel(src) -/obj/structure/cursed_money/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/structure/cursed_money/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(.) return diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index b74b32009f..d97eae5766 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -263,7 +263,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) /turf/closed/indestructible/hoteldoor/attack_tk(mob/user) return //need to be close. -/turf/closed/indestructible/hoteldoor/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/turf/closed/indestructible/hoteldoor/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) promptExit(user) /turf/closed/indestructible/hoteldoor/attack_animal(mob/user) diff --git a/code/modules/shuttle/custom_shuttle.dm b/code/modules/shuttle/custom_shuttle.dm index 6ff15c628e..c71b6ba9a8 100644 --- a/code/modules/shuttle/custom_shuttle.dm +++ b/code/modules/shuttle/custom_shuttle.dm @@ -257,7 +257,7 @@ return ..() -/obj/machinery/computer/camera_advanced/shuttle_docker/custom/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/computer/camera_advanced/shuttle_docker/custom/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!shuttleId) to_chat(user, "You must link the console to a shuttle first.") return diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 0cf348a95b..195e87720c 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -29,7 +29,7 @@ . = ..() GLOB.navigation_computers -= src -/obj/machinery/computer/camera_advanced/shuttle_docker/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/computer/camera_advanced/shuttle_docker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(jammed) to_chat(user, "The Syndicate is jamming the console!") return diff --git a/code/modules/shuttle/shuttle_creation/shuttle_creator_console.dm b/code/modules/shuttle/shuttle_creation/shuttle_creator_console.dm index 9af6d7fe9f..314d5e8b80 100644 --- a/code/modules/shuttle/shuttle_creation/shuttle_creator_console.dm +++ b/code/modules/shuttle/shuttle_creation/shuttle_creator_console.dm @@ -61,7 +61,7 @@ if(user?.client) user.client.images -= eyeobj.user_image -/obj/machinery/computer/camera_advanced/shuttle_creator/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/machinery/computer/camera_advanced/shuttle_creator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!is_operational()) //you cant use broken machine you chumbis return if(current_user) diff --git a/code/modules/spells/spell_types/spacetime_distortion.dm b/code/modules/spells/spell_types/spacetime_distortion.dm index bec0f7871a..5797cbf8b7 100644 --- a/code/modules/spells/spell_types/spacetime_distortion.dm +++ b/code/modules/spells/spell_types/spacetime_distortion.dm @@ -110,8 +110,7 @@ else walk_link(user) -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/effect/cross_action/spacetime_dist/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/effect/cross_action/spacetime_dist/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) walk_link(user) /obj/effect/cross_action/spacetime_dist/attack_paw(mob/user) diff --git a/code/modules/vehicles/cars/car.dm b/code/modules/vehicles/cars/car.dm index fb30e66f97..4545fab2a7 100644 --- a/code/modules/vehicles/cars/car.dm +++ b/code/modules/vehicles/cars/car.dm @@ -57,7 +57,7 @@ return FALSE return ..() -/obj/vehicle/sealed/car/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/vehicle/sealed/car/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) . = ..() if(!(car_traits & CAN_KIDNAP)) return diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index 547eef7af2..df178b53a0 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -62,10 +62,7 @@ if(floorbuffer) . += "cart_buffer" -/obj/vehicle/ridden/janicart/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return +/obj/vehicle/ridden/janicart/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) else if(mybag) mybag.forceMove(get_turf(user)) user.put_in_hands(mybag) diff --git a/modular_citadel/code/modules/reagents/objects/clothes.dm b/modular_citadel/code/modules/reagents/objects/clothes.dm index d3c566ce70..ab4d49c56f 100644 --- a/modular_citadel/code/modules/reagents/objects/clothes.dm +++ b/modular_citadel/code/modules/reagents/objects/clothes.dm @@ -9,7 +9,7 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) //item_flags = NODROP //Tips their hat! -/obj/item/clothing/head/hattip/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/clothing/head/hattip/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(iscarbon(user)) var/mob/living/carbon/C = user if(is_ninja(C)) diff --git a/modular_citadel/code/modules/reagents/objects/items.dm b/modular_citadel/code/modules/reagents/objects/items.dm index 27b8961835..f4316b3c58 100644 --- a/modular_citadel/code/modules/reagents/objects/items.dm +++ b/modular_citadel/code/modules/reagents/objects/items.dm @@ -9,7 +9,7 @@ w_class = WEIGHT_CLASS_TINY //A little janky with pockets -/obj/item/fermichem/pHbooklet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/obj/item/fermichem/pHbooklet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(user.get_held_index_of_item(src))//Does this check pockets too..? if(numberOfPages == 50) icon_state = "pHbookletOpen" From 416b989e12bb3fd4c8e4242fc082874208e0a582 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:35:10 -0700 Subject: [PATCH 025/142] changes --- code/_onclick/item_attack.dm | 4 +-- .../effects/effect_system/effects_foam.dm | 3 +- code/game/objects/effects/spiders.dm | 3 +- code/game/objects/items/cardboard_cutouts.dm | 3 +- code/game/objects/items/cosmetics.dm | 2 +- code/game/objects/items/grenades/flashbang.dm | 4 ++- code/game/objects/structures.dm | 2 +- code/game/objects/structures/aliens.dm | 3 +- code/game/objects/structures/tables_racks.dm | 4 +-- code/game/objects/structures/watercloset.dm | 4 +-- code/game/objects/structures/window.dm | 4 +-- code/modules/admin/verbs/diagnostics.dm | 31 ------------------- code/modules/antagonists/swarmer/swarmer.dm | 1 - code/modules/cargo/coupon.dm | 3 +- code/modules/clothing/spacesuits/hardsuit.dm | 6 +--- code/modules/mob/living/living.dm | 6 ++-- .../modules/mob/living/silicon/robot/robot.dm | 1 - .../mob/living/simple_animal/bot/bot.dm | 1 - .../chemistry/reagents/drug_reagents.dm | 8 ++--- code/modules/surgery/organs/liver.dm | 4 +-- code/modules/vehicles/pimpin_ride.dm | 2 +- .../reagents/chemistry/reagents/SDGF.dm | 10 +++--- tgstation.dme | 1 + 23 files changed, 39 insertions(+), 71 deletions(-) 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" From 526d25741033371cb79e88e27e3b3627fb024fbd Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 20 Jul 2020 11:48:08 -0700 Subject: [PATCH 026/142] fix --- code/_onclick/telekinesis.dm | 5 +++-- code/game/mecha/mecha.dm | 2 ++ code/game/mecha/mecha_defense.dm | 4 ---- code/game/objects/structures/watercloset.dm | 3 ++- code/game/turfs/simulated/floor/plating.dm | 2 +- code/game/turfs/simulated/walls.dm | 4 ++-- code/modules/antagonists/bloodsucker/powers/mesmerize.dm | 4 +--- code/modules/antagonists/bloodsucker/powers/trespass.dm | 5 ----- code/modules/antagonists/swarmer/swarmer.dm | 4 ++-- .../mob/living/simple_animal/hostile/jungle/leaper.dm | 2 +- code/modules/paperwork/paperbin.dm | 4 ++-- modular_citadel/code/datums/status_effects/chems.dm | 9 --------- .../code/modules/reagents/chemistry/reagents/SDGF.dm | 6 +++--- 13 files changed, 19 insertions(+), 35 deletions(-) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index f95ebf82b5..73d834dd64 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -123,7 +123,8 @@ . = ..() if(!target || !user) return - + if(!user.CheckActionCooldown()) + return if(!focus) focus_object(target) return @@ -145,7 +146,7 @@ else apply_focus_overlay() focus.throw_at(target, 10, 1,user) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(immediate = FALSE) update_icon() /proc/tkMaxRangeCheck(mob/user, atom/target) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index d2340a15ea..5b691607db 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -24,6 +24,8 @@ infra_luminosity = 15 //byond implementation is bugged. force = 5 flags_1 = HEAR_1|BLOCK_FACE_ATOM_1 + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE var/can_move = 0 //time of next allowed movement var/mob/living/occupant = null var/step_in = 10 //make a step in step_in/10 sec. diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index 27bfcb6bd9..f519814583 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -55,10 +55,6 @@ /obj/mecha/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) - . = ..() - if(.) - return - user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code. user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) user.visible_message("[user] hits [name]. Nothing happens", null, null, COMBAT_MESSAGE_RANGE) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 00cf65e7b1..c52249686a 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -167,6 +167,8 @@ icon_state = "urinal" density = FALSE anchored = TRUE + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE var/exposed = 0 // can you currently put an item inside var/obj/item/hiddenitem = null // what's in the urinal @@ -181,7 +183,6 @@ if(GM.loc != get_turf(src)) to_chat(user, "[GM.name] needs to be on [src].") return - user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] slams [GM] into [src]!", "You slam [GM] into [src]!") GM.adjustBruteLoss(8) else diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index f26a4b827a..ac80bddd00 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -124,7 +124,7 @@ ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) else playsound(src, 'sound/weapons/tap.ogg', 100, TRUE) //The attack sound is muffled by the foam itself - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.do_attack_animation(src) if(prob(I.force * 20 - 25)) user.visible_message("[user] smashes through [src]!", \ diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 92a156cf82..7983e60f53 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -137,14 +137,14 @@ return TRUE /turf/closed/wall/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) return to_chat(user, "You push the wall but nothing happens!") playsound(src, 'sound/weapons/genhit.ogg', 25, 1) add_fingerprint(user) /turf/closed/wall/attackby(obj/item/W, mob/user, params) - if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) return if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") diff --git a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm index fccef4fb0c..efdd312c6e 100644 --- a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm +++ b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm @@ -128,11 +128,9 @@ target.face_atom(L) target.Stun(power_time) to_chat(L, "[target] is fixed in place by your hypnotic gaze.") - target.next_move = world.time + power_time // <--- Use direct change instead. We want an unmodified delay to their next move // target.changeNext_move(power_time) // check click.dm - target.mob_transforming = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze. + target.DelayNextAction(power_time) spawn(power_time) if(istype(target) && success) - target.mob_transforming = FALSE if(istype(L) && target.stat == CONSCIOUS && (target in L.fov_view(10))) // They Woke Up! (Notice if within view) to_chat(L, "[target] has snapped out of their trance.") diff --git a/code/modules/antagonists/bloodsucker/powers/trespass.dm b/code/modules/antagonists/bloodsucker/powers/trespass.dm index cad3eeb88b..56b72a562e 100644 --- a/code/modules/antagonists/bloodsucker/powers/trespass.dm +++ b/code/modules/antagonists/bloodsucker/powers/trespass.dm @@ -81,9 +81,7 @@ var/mist_delay = max(5, 20 - level_current * 2.5) // Level up and do this faster. // Freeze Me - user.next_move = world.time + mist_delay user.Stun(mist_delay, ignore_canstun = TRUE) - user.mob_transforming = TRUE user.density = FALSE var/invis_was = user.invisibility user.invisibility = INVISIBILITY_MAXIMUM @@ -96,7 +94,6 @@ // Move & Freeze if(isturf(target_turf)) do_teleport(owner, target_turf, no_effects=TRUE, channel = TELEPORT_CHANNEL_QUANTUM) // in teleport.dm? - user.next_move = world.time + mist_delay / 2 user.Stun(mist_delay / 2, ignore_canstun = TRUE) // Wait... @@ -104,9 +101,7 @@ // Un-Hide & Freeze user.dir = get_dir(my_turf, target_turf) - user.next_move = world.time + mist_delay / 2 user.Stun(mist_delay / 2, ignore_canstun = TRUE) - user.mob_transforming = FALSE user.density = 1 user.invisibility = invis_was diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm index edc1abbf5a..82da11a9f6 100644 --- a/code/modules/antagonists/swarmer/swarmer.dm +++ b/code/modules/antagonists/swarmer/swarmer.dm @@ -498,7 +498,7 @@ if(resource_gain) resources += resource_gain do_attack_animation(target) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) var/obj/effect/temp_visual/swarmer/integrate/I = new /obj/effect/temp_visual/swarmer/integrate(get_turf(target)) I.pixel_x = target.pixel_x I.pixel_y = target.pixel_y @@ -518,7 +518,7 @@ /mob/living/simple_animal/hostile/swarmer/proc/DisIntegrate(atom/movable/target) new /obj/effect/temp_visual/swarmer/disintegration(get_turf(target)) do_attack_animation(target) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) target.ex_act(EXPLODE_LIGHT) /mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(mob/living/target) diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index 51f61fa158..0a510f2b07 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -136,7 +136,7 @@ target = A if(!isturf(loc)) return - if(next_move > world.time) + if(!CheckActionCooldown()) return if(hopping) return diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 53b7aafd0c..28cb5ffae9 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -11,8 +11,8 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 8 - clickdelay_attack_hand_is_action = TRUE - clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE + attack_hand_speed = CLICK_CD_RAPID + attack_hand_is_action = TRUE var/papertype = /obj/item/paper var/total_paper = 30 var/list/papers = list() diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm index 47eef6a820..00650b9831 100644 --- a/modular_citadel/code/datums/status_effects/chems.dm +++ b/modular_citadel/code/datums/status_effects/chems.dm @@ -53,7 +53,6 @@ if(last_checked_size != B.cached_size) H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/breast_hypertrophy, multiplicative_slowdown = moveCalc) - sizeMoveMod(moveCalc) if (B.size == "huge") if(prob(1)) @@ -70,16 +69,8 @@ log_reagent("FERMICHEM: [owner]'s breasts has reduced to an acceptable size. ID: [owner.key]") to_chat(owner, "Your expansive chest has become a more managable size, liberating your movements.") owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/breast_hypertrophy) - sizeMoveMod(1) return ..() -/datum/status_effect/chem/breast_enlarger/proc/sizeMoveMod(var/value) - if(cachedmoveCalc == value) - return - owner.next_move_modifier /= cachedmoveCalc - owner.next_move_modifier *= value - cachedmoveCalc = value - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /datum/status_effect/chem/penis_enlarger diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm index a16cefb8f8..f3059a480a 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm @@ -112,7 +112,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING M.visible_message("[M] suddenly shudders, and splits into two identical twins!") SM.copy_languages(M, LANGUAGE_MIND) playerClone = TRUE - M.next_move_modifier = 1 + M.action_cooldown_mod = 1 M.adjust_nutrition(-500) //Damage the clone @@ -154,7 +154,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING M.adjust_nutrition(M.nutrition/5) if(50) to_chat(M, "The synthetic 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!! //candidates = pollGhostCandidates("Do you want to play as a clone of [M.name] and do you agree to respect their character and act in a similar manner to them? I swear to god if you diddle them I will be very disapointed in you. ", "FermiClone", null, ROLE_SENTIENCE, 300) // see poll_ignore.dm, should allow admins to ban greifers or bullies if(51 to 79) M.adjust_nutrition(M.nutrition/2) @@ -164,7 +164,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING M.set_nutrition(20000) //https://www.youtube.com/watch?v=Bj_YLenOlZI if(86)//Upon splitting, you get really hungry and are capable again. Deletes the chem after you're done. M.set_nutrition(15)//YOU BEST BE EATTING AFTER THIS YOU CUTIE - M.next_move_modifier -= 4 + M.action_cooldown_mod -= 4 to_chat(M, "Your body splits away from the cell clone of yourself, leaving you with a drained and hollow feeling inside.") //clone 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 027/142] 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!") From 4d48abf3a6a5a4d79bc862c0e52e74293da77d3e Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:46:17 -0700 Subject: [PATCH 028/142] fixes --- code/_onclick/hud/screen_objects.dm | 26 +++++-------------- code/_onclick/hud/screen_objects/storage.dm | 9 +++---- code/_onclick/observer.dm | 2 +- code/game/objects/structures/displaycase.dm | 3 ++- code/game/objects/structures/tables_racks.dm | 6 ++++- code/modules/antagonists/blob/blob/theblob.dm | 2 +- .../kitchen_machinery/deep_fryer.dm | 4 ++- code/modules/mob/living/brain/MMI.dm | 4 ++- code/modules/mob/living/carbon/carbon.dm | 2 +- .../hostile/mining_mobs/curse_blob.dm | 2 +- .../mob/living/simple_animal/slime/slime.dm | 2 +- code/modules/mob/login.dm | 4 +-- code/modules/projectiles/gun.dm | 2 -- code/modules/projectiles/guns/ballistic.dm | 4 +-- .../reagents/reagent_containers/rags.dm | 3 +-- code/modules/vore/eating/living.dm | 1 - tgstation.dme | 1 + 17 files changed, 31 insertions(+), 46 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9d810cdc07..366bec52b7 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -91,15 +91,9 @@ plane = HUD_PLANE /obj/screen/inventory/Click(location, control, params) - // At this point in client Click() code we have passed the 1/10 sec check and little else - // We don't even know if it's a middle click - if(world.time <= usr.next_move) - return TRUE - - if(usr.incapacitated()) - return TRUE - if(ismecha(usr.loc)) // stops inventory actions in a mech - return TRUE + if(hud?.mymob && (hud.mymob != usr)) + return + // just redirect clicks if(hud?.mymob && slot_id) var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id) @@ -180,17 +174,9 @@ /obj/screen/inventory/hand/Click(location, control, params) - // At this point in client Click() code we have passed the 1/10 sec check and little else - // We don't even know if it's a middle click - var/mob/user = hud?.mymob - if(usr != user) - return TRUE - if(world.time <= user.next_move) - return TRUE - if(user.incapacitated()) - return TRUE - if (ismecha(user.loc)) // stops inventory actions in a mech - return TRUE + if(hud?.mymob && (hud.mymob != usr)) + return + // just redirect clicks if(user.active_hand_index == held_index) var/obj/item/I = user.get_active_held_item() diff --git a/code/_onclick/hud/screen_objects/storage.dm b/code/_onclick/hud/screen_objects/storage.dm index 7e8bfe12ab..ce7bc96c96 100644 --- a/code/_onclick/hud/screen_objects/storage.dm +++ b/code/_onclick/hud/screen_objects/storage.dm @@ -9,12 +9,9 @@ /obj/screen/storage/Click(location, control, params) if(!insertion_click) return ..() - if(world.time <= usr.next_move) - return TRUE - if(usr.incapacitated()) - return TRUE - if (ismecha(usr.loc)) // stops inventory actions in a mech - return TRUE + if(hud?.mymob && (hud.mymob != usr)) + return + // just redirect clicks if(master) var/obj/item/I = usr.get_active_held_item() if(I) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index ed7384697c..8a1e745308 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -37,7 +37,7 @@ CtrlClickOn(A) return - if(world.time <= next_move) + if(!CheckActionCooldown()) return // You are responsible for checking config.ghost_interaction when you override this function // Not all of them require checking, see below diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 6159e69780..f0384ca96a 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -9,6 +9,8 @@ armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100) max_integrity = 200 integrity_failure = 0.25 + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE var/obj/item/showpiece = null var/alert = TRUE var/open = FALSE @@ -158,7 +160,6 @@ return attack_hand(user) /obj/structure/displaycase/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - user.changeNext_move(CLICK_CD_MELEE) if (showpiece && (broken || open)) to_chat(user, "You deactivate the hover field built into the case.") log_combat(user, src, "deactivates the hover field of") diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index f545b183bf..0463289658 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -23,6 +23,8 @@ climbable = TRUE obj_flags = CAN_BE_HIT|SHOVABLE_ONTO pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.") + attack_hand_speed = CLICK_CD_MELEE + attack_hand_is_action = TRUE var/frame = /obj/structure/table_frame var/framestack = /obj/item/stack/rods var/buildstack = /obj/item/stack/sheet/metal @@ -191,8 +193,10 @@ return /obj/structure/table/alt_attack_hand(mob/user) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return + user.DelayNextAction() if(user && Adjacent(user) && !user.incapacitated()) - user.changeNext_move(CLICK_CD_MELEE*0.5) if(istype(user) && user.a_intent == INTENT_HARM) user.visible_message("[user] slams [user.p_their()] palms down on [src].", "You slam your palms down on [src].") playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1) diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm index 6a73dc579b..ed85726a4a 100644 --- a/code/modules/antagonists/blob/blob/theblob.dm +++ b/code/modules/antagonists/blob/blob/theblob.dm @@ -225,7 +225,7 @@ /obj/structure/blob/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/analyzer)) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) to_chat(user, "The analyzer beeps once, then reports:
    ") SEND_SOUND(user, sound('sound/machines/ping.ogg')) if(overmind) diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index 42005340bd..7039e483f4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -150,6 +150,8 @@ God bless America. fry_loop.stop() return else if(user.pulling && user.a_intent == "grab" && iscarbon(user.pulling) && reagents.total_volume) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return if(user.grab_state < GRAB_AGGRESSIVE) to_chat(user, "You need a better grip to do that!") return @@ -159,5 +161,5 @@ God bless America. C.apply_damage(min(30, reagents.total_volume), BURN, BODY_ZONE_HEAD) reagents.remove_any((reagents.total_volume/2)) C.DefaultCombatKnockdown(60) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction() return ..() diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index d1258ce6e4..891243496a 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -39,7 +39,9 @@ laws.set_laws_config() /obj/item/mmi/attackby(obj/item/O, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return + user.DelayNextAction() if(istype(O, /obj/item/organ/brain)) //Time to stick a brain in it --NEO var/obj/item/organ/brain/newbrain = O if(brain) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1d6ba1aec3..43595b9571 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -315,7 +315,7 @@ spin(32,2) visible_message("[src] rolls on the floor, trying to put [p_them()]self out!", \ "You stop, drop, and roll!") - MarkResistCooldown(30) + MarkResistTime(30) sleep(30) if(fire_stacks <= 0) visible_message("[src] has successfully extinguished [p_them()]self!", \ diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm index c4f78b6e26..11cc0fe67e 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/curse_blob.dm @@ -105,7 +105,7 @@ IGNORE_PROC_IF_NOT_TARGET(attack_slime) /mob/living/simple_animal/hostile/asteroid/curseblob/attacked_by(obj/item/I, mob/living/L, attackchain_flags = NONE, damage_multiplier = 1) if(L != set_target) - L.changeNext_move(I.click_delay) //pre_attacked_by not called + I.ApplyAttackCooldown(L, src) return return ..() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index baa8882980..1bdd988694 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -356,7 +356,7 @@ attacked += 10 if(prob(25)) user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) + W.ApplyAttackCooldown(user, src) to_chat(user, "[W] passes right through [src]!") return if(Discipline && prob(50)) // wow, buddy, why am I getting attacked?? diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index b7546becd8..31bfb5621f 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -13,9 +13,7 @@ hud_used.show_hud(hud_used.hud_version) hud_used.update_ui_style(ui_style2icon(client.prefs.UI_style)) - next_move = 1 - - ..() + . = ..() reset_perspective(loc) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 21bc3da4ba..e8a52a778e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -357,11 +357,9 @@ if(user.a_intent == INTENT_HARM) //Flogging if(bayonet) M.attackby(bayonet, user) - attack_delay_done = TRUE return else return ..() - attack_delay_done = TRUE //we are firing the gun, not bashing people with its butt. /obj/item/gun/attack_obj(obj/O, mob/user) if(user.a_intent == INTENT_HARM) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index e4ab2df038..fa8099a257 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -179,13 +179,11 @@ #undef BRAINS_BLOWN_THROW_SPEED #undef BRAINS_BLOWN_THROW_RANGE - - /obj/item/gun/ballistic/proc/sawoff(mob/user) if(sawn_off) to_chat(user, "\The [src] is already shortened!") return - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.visible_message("[user] begins to shorten \the [src].", "You begin to shorten \the [src]...") //if there's any live ammo inside the gun, makes it go off diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm index 1debfa7d8d..8b935cc244 100644 --- a/code/modules/reagents/reagent_containers/rags.dm +++ b/code/modules/reagents/reagent_containers/rags.dm @@ -51,11 +51,10 @@ if(do_after(user, action_speed, target = A)) user.visible_message("[user] finishes wiping off [A]!", "You finish wiping off [A].") SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) - return /obj/item/reagent_containers/rag/alt_pre_attack(mob/living/M, mob/living/user, params) if(istype(M) && user.a_intent == INTENT_HELP) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) if(M.on_fire) user.visible_message("\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!") if(hitsound) diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm index 4df008f2c5..9395cef952 100644 --- a/code/modules/vore/eating/living.dm +++ b/code/modules/vore/eating/living.dm @@ -370,7 +370,6 @@ visible_message("[src] licks [tasted]!","You lick [tasted]. They taste rather like [tasted.get_taste_message()].","Slurp!") - /mob/living/proc/get_taste_message(allow_generic = TRUE, datum/species/mrace) if(!vore_taste && !allow_generic) return FALSE diff --git a/tgstation.dme b/tgstation.dme index 630ee96b42..10d1bf350f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -221,6 +221,7 @@ #include "code\_onclick\overmind.dm" #include "code\_onclick\right_click.dm" #include "code\_onclick\right_item_attack.dm" +#include "code\_onclick\right_other_mobs.dm" #include "code\_onclick\telekinesis.dm" #include "code\_onclick\hud\_defines.dm" #include "code\_onclick\hud\action_button.dm" From 184e3992f33cb01d7632c631879f3d3712909f40 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:56:23 -0700 Subject: [PATCH 029/142] fixes --- code/_onclick/click.dm | 6 +++--- code/_onclick/hud/screen_objects.dm | 1 + code/_onclick/right_item_attack.dm | 5 ++--- code/game/machinery/_machinery.dm | 2 +- code/game/objects/items/devices/forcefieldprojector.dm | 2 +- code/game/objects/items/powerfist.dm | 3 +-- code/game/objects/items/storage/boxes.dm | 8 ++++---- code/game/objects/items/storage/dakis.dm | 2 +- code/game/objects/items/stunbaton.dm | 4 +++- code/modules/food_and_drinks/drinks/drinks.dm | 5 ++++- code/modules/food_and_drinks/food/snacks.dm | 6 ++++-- code/modules/mining/aux_base_camera.dm | 2 +- code/modules/mob/living/living_active_block.dm | 3 +-- code/modules/mob/living/silicon/robot/robot.dm | 3 ++- code/modules/power/lighting.dm | 4 +--- 15 files changed, 30 insertions(+), 26 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 900123320e..58cc5e5dca 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -316,11 +316,11 @@ /mob/living/carbon/human/CtrlClick(mob/user) if(ishuman(user) && Adjacent(user) && !user.incapacitated()) - if(world.time < user.next_move) + if(!user.CheckActionCooldown()) return FALSE var/mob/living/carbon/human/H = user H.dna.species.grab(H, src, H.mind.martial_art) - H.changeNext_move(CLICK_CD_MELEE) + H.DelayNextAction(CLICK_CD_MELEE) else ..() /* @@ -380,7 +380,7 @@ return /mob/living/LaserEyes(atom/A, params) - changeNext_move(CLICK_CD_RANGE) + DelayNextAction(CLICK_CD_RANGE) var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc ) LE.icon = 'icons/effects/genetics.dmi' diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 366bec52b7..126cc18907 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -176,6 +176,7 @@ /obj/screen/inventory/hand/Click(location, control, params) if(hud?.mymob && (hud.mymob != usr)) return + var/mob/user = hud.mymob // just redirect clicks if(user.active_hand_index == held_index) diff --git a/code/_onclick/right_item_attack.dm b/code/_onclick/right_item_attack.dm index bba3b14e2e..4ac9c96c8e 100644 --- a/code/_onclick/right_item_attack.dm +++ b/code/_onclick/right_item_attack.dm @@ -1,10 +1,9 @@ /obj/item/proc/rightclick_melee_attack_chain(mob/user, atom/target, params) if(!alt_pre_attack(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! + . = 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 + . = altafterattack(target, user, TRUE, params) /obj/item/proc/alt_pre_attack(atom/A, mob/living/user, params) return FALSE //return something other than false if you wanna override attacking completely diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 6ef13ac36f..3faf6d5727 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -313,7 +313,7 @@ Class Procs: if(user.a_intent != INTENT_HARM) return attack_hand(user) else - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) user.visible_message("[user.name] smashes against \the [src.name] with its paws.", null, null, COMBAT_MESSAGE_RANGE) take_damage(4, BRUTE, "melee", 1) diff --git a/code/game/objects/items/devices/forcefieldprojector.dm b/code/game/objects/items/devices/forcefieldprojector.dm index 03ca110ec8..9ef9d73705 100644 --- a/code/game/objects/items/devices/forcefieldprojector.dm +++ b/code/game/objects/items/devices/forcefieldprojector.dm @@ -43,7 +43,7 @@ user.visible_message("[user] projects a forcefield!","You project a forcefield.") var/obj/structure/projected_forcefield/F = new(T, src) current_fields += F - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) /obj/item/forcefield_projector/attack_self(mob/user) if(LAZYLEN(current_fields)) diff --git a/code/game/objects/items/powerfist.dm b/code/game/objects/items/powerfist.dm index b7e2d22d2f..217c26d5de 100644 --- a/code/game/objects/items/powerfist.dm +++ b/code/game/objects/items/powerfist.dm @@ -14,12 +14,11 @@ w_class = WEIGHT_CLASS_NORMAL armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 40) resistance_flags = FIRE_PROOF - click_delay = CLICK_CD_MELEE * 1.5 + attack_speed = CLICK_CD_MELEE * 1.5 var/fisto_setting = 1 var/gasperfist = 3 var/obj/item/tank/internals/tank = null //Tank used for the gauntlet's piston-ram. - /obj/item/melee/powerfist/examine(mob/user) . = ..() if(!in_range(user, src)) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 02ae867240..975621ead1 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -726,9 +726,9 @@ obj/item/storage/box/stingbangs return (BRUTELOSS) /obj/item/storage/box/hug/attack_self(mob/user) - ..() - user.changeNext_move(CLICK_CD_MELEE) - playsound(loc, "rustle", 50, 1, -5) + . = ..() + user.DelayNextAction(CLICK_CD_MELEE) + playsound(src, "rustle", 50, 1, -5) user.visible_message("[user] hugs \the [src].","You hug \the [src].") SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"hugbox", /datum/mood_event/hugbox) @@ -1423,4 +1423,4 @@ obj/item/storage/box/stingbangs /obj/item/storage/box/strange_seeds_5pack/PopulateContents() for(var/i in 1 to 5) - new /obj/item/seeds/random(src) \ No newline at end of file + new /obj/item/seeds/random(src) diff --git a/code/game/objects/items/storage/dakis.dm b/code/game/objects/items/storage/dakis.dm index 1939593c8e..29f12df4c4 100644 --- a/code/game/objects/items/storage/dakis.dm +++ b/code/game/objects/items/storage/dakis.dm @@ -47,6 +47,6 @@ if(INTENT_HARM) user.visible_message("[user] punches the [name]!") playsound(src, 'sound/effects/shieldbash.ogg', 50, 1) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) //////////////////////////// diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index fa0c9ba693..574036f07c 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -145,7 +145,6 @@ /obj/item/melee/baton/alt_pre_attack(atom/A, mob/living/user, params) . = common_baton_melee(A, user, TRUE) //return true (attackchain interrupt) if this also returns true. no harm-disarming. - user.changeNext_move(CLICK_CD_MELEE) //return TRUE to interrupt attack chain. /obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE) @@ -153,6 +152,9 @@ return FALSE if(turned_on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) clowning_around(user) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return TRUE + user.DelayNextAction() if(IS_STAMCRIT(user)) //CIT CHANGE - makes it impossible to baton in stamina softcrit to_chat(user, "You're too exhausted to use [src] properly.") return TRUE diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 2e68c57abd..821edba89c 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -23,7 +23,6 @@ gulp_size = max(round(reagents.total_volume / 5), 5) /obj/item/reagent_containers/food/drinks/attack(mob/living/M, mob/user, def_zone) - if(!reagents || !reagents.total_volume) to_chat(user, "[src] is empty!") return 0 @@ -56,6 +55,10 @@ playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) return 1 +/obj/item/reagent_containers/food/drinks/CheckAttackCooldown(mob/user, atom/target) + var/fast = HAS_TRAIT(user, TRAIT_VORACIOUS) && (user == target) + return user.CheckActionCooldown(fast? CLICK_CD_RANGE : CLICK_CD_MELEE) + /obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity) . = ..() if(!proximity) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index de264ff0e4..76fe01b072 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -129,8 +129,6 @@ All foods are distributed among various categories. Use common sense. else if(fullness > (600 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat user.visible_message("[user] cannot force any more of \the [src] to go down [user.p_their()] throat!", "You cannot force any more of \the [src] to go down your throat!") return 0 - if(HAS_TRAIT(M, TRAIT_VORACIOUS)) - M.changeNext_move(CLICK_CD_MELEE * 0.5) //nom nom nom else if(!isbrain(M)) //If you're feeding it to someone else. if(fullness <= (600 * (1 + M.overeatduration / 1000))) @@ -167,6 +165,10 @@ All foods are distributed among various categories. Use common sense. return 0 +/obj/item/reagent_containers/food/snacks/CheckAttackCooldown(mob/user, atom/target) + var/fast = HAS_TRAIT(user, TRAIT_VORACIOUS) && (user == target) + return user.CheckActionCooldown(fast? CLICK_CD_RANGE : CLICK_CD_MELEE) + /obj/item/reagent_containers/food/snacks/examine(mob/user) . = ..() if(food_quality >= 70) diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm index d461523744..be0a41427f 100644 --- a/code/modules/mining/aux_base_camera.dm +++ b/code/modules/mining/aux_base_camera.dm @@ -187,7 +187,7 @@ if(LAZYLEN(S.rcd_vals(owner,B.RCD))) rcd_target = S //If we don't break out of this loop we'll get the last placed thing - owner.changeNext_move(CLICK_CD_RANGE) + owner.DelayNextAction(CLICK_CD_RANGE) B.RCD.afterattack(rcd_target, owner, TRUE) //Activate the RCD and force it to work remotely! playsound(target_turf, 'sound/items/deconstruct.ogg', 60, 1) diff --git a/code/modules/mob/living/living_active_block.dm b/code/modules/mob/living/living_active_block.dm index 4211b2cfd9..bb6e08ee0f 100644 --- a/code/modules/mob/living/living_active_block.dm +++ b/code/modules/mob/living/living_active_block.dm @@ -10,8 +10,7 @@ REMOVE_TRAIT(src, TRAIT_SPRINT_LOCKED, ACTIVE_BLOCK_TRAIT) remove_movespeed_modifier(/datum/movespeed_modifier/active_block) var/datum/block_parry_data/data = I.get_block_parry_data() - if(timeToNextMove() < data.block_end_click_cd_add) - changeNext_move(data.block_end_click_cd_add) + DelayNextAction(data.block_end_click_cd_add) return TRUE /mob/living/proc/ACTIVE_BLOCK_START(obj/item/I) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a265771024..4fcd6d1dbd 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -289,6 +289,7 @@ /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.DelayNextAction(CLICK_CD_MELEE) if (!getBruteLoss()) to_chat(user, "[src] is already in good condition!") return @@ -310,7 +311,7 @@ return else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) if (getFireLoss() > 0 || getToxLoss() > 0) if(src == user) to_chat(user, "You start fixing yourself...") diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 2ecc8f44d0..20f7ce099a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -597,9 +597,7 @@ /obj/machinery/light/on_attack_hand(mob/living/carbon/human/user) . = ..() - if(.) - return - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) add_fingerprint(user) if(status == LIGHT_EMPTY) From 9a5e53a21fc2d18f8cca2512270c8ff1c9323118 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:57:47 -0700 Subject: [PATCH 030/142] ok --- code/__HELPERS/do_after.dm | 2 +- code/_onclick/right_click.dm | 2 +- code/_onclick/right_other_mobs.dm | 4 +++- code/modules/mob/living/living_defense.dm | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/do_after.dm b/code/__HELPERS/do_after.dm index f1f483c345..e0bbceb768 100644 --- a/code/__HELPERS/do_after.dm +++ b/code/__HELPERS/do_after.dm @@ -197,7 +197,7 @@ //some additional checks as a callback for for do_afters that want to break on losing health or on the mob taking action /mob/proc/break_do_after_checks(list/checked_health, check_clicks) - if(check_clicks && next_move > world.time) + if(check_clicks && !CheckActionCooldown()) return FALSE return TRUE diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index 85b0affdb9..93ee14af56 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -69,7 +69,7 @@ /mob/proc/AltUnarmedAttack(atom/A, proximity_flag) if(ismob(A)) - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) return FALSE /mob/proc/AltRangedAttack(atom/A, params) diff --git a/code/_onclick/right_other_mobs.dm b/code/_onclick/right_other_mobs.dm index ec740f023b..f2277511f8 100644 --- a/code/_onclick/right_other_mobs.dm +++ b/code/_onclick/right_other_mobs.dm @@ -11,7 +11,9 @@ /mob/living/carbon/human/AltRangedAttack(atom/A, params) if(isturf(A) || incapacitated()) // pretty annoying to wave your fist at floors and walls. And useless. return TRUE - changeNext_move(CLICK_CD_RANGE) + if(!CheckActionCooldown(CLICK_CD_RANGE)) + return + DelayNextAction() var/list/target_viewers = fov_viewers(11, A) //doesn't check for blindness. if(!(src in target_viewers)) //click catcher issuing calls for out of view objects. return TRUE diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 64835358db..cb95b1c6ec 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -215,8 +215,8 @@ //proc to upgrade a simple pull into a more aggressive grab. /mob/living/proc/grippedby(mob/living/carbon/user, instant = FALSE) if(user.grab_state < GRAB_KILL) - user.changeNext_move(CLICK_CD_GRABBING) - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + user.DelayNextAction(CLICK_CD_GRABBING) + playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(user.grab_state) //only the first upgrade is instantaneous var/old_grab_state = user.grab_state From 2f11fb6a8b9775cbaa530377f5fbbb1a2b4f4c12 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:59:39 -0700 Subject: [PATCH 031/142] ok --- code/modules/clothing/spacesuits/chronosuit.dm | 4 ++-- code/modules/food_and_drinks/drinks/drinks.dm | 3 --- code/modules/mining/equipment/resonator.dm | 2 +- code/modules/mob/living/living_active_parry.dm | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 4590d46219..e2ea9fccf6 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -124,8 +124,8 @@ for(var/obj/item/I in user.held_items) ADD_TRAIT(I, TRAIT_NODROP, CHRONOSUIT_TRAIT) user.animate_movement = NO_STEPS - user.changeNext_move(8 + phase_in_ds) - user.mob_transforming = 1 + user.DelayNextAction(8 + phase_in_ds) + user.mob_transforming = TRUE user.anchored = TRUE user.Stun(INFINITY) diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 821edba89c..45ab6f6af1 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -36,9 +36,6 @@ if(M == user) user.visible_message("[user] swallows a gulp of [src].", "You swallow a gulp of [src].") - if(HAS_TRAIT(M, TRAIT_VORACIOUS)) - M.changeNext_move(CLICK_CD_MELEE * 0.5) //chug! chug! chug! - else M.visible_message("[user] attempts to feed the contents of [src] to [M].", "[user] attempts to feed the contents of [src] to [M].") if(!do_mob(user, M)) diff --git a/code/modules/mining/equipment/resonator.dm b/code/modules/mining/equipment/resonator.dm index 133cb41c33..16dd893c3a 100644 --- a/code/modules/mining/equipment/resonator.dm +++ b/code/modules/mining/equipment/resonator.dm @@ -41,7 +41,7 @@ return if(LAZYLEN(fields) < fieldlimit) new /obj/effect/temp_visual/resonance(T, user, src, burst_time) - user.changeNext_move(CLICK_CD_MELEE) + user.DelayNextAction(CLICK_CD_MELEE) /obj/item/resonator/pre_attack(atom/target, mob/user, params) if(check_allowed_items(target, 1)) diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 8141603f64..e3adf16d23 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -66,7 +66,7 @@ var/full_parry_duration = data.parry_time_windup + data.parry_time_active + data.parry_time_spindown // no system in place to "fallback" if out of the 3 the top priority one can't parry due to constraints but something else can. // can always implement it later, whatever. - if((data.parry_respect_clickdelay && (next_move > world.time)) || ((parry_end_time_last + data.parry_cooldown) > world.time)) + if((data.parry_respect_clickdelay && !CheckActionCooldown()) || ((parry_end_time_last + data.parry_cooldown) > world.time)) to_chat(src, "You are not ready to parry (again)!") return // Point of no return, make sure everything is set. @@ -121,7 +121,7 @@ Stagger(data.parry_failed_stagger_duration) effect_text += "staggering themselves" if(data.parry_failed_clickcd_duration) - changeNext_move(data.parry_failed_clickcd_duration) + DelayNextAction(data.parry_failed_clickcd_duration) effect_text += "throwing themselves off balance" handle_parry_ending_effects(data, effect_text) parrying = NOT_PARRYING From 286e5384d171a6b0b789ac71bd6fba1d46f752c5 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 21 Jul 2020 12:07:24 -0700 Subject: [PATCH 032/142] fix --- .../modules/clothing/spacesuits/chronosuit.dm | 4 ++-- .../hostile/megafauna/blood_drunk_miner.dm | 20 +++++++++---------- .../particle_accelerator/particle_control.dm | 1 - 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index e2ea9fccf6..4dc6fd1f6c 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -80,7 +80,7 @@ if(to_turf) user.forceMove(to_turf) user.SetStun(0) - user.next_move = 1 + user.SetNextAction(0, considered_action = FALSE, immediate = FALSE) user.alpha = 255 user.update_atom_colour() user.animate_movement = FORWARD_STEPS @@ -124,7 +124,7 @@ for(var/obj/item/I in user.held_items) ADD_TRAIT(I, TRAIT_NODROP, CHRONOSUIT_TRAIT) user.animate_movement = NO_STEPS - user.DelayNextAction(8 + phase_in_ds) + user.DelayNextAction(8 + phase_in_ds, considered_action = FALSE, immediate = FALSE) user.mob_transforming = TRUE user.anchored = TRUE user.Stun(INFINITY) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index edfabca7e7..9b1cc3b355 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -86,8 +86,8 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE) var/adjustment_amount = amount * 0.1 - if(world.time + adjustment_amount > next_move) - changeNext_move(adjustment_amount) //attacking it interrupts it attacking, but only briefly + if(world.time + adjustment_amount > next_action) + DelayNextAction(adjustment_amount) //attacking it interrupts it attacking, but only briefly . = ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death() @@ -109,7 +109,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/AttackingTarget() if(QDELETED(target)) return - if(next_move > world.time || !Adjacent(target)) //some cheating + if(!CheckActionCooldown() || !Adjacent(target)) //some cheating INVOKE_ASYNC(src, .proc/quick_attack_loop) return face_atom(target) @@ -125,7 +125,7 @@ Difficulty: Medium adjustHealth(-(L.maxHealth * 0.5)) L.gib() return TRUE - changeNext_move(CLICK_CD_MELEE) + DelayNextAction(CLICK_CD_MELEE) miner_saw.melee_attack_chain(src, target) if(guidance) adjustHealth(-2) @@ -161,19 +161,19 @@ Difficulty: Medium face_atom(target) new /obj/effect/temp_visual/dir_setting/firing_effect(loc, dir) Shoot(target) - changeNext_move(CLICK_CD_RANGE) + DelayNextAction(CLICK_CD_RANGE) //I'm still of the belief that this entire proc needs to be wiped from existence. // do not take my touching of it to be endorsement of it. ~mso /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/quick_attack_loop() - while(!QDELETED(target) && next_move <= world.time) //this is done this way because next_move can change to be sooner while we sleep. + while(!QDELETED(target) && !CheckActionCooldown()) //this is done this way because next_move can change to be sooner while we sleep. stoplag(1) - sleep((next_move - world.time) * 1.5) //but don't ask me what the fuck this is about + sleep((next_action - world.time) * 1.5) //but don't ask me what the fuck this is about if(QDELETED(target)) return - if(dashing || next_move > world.time || !Adjacent(target)) - if(dashing && next_move <= world.time) - next_move = world.time + 1 + if(dashing || !CheckActionCooldown() || !Adjacent(target)) + if(dashing && next_action <= world.time) + SetNextAction(1, considered_action = FALSE, immediate = FALSE) INVOKE_ASYNC(src, .proc/quick_attack_loop) //lets try that again. return AttackingTarget() diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index beaf4bfc43..912fc0a72b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -246,7 +246,6 @@ did_something = TRUE if(did_something) - user.changeNext_move(CLICK_CD_MELEE) update_state() update_icon() return From 76f885e1a6f7c2c3b65b83404456ed03de47bada Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 00:16:43 -0700 Subject: [PATCH 033/142] ok --- .../_onclick/hud/screen_objects/clickdelay.dm | 51 +++++++++++++++++++ code/modules/mob/clickdelay.dm | 8 ++- .../modules/projectiles/ammunition/_firing.dm | 4 -- code/modules/projectiles/gun.dm | 15 ++++-- tgstation.dme | 1 + 5 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 code/_onclick/hud/screen_objects/clickdelay.dm diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm new file mode 100644 index 0000000000..ec8f13329b --- /dev/null +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -0,0 +1,51 @@ +/obj/screen/action_bar + +/obj/screen/action_bar/Destroy() + STOP_PROCESSING(SSfastprocess, src) + return ..() + +/obj/screen/action_bar/proc/mark_dirty() + var/mob/living/L = hud?.mymob + if(L?.client && update_to_mob(L)) + START_PROCESSING(SSfastprocess, src) + +/obj/screen/action_bar/process() + var/mob/living/L = hud?.mymob + if(!L?.client || !update_to_mob(L)) + return PROCESS_KILL + +/obj/screen/action_bar/proc/update_to_mob(mob/living/L) + return FALSE + +/datum/hud/var/obj/screen/action_bar/clickdelay + +/obj/screen/action_bar/clickdelay + name = "click delay" + icon = 'icons/effects/progessbar.dmi' + icon_state = "prog_bar_100" + +/obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L) + var/estimated = L.EstimatedNextActionTime() + var/diff = L.last_action - estimated + var/left = estimated - world.time + if(left < 0 || diff < 0) + icon_state = "prog_bar_100" + return FALSE + icon_state = "prog_bar_[round(clamp((left/diff) * 100, 0, 100), 5)]" + return TRUE + +/datum/hud/var/obj/screen/action_bar/resistdelay/resistdelay + +/obj/screen/action_bar/resistdelay + name = "resist delay" + icon = 'icons/effects/progessbar.dmi' + icon_state = "prog_bar_100" + +/obj/screen/clickdelay/proc/update_to_mob(mob/living/L) + var/diff = L.next_resist - L.last_resist + var/left = L.next_resist - world.time + if(left < 0 || diff < 0) + icon_state = "prog_bar_100" + return FALSE + icon_state = "prog_bar[round(clamp((left/diff) * 100, 0, 100), 5)]" + return TRUE diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 5cecf70cfd..09bd24170a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -65,7 +65,7 @@ var/attack_speed = unarmed_attack_speed var/obj/item/I = get_active_held_item() if(I) - attack_speed = I.attack_speed + attack_speed = I.GetEstimatedAttackSpeed() return max(next_action, last_action + attack_speed) /** @@ -156,3 +156,9 @@ */ /obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, FALSE) + +/** + * Get estimated time that a user has to not attack for to use us + */ +/obj/item/proc/GetEstimatedAttackSpeed() + return attack_speed diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index 340cfc2e98..06772bd099 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -16,10 +16,6 @@ AddComponent(/datum/component/pellet_cloud, projectile_type, pellets) SEND_SIGNAL(src, COMSIG_PELLET_CLOUD_INIT, target, user, fired_from, randomspread, spread, zone_override, params, distro) - if(click_cooldown_override) - user.changeNext_move(click_cooldown_override) - else - user.changeNext_move(CLICK_CD_RANGE) user.newtonian_move(get_dir(target, user)) update_icon() return 1 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e8a52a778e..bdfc999f6f 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -17,6 +17,7 @@ force = 5 item_flags = NEEDS_PERMIT attack_verb = list("struck", "hit", "bashed") + attack_speed = CLICK_CD_RANGE var/fire_sound = "gunshot" var/suppressed = null //whether or not a message is displayed when fired @@ -174,9 +175,6 @@ if(firing) return var/stamloss = user.getStaminaLoss() - 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_GUN_DELAY - user.changeNext_move(CLICK_CD_RANGE+(CLICK_CD_RANGE*penalty)) if(flag) //It's adjacent, is the user, or is on the user's person if(target in user.contents) //can't shoot stuff inside us. return @@ -243,6 +241,17 @@ to_chat(user, " [src] is lethally chambered! You don't want to risk harming anyone...") return FALSE +/obj/item/gun/CheckAttackCooldown(mob/user, atom/target) + if((user.a_intent == INTENT_HARM) && user.Adjacent(target)) //melee + return user.CheckActionCooldown(CLICK_CD_MELEE) + return user.CheckActionCooldown(get_clickcd()) + +/obj/item/gun/proc/get_clickcd() + return isnull(chambered?.click_cooldown_override)? CLICK_CD_RANGE : chambered.click_cooldown_override + +/obj/item/gun/GetEstimatedAttackSpeed() + return get_clickcd() + /obj/item/gun/proc/handle_pins(mob/living/user) if(no_pin_required) return TRUE diff --git a/tgstation.dme b/tgstation.dme index 10d1bf350f..cceae4f874 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -254,6 +254,7 @@ #include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\swarmer.dm" +#include "code\_onclick\hud\screen_objects\clickdelay.dm" #include "code\_onclick\hud\screen_objects\sprint.dm" #include "code\_onclick\hud\screen_objects\stamina.dm" #include "code\_onclick\hud\screen_objects\storage.dm" From 910290edcf8ceeddf60565fcec03619d4ff9df27 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 00:22:33 -0700 Subject: [PATCH 034/142] buffers --- code/_onclick/hud/_defines.dm | 2 ++ code/_onclick/hud/human.dm | 11 +++++++++++ code/modules/mob/clickdelay.dm | 7 ++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 4b963c730d..3fd73192f4 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -168,6 +168,8 @@ //UI position overrides for 1:1 screen layout. (default is 7:5) #define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button #define ui_overridden_resist "EAST-3:24,SOUTH+1:7" +#define ui_clickdelay "CENTER:16,SOUTH:5" +#define ui_resistdelay "EAST-3:24,SOUTH+1:15" #define ui_combat_toggle "EAST-4:22,SOUTH:5" #define ui_boxcraft "EAST-4:22,SOUTH+1:6" diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 9380cf98aa..04141becf2 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -140,6 +140,17 @@ sprint_buffer.hud = src static_inventory += sprint_buffer + // clickdelay + clickdelay = new + clickdelay.hud = src + clickdelay.screen_loc = ui_clickdelay + static_inventory += clickdelay + + // resistdelay + resistdelay = new + resistdelay.hud = src + resistdelay.screen_loc = ui_resistdelay + static_inventory += resistdelay using = new /obj/screen/drop() using.icon = ui_style diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 09bd24170a..2729970510 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -57,6 +57,7 @@ if(considered_action) (immediate? last_action_immediate : last_action) = world.time (immediate? next_action_immediate : next_action) = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + hud_used?.clickdelay?.mark_dirty() /** * Get estimated time of next attack. @@ -66,7 +67,7 @@ var/obj/item/I = get_active_held_item() if(I) attack_speed = I.GetEstimatedAttackSpeed() - return max(next_action, last_action + attack_speed) + return max(next_action, next_action_immediate, max(last_action, last_action_immediate) + attack_speed) /** * Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can. @@ -75,6 +76,7 @@ if(considered_action) (immediate? last_action_immediate : last_action) = world.time (immediate? next_action_immediate : next_action) = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + hud_used?.clickdelay?.mark_dirty() /** * Checks if we can do another action. @@ -97,6 +99,7 @@ /mob/proc/FlushCurrentAction() last_action = last_action_immediate next_action = next_action_immediate + hud_used?.clickdelay?.mark_dirty() /** * Discards last_action and next_action @@ -104,6 +107,7 @@ /mob/proc/DiscardCurrentAction() last_action_immediate = last_action next_action_immediate = next_action + hud_used?.clickdelay?.mark_dirty() /** * Checks if we can resist again. @@ -121,6 +125,7 @@ /mob/proc/MarkResistTime(extra_cooldown = resist_cooldown, override = FALSE) last_resist = world.time next_resist = override? (world.time + extra_cooldown) : max(next_resist, world.time + extra_cooldown) + hud_used?.clickdelay?.mark_dirty() /atom // Standard clickdelay variables From 3a38344a04aec6932776a4e30cb5c6d129079cd3 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 00:25:06 -0700 Subject: [PATCH 035/142] fix --- code/_onclick/hud/screen_objects/clickdelay.dm | 4 ++-- code/datums/status_effects/debuffs.dm | 5 ----- code/modules/mob/living/carbon/carbon.dm | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index ec8f13329b..8b6a2f5328 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -17,7 +17,7 @@ /obj/screen/action_bar/proc/update_to_mob(mob/living/L) return FALSE -/datum/hud/var/obj/screen/action_bar/clickdelay +/datum/hud/var/obj/screen/action_bar/clickdelay/clickdelay /obj/screen/action_bar/clickdelay name = "click delay" @@ -41,7 +41,7 @@ icon = 'icons/effects/progessbar.dmi' icon_state = "prog_bar_100" -/obj/screen/clickdelay/proc/update_to_mob(mob/living/L) +/obj/screen/action_bar/clickdelay/proc/update_to_mob(mob/living/L) var/diff = L.next_resist - L.last_resist var/left = L.next_resist - world.time if(left < 0 || diff < 0) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index faed65e9c4..8c64a8faca 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -144,7 +144,6 @@ id = "tased" alert_type = null var/movespeed_mod = /datum/movespeed_modifier/status_effect/tased - var/nextmove_modifier = 1 var/stamdmg_per_ds = 0 //a 20 duration would do 20 stamdmg, disablers do 24 or something var/last_tick = 0 //fastprocess processing speed is a goddamn sham, don't trust it. @@ -173,13 +172,9 @@ C.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing. last_tick = world.time -/datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y - return nextmove_modifier - /datum/status_effect/electrode/no_combat_mode id = "tased_strong" movespeed_mod = /datum/movespeed_modifier/status_effect/tased/no_combat_mode - nextmove_modifier = 2 blocks_combatmode = TRUE stamdmg_per_ds = 1 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 43595b9571..2acba560cb 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -324,13 +324,10 @@ /mob/living/carbon/resist_restraints() var/obj/item/I = null - var/type = 0 if(handcuffed) I = handcuffed - type = 1 else if(legcuffed) I = legcuffed - type = 2 if(I) MarkResistTime() cuff_resist(I) From 21d57eeeac8709d5e75285ceb0a4a51460ce7bd2 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 00:27:45 -0700 Subject: [PATCH 036/142] sigh --- .../_onclick/hud/screen_objects/clickdelay.dm | 2 +- code/modules/mob/clickdelay.dm | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index 8b6a2f5328..f28fb27963 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -41,7 +41,7 @@ icon = 'icons/effects/progessbar.dmi' icon_state = "prog_bar_100" -/obj/screen/action_bar/clickdelay/proc/update_to_mob(mob/living/L) +/obj/screen/action_bar/resistdelay/update_to_mob(mob/living/L) var/diff = L.next_resist - L.last_resist var/left = L.next_resist - world.time if(left < 0 || diff < 0) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 2729970510..640acbd2a4 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -54,9 +54,14 @@ * * immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack. */ /mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) - if(considered_action) - (immediate? last_action_immediate : last_action) = world.time - (immediate? next_action_immediate : next_action) = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + if(immediate) + if(considered_action) + last_action_immediate = world.time + next_action_immediate = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + else + if(considered_action) + last_action = world.time + next_action = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) hud_used?.clickdelay?.mark_dirty() /** @@ -73,9 +78,14 @@ * Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can. */ /mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) - if(considered_action) - (immediate? last_action_immediate : last_action) = world.time - (immediate? next_action_immediate : next_action) = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + if(immediate) + if(considered_action) + last_action_immediate = world.time + next_action_immediate = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + else + if(considered_action) + last_action = world.time + next_action = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) hud_used?.clickdelay?.mark_dirty() /** From 65898bb7f6d9a92c5a5222cdd4b019ccfcde4cb6 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 00:32:05 -0700 Subject: [PATCH 037/142] inf loop --- code/_onclick/other_mobs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index bda18cfb24..c35158046e 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -36,7 +36,7 @@ if(attack_hand_speed) if(!user.CheckActionCooldown(attack_hand_speed)) return - attack_hand(user, act_intent, unarmed_attack_flags) + on_attack_hand(user, act_intent, unarmed_attack_flags) if(attack_hand_unwieldlyness) user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) From 703afec45494e41328f10157075aed5c25e9e543 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 08:57:15 -0700 Subject: [PATCH 038/142] ok --- code/__DEFINES/_flags/return_values.dm | 2 -- code/_onclick/click.dm | 9 ++------- code/_onclick/cyborg.dm | 4 ---- code/_onclick/right_click.dm | 8 ++------ code/game/objects/items.dm | 4 ++++ code/modules/mining/lavaland/necropolis_chests.dm | 3 +-- code/modules/mob/mob_defines.dm | 3 +++ 7 files changed, 12 insertions(+), 21 deletions(-) diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm index d70fb7a8ce..dd15ff6268 100644 --- a/code/__DEFINES/_flags/return_values.dm +++ b/code/__DEFINES/_flags/return_values.dm @@ -7,8 +7,6 @@ #define STOP_ATTACK_PROC_CHAIN (1<<0) /// This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced. #define DISCARD_LAST_ACTION (1<<1) -/// Override automatic last_action set. There's usually a safety net in that attempting to attack a mob will set last_action even if the item itself doesn't specifically set it. If this is present, that doesn't happen. -#define MANUALLY_HANDLE_LAST_ACTION (1<<2) // UnarmedAttack() flags /// Attack is from a parry counterattack diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 58cc5e5dca..138a61e4d9 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -111,12 +111,9 @@ if(A in DirectAccess()) if(W) . = W.melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) else - UnarmedAttack(A) - return + . = UnarmedAttack(A)? TRUE : FALSE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -126,11 +123,9 @@ if(CanReach(A,W)) if(W) . = W.melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) else - UnarmedAttack(A, 1) + . = UnarmedAttack(A, 1)? TRUE : FALSE else if(W) W.ranged_attack_chain(src, A, params) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 36dd598377..4e6730ac35 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -79,8 +79,6 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) if(A == loc || (A in loc) || (A in contents)) . = W.melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) return @@ -91,8 +89,6 @@ if(isturf(A) || isturf(A.loc)) if(A.Adjacent(src)) // see adjacent.dm . = W.melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) return else diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index 93ee14af56..cb81c3998e 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -37,12 +37,10 @@ if(A in DirectAccess()) if(W) . = W.rightclick_melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A)) - UnarmedAttack(A) + . = UnarmedAttack(A, 1)? TRUE : FALSE return //Can't reach anything else in lockers or other weirdness @@ -53,12 +51,10 @@ if(CanReach(A,W)) if(W) . = W.rightclick_melee_attack_chain(src, A, params) - if(ismob(A) && !(. & MANUALLY_HANDLE_LAST_ACTION)) - DelayNextAction() . = !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A,1)) - UnarmedAttack(A,1) + . = UnarmedAttack(A, 1)? TRUE : FALSE else if(W) if(!W.altafterattack(A, src, FALSE, params)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4a00678726..fb0788c191 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -11,6 +11,10 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb name = "item" icon = 'icons/obj/items_and_weapons.dmi' blocks_emissive = EMISSIVE_BLOCK_GENERIC + + attack_hand_speed = 0 + attack_hand_is_action = FALSE + attack_hand_unwieldlyness = 0 ///icon state name for inhand overlays var/item_state = null diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 90e8b1d3ca..043fbd4853 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -701,11 +701,10 @@ to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) -/obj/item/melee/transforming/cleaving_saw/melee_attack_chain(mob/user, atom/target, params) +/obj/item/melee/transforming/cleaving_saw/ApplyAttackCooldown(mob/user, atom/target) . = ..() if(!active) 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/mob_defines.dm b/code/modules/mob/mob_defines.dm index c78732db49..f5c236f9a8 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -11,6 +11,9 @@ blocks_emissive = EMISSIVE_BLOCK_GENERIC vis_flags = VIS_INHERIT_PLANE //when this be added to vis_contents of something it inherit something.plane, important for visualisation of mob in openspace. + + attack_hand_is_action = TRUE + attack_hand_unwieldlyness = CLICK_CD_MELEE /// What receives our keyboard input. src by default. var/datum/focus From 99eb77c0529573f240b60afb0041831ec34d8680 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:32:28 -0700 Subject: [PATCH 039/142] fix --- code/_onclick/click.dm | 8 ++++---- code/_onclick/cyborg.dm | 6 ++---- code/_onclick/other_mobs.dm | 5 +++-- code/_onclick/right_click.dm | 13 ++++++------- code/modules/mob/clickdelay.dm | 4 ++-- code/modules/mob/living/living.dm | 2 +- code/modules/mob/mob_defines.dm | 1 + 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 138a61e4d9..fd969ddbd7 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -111,9 +111,9 @@ if(A in DirectAccess()) if(W) . = W.melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) + return = !(. & DISCARD_LAST_ACTION) else - . = UnarmedAttack(A)? TRUE : FALSE + return UnarmedAttack(A)? TRUE : FALSE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -123,9 +123,9 @@ if(CanReach(A,W)) if(W) . = W.melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) + return !(. & DISCARD_LAST_ACTION) else - . = UnarmedAttack(A, 1)? TRUE : FALSE + return UnarmedAttack(A, 1)? TRUE : FALSE else if(W) W.ranged_attack_chain(src, A, params) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 4e6730ac35..ee30788b0d 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -79,8 +79,7 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) if(A == loc || (A in loc) || (A in contents)) . = W.melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) - return + return !(. & DISCARD_LAST_ACTION) if(!isturf(loc)) return @@ -89,8 +88,7 @@ if(isturf(A) || isturf(A.loc)) if(A.Adjacent(src)) // see adjacent.dm . = W.melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) - return + return !(. & DISCARD_LAST_ACTION) else W.afterattack(A, src, 0, params) return diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index c35158046e..773a4475dd 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -14,7 +14,7 @@ // If the gloves do anything, have them return 1 to stop // normal attack_hand() here. var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines - if(proximity && istype(G) && G.Touch(A,1)) + if(proximity && istype(G) && (. = G.Touch(A,1))) return var/override = 0 @@ -26,7 +26,7 @@ return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) - A.attack_hand(src, intent, flags) + return A.attack_hand(src, intent, flags) /atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) @@ -39,6 +39,7 @@ on_attack_hand(user, act_intent, unarmed_attack_flags) if(attack_hand_unwieldlyness) user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) + return attack_hand_is_action /atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index cb81c3998e..481bac446a 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -36,12 +36,11 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - . = W.rightclick_melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + return !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A)) - . = UnarmedAttack(A, 1)? TRUE : FALSE - return + return UnarmedAttack(A, 1)? TRUE : FALSE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -50,11 +49,11 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - . = W.rightclick_melee_attack_chain(src, A, params) - . = !(. & DISCARD_LAST_ACTION) + . = W.melee_attack_chain(src, A, params) + return !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A,1)) - . = UnarmedAttack(A, 1)? TRUE : FALSE + return UnarmedAttack(A, 1)? TRUE : FALSE else if(W) if(!W.altafterattack(A, src, FALSE, params)) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 640acbd2a4..f55bd13205 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -144,7 +144,7 @@ var/attack_hand_speed = CLICK_CD_MELEE /// Amount of time to hard stagger (no clicking at all) the mob post attack_hand(). Lower = better var/attack_hand_unwieldlyness = 0 - /// Should we set last action for attack hand? + /// Should we set last action for attack hand? This implies that attack_hands to this atom should flush to clickdelay buffers instead of discarding. var/attack_hand_is_action = FALSE /obj/item @@ -170,7 +170,7 @@ * Called after a successful attack to set a mob's clickdelay. */ /obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) - user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, FALSE) + user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass) /** * Get estimated time that a user has to not attack for to use us diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e7e01b438d..4559a48ac6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -676,7 +676,7 @@ ..(pressure_difference, direction, pressure_resistance_prob_delta) /mob/living/can_resist() - return !(CheckResistCooldown() || !CHECK_MOBILITY(src, MOBILITY_RESIST)) + return !CheckResistCooldown() && CHECK_MOBILITY(src, MOBILITY_RESIST) /// Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true. /mob/living/verb/resist() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f5c236f9a8..0d4b3830a7 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -14,6 +14,7 @@ attack_hand_is_action = TRUE attack_hand_unwieldlyness = CLICK_CD_MELEE + attack_hand_speed = 0 /// What receives our keyboard input. src by default. var/datum/focus From e425ef7d688e69e223042dd861750f10ce1e45d1 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:33:32 -0700 Subject: [PATCH 040/142] fix --- code/_onclick/click.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index fd969ddbd7..df7cdbaae8 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -111,7 +111,7 @@ if(A in DirectAccess()) if(W) . = W.melee_attack_chain(src, A, params) - return = !(. & DISCARD_LAST_ACTION) + return !(. & DISCARD_LAST_ACTION) else return UnarmedAttack(A)? TRUE : FALSE From 0858af4b85115d2d3af9b62757c3f8ab1d7490d5 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:43:43 -0700 Subject: [PATCH 041/142] ok --- code/game/machinery/doors/airlock.dm | 2 ++ code/modules/projectiles/gun.dm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 85307e5b6e..b5e752cc6b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -780,6 +780,8 @@ H.apply_damage(10, BRUTE, BODY_ZONE_HEAD) else visible_message("[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.") + else + return ..() /obj/machinery/door/airlock/attempt_wire_interaction(mob/user) if(security_level) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index bdfc999f6f..43eae2db1b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -167,6 +167,8 @@ /obj/item/gun/afterattack(atom/target, mob/living/user, flag, params) . = ..() + if(!CheckAttackCooldown(user, target)) + return process_afterattack(target, user, flag, params) /obj/item/gun/proc/process_afterattack(atom/target, mob/living/user, flag, params) From 38a9e89687f9bca33a4b13093bf62623ffeeeb92 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:49:56 -0700 Subject: [PATCH 042/142] ok bet --- code/game/machinery/doors/firedoor.dm | 1 - code/modules/projectiles/gun.dm | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 015bb0126a..2d41575e70 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -82,7 +82,6 @@ return TRUE return FALSE - /obj/machinery/door/firedoor/power_change() if(powered(power_channel)) stat &= ~NOPOWER diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 43eae2db1b..1c0721a98f 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -169,6 +169,7 @@ . = ..() if(!CheckAttackCooldown(user, target)) return + user.DelayNextAction() process_afterattack(target, user, flag, params) /obj/item/gun/proc/process_afterattack(atom/target, mob/living/user, flag, params) From 2eb6f0467dcde7cc307fa78939fdea8b5e528fbf Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:56:38 -0700 Subject: [PATCH 043/142] fix guns --- code/modules/projectiles/ammunition/_ammunition.dm | 3 ++- code/modules/projectiles/ammunition/_firing.dm | 1 + code/modules/projectiles/gun.dm | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm index ee6a25d8e4..6a73d9a366 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammunition.dm @@ -16,7 +16,8 @@ var/variance = 0 //Variance for inaccuracy fundamental to the casing var/randomspread = 0 //Randomspread for automatics var/delay = 0 //Delay for energy weapons - var/click_cooldown_override = 0 //Override this to make your gun have a faster fire rate, in tenths of a second. 4 is the default gun cooldown. + /// Override this to make the gun check for a different cooldown rather than CLICK_CD_RANGE, which is 4 deciseconds. + var/click_cooldown_override var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired. var/heavy_metal = TRUE var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index 06772bd099..0ef4c680aa 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -16,6 +16,7 @@ AddComponent(/datum/component/pellet_cloud, projectile_type, pellets) SEND_SIGNAL(src, COMSIG_PELLET_CLOUD_INIT, target, user, fired_from, randomspread, spread, zone_override, params, distro) + user.DelayNextAction(considered_action = TRUE, immediate = FALSE) user.newtonian_move(get_dir(target, user)) update_icon() return 1 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1c0721a98f..43eae2db1b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -169,7 +169,6 @@ . = ..() if(!CheckAttackCooldown(user, target)) return - user.DelayNextAction() process_afterattack(target, user, flag, params) /obj/item/gun/proc/process_afterattack(atom/target, mob/living/user, flag, params) From 89a1fa544ede2d8673273d1975aca3c279f3a3e0 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:12:34 -0700 Subject: [PATCH 044/142] fixes --- code/_onclick/hud/_defines.dm | 4 ++-- code/_onclick/hud/screen_objects/clickdelay.dm | 6 +++--- code/modules/mob/living/living.dm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 3fd73192f4..3acdcc3b82 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -168,8 +168,8 @@ //UI position overrides for 1:1 screen layout. (default is 7:5) #define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button #define ui_overridden_resist "EAST-3:24,SOUTH+1:7" -#define ui_clickdelay "CENTER:16,SOUTH:5" -#define ui_resistdelay "EAST-3:24,SOUTH+1:15" +#define ui_clickdelay "CENTER,SOUTH+1:-28" +#define ui_resistdelay "EAST-3:24,SOUTH+1:4" #define ui_combat_toggle "EAST-4:22,SOUTH:5" #define ui_boxcraft "EAST-4:22,SOUTH+1:6" diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index f28fb27963..7b546b9ee2 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -26,12 +26,12 @@ /obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L) var/estimated = L.EstimatedNextActionTime() - var/diff = L.last_action - estimated + var/diff = estimated - L.last_action var/left = estimated - world.time if(left < 0 || diff < 0) icon_state = "prog_bar_100" return FALSE - icon_state = "prog_bar_[round(clamp((left/diff) * 100, 0, 100), 5)]" + icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]" return TRUE /datum/hud/var/obj/screen/action_bar/resistdelay/resistdelay @@ -47,5 +47,5 @@ if(left < 0 || diff < 0) icon_state = "prog_bar_100" return FALSE - icon_state = "prog_bar[round(clamp((left/diff) * 100, 0, 100), 5)]" + icon_state = "prog_bar[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]" return TRUE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4559a48ac6..8fbca38a33 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -676,7 +676,7 @@ ..(pressure_difference, direction, pressure_resistance_prob_delta) /mob/living/can_resist() - return !CheckResistCooldown() && CHECK_MOBILITY(src, MOBILITY_RESIST) + return CheckResistCooldown() && CHECK_MOBILITY(src, MOBILITY_RESIST) /// Resist verb for attempting to get out of whatever is restraining your motion. Gives you resist clickdelay if do_resist() returns true. /mob/living/verb/resist() From 4373e2b4525ca7b817c0f81ee7f0b56c81c94154 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:18:10 -0700 Subject: [PATCH 045/142] done --- code/modules/mob/clickdelay.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index f55bd13205..f76c04b51a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -135,7 +135,7 @@ /mob/proc/MarkResistTime(extra_cooldown = resist_cooldown, override = FALSE) last_resist = world.time next_resist = override? (world.time + extra_cooldown) : max(next_resist, world.time + extra_cooldown) - hud_used?.clickdelay?.mark_dirty() + hud_used?.resistdelay?.mark_dirty() /atom // Standard clickdelay variables From da4e208f948e3913d0dcf71ac428e2b6e534119b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:40:12 -0700 Subject: [PATCH 046/142] ok --- code/datums/status_effects/status_effect.dm | 6 ++++++ code/datums/status_effects/wound_effects.dm | 2 +- code/modules/mob/clickdelay.dm | 13 ++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 17347eb946..461ae9c65d 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -90,6 +90,12 @@ return duration = world.time + original_duration +/** + * Multiplied to clickdelays + */ +/datum/status_effect/proc/action_cooldown_mod() + return 1 + //////////////// // ALERT HOOK // //////////////// diff --git a/code/datums/status_effects/wound_effects.dm b/code/datums/status_effects/wound_effects.dm index 2c0c030425..91440d36de 100644 --- a/code/datums/status_effects/wound_effects.dm +++ b/code/datums/status_effects/wound_effects.dm @@ -151,7 +151,7 @@ return 1 -/datum/status_effect/wound/bone/nextmove_modifier() +/datum/status_effect/wound/bone/action_cooldown_mod() var/mob/living/carbon/C = owner if(C.get_active_hand() == linked_limb) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index f76c04b51a..4f807198d7 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -17,7 +17,7 @@ * The difference between the above and this is this is set immediately before even the pre-attack begins to ensure clickdelay is respected. * Then, it is flushed or discarded using [FlushLastAttack()] or [DiscardLastAttack()] respectively. */ - + var/last_action_immediate = 0 /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. var/next_action = 0 @@ -31,11 +31,11 @@ /// Simple modification variable added to amount on adjust and on checking time since last action using [CheckActionCooldown()]. /// This should only be manually modified via addition. var/action_cooldown_adjust = 0 - + // Resisting - While resisting will give generic clickdelay, it is also on its own resist delay system. However, resisting does not check generic movedelay. // Resist cooldown should only be set at the start of a resist chain - whether this is clicking an alert button, pressing or hotkeying the resist button, or moving to resist out of a locker. /* - * Special clickdelay variable for resisting. Last time we did a special action like resisting. This should only be set using [MarkResistTime()]. + * Special clickdelay variable for resisting. Last time we did a special action like resisting. This should only be set using [MarkResistTime()]. * Use [CheckResistCooldown()] to check cooldowns, this should only be used for the resist action bar visual. */ var/last_resist = 0 @@ -51,7 +51,7 @@ * * amount - Amount to delay by * * ignore_mod - ignores next action adjust and mult * * considered_action - Defaults to TRUE - If TRUE, sets last_action to world.time. - * * immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack. + * * immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack. */ /mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) if(immediate) @@ -100,8 +100,11 @@ * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. */ /mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) + var/mod = action_cooldown_mod + for(var/datum/status_effect/S in status_effects) + mod *= S.action_cooldown_mod() return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ - (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) + (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * mod + action_cooldown_adjust)))) /** * Flushes last_action and next_action From 21143ade213081e1b3e294dcb09a1254a7a0b8fc Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:01:33 -0700 Subject: [PATCH 047/142] eyeroll --- code/modules/mob/clickdelay.dm | 6 ++---- code/modules/mob/living/clickdelay.dm | 20 ++++++++++++++++++++ tgstation.dme | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 code/modules/mob/living/clickdelay.dm diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 4f807198d7..95485d6a8a 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -100,11 +100,9 @@ * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. */ /mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) - var/mod = action_cooldown_mod - for(var/datum/status_effect/S in status_effects) - mod *= S.action_cooldown_mod() + ////// WARNING: IF YOU MODIFY THIS PROC, CHECK living/clickdelay.dm! DUE TO STATUS EFFECTS ONLY BEING ON LIVING, THIS PROC IS COPYPASTED THERE AND MODIFIED. return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ - (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * mod + action_cooldown_adjust)))) + (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) /** * Flushes last_action and next_action diff --git a/code/modules/mob/living/clickdelay.dm b/code/modules/mob/living/clickdelay.dm new file mode 100644 index 0000000000..50b752ebcf --- /dev/null +++ b/code/modules/mob/living/clickdelay.dm @@ -0,0 +1,20 @@ +/** + * Checks if we can do another action. + * Returns TRUE if we can and FALSE if we cannot. + * + * @params + * * cooldown - Time required since last action. Defaults to 0.5 + * * from_next_action - Defaults to FALSE. Should we check from the tail end of next_action instead of last_action? + * * ignore_mod - Defaults to FALSE. Ignore all adjusts and multipliers. Do not use this unless you know what you are doing and have a good reason. + * * ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused. + * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. + * + * Is this a copypaste? + * Yes, because status_effects isn't on /mob... :/ + */ +/mob/living/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) + var/mod = action_cooldown_mod + for(var/datum/status_effect/S in status_effects) + mod *= S.action_cooldown_mod() + return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ + (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * mod + action_cooldown_adjust)))) diff --git a/tgstation.dme b/tgstation.dme index 13f394a1b6..d22713dd1e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2377,6 +2377,7 @@ #include "code\modules\mob\dead\observer\say.dm" #include "code\modules\mob\living\blood.dm" #include "code\modules\mob\living\bloodcrawl.dm" +#include "code\modules\mob\living\clickdelay.dm" #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\death.dm" #include "code\modules\mob\living\emote.dm" From cd67be32e050e496126a68e78db1b264287f262d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:12:09 -0700 Subject: [PATCH 048/142] Update wishgranter.dm --- code/game/machinery/wishgranter.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index c2eb5c1413..12fdc2193b 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -31,7 +31,7 @@ user.dna.add_mutation(XRAY) user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(TK) - user.action_cooldown_mod = 0.5 + user.action_cooldown_mod *= 0.5 to_chat(user, "Things around you feel slower!") charges-- insisting = FALSE @@ -101,7 +101,7 @@ to_chat(user, "[killreward] materializes into your hands!") else to_chat(user, "[killreward] materializes onto the floor.") - user.action_cooldown_mod = 0.5 + user.action_cooldown_mod *= 0.8 to_chat(user, "Things around you feel slightly slower!") var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc) killwish.maxHealth = 1500 From aaa536b8fc065b52baa6dea2ca9a7825c5fc92c5 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:38:15 -0700 Subject: [PATCH 049/142] ok --- code/modules/mob/clickdelay.dm | 27 ++++++++++++++++++++------- code/modules/mob/living/clickdelay.dm | 22 +++------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index 95485d6a8a..c634b04f15 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -57,21 +57,23 @@ if(immediate) if(considered_action) last_action_immediate = world.time - next_action_immediate = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + next_action_immediate = max(next_action, world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust()))) else if(considered_action) last_action = world.time - next_action = max(next_action, world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust))) + next_action = max(next_action, world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust()))) hud_used?.clickdelay?.mark_dirty() /** * Get estimated time of next attack. */ /mob/proc/EstimatedNextActionTime() - var/attack_speed = unarmed_attack_speed + var/attack_speed = unarmed_attack_speed * GetActionCooldownMod() + GetActionCooldownAdjust() var/obj/item/I = get_active_held_item() if(I) attack_speed = I.GetEstimatedAttackSpeed() + if(!I.clickdelay_mod_bypass) + attack_speed = attack_speed * GetActionCooldownMod() + GetActionCooldownAdjust() return max(next_action, next_action_immediate, max(last_action, last_action_immediate) + attack_speed) /** @@ -81,11 +83,11 @@ if(immediate) if(considered_action) last_action_immediate = world.time - next_action_immediate = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + next_action_immediate = world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust())) else if(considered_action) last_action = world.time - next_action = world.time + (ignore_mod? amount : (amount * action_cooldown_mod + action_cooldown_adjust)) + next_action = world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust())) hud_used?.clickdelay?.mark_dirty() /** @@ -100,9 +102,20 @@ * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. */ /mob/proc/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) - ////// WARNING: IF YOU MODIFY THIS PROC, CHECK living/clickdelay.dm! DUE TO STATUS EFFECTS ONLY BEING ON LIVING, THIS PROC IS COPYPASTED THERE AND MODIFIED. return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ - (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * action_cooldown_mod + action_cooldown_adjust)))) + (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * GetActionCooldownMod() + GetActionCooldownAdjust())))) + +/** + * Gets action_cooldown_mod. + */ +/mob/proc/GetActionCooldownMod() + return action_cooldown_mod + +/** + * Gets action_cooldown_adjust + */ +/mob/proc/GetActionCooldownAdjust() + return action_cooldown_adjust /** * Flushes last_action and next_action diff --git a/code/modules/mob/living/clickdelay.dm b/code/modules/mob/living/clickdelay.dm index 50b752ebcf..dfdb9104bf 100644 --- a/code/modules/mob/living/clickdelay.dm +++ b/code/modules/mob/living/clickdelay.dm @@ -1,20 +1,4 @@ -/** - * Checks if we can do another action. - * Returns TRUE if we can and FALSE if we cannot. - * - * @params - * * cooldown - Time required since last action. Defaults to 0.5 - * * from_next_action - Defaults to FALSE. Should we check from the tail end of next_action instead of last_action? - * * ignore_mod - Defaults to FALSE. Ignore all adjusts and multipliers. Do not use this unless you know what you are doing and have a good reason. - * * ignore_next_action - Defaults to FALSE. Ignore next_action and only care about cooldown param and everything else. Generally unused. - * * immediate - Defaults to FALSE. Checks last action using immediate, used on the head end of an attack. This is to prevent colliding attacks in case of sleep. Not that you should sleep() in an attack but.. y'know. - * - * Is this a copypaste? - * Yes, because status_effects isn't on /mob... :/ - */ -/mob/living/CheckActionCooldown(cooldown = 0.5, from_next_action = FALSE, ignore_mod = FALSE, ignore_next_action = FALSE, immediate = FALSE) - var/mod = action_cooldown_mod +/mob/living/GetActionCooldownMod() + . = ..() for(var/datum/status_effect/S in status_effects) - mod *= S.action_cooldown_mod() - return (ignore_next_action || (world.time >= (immediate? next_action_immediate : next_action))) && \ - (world.time >= ((from_next_action? (immediate? next_action_immediate : next_action) : (immediate? last_action_immediate : last_action)) + max(0, ignore_mod? cooldown : (cooldown * mod + action_cooldown_adjust)))) + . *= S.action_cooldown_mod() From 95cd7c657138ad5d417288eff99a14eacfeeb681 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:46:46 -0700 Subject: [PATCH 050/142] fix --- code/_onclick/click.dm | 3 ++- code/_onclick/hud/screen_objects/clickdelay.dm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index df7cdbaae8..ab93cc3cd6 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -316,8 +316,9 @@ var/mob/living/carbon/human/H = user H.dna.species.grab(H, src, H.mind.martial_art) H.DelayNextAction(CLICK_CD_MELEE) + return TRUE else - ..() + return ..() /* Alt click Unused except for AI diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index 7b546b9ee2..b17978b1ba 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -47,5 +47,5 @@ if(left < 0 || diff < 0) icon_state = "prog_bar_100" return FALSE - icon_state = "prog_bar[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]" + icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]" return TRUE From db3f9b4549fea0fa0cc4ff36c3dd4abf0f34bccd Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:48:46 -0700 Subject: [PATCH 051/142] woops --- code/_onclick/click.dm | 18 ++++++------------ code/_onclick/right_click.dm | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index ab93cc3cd6..f83ddfd270 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -54,23 +54,17 @@ var/list/modifiers = params2list(params) if(modifiers["shift"] && modifiers["middle"]) - ShiftMiddleClickOn(A) - return + return ShiftMiddleClickOn(A) if(modifiers["shift"] && modifiers["ctrl"]) - CtrlShiftClickOn(A) - return + return CtrlShiftClickOn(A) if(modifiers["middle"]) - MiddleClickOn(A) - return + return MiddleClickOn(A) if(modifiers["shift"] && (client && client.show_popup_menus || modifiers["right"])) //CIT CHANGE - makes shift-click examine use right click instead of left click in combat mode - ShiftClickOn(A) - return + return ShiftClickOn(A) if(modifiers["alt"]) // alt and alt-gr (rightalt) - AltClickOn(A) - return + return AltClickOn(A) if(modifiers["ctrl"]) - CtrlClickOn(A) - return + return CtrlClickOn(A) if(modifiers["right"]) //CIT CHANGE - allows right clicking to perform actions return RightClickOn(A,params) //CIT CHANGE - ditto diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index 481bac446a..b4a8d48915 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -18,7 +18,7 @@ if(restrained()) DelayNextAction(CLICK_CD_HANDCUFFED) RestrainedClickOn(A) - return + return TRUE if(in_throw_mode) throw_item(A)//todo: make it plausible to lightly toss items via right-click From 80233e52afab5d8f76aa303c0867950b3ae40b51 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:56:08 -0700 Subject: [PATCH 052/142] ok --- code/_onclick/click.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index f83ddfd270..116b9c7db7 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -294,8 +294,7 @@ */ /mob/proc/CtrlClickOn(atom/A) - A.CtrlClick(src) - return + return A.CtrlClick(src) /atom/proc/CtrlClick(mob/user) SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user) @@ -335,7 +334,8 @@ var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling) if(C && C.chosen_sting) C.chosen_sting.try_to_sting(src,A) - return + DelayNextAction(CLICK_CD_RANGE) + return TRUE ..() /atom/proc/AltClick(mob/user) From 29a8c2eee6f87482433125189edf084d99e8269c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 12:47:21 -0700 Subject: [PATCH 053/142] flushed --- code/modules/mob/clickdelay.dm | 15 +++++++++++---- code/modules/mob/living/living_defense.dm | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index c634b04f15..d570650789 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -52,8 +52,9 @@ * * ignore_mod - ignores next action adjust and mult * * considered_action - Defaults to TRUE - If TRUE, sets last_action to world.time. * * immediate - defaults to TRUE - if TRUE, writes to cached/last_attack_immediate instead of last_attack. This ensures it can't collide with any delay checks in the actual attack. + * * flush - defaults to FALSE - Use this while using this proc outside of clickcode to ensure everything is set properly. This should never be set to TRUE if this is called from clickcode. */ -/mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) +/mob/proc/DelayNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE, flush = FALSE) if(immediate) if(considered_action) last_action_immediate = world.time @@ -62,7 +63,10 @@ if(considered_action) last_action = world.time next_action = max(next_action, world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust()))) - hud_used?.clickdelay?.mark_dirty() + if(flush) + FlushCurrentAction() + else + hud_used?.clickdelay?.mark_dirty() /** * Get estimated time of next attack. @@ -79,7 +83,7 @@ /** * Sets our next action to. The difference is DelayNextAction cannot reduce next_action under any circumstances while this can. */ -/mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE) +/mob/proc/SetNextAction(amount = 0, ignore_mod = FALSE, considered_action = TRUE, immediate = TRUE, flush = FALSE) if(immediate) if(considered_action) last_action_immediate = world.time @@ -88,7 +92,10 @@ if(considered_action) last_action = world.time next_action = world.time + (ignore_mod? amount : (amount * GetActionCooldownMod() + GetActionCooldownAdjust())) - hud_used?.clickdelay?.mark_dirty() + if(flush) + FlushCurrentAction() + else + hud_used?.clickdelay?.mark_dirty() /** * Checks if we can do another action. diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0d9c0288cc..03273e999f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -215,7 +215,7 @@ //proc to upgrade a simple pull into a more aggressive grab. /mob/living/proc/grippedby(mob/living/carbon/user, instant = FALSE) if(user.grab_state < GRAB_KILL) - user.DelayNextAction(CLICK_CD_GRABBING) + user.DelayNextAction(CLICK_CD_GRABBING, flush = TRUE) playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(user.grab_state) //only the first upgrade is instantaneous From c3ca4be149aeadf15967bdb9a8cdbbd67187231d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 13:47:07 -0700 Subject: [PATCH 054/142] ok --- code/_onclick/hud/_defines.dm | 2 +- code/_onclick/hud/screen_objects/clickdelay.dm | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 3acdcc3b82..467c67e0c3 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -168,7 +168,7 @@ //UI position overrides for 1:1 screen layout. (default is 7:5) #define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button #define ui_overridden_resist "EAST-3:24,SOUTH+1:7" -#define ui_clickdelay "CENTER,SOUTH+1:-28" +#define ui_clickdelay "CENTER,SOUTH+1:-31" #define ui_resistdelay "EAST-3:24,SOUTH+1:4" #define ui_combat_toggle "EAST-4:22,SOUTH:5" diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index b17978b1ba..4836ccf448 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -23,6 +23,13 @@ name = "click delay" icon = 'icons/effects/progessbar.dmi' icon_state = "prog_bar_100" + layer = 20 // under hand buttons + +/obj/screen/action_bar/clickdelay/Initialize() + . = ..() + var/matrix/M = new + M.Scale(2, 1) + transform = M /obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L) var/estimated = L.EstimatedNextActionTime() From d30acd5b09d77d91998ab384a580ae6f261d5e9e Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 13:49:17 -0700 Subject: [PATCH 055/142] smooth --- code/__DEFINES/subsystems.dm | 1 + code/_onclick/hud/screen_objects/clickdelay.dm | 4 ++-- code/controllers/subsystem/processing/huds.dm | 6 ++++++ tgstation.dme | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 code/controllers/subsystem/processing/huds.dm diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index bf76f8a523..b817f04dc1 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -107,6 +107,7 @@ #define FIRE_PRIORITY_INSTRUMENTS 30 #define FIRE_PRIORITY_FIELDS 30 #define FIRE_PRIOTITY_SMOOTHING 35 +#define FIRE_PRIORITY_HUDS 40 #define FIRE_PRIORITY_NETWORKS 40 #define FIRE_PRIORITY_OBJ 40 #define FIRE_PRIORITY_ACID 40 diff --git a/code/_onclick/hud/screen_objects/clickdelay.dm b/code/_onclick/hud/screen_objects/clickdelay.dm index 4836ccf448..e0ad039cdf 100644 --- a/code/_onclick/hud/screen_objects/clickdelay.dm +++ b/code/_onclick/hud/screen_objects/clickdelay.dm @@ -1,13 +1,13 @@ /obj/screen/action_bar /obj/screen/action_bar/Destroy() - STOP_PROCESSING(SSfastprocess, src) + STOP_PROCESSING(SShuds, src) return ..() /obj/screen/action_bar/proc/mark_dirty() var/mob/living/L = hud?.mymob if(L?.client && update_to_mob(L)) - START_PROCESSING(SSfastprocess, src) + START_PROCESSING(SShuds, src) /obj/screen/action_bar/process() var/mob/living/L = hud?.mymob diff --git a/code/controllers/subsystem/processing/huds.dm b/code/controllers/subsystem/processing/huds.dm new file mode 100644 index 0000000000..aea23d2400 --- /dev/null +++ b/code/controllers/subsystem/processing/huds.dm @@ -0,0 +1,6 @@ +// Smooth HUD updates, but low priority +PROCESSING_SUBSYSTEM_DEF(huds) + name = "HUD updates" + wait = 0.5 + priority = FIRE_PRIORITY_HUDS + stat_tag = "HUDS" diff --git a/tgstation.dme b/tgstation.dme index d22713dd1e..4d444fc65a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -346,6 +346,7 @@ #include "code\controllers\subsystem\processing\circuit.dm" #include "code\controllers\subsystem\processing\fastprocess.dm" #include "code\controllers\subsystem\processing\fields.dm" +#include "code\controllers\subsystem\processing\huds.dm" #include "code\controllers\subsystem\processing\instruments.dm" #include "code\controllers\subsystem\processing\nanites.dm" #include "code\controllers\subsystem\processing\networks.dm" From 9c9014acdb376e1469d8d2265592b551e2e8586b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:19:07 -0700 Subject: [PATCH 056/142] crate fix --- code/game/objects/structures/crates_lockers/crates.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 7d80a28b13..46170d44b1 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -42,6 +42,7 @@ . += "manifest" /obj/structure/closet/crate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) + . = ..() if(manifest) tear_manifest(user) From 53b3c6099b5fdc5f5ab439e9d675b876597a22d7 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:27:41 -0700 Subject: [PATCH 057/142] ok --- code/_onclick/other_mobs.dm | 4 ++-- code/modules/antagonists/cult/cult_structures.dm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 45700f4474..9578b909cb 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -118,7 +118,7 @@ Animals & All Unspecified */ /mob/living/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) - A.attack_animal(src, intent, flags) + return !isnull(A.attack_animal(src, intent, flags)) /atom/proc/attack_animal(mob/user) SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ANIMAL, user) @@ -130,7 +130,7 @@ Monkeys */ /mob/living/carbon/monkey/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) - A.attack_paw(src, intent, flags) + return A.attack_paw(src, intent, flags) /atom/proc/attack_paw(mob/user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND) diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm index 5c6a0b3416..5803941f36 100644 --- a/code/modules/antagonists/cult/cult_structures.dm +++ b/code/modules/antagonists/cult/cult_structures.dm @@ -49,10 +49,11 @@ Beam(M, icon_state="sendbeam", time=4) M.visible_message("[M] repairs \the [src].", \ "You repair [src], leaving [p_they()] at [round(obj_integrity * 100 / max_integrity)]% stability.") + return TRUE else to_chat(M, "You cannot repair [src], as [p_theyre()] undamaged!") else - ..() + return ..() /obj/structure/destructible/cult/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user)) From b20e3bc2b646d155d6f6aba51a97dbee923d2b8d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:30:27 -0700 Subject: [PATCH 058/142] monkey attacks --- code/modules/events/spacevine.dm | 1 + code/modules/mob/living/carbon/alien/alien_defense.dm | 1 - code/modules/mob/living/carbon/carbon_defense.dm | 4 +--- code/modules/mob/living/living_defense.dm | 2 ++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index dbda71cff3..4dd787849f 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -355,6 +355,7 @@ for(var/datum/spacevine_mutation/SM in mutations) SM.on_hit(src, user) user_unbuckle_mob(user,user) + return ..() /obj/structure/spacevine/attack_alien(mob/living/user) eat(user) diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index a2883ddeb2..5081fd8a14 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -74,7 +74,6 @@ In all, this is a lot like the monkey code. /N var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected)) apply_damage(rand(1, 3), BRUTE, affecting) - /mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M) . = ..() if(.) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 959ba17b2a..1b0aee04e4 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -150,15 +150,13 @@ if(M.a_intent == INTENT_HELP) help_shake_act(M) - return 0 + return TRUE . = ..() if(.) //successful monkey bite. for(var/thing in M.diseases) var/datum/disease/D = thing ForceContractDisease(D) - return 1 - /mob/living/carbon/attack_slime(mob/living/simple_animal/slime/M) . = ..() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 03273e999f..e5d1c8cbe3 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -357,6 +357,7 @@ if(mob_run_block(M, 0, "the [M.name]", ATTACK_TYPE_MELEE | ATTACK_TYPE_UNARMED, 0, M, check_zone(M.zone_selected), null) & BLOCK_SUCCESS) return FALSE M.do_attack_animation(src, ATTACK_EFFECT_BITE) + M.DelayNextAction() if (prob(75)) log_combat(M, src, "attacked") playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) @@ -368,6 +369,7 @@ visible_message("[M.name] has attempted to bite [src]!", \ "[M.name] has attempted to bite [src]!", null, COMBAT_MESSAGE_RANGE, null, M, "You have attempted to bite [src]!") + return TRUE return FALSE /mob/living/attack_larva(mob/living/carbon/alien/larva/L) From 64de8f16a9a63ec83c4812b85ac31e38e1b0678c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:59:27 -0700 Subject: [PATCH 059/142] fixes --- code/_onclick/other_mobs.dm | 11 ++++++++--- code/game/objects/obj_defense.dm | 2 ++ code/game/objects/structures/window.dm | 1 + code/modules/mob/living/carbon/human/human_defense.dm | 3 +++ code/modules/mob/living/living_defense.dm | 9 +++++++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 9578b909cb..bca8280a89 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -130,7 +130,9 @@ Monkeys */ /mob/living/carbon/monkey/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) - return A.attack_paw(src, intent, flags) + if(!CheckActionCooldown(CLICK_CD_MELEE)) + return + return !isnull(A.attack_paw(src, intent, flags)) /atom/proc/attack_paw(mob/user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND) @@ -151,6 +153,8 @@ return if(is_muzzled()) return + if(!CheckActionCooldown(CLICK_CD_MELEE)) + return var/mob/living/carbon/ML = A if(istype(ML)) 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) @@ -170,6 +174,7 @@ ML.ForceContractDisease(D) else ML.visible_message("[src] has attempted to bite [ML]!") + DelayNextAction() /* Aliens @@ -250,9 +255,9 @@ /mob/living/simple_animal/hostile/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) target = A if(dextrous && !ismob(A)) - ..() + return ..() else - AttackingTarget() + return AttackingTarget() /* New Players: diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 0c07eb3431..14017ffb2d 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -116,6 +116,8 @@ playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) /obj/attack_animal(mob/living/simple_animal/M) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return if(!M.melee_damage_upper && !M.obj_damage) M.emote("custom", message = "[M.friendly_verb_continuous] [src].") return 0 diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 88e7cab798..6aae4955f1 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -177,6 +177,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) playsound(src, 'sound/effects/Glassknock.ogg', 50, 1) /obj/structure/window/attack_paw(mob/user) + user.DelayNextAction() return attack_hand(user) /obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dc62ed20e5..1673c57a80 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -131,6 +131,9 @@ dna.species.spec_attack_hand(H, src, null, act_intent, unarmed_attack_flags) /mob/living/carbon/human/attack_paw(mob/living/carbon/monkey/M) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return + M.DelayNextAction() 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) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index e5d1c8cbe3..216670a7d3 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -323,6 +323,9 @@ /mob/living/attack_animal(mob/living/simple_animal/M) M.face_atom(src) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return + M.DelayNextAction() if(M.melee_damage_upper == 0) M.visible_message("\The [M] [M.friendly_verb_continuous] [src]!", "You [M.friendly_verb_simple] [src]!", target = src, @@ -338,7 +341,7 @@ return 0 damage = block_calculate_resultant_damage(damage, return_list) if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) + playsound(src, M.attack_sound, 50, 1, 1) M.do_attack_animation(src) visible_message("\The [M] [M.attack_verb_continuous] [src]!", \ "\The [M] [M.attack_verb_continuous] you!", null, COMBAT_MESSAGE_RANGE, null, @@ -347,6 +350,9 @@ return damage /mob/living/attack_paw(mob/living/carbon/monkey/M) + if(!M.CheckActionCooldown(CLICK_CD_MELEE)) + return + M.DelayNextAction() if (M.a_intent == INTENT_HARM) if(HAS_TRAIT(M, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") @@ -357,7 +363,6 @@ if(mob_run_block(M, 0, "the [M.name]", ATTACK_TYPE_MELEE | ATTACK_TYPE_UNARMED, 0, M, check_zone(M.zone_selected), null) & BLOCK_SUCCESS) return FALSE M.do_attack_animation(src, ATTACK_EFFECT_BITE) - M.DelayNextAction() if (prob(75)) log_combat(M, src, "attacked") playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) From ce18584fb16d373b06730853d19a3b6a14b83f81 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:47:22 -0700 Subject: [PATCH 060/142] Update beam_rifle.dm --- code/modules/projectiles/guns/misc/beam_rifle.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index bcb074023f..5605647078 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -418,10 +418,10 @@ var/wall_devastate = 0 var/aoe_structure_range = 0 var/aoe_structure_damage = 0 - var/aoe_fire_range = 0 - var/aoe_fire_chance = 0 - var/aoe_mob_range = 0 - var/aoe_mob_damage = 0 + var/aoe_fire_range = 2 + var/aoe_fire_chance = 100 + var/aoe_mob_range = 2 + var/aoe_mob_damage = 30 var/impact_structure_damage = 0 var/impact_direct_damage = 0 var/turf/cached From 0b4185e26faec54063d496ab81a756f6956ec131 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:47:46 -0700 Subject: [PATCH 061/142] Update beam_rifle.dm --- code/modules/projectiles/guns/misc/beam_rifle.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index 5605647078..fd09aa7f9d 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -29,6 +29,8 @@ ammo_type = list(/obj/item/ammo_casing/energy/beam_rifle/hitscan) cell_type = /obj/item/stock_parts/cell/beam_rifle canMouseDown = TRUE + can_turret = FALSE + can_circuit = FALSE //Cit changes: beam rifle stats. slowdown = 1 item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND | NEEDS_PERMIT From f47a7449e3a7cb1251f1674ccac20090537f2e3d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:48:21 -0700 Subject: [PATCH 062/142] Update gun.dm --- code/modules/projectiles/gun.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f34343debd..9078a1bce9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -28,6 +28,13 @@ trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers var/sawn_desc = null //description change if weapon is sawn-off var/sawn_off = FALSE + + /// can we be put into a turret + var/can_turret = TRUE + /// can we be put in a circuit + var/can_circuit = TRUE + /// can we be put in an emitter + var/can_emitter = TRUE /// Weapon is burst fire if this is above 1 var/burst_size = 1 From 08f905f5bcc02ae62d7aa3b0ef805bed3bbe6ff2 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:49:00 -0700 Subject: [PATCH 063/142] Update portable_turret_construct.dm --- code/game/machinery/porta_turret/portable_turret_construct.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm index bf70ee8a9d..8feb3c7bab 100644 --- a/code/game/machinery/porta_turret/portable_turret_construct.dm +++ b/code/game/machinery/porta_turret/portable_turret_construct.dm @@ -79,6 +79,9 @@ if(PTURRET_INTERNAL_ARMOUR_ON) if(istype(I, /obj/item/gun/energy)) //the gun installation part var/obj/item/gun/energy/E = I + if(!E.can_turret) + to_chat(user, "[src] can't be fit into turrets.") + return if(!user.transferItemToLoc(E, src)) return installed_gun = E From bb32f183ff95c2fba2079a0bb38cb129ed998b9f Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:49:49 -0700 Subject: [PATCH 064/142] Update weaponized.dm --- code/modules/integrated_electronics/subtypes/weaponized.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/integrated_electronics/subtypes/weaponized.dm b/code/modules/integrated_electronics/subtypes/weaponized.dm index 950525ab7f..96a732d08f 100644 --- a/code/modules/integrated_electronics/subtypes/weaponized.dm +++ b/code/modules/integrated_electronics/subtypes/weaponized.dm @@ -45,6 +45,9 @@ /obj/item/integrated_circuit/weaponized/weapon_firing/attackby(var/obj/O, var/mob/user) if(istype(O, /obj/item/gun/energy)) var/obj/item/gun/gun = O + if(!gun.can_circuit) + to_chat(user, "[gun] does not fit into circuits.") + return if(installed_gun) to_chat(user, "There's already a weapon installed.") return From aabe3c3b32799fd95613c9939f5ad0611db745b7 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 23 Jul 2020 18:50:52 -0700 Subject: [PATCH 065/142] Update emitter.dm --- code/modules/power/singularity/emitter.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 0d182e0a1b..50dae7d6bb 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -315,6 +315,9 @@ /obj/machinery/power/emitter/proc/integrate(obj/item/gun/energy/E,mob/user) if(istype(E, /obj/item/gun/energy)) + if(!E.can_emitter) + to_chat(user, "[E] cannot fit into emitters.") + return if(!user.transferItemToLoc(E, src)) return gun = E From 33d5ba788b231630960f030cbc56b86755bf1e93 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 20:19:18 -0700 Subject: [PATCH 066/142] aight --- code/__DEFINES/_flags/return_values.dm | 7 +++- code/_onclick/click.dm | 8 ++++- code/_onclick/item_attack.dm | 32 ++++++++++++++++--- code/_onclick/other_mobs.dm | 12 ++++--- code/_onclick/right_click.dm | 10 ++++-- code/modules/clothing/gloves/miscellaneous.dm | 4 +-- code/modules/ninja/suit/gloves.dm | 1 + 7 files changed, 58 insertions(+), 16 deletions(-) diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm index dd15ff6268..1bcb54bdb7 100644 --- a/code/__DEFINES/_flags/return_values.dm +++ b/code/__DEFINES/_flags/return_values.dm @@ -2,11 +2,16 @@ /// The attack is from a parry counterattack. #define ATTACKCHAIN_PARRY_COUNTERATTACK (1<<0) -// melee_attack_chain(), attackby(), pre_attack(), afterattack(), and tool_act() return values. +// melee_attack_chain(), attackby(), pre_attack(), afterattack(), and tool_act(), attack() and **anything that is called by ClickOn()** return values. /// Stop the attack chain if still in melee_attack_chain() #define STOP_ATTACK_PROC_CHAIN (1<<0) /// This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced. #define DISCARD_LAST_ACTION (1<<1) +/// There are a number of "safety nets" intended to default-handle clickdelay. Return this flag to bypass ALL of them. Be sure +/// you know EXACTLY what you are doing! +#define NO_AUTO_CLICKDELAY_HANDLING (1<<2) +/// Only used with UnarmedAttack(). Interrupts unarmed attack from progressing. +#define INTERRUPT_UNARMED_ATTACK (1<<3) // UnarmedAttack() flags /// Attack is from a parry counterattack diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 116b9c7db7..ff6a03582c 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -107,6 +107,9 @@ . = W.melee_attack_chain(src, A, params) return !(. & DISCARD_LAST_ACTION) else + . = UnarmedAttack(A) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) + DelayNextAction(CLICK_CD_MELEE) return UnarmedAttack(A)? TRUE : FALSE //Can't reach anything else in lockers or other weirdness @@ -119,7 +122,10 @@ . = W.melee_attack_chain(src, A, params) return !(. & DISCARD_LAST_ACTION) else - return UnarmedAttack(A, 1)? TRUE : FALSE + . = UnarmedAttack(A) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) + DelayNextAction(CLICK_CD_MELEE) + return UnarmedAttack(A)? TRUE : FALSE else if(W) W.ranged_attack_chain(src, A, params) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index e595a744ad..951c3615f9 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -59,7 +59,20 @@ if(. & STOP_ATTACK_PROC_CHAIN) return . |= I.attack(src, user, attackchain_flags, damage_multiplier) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) // SAFETY NET - unless the proc tells us we should not handle this, give them the basic melee cooldown! + I.ApplyAttackCooldown(user, src) +/** + * Called when someone uses us to attack a mob in melee combat. + * + * This proc respects CheckAttackCooldown() default clickdelay handling. + * + * @params + * * mob/living/M - target + * * mob/living/user - attacker + * * attackchain_Flags - see [code/__DEFINES/_flags/return_values.dm] + * * damage_multiplier - what to multiply the damage by + */ /obj/item/proc/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK) return @@ -80,7 +93,6 @@ user.do_attack_animation(M) M.attacked_by(src, user, attackchain_flags, damage_multiplier) - ApplyAttackCooldown(user, M) log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") add_fingerprint(user) @@ -97,7 +109,6 @@ return user.do_attack_animation(O) O.attacked_by(src, user) - 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 @@ -124,7 +135,7 @@ if(!(SKILL_TRAIN_ATTACK_OBJ in I.used_skills[skill])) continue user.mind.auto_gain_experience(skill, I.skill_gain) - + I.ApplyAttackCooldown(user, src) if(totitemdamage) visible_message("[user] has hit [src] with [I]!", null, null, COMBAT_MESSAGE_RANGE) //only witnesses close by and the victim see a hit message. @@ -190,9 +201,20 @@ var/datum/skill/S = GLOB.skill_datums[skill] user.mind.auto_gain_experience(skill, I.skill_gain*S.item_skill_gain_multi) -// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person. -// Click parameters is the params string from byond Click() code, see that documentation. +/** + * Called after attacking something if the melee attack chain isn't interrupted before. + * Also called when clicking on something with an item without being in melee range + * + * WARNING: This does not automatically check clickdelay if not in a melee attack! Be sure to account for this! + * + * @params + * * target - The thing we clicked + * * user - mob of person clicking + * * proximity_flag - are we in melee range/doing it in a melee attack + * * click_parameters - mouse control parameters, check BYOND ref. + */ /obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters) SEND_SIGNAL(user, COMSIG_MOB_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index bca8280a89..f911756f65 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -20,15 +20,17 @@ // If the gloves do anything, have them return 1 to stop // normal attack_hand() here. var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines - if(proximity && istype(G) && (. = G.Touch(A,1))) - return + if(proximity && istype(G)) + . |= G.Touch(A, TRUE) + if(. & INTERRUPT_UNARMED_ATTACK) + return - var/override = 0 + . = NONE for(var/datum/mutation/human/HM in dna.mutations) - override += HM.on_attack_hand(A, proximity, intent, flags) + . |= HM.on_attack_hand(A, proximity, intent, flags) - if(override) + if(. & INTERRUPT_UNARMED_ATTACK) return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index b4a8d48915..e5a3bd8345 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -40,7 +40,10 @@ return !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A)) - return UnarmedAttack(A, 1)? TRUE : FALSE + . = UnarmedAttack(A) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) + DelayNextAction(CLICK_CD_MELEE) + return UnarmedAttack(A)? TRUE : FALSE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -53,7 +56,10 @@ return !(. & DISCARD_LAST_ACTION) else if(!AltUnarmedAttack(A,1)) - return UnarmedAttack(A, 1)? TRUE : FALSE + . = UnarmedAttack(A) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) + DelayNextAction(CLICK_CD_MELEE) + return UnarmedAttack(A)? TRUE : FALSE else if(W) if(!W.altafterattack(A, src, FALSE, params)) diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index c9b5551789..f30fa02879 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -109,7 +109,7 @@ if(warcry) M.say("[warcry]", ignore_spam = TRUE, forced = TRUE) - return FALSE + return NO_AUTO_CLICKDELAY_HANDLING /obj/item/clothing/gloves/fingerless/pugilist/rapid/AltClick(mob/user) var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7) @@ -137,7 +137,7 @@ else M.SetNextAction(CLICK_CD_RAPID) - return FALSE + return NO_AUTO_CLICKDELAY_HANDLING /obj/item/clothing/gloves/botanic_leather name = "botanist's leather gloves" diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm index dbe4c80579..a06b753402 100644 --- a/code/modules/ninja/suit/gloves.dm +++ b/code/modules/ninja/suit/gloves.dm @@ -67,6 +67,7 @@ to_chat(H, "Gained [DisplayEnergy(.)] of energy from [A].") else to_chat(H, "\The [A] has run dry of energy, you must find another source!") + . = INTERRUPT_UNARMED_ATTACK else . = FALSE //as to not cancel attack_hand() From 46fc0b6ae573e4c6d367f91715a7a7160ff0df44 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 20:22:44 -0700 Subject: [PATCH 067/142] epic --- code/_onclick/item_attack.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 951c3615f9..d12f651c95 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -214,7 +214,6 @@ * * click_parameters - mouse control parameters, check BYOND ref. */ /obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters) - SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters) SEND_SIGNAL(user, COMSIG_MOB_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters) From 44d3a0aa27d328b04c293625fe215faac63d7466 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 20:37:02 -0700 Subject: [PATCH 068/142] fixes --- code/_onclick/click.dm | 16 ++++++++-------- code/_onclick/cyborg.dm | 7 +++++-- code/_onclick/item_attack.dm | 2 +- code/_onclick/other_mobs.dm | 14 ++++++++++---- code/_onclick/right_click.dm | 16 ++++++++++------ code/_onclick/right_other_mobs.dm | 7 ++----- .../mob/living/simple_animal/bot/ed209bot.dm | 4 +++- .../mob/living/simple_animal/hostile/hostile.dm | 6 +++--- 8 files changed, 42 insertions(+), 30 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index ff6a03582c..b76b4704dd 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -108,9 +108,9 @@ return !(. & DISCARD_LAST_ACTION) else . = UnarmedAttack(A) - if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) - DelayNextAction(CLICK_CD_MELEE) - return UnarmedAttack(A)? TRUE : FALSE + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) + return .? TRUE : FALSE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -123,12 +123,12 @@ return !(. & DISCARD_LAST_ACTION) else . = UnarmedAttack(A) - if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) - DelayNextAction(CLICK_CD_MELEE) - return UnarmedAttack(A)? TRUE : FALSE + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) + return .? TRUE : FALSE else if(W) - W.ranged_attack_chain(src, A, params) + return W.ranged_attack_chain(src, A, params) else RangedAttack(A,params) @@ -376,7 +376,7 @@ return /mob/living/LaserEyes(atom/A, params) - DelayNextAction(CLICK_CD_RANGE) + DelayNextAction(CLICK_CD_RANGE, flush = TRUE) var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc ) LE.icon = 'icons/effects/genetics.dmi' diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index ee30788b0d..9c94a19707 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -79,6 +79,8 @@ // cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents) if(A == loc || (A in loc) || (A in contents)) . = W.melee_attack_chain(src, A, params) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) return !(. & DISCARD_LAST_ACTION) if(!isturf(loc)) @@ -88,10 +90,11 @@ if(isturf(A) || isturf(A.loc)) if(A.Adjacent(src)) // see adjacent.dm . = W.melee_attack_chain(src, A, params) + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) return !(. & DISCARD_LAST_ACTION) else - W.afterattack(A, src, 0, params) - return + return W.afterattack(A, src, 0, params) //Middle click cycles through selected modules. /mob/living/silicon/robot/MiddleClickOn(atom/A) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index d12f651c95..dd3c850e0a 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -30,7 +30,7 @@ if(!CHECK_MOBILITY(L, MOBILITY_USE)) to_chat(L, "You are unable to raise [src] right now!") return - afterattack(target, user, FALSE, params) + return afterattack(target, user, FALSE, params) // Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown. /obj/item/proc/attack_self(mob/user) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index f911756f65..8c79233be5 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -104,13 +104,19 @@ . = ..() if(gloves) var/obj/item/clothing/gloves/G = gloves - if(istype(G) && G.Touch(A,0)) // for magic gloves + . |= G.Touch(A, FALSE) + if(. & INTERRUPT_UNARMED_ATTACK) + return + if(istype(glasses)) + . |= glasses.ranged_attack(src, A, mouseparams) + if(. & INTERRUPT_UNARMED_ATTACK) return - if (istype(glasses) && glasses.ranged_attack(src,A,mouseparams)) - return for(var/datum/mutation/human/HM in dna.mutations) - HM.on_ranged_attack(A, mouseparams) + . |= HM.on_ranged_attack(A, mouseparams) + + if(. & INTERRUPT_UNARMED_ATTACK) + return if(isturf(A) && get_dist(src,A) <= 1) src.Move_Pulled(A) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index e5a3bd8345..33bcd1e0fa 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -41,9 +41,10 @@ else if(!AltUnarmedAttack(A)) . = UnarmedAttack(A) - if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) - DelayNextAction(CLICK_CD_MELEE) - return UnarmedAttack(A)? TRUE : FALSE + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) + return .? TRUE : FALSE + return TRUE //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -57,9 +58,10 @@ else if(!AltUnarmedAttack(A,1)) . = UnarmedAttack(A) - if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) - DelayNextAction(CLICK_CD_MELEE) - return UnarmedAttack(A)? TRUE : FALSE + if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) + DelayNextAction(CLICK_CD_MELEE)) + return .? TRUE : FALSE + return TRUE else if(W) if(!W.altafterattack(A, src, FALSE, params)) @@ -67,6 +69,8 @@ else if(!AltRangedAttack(A,params)) RangedAttack(A,params) + return + return TRUE /mob/proc/AltUnarmedAttack(atom/A, proximity_flag) if(ismob(A)) diff --git a/code/_onclick/right_other_mobs.dm b/code/_onclick/right_other_mobs.dm index f2277511f8..2dc9fddeef 100644 --- a/code/_onclick/right_other_mobs.dm +++ b/code/_onclick/right_other_mobs.dm @@ -3,14 +3,11 @@ to_chat(src, "You look at the state of the universe and sigh.") //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 + return A.alt_attack_hand(src) /mob/living/carbon/human/AltRangedAttack(atom/A, params) if(isturf(A) || incapacitated()) // pretty annoying to wave your fist at floors and walls. And useless. - return TRUE + return if(!CheckActionCooldown(CLICK_CD_RANGE)) return DelayNextAction() diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 96af6d2876..91462a6713 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -532,8 +532,10 @@ Auto Patrol[]"}, /mob/living/simple_animal/bot/ed209/RangedAttack(atom/A) if(!on) - return + return ..() shootAt(A) + DelayNextAction() + return TRUE /mob/living/simple_animal/bot/ed209/proc/stun_attack(mob/living/carbon/C) playsound(src, 'sound/weapons/egloves.ogg', 50, TRUE, -1) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 945842d5ed..5ed3cd0cdd 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -523,9 +523,9 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega if(ranged && ranged_cooldown <= world.time) target = A OpenFire(A) - ..() - - + DelayNextAction() + . = ..() + return TRUE ////// AI Status /////// /mob/living/simple_animal/hostile/proc/AICanContinue(var/list/possible_targets) From 849919d76c1c9b3ed889c6b2f92d39aff38f0d3b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 20:53:46 -0700 Subject: [PATCH 069/142] fixes --- code/_onclick/click.dm | 4 ++-- code/_onclick/cyborg.dm | 4 ++-- code/_onclick/right_click.dm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index b76b4704dd..17ae3872b0 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -109,7 +109,7 @@ else . = UnarmedAttack(A) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return .? TRUE : FALSE //Can't reach anything else in lockers or other weirdness @@ -124,7 +124,7 @@ else . = UnarmedAttack(A) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return .? TRUE : FALSE else if(W) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 9c94a19707..e72d42cb14 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -80,7 +80,7 @@ if(A == loc || (A in loc) || (A in contents)) . = W.melee_attack_chain(src, A, params) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return !(. & DISCARD_LAST_ACTION) if(!isturf(loc)) @@ -91,7 +91,7 @@ if(A.Adjacent(src)) // see adjacent.dm . = W.melee_attack_chain(src, A, params) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return !(. & DISCARD_LAST_ACTION) else return W.afterattack(A, src, 0, params) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index 33bcd1e0fa..0f5a9022b3 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -42,7 +42,7 @@ if(!AltUnarmedAttack(A)) . = UnarmedAttack(A) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return .? TRUE : FALSE return TRUE @@ -59,7 +59,7 @@ if(!AltUnarmedAttack(A,1)) . = UnarmedAttack(A) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) - DelayNextAction(CLICK_CD_MELEE)) + DelayNextAction(CLICK_CD_MELEE) return .? TRUE : FALSE return TRUE else From 0e1574bf77e0269dff646b2db6bba233e608f594 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 23:34:47 -0700 Subject: [PATCH 070/142] sigh --- code/_onclick/click.dm | 43 +++++++++++++++---------- code/_onclick/cyborg.dm | 2 +- code/_onclick/other_mobs.dm | 2 +- code/_onclick/right_click.dm | 23 ++++++------- code/datums/mutations/hulk.dm | 6 +++- code/game/objects/items/electrostaff.dm | 1 + code/game/objects/items/stunbaton.dm | 4 +-- 7 files changed, 45 insertions(+), 36 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 17ae3872b0..262d9a4fd6 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -29,11 +29,18 @@ return if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) return + . = ClickOn(A, params) + if(.) + FlushCurrentAction() + else + DiscardCurrentAction() + /* if(ClickOn(A, params)) FlushCurrentAction() else DiscardCurrentAction() - + */ + /* Standard mob ClickOn() Handles exceptions: Buildmode, middle click, modified clicks, mech actions @@ -67,7 +74,7 @@ return CtrlClickOn(A) if(modifiers["right"]) //CIT CHANGE - allows right clicking to perform actions - return RightClickOn(A,params) //CIT CHANGE - ditto + return RightClickOn(A, params) //CIT CHANGE - ditto if(incapacitated(ignore_restraints = 1)) return @@ -82,7 +89,8 @@ if(ismecha(loc)) var/obj/mecha/M = loc - return M.click_action(A,src,params) + M.click_action(A,src,params) + return TRUE if(restrained()) DelayNextAction(CLICK_CD_HANDCUFFED) @@ -91,26 +99,25 @@ if(in_throw_mode) throw_item(A) - return + return TRUE var/obj/item/W = get_active_held_item() if(W == A) W.attack_self(src) update_inv_hands() - return + return TRUE //These are always reachable. //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - . = W.melee_attack_chain(src, A, params) - return !(. & DISCARD_LAST_ACTION) + return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - . = UnarmedAttack(A) + . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return .? TRUE : FALSE + return !(. & DISCARD_LAST_ACTION) //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -119,18 +126,17 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - . = W.melee_attack_chain(src, A, params) - return !(. & DISCARD_LAST_ACTION) + return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - . = UnarmedAttack(A) + . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return .? TRUE : FALSE + return !(. & DISCARD_LAST_ACTION) else if(W) - return W.ranged_attack_chain(src, A, params) + return !(W.ranged_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - RangedAttack(A,params) + return !(RangedAttack(A,params) & DISCARD_LAST_ACTION) //Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it /atom/proc/IsObscured() @@ -376,9 +382,11 @@ return /mob/living/LaserEyes(atom/A, params) - DelayNextAction(CLICK_CD_RANGE, flush = TRUE) + if(!CheckActionCooldown(CLICK_CD_RANGE)) + return + DelayNextAction() - var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc ) + var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc) LE.icon = 'icons/effects/genetics.dmi' LE.icon_state = "eyelasers" playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1) @@ -387,6 +395,7 @@ LE.def_zone = get_organ_target() LE.preparePixelProjectile(A, src, params) LE.fire() + return TRUE // Simple helper to face what you clicked on, in case it should be needed in more than one place /mob/proc/face_atom(atom/A, ismousemovement = FALSE) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index e72d42cb14..7048c98fb3 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -94,7 +94,7 @@ DelayNextAction(CLICK_CD_MELEE) return !(. & DISCARD_LAST_ACTION) else - return W.afterattack(A, src, 0, params) + return !(W.afterattack(A, src, 0, params) & DISCARD_LAST_ACTION) //Middle click cycles through selected modules. /mob/living/silicon/robot/MiddleClickOn(atom/A) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 8c79233be5..a4b5b92397 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -34,7 +34,7 @@ return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) - return A.attack_hand(src, intent, flags) + return . | A.attack_hand(src, intent, flags) /atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index 0f5a9022b3..e822aad497 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -36,14 +36,13 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - . = W.melee_attack_chain(src, A, params) - return !(. & DISCARD_LAST_ACTION) + return !(W.rightclick__melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - if(!AltUnarmedAttack(A)) - . = UnarmedAttack(A) + if(!AltUnarmedAttack(A, TRUE)) + . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return .? TRUE : FALSE + return (.)? TRUE : FALSE return TRUE //Can't reach anything else in lockers or other weirdness @@ -53,23 +52,21 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - . = W.melee_attack_chain(src, A, params) - return !(. & DISCARD_LAST_ACTION) + return !(W.rightclick_melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) else - if(!AltUnarmedAttack(A,1)) - . = UnarmedAttack(A) + if(!AltUnarmedAttack(A, TRUE)) + . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return .? TRUE : FALSE + return (.)? TRUE : FALSE return TRUE else if(W) if(!W.altafterattack(A, src, FALSE, params)) W.afterattack(A, src, FALSE, params) else - if(!AltRangedAttack(A,params)) - RangedAttack(A,params) - return + if(!AltRangedAttack(A, params)) + return !(RangedAttack(A, params) & DISCARD_LAST_ACTION) return TRUE /mob/proc/AltUnarmedAttack(atom/A, proximity_flag) diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index 2df2b20cbc..bc7b9171a8 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -21,7 +21,11 @@ /datum/mutation/human/hulk/on_attack_hand(atom/target, proximity, act_intent, unarmed_attack_flags) if(proximity && (act_intent == INTENT_HARM)) //no telekinetic hulk attack - return target.attack_hulk(owner) + if(!owner.CheckActionCooldown(CLICK_CD_MELEE)) + return INTERRUPT_UNARMED_ATTACK | NO_AUTO_CLICKDELAY_HANDLING + owner.DelayNextAction() + target.attack_hulk(owner) + return INTERRUPT_UNARMED_ATTACK | NO_AUTO_CLICKDELAY_HANDLING /datum/mutation/human/hulk/on_life() if(owner.health < 0) diff --git a/code/game/objects/items/electrostaff.dm b/code/game/objects/items/electrostaff.dm index 8d1fe4ebd1..9750994c87 100644 --- a/code/game/objects/items/electrostaff.dm +++ b/code/game/objects/items/electrostaff.dm @@ -15,6 +15,7 @@ attack_verb = list("struck", "beaten", "thwacked", "pulped") total_mass = 5 //yeah this is a heavy thing, beating people with it while it's off is not going to do you any favors. (to curb stun-kill rampaging without it being on) block_parry_data = /datum/block_parry_data/electrostaff + attack_speed = CLICK_CD_MELEE var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high var/on = FALSE var/can_block_projectiles = FALSE //can't block guns diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 574036f07c..d5c554a601 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -14,6 +14,7 @@ w_class = WEIGHT_CLASS_NORMAL attack_verb = list("beaten") armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) + attack_speed = CLICK_CD_MELEE var/stamforce = 35 var/turned_on = FALSE @@ -152,9 +153,6 @@ return FALSE if(turned_on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) clowning_around(user) - if(!user.CheckActionCooldown(CLICK_CD_MELEE)) - return TRUE - user.DelayNextAction() if(IS_STAMCRIT(user)) //CIT CHANGE - makes it impossible to baton in stamina softcrit to_chat(user, "You're too exhausted to use [src] properly.") return TRUE From 48fa617aeb15b5156ed4151ba9fb00583d0a7c3a Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 23:40:24 -0700 Subject: [PATCH 071/142] let's do this --- code/_onclick/click.dm | 21 ++++++++++----------- code/_onclick/cyborg.dm | 24 +++++++++--------------- code/_onclick/right_click.dm | 20 +++++++++----------- 3 files changed, 28 insertions(+), 37 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 262d9a4fd6..2e7f80ab49 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -30,7 +30,7 @@ if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) return . = ClickOn(A, params) - if(.) + if(!(. & DISCARD_LAST_ACTION)) FlushCurrentAction() else DiscardCurrentAction() @@ -94,30 +94,29 @@ if(restrained()) DelayNextAction(CLICK_CD_HANDCUFFED) - RestrainedClickOn(A) - return TRUE + return RestrainedClickOn(A) if(in_throw_mode) throw_item(A) - return TRUE + return var/obj/item/W = get_active_held_item() if(W == A) W.attack_self(src) update_inv_hands() - return TRUE + return //These are always reachable. //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + return W.melee_attack_chain(src, A, params) else . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return !(. & DISCARD_LAST_ACTION) + return //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -126,17 +125,17 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - return !(W.melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + return W.melee_attack_chain(src, A, params) else . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return !(. & DISCARD_LAST_ACTION) + return else if(W) - return !(W.ranged_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + return W.ranged_attack_chain(src, A, params) else - return !(RangedAttack(A,params) & DISCARD_LAST_ACTION) + return RangedAttack(A,params) //Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it /atom/proc/IsObscured() diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 7048c98fb3..3dc3176205 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -16,23 +16,17 @@ var/list/modifiers = params2list(params) if(modifiers["shift"] && modifiers["ctrl"]) - CtrlShiftClickOn(A) - return + return CtrlShiftClickOn(A) if(modifiers["shift"] && modifiers["middle"]) - ShiftMiddleClickOn(A) - return + return ShiftMiddleClickOn(A) if(modifiers["middle"]) - MiddleClickOn(A) - return + return MiddleClickOn(A) if(modifiers["shift"]) - ShiftClickOn(A) - return + return ShiftClickOn(A) if(modifiers["alt"]) // alt and alt-gr (rightalt) - AltClickOn(A) - return + return AltClickOn(A) if(modifiers["ctrl"]) - CtrlClickOn(A) - return + return CtrlClickOn(A) if(!CheckActionCooldown(immediate = TRUE)) return @@ -81,7 +75,7 @@ . = W.melee_attack_chain(src, A, params) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return !(. & DISCARD_LAST_ACTION) + return if(!isturf(loc)) return @@ -92,9 +86,9 @@ . = W.melee_attack_chain(src, A, params) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return !(. & DISCARD_LAST_ACTION) + return else - return !(W.afterattack(A, src, 0, params) & DISCARD_LAST_ACTION) + return W.afterattack(A, src, 0, params) //Middle click cycles through selected modules. /mob/living/silicon/robot/MiddleClickOn(atom/A) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index e822aad497..a72ab3ce85 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -17,8 +17,7 @@ if(restrained()) DelayNextAction(CLICK_CD_HANDCUFFED) - RestrainedClickOn(A) - return TRUE + return RestrainedClickOn(A) if(in_throw_mode) throw_item(A)//todo: make it plausible to lightly toss items via right-click @@ -36,14 +35,14 @@ //User itself, current loc, and user inventory if(A in DirectAccess()) if(W) - return !(W.rightclick__melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + return W.rightclick_melee_attack_chain(src, A, params) else if(!AltUnarmedAttack(A, TRUE)) . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return (.)? TRUE : FALSE - return TRUE + return + return //Can't reach anything else in lockers or other weirdness if(!loc.AllowClick()) @@ -52,22 +51,21 @@ //Standard reach turf to turf or reaching inside storage if(CanReach(A,W)) if(W) - return !(W.rightclick_melee_attack_chain(src, A, params) & DISCARD_LAST_ACTION) + return W.rightclick_melee_attack_chain(src, A, params) else if(!AltUnarmedAttack(A, TRUE)) . = UnarmedAttack(A, TRUE, a_intent) if(!(. & NO_AUTO_CLICKDELAY_HANDLING) && ismob(A)) DelayNextAction(CLICK_CD_MELEE) - return (.)? TRUE : FALSE - return TRUE + return + return else if(W) if(!W.altafterattack(A, src, FALSE, params)) - W.afterattack(A, src, FALSE, params) + return W.afterattack(A, src, FALSE, params) else if(!AltRangedAttack(A, params)) - return !(RangedAttack(A, params) & DISCARD_LAST_ACTION) - return TRUE + return (RangedAttack(A, params) /mob/proc/AltUnarmedAttack(atom/A, proximity_flag) if(ismob(A)) From ac00d05a3f38c299fbb13b3641359ae613fc011d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 24 Jul 2020 23:41:21 -0700 Subject: [PATCH 072/142] fix --- code/_onclick/right_click.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/right_click.dm b/code/_onclick/right_click.dm index a72ab3ce85..4b2480eb8c 100644 --- a/code/_onclick/right_click.dm +++ b/code/_onclick/right_click.dm @@ -65,7 +65,7 @@ return W.afterattack(A, src, FALSE, params) else if(!AltRangedAttack(A, params)) - return (RangedAttack(A, params) + return RangedAttack(A, params) /mob/proc/AltUnarmedAttack(atom/A, proximity_flag) if(ismob(A)) From 2a29f73ac80cb4bef2511a9f2de01a9e29ea1909 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 25 Jul 2020 17:34:12 -0700 Subject: [PATCH 073/142] ok --- code/game/objects/items/melee/misc.dm | 1 + code/game/objects/items/stunbaton.dm | 1 + code/modules/projectiles/gun.dm | 2 ++ 3 files changed, 4 insertions(+) diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 02f7f735eb..9a7d455df6 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -375,6 +375,7 @@ var/wait_desc = get_wait_description() if(wait_desc) to_chat(user, wait_desc) + return DISCARD_LAST_ACTION /obj/item/melee/classic_baton/telescopic name = "telescopic baton" diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index d5c554a601..c9526a5fc9 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -162,6 +162,7 @@ return TRUE if(turned_on) if(baton_stun(M, user, disarming)) + user.DelayNextAction() user.do_attack_animation(M) user.adjustStaminaLossBuffered(getweight(user, STAM_COST_BATON_MOB_MULT)) else if(user.a_intent != INTENT_HARM) //they'll try to bash in the last proc. diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1015d0a54d..7c726d43e9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -218,6 +218,8 @@ to_chat(user, "You need both hands free to fire \the [src]!") return + user.DelayNextAction() + //DUAL (or more!) WIELDING var/bonus_spread = 0 var/loop_counter = 0 From e3b8c212f1ce52a2f10e750c7c00015e5261ffa0 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 25 Jul 2020 23:14:38 -0700 Subject: [PATCH 074/142] ok --- code/_onclick/click.dm | 5 ++--- code/_onclick/hud/parallax.dm | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 2e7f80ab49..28d6b55d51 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -24,7 +24,7 @@ * Common mob click code */ /mob/proc/CommonClickOn(atom/A, params) - set waitfor = FALSE // oh no you don't + SHOULD_NOT_SLEEP(TRUE) if(mob_transforming) return if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON) @@ -55,7 +55,6 @@ * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ /mob/proc/ClickOn( atom/A, params) - set waitfor = FALSE if(check_click_intercept(params,A)) return @@ -311,7 +310,7 @@ SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user) var/mob/living/ML = user if(istype(ML)) - ML.pulled(src) + INVOKE_ASYNC(ML, /mob/living.proc/pulled, src) /mob/living/carbon/human/CtrlClick(mob/user) if(ishuman(user) && Adjacent(user) && !user.incapacitated()) diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index d8ef1c525a..03d3ebf5a5 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -219,6 +219,7 @@ L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]" /atom/movable/proc/update_parallax_contents() + set waitfor = FALSE if(length(client_mobs_in_contents)) for(var/thing in client_mobs_in_contents) var/mob/M = thing From 61a4d5eb06ebd2502ffdfb79c85261c8174c4bf5 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 25 Jul 2020 23:22:01 -0700 Subject: [PATCH 075/142] fix --- code/_onclick/click.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 28d6b55d51..1ef8f7ae53 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -310,7 +310,7 @@ SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user) var/mob/living/ML = user if(istype(ML)) - INVOKE_ASYNC(ML, /mob/living.proc/pulled, src) + INVOKE_ASYNC(ML, /mob/living.verb/pulled, src) /mob/living/carbon/human/CtrlClick(mob/user) if(ishuman(user) && Adjacent(user) && !user.incapacitated()) From 8dda9b88b4ef60aff7b3dd29314578358b0ed9da Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 25 Jul 2020 23:23:45 -0700 Subject: [PATCH 076/142] code --- code/_onclick/click.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 1ef8f7ae53..94b161f0d2 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -34,12 +34,6 @@ FlushCurrentAction() else DiscardCurrentAction() - /* - if(ClickOn(A, params)) - FlushCurrentAction() - else - DiscardCurrentAction() - */ /* Standard mob ClickOn() From d3e808f0e122e36438a3ea19fcb7df7dbef24922 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 00:18:42 -0700 Subject: [PATCH 077/142] fix --- code/_onclick/other_mobs.dm | 4 ++-- code/game/objects/items/stunbaton.dm | 4 +++- code/game/objects/structures.dm | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index a4b5b92397..df1f8222b9 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -44,14 +44,14 @@ if(attack_hand_speed) if(!user.CheckActionCooldown(attack_hand_speed)) return + if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) + . = _try_interact(user) on_attack_hand(user, act_intent, unarmed_attack_flags) if(attack_hand_unwieldlyness) user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) return attack_hand_is_action /atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) - . = _try_interact(user) //Return a non FALSE value to cancel whatever called this from propagating, if it respects it. /atom/proc/_try_interact(mob/user) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index c9526a5fc9..1a84b85a1a 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -145,6 +145,8 @@ return ..() /obj/item/melee/baton/alt_pre_attack(atom/A, mob/living/user, params) + if(!user.CheckActionCooldown(CLICK_CD_MELEE)) + return . = common_baton_melee(A, user, TRUE) //return true (attackchain interrupt) if this also returns true. no harm-disarming. //return TRUE to interrupt attack chain. @@ -156,13 +158,13 @@ if(IS_STAMCRIT(user)) //CIT CHANGE - makes it impossible to baton in stamina softcrit to_chat(user, "You're too exhausted to use [src] properly.") return TRUE + user.DelayNextAction() if(ishuman(M)) var/mob/living/carbon/human/L = M if(check_martial_counter(L, user)) return TRUE if(turned_on) if(baton_stun(M, user, disarming)) - user.DelayNextAction() user.do_attack_animation(M) user.adjustStaminaLossBuffered(getweight(user, STAM_COST_BATON_MOB_MULT)) else if(user.a_intent != INTENT_HARM) //they'll try to bash in the last proc. diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 0057bebf99..39f2d276a1 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -29,6 +29,7 @@ return ..() /obj/structure/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) + . = ..() if(structureclimber && structureclimber != user) user.DelayNextAction(CLICK_CD_MELEE) user.do_attack_animation(src) From 389a54590e9280bd4c43459f14b90351c3b72547 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 00:32:14 -0700 Subject: [PATCH 078/142] fix --- code/modules/mob/living/living_active_parry.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index e3adf16d23..c19fefbe8a 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -121,7 +121,7 @@ Stagger(data.parry_failed_stagger_duration) effect_text += "staggering themselves" if(data.parry_failed_clickcd_duration) - DelayNextAction(data.parry_failed_clickcd_duration) + DelayNextAction(data.parry_failed_clickcd_duration, flush = TRUE) effect_text += "throwing themselves off balance" handle_parry_ending_effects(data, effect_text) parrying = NOT_PARRYING From 55dc0a16501e173824926cb77fa6a8420b22277f Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 00:36:52 -0700 Subject: [PATCH 079/142] Fix --- code/_onclick/item_attack.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index dd3c850e0a..95f3fa5f1e 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -51,6 +51,8 @@ /obj/attackby(obj/item/I, mob/living/user, params) . = ..() + if(. & STOP_ATTACK_PROC_CHAIN) + return if(obj_flags & CAN_BE_HIT) . |= I.attack_obj(src, user) From 94e218ccc03c803934acc64302adc18ed14c2233 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 01:04:55 -0700 Subject: [PATCH 080/142] ok --- code/_onclick/other_mobs.dm | 2 ++ code/game/objects/items/crayons.dm | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index df1f8222b9..03dc64d5be 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -49,6 +49,8 @@ on_attack_hand(user, act_intent, unarmed_attack_flags) if(attack_hand_unwieldlyness) user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) + else if(attack_hand_is_action) + user.DelayNextAction() return attack_hand_is_action /atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 620fbbf100..a366a2ef88 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -273,7 +273,9 @@ . = ..() if(!proximity || !check_allowed_items(target)) return + draw_on(target, user, proximity, params) +/obj/item/toy/crayon/proc/draw_on(atom/target, mob/user, proximity, params) var/static/list/punctuation = list("!","?",".",",","/","+","-","=","%","#","&") var/cost = 1 @@ -568,9 +570,9 @@ dye_color = DYE_RAINBOW charges = -1 -/obj/item/toy/crayon/rainbow/afterattack(atom/target, mob/user, proximity, params) +/obj/item/toy/crayon/rainbow/draw_on(atom/target, mob/user, proximity, params) paint_color = rgb(rand(0,255), rand(0,255), rand(0,255)) - . = ..() + return ..() /* * Crayon Box @@ -693,7 +695,7 @@ . += "It is empty." . += "Alt-click [src] to [ is_capped ? "take the cap off" : "put the cap on"]." -/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity, params) +/obj/item/toy/crayon/spraycan/draw_on(atom/target, mob/user, proximity, params) if(!proximity) return @@ -766,7 +768,7 @@ desc = "A metallic container containing shiny synthesised paint." charges = -1 -/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity, params) +/obj/item/toy/crayon/spraycan/borg/draw_on(atom/target,mob/user,proximity, params) var/diff = ..() if(!iscyborg(user)) to_chat(user, "How did you get this?") From 73b9ba6cdb1532b417daa16efae11b69d14b38fe Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:30:20 +0100 Subject: [PATCH 081/142] movement sprites --- icons/mob/secbot_accessories.dmi | Bin 1725 -> 3374 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/mob/secbot_accessories.dmi b/icons/mob/secbot_accessories.dmi index b6c7bad6fa3ec04db33e02db164c5645aeab6aeb..be7ef6861e24e3b2be7574b096086263d7f04761 100644 GIT binary patch literal 3374 zcmZ8jc|2Qb7fu+`jhJ>wH=>H#+Nd@ZA!vxDU#&$^p)LLF#2Sf&E~BW@)?QnUPD>DK z6t#p-)mEytRFTAx+7oRfAtLgno%v(>-QVxt``&x*d(L^D_nhaxDGuk+GP@4$0ssIq zHr6O7003C}?c5U3n+}v72 z*}}p?uv)qN5So{l$6zpK7FJff6#EATHVB00)z!HHhN8+!4Gj%zBY?cTyrQC_y1KgF z$&(^oz}jl(L3x0d3Lx0Swjg2WOanmlZvV>4io3fz7K^Q{tnBUW6%DI|hlginWu2l@ zWkN%(t*wt9J$n53@f4i%a{%CX0N_<^!tkr&*8spA0MP27`NmBLb_FsWjy8-}thQBG zJ-2swczAkxno6ZMH8qK`Z+VA0i_rq3oX$G~%;v`Z#ba>1i+dExFY*dDAUrA{EEE8U zE6mR741KA)=hwFb&Zuz9VQH_}e6xMYUu1uMk=|9{5{l|7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 +0100 Subject: [PATCH 082/142] sprite tweaking --- icons/mob/secbot_accessories.dmi | Bin 3374 -> 3382 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/mob/secbot_accessories.dmi b/icons/mob/secbot_accessories.dmi index be7ef6861e24e3b2be7574b096086263d7f04761..310d94f7ef00d7a85a02cd7d0591d94b158a08e0 100644 GIT binary patch delta 3118 zcmZ9Nc|4SB8^?`_=_qNzoD?&pteGN5GMbSbS<1dlWQfvht)Y-H4|VLyo~0}$mBfTB zV;jc_V=wz*%*Zmz9tLB!cRJ^MKJW3~e>|W2^E}scEx+r&zIUlil}wT*a?geIy~a6U z^@~=&f=Q19-i0`*tE)eH^hiiZNaXT85y$9)JJx(YU&TIKT3Q-n)pXl!*IgG2d!uuy zH%*iMYNd{iTs9Hdft*a)E+BR2(m@l<`#=|iPPEx81hqpJH%5^!b3bnL=hP-+AS z3beF%RQ!@|=#_&^F+iV+icjW+&qo${O}f3+wEN@J7fGP2Tx(r;y0i9FZgYw9e5|`| z+BHh`jGF8(alFDe2J{r;=@*t4mL==8oDUxJn{?nrj=jXTXbqonghVOa-#s3iY>3(I z(oys5r=bAin4Nj;?UsEF^%D}u72IWI(gk1a9uWA;eSa$Mrt~1?r_P$N_@7e#(5m>)<7MuGJL^{Y_@$qQHEvox0`p>JJ#E&>LMl@jd3iF zM`MPQeNkvvPVqMMre|kG#fB7)Jh!~Q-qnTpylP!^R!7Gnuu?h5p1%-y9;KVrJBu6A ztlKQEx6IAVR@PH>%siRVxgiP^aaHq{pr7oUn?i~lpQ&XfUO!%7$Q@Jg_ppCImihtp zpXd|CgUir%uEMfv+Upaq7DUv|sT!~SEF7Q2a5eLCS%X`PLEaIDj6%~g+)%!0(P|jA zPOX-i*IT;6!B={@OmvC$=c<_v5JJMP@z-aH{8hapsl@H4idy|k!}&lGi3IqKV@`1~ zH34e#b{Y;PR~W@AHotdeykCzW7s*2Sdy(rK-;x#BIuvHVSS`))0wdkDEVB`k74)L6 zB>`D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N=r}CGo4xiof=dt)IVn8Z zhN%~*Fzrl7_eL7cp6}B+wVK&tlht=m9OxDvNsBX5>Gk;{bP@H@&H1~bMw{yfQ9gqk zJgX9qDH!0tcV%{^ncm}wV?gLIq{(rSIh7}PLChDV`1p;fVJ`ROHKa*D@u@pPYZ;Wk zB!!5MijInspH%b1oAfu{m6Ad!?xz1R;BmHwUbK$Z8UVulu;E`W?7;e@Xg|u#ibRUO zXcWHO`}P4atL~1 zTlNS;%<4L}#1II(tQDakh@S!Fv`bj3r%_8OP4d82(fo(8*HA6^n*;n;x`68PTFNQZ z86;8?${>=&#b-Y$S4clRWq(y?W_kI`%*@OZgTWZU8J;l^ zcJQ6$WuFX)l9N|1q}hpyX5l?#>um~n%O-W=AI@AO3?&QYgP!N80)(OUmD)gbIZyDC z=K}-Mhw&{`k>PkxaPhsPhnvuh-62Nh+MF@EF5<;7xoAo-Ec2sB0HZhV{^XCdg+)b? z0ZmDET&X1Ck8Xc+g}`p;vg^2nS{&J~#O+0X2kpmJ6NO-OQEymNaE|z|ZL~(OPetBD z2f<~LB==f^Z(JbC`;uFa;};~fxi~=Vowx}~QT7N-_GjseLRd1?)@*rk_UC`8g~=u3 Jn)9AF{|7H4?biSR From f8545b0a72ecbe2751715d5990c516af1f4a8256 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:59:47 +0100 Subject: [PATCH 083/142] more tweaks --- icons/mob/secbot_accessories.dmi | Bin 3382 -> 3380 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/mob/secbot_accessories.dmi b/icons/mob/secbot_accessories.dmi index 310d94f7ef00d7a85a02cd7d0591d94b158a08e0..944aac44f37586d772e60f31228beb834cd10caa 100644 GIT binary patch delta 2625 zcmZ{meK^zWAIFU|tDLn{Cln`>hlm_fitx_A=ap6fmH zRR^_Gj;ULL3@JC%5kO1*@p@m2y^ASClPtF97?Bp5S=Tm1D*;YLy+G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!sEH7WI`^o#>e*lBT B9wGn$ From abdafe15fae0b7bdddf0aff5cc2510a58ee399ee Mon Sep 17 00:00:00 2001 From: SiliconMain <65544193+SiliconMain@users.noreply.github.com> Date: Sun, 26 Jul 2020 15:21:24 -0500 Subject: [PATCH 084/142] fuck --- code/game/objects/items/devices/scanners.bk | 910 ++++++++++++++++++ code/game/objects/items/devices/scanners.dm | 132 ++- code/game/objects/items/flamethrower.dm | 1 + code/game/objects/items/storage/belt.dm | 2 +- code/game/objects/items/tanks/tanks.dm | 1 + code/game/objects/items/tools/crowbar.dm | 1 + code/game/objects/items/tools/wirecutters.dm | 1 + code/modules/assembly/bomb.dm | 1 + .../machinery/components/components_base.dm | 1 + .../atmospherics/machinery/pipes/pipes.dm | 1 + .../portable/portable_atmospherics.dm | 1 + code/modules/power/singularity/collector.dm | 1 + code/modules/research/designs/tool_designs.dm | 10 + .../research/techweb/nodes/tools_nodes.dm | 2 +- icons/obj/device.dmi | Bin 55482 -> 56123 bytes 15 files changed, 1011 insertions(+), 54 deletions(-) create mode 100644 code/game/objects/items/devices/scanners.bk diff --git a/code/game/objects/items/devices/scanners.bk b/code/game/objects/items/devices/scanners.bk new file mode 100644 index 0000000000..b48bb0b51a --- /dev/null +++ b/code/game/objects/items/devices/scanners.bk @@ -0,0 +1,910 @@ + +/* + +CONTAINS: +T-RAY +HEALTH ANALYZER +GAS ANALYZER +SLIME SCANNER +NANITE SCANNER +GENETICS SCANNER + +*/ +/obj/item/t_scanner + name = "\improper T-ray scanner" + desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." + custom_price = PRICE_REALLY_CHEAP + icon = 'icons/obj/device.dmi' + icon_state = "t-ray0" + var/on = FALSE + slot_flags = ITEM_SLOT_BELT + w_class = WEIGHT_CLASS_SMALL + item_state = "electronic" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + custom_materials = list(/datum/material/iron=150) + +/obj/item/t_scanner/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins to emit terahertz-rays into [user.p_their()] brain with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return TOXLOSS + +/obj/item/t_scanner/attack_self(mob/user) + + on = !on + icon_state = copytext_char(icon_state, 1, -1) + "[on]" + + if(on) + START_PROCESSING(SSobj, src) + +/obj/item/t_scanner/process() + if(!on) + STOP_PROCESSING(SSobj, src) + return null + scan() + +/obj/item/t_scanner/proc/scan() + t_ray_scan(loc) + +/proc/t_ray_scan(mob/viewer, flick_time = 8, distance = 3) + if(!ismob(viewer) || !viewer.client) + return + var/list/t_ray_images = list() + for(var/obj/O in orange(distance, viewer) ) + if(O.level != 1) + continue + + if(O.invisibility == INVISIBILITY_MAXIMUM) + var/image/I = new(loc = get_turf(O)) + var/mutable_appearance/MA = new(O) + MA.alpha = 128 + MA.dir = O.dir + I.appearance = MA + t_ray_images += I + if(t_ray_images.len) + flick_overlay(t_ray_images, list(viewer.client), flick_time) + +/obj/item/healthanalyzer + name = "health analyzer" + icon = 'icons/obj/device.dmi' + icon_state = "health" + item_state = "healthanalyzer" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + desc = "A hand-held body scanner able to distinguish vital signs of the subject." + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON + slot_flags = ITEM_SLOT_BELT + throwforce = 3 + w_class = WEIGHT_CLASS_TINY + throw_speed = 3 + throw_range = 7 + custom_materials = list(/datum/material/iron=200) + var/mode = 1 + var/scanmode = 0 + var/advanced = FALSE + +/obj/item/healthanalyzer/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!") + return BRUTELOSS + +/obj/item/healthanalyzer/attack_self(mob/user) + if(!scanmode) + to_chat(user, "You switch the health analyzer to scan chemical contents.") + scanmode = 1 + else + to_chat(user, "You switch the health analyzer to check physical health.") + scanmode = 0 + +/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user) + + // Clumsiness/brain damage check + if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) + to_chat(user, "You stupidly try to analyze the floor's vitals!") + user.visible_message("[user] has analyzed the floor's vitals!") + var/msg = "*---------*\nAnalyzing results for The floor:\n\tOverall status: Healthy\n" + msg += "Key: Suffocation/Toxin/Burn/Brute\n" + msg += "\tDamage specifics: 0-0-0-0\n" + msg += "Body temperature: ???\n" + msg += "*---------*" + to_chat(user, msg) + return + + user.visible_message("[user] has analyzed [M]'s vitals.") + + if(scanmode == 0) + healthscan(user, M, mode, advanced) + else if(scanmode == 1) + chemscan(user, M) + + add_fingerprint(user) + + +// Used by the PDA medical scanner too +/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE) + if(isliving(user) && (user.incapacitated() || user.eye_blind)) + return + //Damage specifics + var/oxy_loss = M.getOxyLoss() + var/tox_loss = M.getToxLoss() + var/fire_loss = M.getFireLoss() + var/brute_loss = M.getBruteLoss() + var/mob_status = (M.stat == DEAD ? "Deceased" : "[round(M.health/M.maxHealth,0.01)*100] % healthy") + + if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced) + mob_status = "Deceased" + oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss + + var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]" + + // Damage descriptions + if(brute_loss > 10) + msg += "\n\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected." + if(fire_loss > 10) + msg += "\n\t[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected." + if(oxy_loss > 10) + msg += "\n\t[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected." + if(tox_loss > 10) + msg += "\n\t[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected." + if(M.getStaminaLoss()) + msg += "\n\tSubject appears to be suffering from fatigue." + if(advanced) + msg += "\n\tFatigue Level: [M.getStaminaLoss()]%." + if (M.getCloneLoss()) + msg += "\n\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." + if(advanced) + msg += "\n\tCellular Damage Level: [M.getCloneLoss()]." + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(advanced && H.has_dna()) + msg += "\n\tGenetic Stability: [H.dna.stability]%." + + to_chat(user, msg) + msg = "" + + // Body part damage report + var/list/dmgreport = list() + if(iscarbon(M) && mode == 1) + var/mob/living/carbon/C = M + var/list/damaged = C.get_damaged_bodyparts(1,1) + if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0) + dmgreport += "\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + " + + for(var/o in damaged) + var/obj/item/bodypart/org = o //head, left arm, right arm, etc. + dmgreport += "\ + \ + " + dmgreport += "
    Damage:BruteBurnToxinSuffocation
    Overall:[brute_loss][fire_loss][tox_loss][oxy_loss]
    [capitalize(org.name)]:[(org.brute_dam > 0) ? "[org.brute_dam]" : "0"][(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]
    " + to_chat(user, dmgreport.Join()) + + + //Organ damages report + var/heart_ded = FALSE + if(iscarbon(M)) + var/mob/living/carbon/C = M + var/mob/living/carbon/human/H = M + for(var/organ in C.internal_organs) + var/temp_message + var/damage_message + var/obj/item/organ/O = organ + + //EYES + if(istype(O, /obj/item/organ/eyes)) + var/obj/item/organ/eyes/eyes = O + if(advanced) + if(HAS_TRAIT(C, TRAIT_BLIND)) + temp_message += " Subject is blind." + if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) + temp_message += " Subject is nearsighted." + if(eyes.damage > 30) + damage_message += " Subject has severe eye damage." + else if(eyes.damage > 20) + damage_message += " Subject has significant eye damage." + else if(eyes.damage) + damage_message += " Subject has minor eye damage." + + + //EARS + else if(istype(O, /obj/item/organ/ears)) + var/obj/item/organ/ears/ears = O + if(advanced) + if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION)) + temp_message += " Subject is genetically deaf." + else if(HAS_TRAIT(C, TRAIT_DEAF)) + temp_message += " Subject is deaf." + else + if(ears.damage) + damage_message += " Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage." + if(ears.deaf) + damage_message += " Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf." + + + //BRAIN + else if(istype(O, /obj/item/organ/brain)) + if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200) + damage_message += " Subject's brain non-functional. Neurine injection recomended." + else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120) + damage_message += " Severe brain damage detected. Subject likely to have mental traumas." + else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45) + damage_message += " Brain damage detected." + if(advanced) + temp_message += " Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%." + + //TRAUMAS + if(LAZYLEN(C.get_traumas())) + var/list/trauma_text = list() + for(var/datum/brain_trauma/B in C.get_traumas()) + var/trauma_desc = "" + switch(B.resilience) + if(TRAUMA_RESILIENCE_SURGERY) + trauma_desc += "severe " + if(TRAUMA_RESILIENCE_LOBOTOMY) + trauma_desc += "deep-rooted " + if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE) + trauma_desc += "permanent " + trauma_desc += B.scan_desc + trauma_text += trauma_desc + temp_message += " Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)]." + if(C.roundstart_quirks.len) + temp_message += " Subject has the following physiological traits: [C.get_trait_string()]." + + if(ishuman(C) && advanced) + //MON PETIT CHAUFFEUR + if(H.hallucinating()) + temp_message += " Subject is hallucinating." + + //MKUltra + if(H.has_status_effect(/datum/status_effect/chem/enthrall)) + temp_message += " Subject has abnormal brain fuctions." + + //Astrogen shenanigans + if(H.reagents.has_reagent(/datum/reagent/fermi/astral)) + if(H.mind) + temp_message += " Warning: subject may be possesed." + else + temp_message += " Subject appears to be astrally projecting." + + + //LIVER + else if(istype(O, /obj/item/organ/liver)) + var/obj/item/organ/liver/L = O + if(L.organ_flags & ORGAN_FAILING && H.stat != DEAD) //might be depreciated + temp_message += "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!" + + //HEART + else if(ishuman(M) && (istype(O, /obj/item/organ/heart))) + var/obj/item/organ/heart/He = O + if(H.undergoing_cardiac_arrest() && H.stat != DEAD) + temp_message += " Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!" + if(He.organ_flags & ORGAN_FAILING) + heart_ded = TRUE + + //TONGUE + else if(istype(O, /obj/item/organ/tongue)) + var/obj/item/organ/tongue/T = O + if(T.name == "fluffy tongue") + temp_message += " Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant." + + //HECK + else if(istype(O, /obj/item/organ/genital/penis)) + var/obj/item/organ/genital/penis/P = O + if(P.length>20) + temp_message += " Subject has a sizeable gentleman's organ at [P.length] inches." + + else if(istype(O, /obj/item/organ/genital/breasts)) + var/obj/item/organ/genital/breasts/Br = O + if(Br.cached_size>5) + temp_message += " Subject has a sizeable bosom with a [Br.size] cup." + + + + //GENERAL HANDLER + if(!damage_message) + if(O.organ_flags & ORGAN_FAILING) + damage_message += " Chronic [O.name] failure detected." + else if(O.damage > O.high_threshold) + damage_message += " Acute [O.name] failure detected." + else if(O.damage > O.low_threshold && advanced) + damage_message += " Minor [O.name] failure detected.
    " + + if(temp_message || damage_message) + msg += "\t[uppertext(O.name)]:
    [damage_message] [temp_message]\n" + + + + //END; LOOK FOR MISSING ORGANS? + var/breathes = TRUE + var/blooded = TRUE + if(C.dna && C.dna.species) + if(HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT)) + breathes = FALSE + if(NOBLOOD in C.dna.species.species_traits) + blooded = FALSE + var/has_liver = C.dna && !(NOLIVER in C.dna.species.species_traits) + var/has_stomach = C.dna && !(NOSTOMACH in C.dna.species.species_traits) + if(!M.getorganslot(ORGAN_SLOT_EYES)) + msg += "\tSubject does not have eyes.\n" + if(!M.getorganslot(ORGAN_SLOT_EARS)) + msg += "\tSubject does not have ears.\n" + if(!M.getorganslot(ORGAN_SLOT_BRAIN)) + msg += "\tSubject's brain function is non-existent!\n" + if(has_liver && !M.getorganslot(ORGAN_SLOT_LIVER)) + msg += "\tSubject's liver is missing!\n" + if(blooded && !M.getorganslot(ORGAN_SLOT_HEART)) + msg += "\tSubject's heart is missing!\n" + if(breathes && !M.getorganslot(ORGAN_SLOT_LUNGS)) + msg += "\tSubject's lungs have collapsed from trauma!\n" + if(has_stomach && !M.getorganslot(ORGAN_SLOT_STOMACH)) + msg += "\tSubject's stomach is missing!\n" + + + if(M.radiation) + msg += "\tSubject is irradiated.\n" + msg += "\tRadiation Level: [M.radiation] rad\n" + + + + // Species and body temperature + var/mob/living/carbon/human/H = M //Start to use human only stuff here + if(ishuman(M)) + var/datum/species/S = H.dna.species + var/mutant = FALSE + if (H.dna.check_mutation(HULK)) + mutant = TRUE + else if (S.mutantlungs != initial(S.mutantlungs)) + mutant = TRUE + else if (S.mutant_brain != initial(S.mutant_brain)) + mutant = TRUE + else if (S.mutant_heart != initial(S.mutant_heart)) + mutant = TRUE + else if (S.mutanteyes != initial(S.mutanteyes)) + mutant = TRUE + else if (S.mutantears != initial(S.mutantears)) + mutant = TRUE + else if (S.mutanthands != initial(S.mutanthands)) + mutant = TRUE + else if (S.mutanttongue != initial(S.mutanttongue)) + mutant = TRUE + else if (S.mutanttail != initial(S.mutanttail)) + mutant = TRUE + else if (S.mutantliver != initial(S.mutantliver)) + mutant = TRUE + else if (S.mutantstomach != initial(S.mutantstomach)) + mutant = TRUE + + msg += "\tReported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]\n" + msg += "\tBase Species: [S.name]\n" + if(mutant) + msg += "\tSubject has mutations present.\n" + msg += "\tBody temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)\n" + + // Time of death + if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced))) + msg += "Time of Death: [M.tod]\n" + var/tdelta = round(world.time - M.timeofdeath) + if(tdelta < (DEFIB_TIME_LIMIT * 10)) + if(heart_ded) + msg += "Subject died [DisplayTimeText(tdelta)] ago, heart requires surgical intervention for defibrillation." + else + msg += "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!" + if(advanced) + if(H.get_ghost() || H.key || H.client)//Since it can last a while. + msg += " Intervention recommended.\n" + else + msg += "\n" + + for(var/thing in M.diseases) + var/datum/disease/D = thing + if(!(D.visibility_flags & HIDDEN_SCANNER)) + msg += "Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]\n" + + // Blood Level + if(M.has_dna()) + var/mob/living/carbon/C = M + var/blood_typepath = C.get_blood_id() + if(blood_typepath) + if(ishuman(C)) + if(H.bleed_rate) + msg += "Subject is bleeding!\n" + var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) + var/blood_type = C.dna.blood_type + if(!(blood_typepath in GLOB.blood_reagent_types)) + var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] + if(R) + blood_type = R.name + if(C.scan_blood_volume() <= (BLOOD_VOLUME_SAFE*C.blood_ratio) && C.scan_blood_volume() > (BLOOD_VOLUME_OKAY*C.blood_ratio)) + msg += "LOW blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" + else if(C.scan_blood_volume() <= (BLOOD_VOLUME_OKAY*C.blood_ratio)) + msg += "CRITICAL blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" + else + msg += "Blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" + + var/cyberimp_detect + for(var/obj/item/organ/cyberimp/CI in C.internal_organs) + if(CI.status == ORGAN_ROBOTIC && !CI.syndicate_implant) + cyberimp_detect += "[C.name] is modified with a [CI.name].
    " + if(cyberimp_detect) + msg += "Detected cybernetic modifications:\n" + msg += "[cyberimp_detect]\n" + msg += "*---------*" + to_chat(user, msg) + SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE) + +/proc/chemscan(mob/living/user, mob/living/M) + if(istype(M)) + if(M.reagents) + var/msg = "*---------*\n" + if(M.reagents.reagent_list.len) + var/list/datum/reagent/reagents = list() + for(var/datum/reagent/R in M.reagents.reagent_list) + if(R.chemical_flags & REAGENT_INVISIBLE) + continue + reagents += R + + if(length(reagents)) + msg += "Subject contains the following reagents:\n" + for(var/datum/reagent/R in reagents) + msg += "[R.volume] units of [R.name][R.overdosed == 1 ? " - OVERDOSING" : "."]\n" + else + msg += "Subject contains no reagents.\n" + + else + msg += "Subject contains no reagents.\n" + if(M.reagents.addiction_list.len) + msg += "Subject is addicted to the following reagents:\n" + for(var/datum/reagent/R in M.reagents.addiction_list) + msg += "[R.name]\n" + else + msg += "Subject is not addicted to any reagents.\n" + + var/datum/reagent/impure/fermiTox/F = M.reagents.has_reagent(/datum/reagent/impure/fermiTox) + if(istype(F,/datum/reagent/impure/fermiTox)) + switch(F.volume) + if(5 to 10) + msg += "Subject contains a low amount of toxic isomers.\n" + if(10 to 25) + msg += "Subject contains toxic isomers.\n" + if(25 to 50) + msg += "Subject contains a substantial amount of toxic isomers.\n" + if(50 to 95) + msg += "Subject contains a high amount of toxic isomers.\n" + if(95 to INFINITY) + msg += "Subject contains a extremely dangerous amount of toxic isomers.\n" + + msg += "*---------*" + to_chat(user, msg) + +/obj/item/healthanalyzer/verb/toggle_mode() + set name = "Switch Verbosity" + set category = "Object" + + var/mob/living/L = usr + if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE)) + return + + mode = !mode + switch (mode) + if(1) + to_chat(usr, "The scanner now shows specific limb damage.") + if(0) + to_chat(usr, "The scanner no longer shows limb damage.") + +/obj/item/healthanalyzer/advanced + name = "advanced health analyzer" + icon_state = "health_adv" + desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy." + advanced = TRUE + +/obj/item/analyzer + desc = "A hand-held environmental scanner which reports current gas levels. Alt-Click to use the built in barometer function." + name = "analyzer" + icon = 'icons/obj/device.dmi' + icon_state = "analyzer" + item_state = "analyzer" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + w_class = WEIGHT_CLASS_SMALL + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON + slot_flags = ITEM_SLOT_BELT + throwforce = 0 + throw_speed = 3 + throw_range = 7 + tool_behaviour = TOOL_ANALYZER + custom_materials = list(/datum/material/iron=30, /datum/material/glass=20) + grind_results = list(/datum/reagent/mercury = 5, /datum/reagent/iron = 5, /datum/reagent/silicon = 5) + var/cooldown = FALSE + var/cooldown_time = 250 + var/accuracy // 0 is the best accuracy. + +/obj/item/analyzer/examine(mob/user) + . = ..() + . += "Alt-click [src] to activate the barometer function." + +/obj/item/analyzer/suicide_act(mob/living/carbon/user) + user.visible_message("[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!") + return BRUTELOSS + +/obj/item/analyzer/attack_self(mob/user) + add_fingerprint(user) + + if (user.stat || user.eye_blind) + return + + // Skyrat change: Functionality moved down to proc/scan_turf() + var/turf/location = get_turf(user) + if(!istype(location)) + return + + scan_turf(user, location) + +/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens + . = ..() + + if(user.canUseTopic(src)) + . = TRUE + if(cooldown) + to_chat(user, "[src]'s barometer function is preparing itself.") + return + + var/turf/T = get_turf(user) + if(!T) + return + + playsound(src, 'sound/effects/pop.ogg', 100) + var/area/user_area = T.loc + var/datum/weather/ongoing_weather = null + + if(!user_area.outdoors) + to_chat(user, "[src]'s barometer function won't work indoors!") + return + + for(var/V in SSweather.processing) + var/datum/weather/W = V + if(W.barometer_predictable && (T.z in W.impacted_z_levels) && W.area_type == user_area.type && !(W.stage == END_STAGE)) + ongoing_weather = W + break + + if(ongoing_weather) + if((ongoing_weather.stage == MAIN_STAGE) || (ongoing_weather.stage == WIND_DOWN_STAGE)) + to_chat(user, "[src]'s barometer function can't trace anything while the storm is [ongoing_weather.stage == MAIN_STAGE ? "already here!" : "winding down."]") + return + + to_chat(user, "The next [ongoing_weather] will hit in [butchertime(ongoing_weather.next_hit_time - world.time)].") + if(ongoing_weather.aesthetic) + to_chat(user, "[src]'s barometer function says that the next storm will breeze on by.") + else + var/next_hit = SSweather.next_hit_by_zlevel["[T.z]"] + var/fixed = next_hit ? next_hit - world.time : -1 + if(fixed < 0) + to_chat(user, "[src]'s barometer function was unable to trace any weather patterns.") + else + to_chat(user, "[src]'s barometer function says a storm will land in approximately [butchertime(fixed)].") + cooldown = TRUE + addtimer(CALLBACK(src,/obj/item/analyzer/proc/ping), cooldown_time) + +/obj/item/analyzer/proc/ping() + if(isliving(loc)) + var/mob/living/L = loc + to_chat(L, "[src]'s barometer function is ready!") + playsound(src, 'sound/machines/click.ogg', 100) + cooldown = FALSE + +/obj/item/analyzer/proc/butchertime(amount) + if(!amount) + return + if(accuracy) + var/inaccurate = round(accuracy*(1/3)) + if(prob(50)) + amount -= inaccurate + if(prob(50)) + amount += inaccurate + return DisplayTimeText(max(1,amount)) + +/proc/atmosanalyzer_scan(mixture, mob/living/user, atom/target = src, visible = TRUE) + var/icon = target + if(visible) + user.visible_message("[user] has used the analyzer on [icon2html(icon, viewers(user))] [target].", "You use the analyzer on [icon2html(icon, user)] [target].") + to_chat(user, "Results of analysis of [icon2html(icon, user)] [target].") + + var/list/airs = islist(mixture) ? mixture : list(mixture) + for(var/g in airs) + if(airs.len > 1) //not a unary gas mixture + to_chat(user, "Node [airs.Find(g)]") + var/datum/gas_mixture/air_contents = g + + var/total_moles = air_contents.total_moles() + var/pressure = air_contents.return_pressure() + var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess? + var/temperature = air_contents.temperature + var/cached_scan_results = air_contents.analyzer_results + + if(total_moles > 0) + to_chat(user, "Moles: [round(total_moles, 0.01)] mol") + to_chat(user, "Volume: [volume] L") + to_chat(user, "Pressure: [round(pressure,0.01)] kPa") + + var/list/cached_gases = air_contents.gases + for(var/id in cached_gases) + var/gas_concentration = cached_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)") + to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") + + else + if(airs.len > 1) + to_chat(user, "This node is empty!") + else + to_chat(user, "[target] is empty!") + + if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected + var/fusion_power = round(cached_scan_results["fusion"], 0.01) + var/tier = fusionpower2text(fusion_power) + to_chat(user, "Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.") + to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") + return + +// Skyrat change +/obj/item/analyzer/proc/scan_turf(mob/user, turf/location) + var/datum/gas_mixture/environment = location.return_air() + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles() + var/cached_scan_results = environment.analyzer_results + + to_chat(user, "Results:") + if(abs(pressure - ONE_ATMOSPHERE) < 10) + to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") + else + to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") + if(total_moles) + var/list/env_gases = environment.gases + + var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles + var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles + var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles + var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles + + if(abs(n2_concentration - N2STANDARD) < 20) + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + else + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + + if(abs(o2_concentration - O2STANDARD) < 2) + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + else + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + + if(co2_concentration > 0.01) + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + else + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + + if(plasma_concentration > 0.005) + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + else + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + + GAS_GARBAGE_COLLECT(environment.gases) + + for(var/id in env_gases) + if(id in GLOB.hardcoded_gases) + continue + var/gas_concentration = env_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)") + to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)") + + if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected + var/fusion_power = round(cached_scan_results["fusion"], 0.01) + var/tier = fusionpower2text(fusion_power) + to_chat(user, "Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.") + to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") + +/obj/item/analyzer/ranged + desc = "A hand-held scanner which uses advanced spectroscopy and infrared readings to analyze gases as a distance. Alt-Click to use the built in barometer function." + name = "long-range analyzer" + icon = 'modular_skyrat/icons/obj/device.dmi' + icon_state = "ranged_analyzer" + +/obj/item/analyzer/ranged/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(target.tool_act(user, src, tool_behaviour)) + return + // Tool act didn't scan it, so let's get it's turf. + var/turf/location = get_turf(target) + scan_turf(user, location) +// End skyrat change + +//slime scanner + +/obj/item/slime_scanner + name = "slime scanner" + desc = "A device that analyzes a slime's internal composition and measures its stats." + icon = 'icons/obj/device.dmi' + icon_state = "adv_spectrometer" + item_state = "analyzer" + lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' + w_class = WEIGHT_CLASS_SMALL + flags_1 = CONDUCT_1 + throwforce = 0 + throw_speed = 3 + throw_range = 7 + custom_materials = list(/datum/material/iron=30, /datum/material/glass=20) + +/obj/item/slime_scanner/attack(mob/living/M, mob/living/user) + if(user.stat || user.eye_blind) + return + if (!isslime(M)) + to_chat(user, "This device can only scan slimes!") + return + var/mob/living/simple_animal/slime/T = M + slime_scan(T, user) + +/proc/slime_scan(mob/living/simple_animal/slime/T, mob/living/user) + to_chat(user, "========================") + to_chat(user, "Slime scan results:") + to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime") + to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]") + if (T.nutrition < T.get_starve_nutrition()) + to_chat(user, "Warning: slime is starving!") + else if (T.nutrition < T.get_hunger_nutrition()) + to_chat(user, "Warning: slime is hungry") + to_chat(user, "Electric change strength: [T.powerlevel]") + to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]%") + if (T.slime_mutation[4] == T.colour) + to_chat(user, "This slime does not evolve any further.") + else + if (T.slime_mutation[3] == T.slime_mutation[4]) + if (T.slime_mutation[2] == T.slime_mutation[1]) + to_chat(user, "Possible mutation: [T.slime_mutation[3]]") + to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting") + else + to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)") + to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting") + else + to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]") + to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting") + if (T.cores > 1) + to_chat(user, "Multiple cores detected") + to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]") + if(T.effectmod) + to_chat(user, "Core mutation in progress: [T.effectmod]") + to_chat(user, "Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]") + to_chat(user, "========================") + + +/obj/item/nanite_scanner + name = "nanite scanner" + icon = 'icons/obj/device.dmi' + icon_state = "nanite_scanner" + item_state = "nanite_remote" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + desc = "A hand-held body scanner able to detect nanites and their programming." + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON + slot_flags = ITEM_SLOT_BELT + throwforce = 3 + w_class = WEIGHT_CLASS_TINY + throw_speed = 3 + throw_range = 7 + custom_materials = list(/datum/material/iron=200) + +/obj/item/nanite_scanner/attack(mob/living/M, mob/living/carbon/human/user) + user.visible_message("[user] has analyzed [M]'s nanites.") + + add_fingerprint(user) + + var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE) + if(!response) + to_chat(user, "No nanites detected in the subject.") + +/obj/item/sequence_scanner + name = "genetic sequence scanner" + icon = 'icons/obj/device.dmi' + icon_state = "gene" + item_state = "healthanalyzer" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + desc = "A hand-held scanner for analyzing someones gene sequence on the fly. Hold near a DNA console to update the internal database." + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON + slot_flags = ITEM_SLOT_BELT + throwforce = 3 + w_class = WEIGHT_CLASS_TINY + throw_speed = 3 + throw_range = 7 + custom_materials = list(/datum/material/iron=200) + var/list/discovered = list() //hit a dna console to update the scanners database + var/list/buffer + var/ready = TRUE + var/cooldown = 200 + +/obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user) + add_fingerprint(user) + if (!HAS_TRAIT_NOT_FROM(M, TRAIT_RADIMMUNE,BLOODSUCKER_TRAIT)) //no scanning if its a husk or DNA-less Species + user.visible_message("[user] analyzes [M]'s genetic sequence.", \ + "You analyze [M]'s genetic sequence.") + gene_scan(M, user) + + else + user.visible_message("[user] failed to analyse [M]'s genetic sequence.", "[M] has no readable genetic sequence!") + +/obj/item/sequence_scanner/attack_self(mob/user) + display_sequence(user) + +/obj/item/sequence_scanner/attack_self_tk(mob/user) + return + +/obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity) + . = ..() + if(!istype(O) || !proximity) + return + + if(istype(O, /obj/machinery/computer/scan_consolenew)) + var/obj/machinery/computer/scan_consolenew/C = O + if(C.stored_research) + to_chat(user, "[name] linked to central research database.") + discovered = C.stored_research.discovered_mutations + else + to_chat(user,"No database to update from.") + +/obj/item/sequence_scanner/proc/gene_scan(mob/living/carbon/C, mob/living/user) + if(!iscarbon(C) || !C.has_dna()) + return + buffer = C.dna.mutation_index + to_chat(user, "Subject [C.name]'s DNA sequence has been saved to buffer.") + if(LAZYLEN(buffer)) + for(var/A in buffer) + to_chat(user, "[get_display_name(A)]") + + +/obj/item/sequence_scanner/proc/display_sequence(mob/living/user) + if(!LAZYLEN(buffer) || !ready) + return + var/list/options = list() + for(var/A in buffer) + options += get_display_name(A) + + var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options) + if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + var/sequence + for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list + if(get_display_name(A) == answer) + sequence = buffer[A] + break + + if(sequence) + var/display + for(var/i in 0 to length_char(sequence) / DNA_MUTATION_BLOCKS-1) + if(i) + display += "-" + display += copytext_char(sequence, 1 + i*DNA_MUTATION_BLOCKS, DNA_MUTATION_BLOCKS*(1+i) + 1) + + to_chat(user, "[display]
    ") + + ready = FALSE + icon_state = "[icon_state]_recharging" + addtimer(CALLBACK(src, .proc/recharge), cooldown, TIMER_UNIQUE) + +/obj/item/sequence_scanner/proc/recharge() + icon_state = initial(icon_state) + ready = TRUE + +/obj/item/sequence_scanner/proc/get_display_name(mutation) + var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation) + if(!HM) + return "ERROR" + if(mutation in discovered) + return "[HM.name] ([HM.alias])" + else + return HM.alias diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2011943bfb..86d1cc75e1 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -624,54 +624,13 @@ GENETICS SCANNER if (user.stat || user.eye_blind) return - var/turf/location = user.loc + //Functionality moved down to proc/scan_turf() + var/turf/location = get_turf(user) if(!istype(location)) return - - var/datum/gas_mixture/environment = location.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - - to_chat(user, "Results:") - if(abs(pressure - ONE_ATMOSPHERE) < 10) - to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") - else - to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") - if(total_moles) - - var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles - var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles - var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles - var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles - - if(abs(n2_concentration - N2STANDARD) < 20) - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)") - else - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)") - - if(abs(o2_concentration - O2STANDARD) < 2) - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)") - else - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)") - - if(co2_concentration > 0.01) - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)") - else - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)") - - if(plasma_concentration > 0.005) - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)") - else - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)") - - for(var/id in environment.get_gases()) - if(id in GLOB.hardcoded_gases) - continue - var/gas_concentration = environment.get_moles(id)/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)") - to_chat(user, "Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)") - + + scan_turf(user, location) + /obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens . = ..() @@ -749,8 +708,8 @@ GENETICS SCANNER var/total_moles = air_contents.total_moles() var/pressure = air_contents.return_pressure() - var/volume = air_contents.return_volume() - var/temperature = air_contents.return_temperature() + var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess? + var/temperature = air_contents.temperature var/cached_scan_results = air_contents.analyzer_results if(total_moles > 0) @@ -758,9 +717,10 @@ GENETICS SCANNER to_chat(user, "Volume: [volume] L") to_chat(user, "Pressure: [round(pressure,0.01)] kPa") - for(var/id in air_contents.get_gases()) - var/gas_concentration = air_contents.get_moles(id)/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)") + var/list/cached_gases = air_contents.gases + for(var/id in cached_gases) + var/gas_concentration = cached_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)") to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") else @@ -776,6 +736,74 @@ GENETICS SCANNER to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") return +/obj/item/analyzer/proc/scan_turf(mob/user, turf/location) + var/datum/gas_mixture/environment = location.return_air() + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles() + var/cached_scan_results = environment.analyzer_results + + to_chat(user, "Results:") + if(abs(pressure - ONE_ATMOSPHERE) < 10) + to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") + else + to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") + if(total_moles) + var/list/env_gases = environment.gases + + var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles + var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles + var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles + var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles + + if(abs(n2_concentration - N2STANDARD) < 20) + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + else + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + + if(abs(o2_concentration - O2STANDARD) < 2) + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + else + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + + if(co2_concentration > 0.01) + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + else + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + + if(plasma_concentration > 0.005) + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + else + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + + GAS_GARBAGE_COLLECT(environment.gases) + + for(var/id in env_gases) + if(id in GLOB.hardcoded_gases) + continue + var/gas_concentration = env_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)") + to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)") + + if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected + var/fusion_power = round(cached_scan_results["fusion"], 0.01) + var/tier = fusionpower2text(fusion_power) + to_chat(user, "Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.") + to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") + +/obj/item/analyzer/ranged + desc = "A hand-held scanner which uses advanced spectroscopy and infrared readings to analyze gases as a distance. Alt-Click to use the built in barometer function." + name = "long-range analyzer" + icon = 'icons/obj/device.dmi' + icon_state = "ranged_analyzer" + +/obj/item/analyzer/ranged/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(target.tool_act(user, src, tool_behaviour)) + return + // Tool act didn't scan it, so let's get it's turf. + var/turf/location = get_turf(target) + scan_turf(user, location) + //slime scanner /obj/item/slime_scanner @@ -966,4 +994,4 @@ GENETICS SCANNER #undef SCANMODE_CHEMICAL #undef SCANMODE_WOUND #undef SCANNER_CONDENSED -#undef SCANNER_VERBOSE +#undef SCANNER_VERBOSE \ No newline at end of file diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index f293e6579a..515f5715dd 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -131,6 +131,7 @@ /obj/item/flamethrower/analyzer_act(mob/living/user, obj/item/I) if(ptank) ptank.analyzer_act(user, I) + return TRUE /obj/item/flamethrower/attack_self(mob/user) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 52e8e9193f..347679e0a5 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -83,7 +83,7 @@ new /obj/item/multitool(src) new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) new /obj/item/extinguisher/mini(src) - new /obj/item/analyzer(src) + new /obj/item/analyzer/ranged(src) //much roomier now that we've managed to remove two tools /obj/item/storage/belt/utility/full/PopulateContents() diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 42e25273a2..2de5860794 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -123,6 +123,7 @@ /obj/item/tank/analyzer_act(mob/living/user, obj/item/I) atmosanalyzer_scan(air_contents, user, src) + return TRUE /obj/item/tank/deconstruct(disassembled = TRUE) if(!disassembled) diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index 91e8c49e5a..d39da2f543 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -90,6 +90,7 @@ /obj/item/crowbar/power/attack_self(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power(drop_location()) + cutjaws.name = name to_chat(user, "You attach the cutting jaws to [src].") qdel(src) user.put_in_active_hand(cutjaws) diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index ac5a02b9fc..53a578a45d 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -117,6 +117,7 @@ /obj/item/wirecutters/power/attack_self(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power(drop_location()) + pryjaws.name = name to_chat(user, "You attach the pry jaws to [src].") qdel(src) user.put_in_active_hand(pryjaws) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 36c444f02d..9d7bae5c6d 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -62,6 +62,7 @@ /obj/item/onetankbomb/analyzer_act(mob/living/user, obj/item/I) bombtank.analyzer_act(user, I) + return TRUE /obj/item/onetankbomb/attack_self(mob/user) //pressing the bomb accesses its assembly bombassembly.attack_self(user, TRUE) diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index dc7c106035..a8d9586fc4 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -170,3 +170,4 @@ /obj/machinery/atmospherics/components/analyzer_act(mob/living/user, obj/item/I) atmosanalyzer_scan(airs, user, src) + return TRUE \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 4a6170c251..23fd2292ff 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -64,6 +64,7 @@ /obj/machinery/atmospherics/pipe/analyzer_act(mob/living/user, obj/item/I) atmosanalyzer_scan(parent.air, user, src) + return TRUE /obj/machinery/atmospherics/pipe/returnPipenet() return parent diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 445cc686f3..fa57e683c4 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -145,6 +145,7 @@ /obj/machinery/portable_atmospherics/analyzer_act(mob/living/user, obj/item/I) atmosanalyzer_scan(air_contents, user, src) + return TRUE /obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user, attackchain_flags = NONE, damage_multiplier = 1) if(I.force < 10 && !(stat & BROKEN)) diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 4cc9cbe34f..256b13ee72 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -176,6 +176,7 @@ /obj/machinery/power/rad_collector/analyzer_act(mob/living/user, obj/item/I) if(loaded_tank) loaded_tank.analyzer_act(user, I) + return TRUE /obj/machinery/power/rad_collector/examine(mob/user) . = ..() diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm index 551d6fa0e3..593fac50d4 100644 --- a/code/modules/research/designs/tool_designs.dm +++ b/code/modules/research/designs/tool_designs.dm @@ -91,6 +91,16 @@ build_path = /obj/item/construction/rld/mini category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO + + /datum/design/ranged_analyzer // Skyrat addition + name = "Long-range Analyzer" + desc = "A new advanced atmospheric analyzer design, capable of performing scans at long range." + id = "ranged_analyzer" + build_type = PROTOLATHE + materials = list(/datum/material/iron = 400, /datum/material/glass = 1000, /datum/material/uranium = 800, /datum/material/gold = 200, /datum/material/plastic = 200) + build_path = /obj/item/analyzer/ranged + category = list("Tool Designs") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING ///////////////////////////////////////// //////////////Alien Tools//////////////// diff --git a/code/modules/research/techweb/nodes/tools_nodes.dm b/code/modules/research/techweb/nodes/tools_nodes.dm index b084979116..180cdb5778 100644 --- a/code/modules/research/techweb/nodes/tools_nodes.dm +++ b/code/modules/research/techweb/nodes/tools_nodes.dm @@ -44,7 +44,7 @@ id = "exp_tools" display_name = "Experimental Tools" description = "Highly advanced construction tools." - design_ids = list("exwelder", "jawsoflife", "handdrill", "holosigncombifan") + design_ids = list("exwelder", "jawsoflife", "handdrill", "holosigncombifan", "ranged_analyzer") prereq_ids = list("adv_engi") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2750) diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index c27e03bb2a57f16d99442ddd2d2bbb33a38bec51..5a9e1e54b63cd31e3957d1d11fade35f3841a2c7 100644 GIT binary patch delta 14031 zcmX|o2|QHa8}}VcLMeNeD6(Wt%Dz>KvhO<;vQ@TZ8*`PiWEmnmW2x->zKbkblaO_Y zu``*$7|eLD-~WBz`6ID;BpJae=7EHG6KXk9aLTf~y4lVr`CaT-FvM74C zMX(#$)y|(a!mB0kHe8~5DE7fT-?HY>_21vUq#xfYVp_f4Z7VmAe3#HFgql*!{~A7e>713G&?sx1Yr+j+9A??+L* z;G9p}{%S{9SNZgY-oXhS>mQQmoj?6~yNC3{uJK@nrnQhn0E;A+h-+wbOva*?y&8^( zJQOmXuKvtMV7n;}+8DAOxP#&d6|WntuLemwv>qY0C$G+aU{;$gk#kxn#JRh+j!h54 z(M?xxC%SW!o{LYHDWIKAEmK!#i^v~A&Yl?Fu$}$1h02{Td0o6G7U5G`D>pDlojYMK znxwMgLz!>4uTFp58T`R~$-m$C#%|)1Ubr$1IuX^bx6O-`m~H&qJ7Ry(GYL%oH64ygh>rff~NNFxUALHTy%FU;_ zx89j3wb={Q>fgB7rPZ}qLQt}Tcn)Y|Uujz%MNu*b@QsVMioeQCR8z56b+K61=M zs#~&lXlh%f8rGL>hwy@I=9mslTNNlIvxI#hq;rp;oAFPT8kOB?(oTK#XHC)hJYAm7 zJiGL}TSWZ9XxNeG{=ju>*HI2I#r=e`-itA*)cU=-^|!d7u%BO}LrW{9>J0-KlO!ou zBz|Yzo0iE}0(q2=Y>_c9Zi!jpa*}0F9wsKTZEmY;$+)b-of+BD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7%Z zy>vwux4%hASAYSZ=2XLbTC9o`o8#Dw70HI(tN1&)0$*gaNz~bjSPnd&9LCO{$-}z) zVZV?3GVT0Uz2OZE2^tXtq0j*nw$8kntx_TL3cT;sEWpn)bGhUfBr3$eQ_k%qo4M&v(N%oQL5$m3hwih2bNG9IX_&$1bld70cAO0!;mpF@7YO}zW&+?SVQ zC1%OaegQ-ssR&$?sY2W+JL(FY=f^CWbQ`vJWe&7 zF;wrpsdZx32tqcJp(EVe1teZCJ^T&%-0tSo#4h82`+OUXpJRZaQ*+|y&)W}u|MOG9 z1#(5`Ydq0pRFeY4e^?B5mkF9Fp2>{b_!tq<43Sf2D*xk%G2YD-o6M2Mn;~-VBO-z? z@y>+RUpU)dj6bY+tV26r2d~ zFyW+txHolmSL(Q!O5Qlt0@k?eW72V`%JWeBI&{wx-De5luA?>U0 zB|rX@?T&kC@~vYx@76+?m8#{{dFQn5_?P}%S|^Y`zBzG5z832E?mzs!_&1bnM%Go& zbinvlfCrKb8kaqz_Tm%@uKlkrnE!uzVE~Pf4Nwvl1487z6B#RmDQLyBkxfe-q_Ltw z+*9jDITnJR(+nc9Xk*#(^J`B5$#VEF6g0$cw57TzeIf(`dch0>OZGw!@ z42>wiaH!YGTVq{;uJdM%>OxuQ zaVZ6(2AyEu(DOavON_Bp@^K7f8ju$=unnJ5Yr9Jb`1yDx1JLn6Lr=Zr-jk632a{5X A(*OVf From ad420c663341b95c24e58dc3579fabe1680e1566 Mon Sep 17 00:00:00 2001 From: SiliconMain <65544193+SiliconMain@users.noreply.github.com> Date: Sun, 26 Jul 2020 15:53:08 -0500 Subject: [PATCH 085/142] AAAAAAAAAAAA --- code/game/objects/items/devices/scanners.bk | 910 -------------------- code/game/objects/items/devices/scanners.dm | 9 +- 2 files changed, 4 insertions(+), 915 deletions(-) delete mode 100644 code/game/objects/items/devices/scanners.bk diff --git a/code/game/objects/items/devices/scanners.bk b/code/game/objects/items/devices/scanners.bk deleted file mode 100644 index b48bb0b51a..0000000000 --- a/code/game/objects/items/devices/scanners.bk +++ /dev/null @@ -1,910 +0,0 @@ - -/* - -CONTAINS: -T-RAY -HEALTH ANALYZER -GAS ANALYZER -SLIME SCANNER -NANITE SCANNER -GENETICS SCANNER - -*/ -/obj/item/t_scanner - name = "\improper T-ray scanner" - desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." - custom_price = PRICE_REALLY_CHEAP - icon = 'icons/obj/device.dmi' - icon_state = "t-ray0" - var/on = FALSE - slot_flags = ITEM_SLOT_BELT - w_class = WEIGHT_CLASS_SMALL - item_state = "electronic" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - custom_materials = list(/datum/material/iron=150) - -/obj/item/t_scanner/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins to emit terahertz-rays into [user.p_their()] brain with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return TOXLOSS - -/obj/item/t_scanner/attack_self(mob/user) - - on = !on - icon_state = copytext_char(icon_state, 1, -1) + "[on]" - - if(on) - START_PROCESSING(SSobj, src) - -/obj/item/t_scanner/process() - if(!on) - STOP_PROCESSING(SSobj, src) - return null - scan() - -/obj/item/t_scanner/proc/scan() - t_ray_scan(loc) - -/proc/t_ray_scan(mob/viewer, flick_time = 8, distance = 3) - if(!ismob(viewer) || !viewer.client) - return - var/list/t_ray_images = list() - for(var/obj/O in orange(distance, viewer) ) - if(O.level != 1) - continue - - if(O.invisibility == INVISIBILITY_MAXIMUM) - var/image/I = new(loc = get_turf(O)) - var/mutable_appearance/MA = new(O) - MA.alpha = 128 - MA.dir = O.dir - I.appearance = MA - t_ray_images += I - if(t_ray_images.len) - flick_overlay(t_ray_images, list(viewer.client), flick_time) - -/obj/item/healthanalyzer - name = "health analyzer" - icon = 'icons/obj/device.dmi' - icon_state = "health" - item_state = "healthanalyzer" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - desc = "A hand-held body scanner able to distinguish vital signs of the subject." - flags_1 = CONDUCT_1 - item_flags = NOBLUDGEON - slot_flags = ITEM_SLOT_BELT - throwforce = 3 - w_class = WEIGHT_CLASS_TINY - throw_speed = 3 - throw_range = 7 - custom_materials = list(/datum/material/iron=200) - var/mode = 1 - var/scanmode = 0 - var/advanced = FALSE - -/obj/item/healthanalyzer/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!") - return BRUTELOSS - -/obj/item/healthanalyzer/attack_self(mob/user) - if(!scanmode) - to_chat(user, "You switch the health analyzer to scan chemical contents.") - scanmode = 1 - else - to_chat(user, "You switch the health analyzer to check physical health.") - scanmode = 0 - -/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user) - - // Clumsiness/brain damage check - if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) - to_chat(user, "You stupidly try to analyze the floor's vitals!") - user.visible_message("[user] has analyzed the floor's vitals!") - var/msg = "*---------*\nAnalyzing results for The floor:\n\tOverall status: Healthy\n" - msg += "Key: Suffocation/Toxin/Burn/Brute\n" - msg += "\tDamage specifics: 0-0-0-0\n" - msg += "Body temperature: ???\n" - msg += "*---------*" - to_chat(user, msg) - return - - user.visible_message("[user] has analyzed [M]'s vitals.") - - if(scanmode == 0) - healthscan(user, M, mode, advanced) - else if(scanmode == 1) - chemscan(user, M) - - add_fingerprint(user) - - -// Used by the PDA medical scanner too -/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE) - if(isliving(user) && (user.incapacitated() || user.eye_blind)) - return - //Damage specifics - var/oxy_loss = M.getOxyLoss() - var/tox_loss = M.getToxLoss() - var/fire_loss = M.getFireLoss() - var/brute_loss = M.getBruteLoss() - var/mob_status = (M.stat == DEAD ? "Deceased" : "[round(M.health/M.maxHealth,0.01)*100] % healthy") - - if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced) - mob_status = "Deceased" - oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss - - var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]" - - // Damage descriptions - if(brute_loss > 10) - msg += "\n\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected." - if(fire_loss > 10) - msg += "\n\t[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected." - if(oxy_loss > 10) - msg += "\n\t[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected." - if(tox_loss > 10) - msg += "\n\t[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected." - if(M.getStaminaLoss()) - msg += "\n\tSubject appears to be suffering from fatigue." - if(advanced) - msg += "\n\tFatigue Level: [M.getStaminaLoss()]%." - if (M.getCloneLoss()) - msg += "\n\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." - if(advanced) - msg += "\n\tCellular Damage Level: [M.getCloneLoss()]." - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(advanced && H.has_dna()) - msg += "\n\tGenetic Stability: [H.dna.stability]%." - - to_chat(user, msg) - msg = "" - - // Body part damage report - var/list/dmgreport = list() - if(iscarbon(M) && mode == 1) - var/mob/living/carbon/C = M - var/list/damaged = C.get_damaged_bodyparts(1,1) - if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0) - dmgreport += "\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - " - - for(var/o in damaged) - var/obj/item/bodypart/org = o //head, left arm, right arm, etc. - dmgreport += "\ - \ - " - dmgreport += "
    Damage:BruteBurnToxinSuffocation
    Overall:[brute_loss][fire_loss][tox_loss][oxy_loss]
    [capitalize(org.name)]:[(org.brute_dam > 0) ? "[org.brute_dam]" : "0"][(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]
    " - to_chat(user, dmgreport.Join()) - - - //Organ damages report - var/heart_ded = FALSE - if(iscarbon(M)) - var/mob/living/carbon/C = M - var/mob/living/carbon/human/H = M - for(var/organ in C.internal_organs) - var/temp_message - var/damage_message - var/obj/item/organ/O = organ - - //EYES - if(istype(O, /obj/item/organ/eyes)) - var/obj/item/organ/eyes/eyes = O - if(advanced) - if(HAS_TRAIT(C, TRAIT_BLIND)) - temp_message += " Subject is blind." - if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) - temp_message += " Subject is nearsighted." - if(eyes.damage > 30) - damage_message += " Subject has severe eye damage." - else if(eyes.damage > 20) - damage_message += " Subject has significant eye damage." - else if(eyes.damage) - damage_message += " Subject has minor eye damage." - - - //EARS - else if(istype(O, /obj/item/organ/ears)) - var/obj/item/organ/ears/ears = O - if(advanced) - if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION)) - temp_message += " Subject is genetically deaf." - else if(HAS_TRAIT(C, TRAIT_DEAF)) - temp_message += " Subject is deaf." - else - if(ears.damage) - damage_message += " Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage." - if(ears.deaf) - damage_message += " Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf." - - - //BRAIN - else if(istype(O, /obj/item/organ/brain)) - if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200) - damage_message += " Subject's brain non-functional. Neurine injection recomended." - else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120) - damage_message += " Severe brain damage detected. Subject likely to have mental traumas." - else if (C.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45) - damage_message += " Brain damage detected." - if(advanced) - temp_message += " Brain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%." - - //TRAUMAS - if(LAZYLEN(C.get_traumas())) - var/list/trauma_text = list() - for(var/datum/brain_trauma/B in C.get_traumas()) - var/trauma_desc = "" - switch(B.resilience) - if(TRAUMA_RESILIENCE_SURGERY) - trauma_desc += "severe " - if(TRAUMA_RESILIENCE_LOBOTOMY) - trauma_desc += "deep-rooted " - if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE) - trauma_desc += "permanent " - trauma_desc += B.scan_desc - trauma_text += trauma_desc - temp_message += " Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)]." - if(C.roundstart_quirks.len) - temp_message += " Subject has the following physiological traits: [C.get_trait_string()]." - - if(ishuman(C) && advanced) - //MON PETIT CHAUFFEUR - if(H.hallucinating()) - temp_message += " Subject is hallucinating." - - //MKUltra - if(H.has_status_effect(/datum/status_effect/chem/enthrall)) - temp_message += " Subject has abnormal brain fuctions." - - //Astrogen shenanigans - if(H.reagents.has_reagent(/datum/reagent/fermi/astral)) - if(H.mind) - temp_message += " Warning: subject may be possesed." - else - temp_message += " Subject appears to be astrally projecting." - - - //LIVER - else if(istype(O, /obj/item/organ/liver)) - var/obj/item/organ/liver/L = O - if(L.organ_flags & ORGAN_FAILING && H.stat != DEAD) //might be depreciated - temp_message += "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!" - - //HEART - else if(ishuman(M) && (istype(O, /obj/item/organ/heart))) - var/obj/item/organ/heart/He = O - if(H.undergoing_cardiac_arrest() && H.stat != DEAD) - temp_message += " Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!" - if(He.organ_flags & ORGAN_FAILING) - heart_ded = TRUE - - //TONGUE - else if(istype(O, /obj/item/organ/tongue)) - var/obj/item/organ/tongue/T = O - if(T.name == "fluffy tongue") - temp_message += " Subject is suffering from a fluffified tongue. Suggested cure: Yamerol or a tongue transplant." - - //HECK - else if(istype(O, /obj/item/organ/genital/penis)) - var/obj/item/organ/genital/penis/P = O - if(P.length>20) - temp_message += " Subject has a sizeable gentleman's organ at [P.length] inches." - - else if(istype(O, /obj/item/organ/genital/breasts)) - var/obj/item/organ/genital/breasts/Br = O - if(Br.cached_size>5) - temp_message += " Subject has a sizeable bosom with a [Br.size] cup." - - - - //GENERAL HANDLER - if(!damage_message) - if(O.organ_flags & ORGAN_FAILING) - damage_message += " Chronic [O.name] failure detected." - else if(O.damage > O.high_threshold) - damage_message += " Acute [O.name] failure detected." - else if(O.damage > O.low_threshold && advanced) - damage_message += " Minor [O.name] failure detected.
    " - - if(temp_message || damage_message) - msg += "\t[uppertext(O.name)]:
    [damage_message] [temp_message]\n" - - - - //END; LOOK FOR MISSING ORGANS? - var/breathes = TRUE - var/blooded = TRUE - if(C.dna && C.dna.species) - if(HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT)) - breathes = FALSE - if(NOBLOOD in C.dna.species.species_traits) - blooded = FALSE - var/has_liver = C.dna && !(NOLIVER in C.dna.species.species_traits) - var/has_stomach = C.dna && !(NOSTOMACH in C.dna.species.species_traits) - if(!M.getorganslot(ORGAN_SLOT_EYES)) - msg += "\tSubject does not have eyes.\n" - if(!M.getorganslot(ORGAN_SLOT_EARS)) - msg += "\tSubject does not have ears.\n" - if(!M.getorganslot(ORGAN_SLOT_BRAIN)) - msg += "\tSubject's brain function is non-existent!\n" - if(has_liver && !M.getorganslot(ORGAN_SLOT_LIVER)) - msg += "\tSubject's liver is missing!\n" - if(blooded && !M.getorganslot(ORGAN_SLOT_HEART)) - msg += "\tSubject's heart is missing!\n" - if(breathes && !M.getorganslot(ORGAN_SLOT_LUNGS)) - msg += "\tSubject's lungs have collapsed from trauma!\n" - if(has_stomach && !M.getorganslot(ORGAN_SLOT_STOMACH)) - msg += "\tSubject's stomach is missing!\n" - - - if(M.radiation) - msg += "\tSubject is irradiated.\n" - msg += "\tRadiation Level: [M.radiation] rad\n" - - - - // Species and body temperature - var/mob/living/carbon/human/H = M //Start to use human only stuff here - if(ishuman(M)) - var/datum/species/S = H.dna.species - var/mutant = FALSE - if (H.dna.check_mutation(HULK)) - mutant = TRUE - else if (S.mutantlungs != initial(S.mutantlungs)) - mutant = TRUE - else if (S.mutant_brain != initial(S.mutant_brain)) - mutant = TRUE - else if (S.mutant_heart != initial(S.mutant_heart)) - mutant = TRUE - else if (S.mutanteyes != initial(S.mutanteyes)) - mutant = TRUE - else if (S.mutantears != initial(S.mutantears)) - mutant = TRUE - else if (S.mutanthands != initial(S.mutanthands)) - mutant = TRUE - else if (S.mutanttongue != initial(S.mutanttongue)) - mutant = TRUE - else if (S.mutanttail != initial(S.mutanttail)) - mutant = TRUE - else if (S.mutantliver != initial(S.mutantliver)) - mutant = TRUE - else if (S.mutantstomach != initial(S.mutantstomach)) - mutant = TRUE - - msg += "\tReported Species: [H.dna.custom_species ? H.dna.custom_species : S.name]\n" - msg += "\tBase Species: [S.name]\n" - if(mutant) - msg += "\tSubject has mutations present.\n" - msg += "\tBody temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)\n" - - // Time of death - if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced))) - msg += "Time of Death: [M.tod]\n" - var/tdelta = round(world.time - M.timeofdeath) - if(tdelta < (DEFIB_TIME_LIMIT * 10)) - if(heart_ded) - msg += "Subject died [DisplayTimeText(tdelta)] ago, heart requires surgical intervention for defibrillation." - else - msg += "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!" - if(advanced) - if(H.get_ghost() || H.key || H.client)//Since it can last a while. - msg += " Intervention recommended.\n" - else - msg += "\n" - - for(var/thing in M.diseases) - var/datum/disease/D = thing - if(!(D.visibility_flags & HIDDEN_SCANNER)) - msg += "Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]\n" - - // Blood Level - if(M.has_dna()) - var/mob/living/carbon/C = M - var/blood_typepath = C.get_blood_id() - if(blood_typepath) - if(ishuman(C)) - if(H.bleed_rate) - msg += "Subject is bleeding!\n" - var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100) - var/blood_type = C.dna.blood_type - if(!(blood_typepath in GLOB.blood_reagent_types)) - var/datum/reagent/R = GLOB.chemical_reagents_list[blood_typepath] - if(R) - blood_type = R.name - if(C.scan_blood_volume() <= (BLOOD_VOLUME_SAFE*C.blood_ratio) && C.scan_blood_volume() > (BLOOD_VOLUME_OKAY*C.blood_ratio)) - msg += "LOW blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" - else if(C.scan_blood_volume() <= (BLOOD_VOLUME_OKAY*C.blood_ratio)) - msg += "CRITICAL blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" - else - msg += "Blood level [blood_percent] %, [C.scan_blood_volume()] cl, type: [blood_type]\n" - - var/cyberimp_detect - for(var/obj/item/organ/cyberimp/CI in C.internal_organs) - if(CI.status == ORGAN_ROBOTIC && !CI.syndicate_implant) - cyberimp_detect += "[C.name] is modified with a [CI.name].
    " - if(cyberimp_detect) - msg += "Detected cybernetic modifications:\n" - msg += "[cyberimp_detect]\n" - msg += "*---------*" - to_chat(user, msg) - SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE) - -/proc/chemscan(mob/living/user, mob/living/M) - if(istype(M)) - if(M.reagents) - var/msg = "*---------*\n" - if(M.reagents.reagent_list.len) - var/list/datum/reagent/reagents = list() - for(var/datum/reagent/R in M.reagents.reagent_list) - if(R.chemical_flags & REAGENT_INVISIBLE) - continue - reagents += R - - if(length(reagents)) - msg += "Subject contains the following reagents:\n" - for(var/datum/reagent/R in reagents) - msg += "[R.volume] units of [R.name][R.overdosed == 1 ? " - OVERDOSING" : "."]\n" - else - msg += "Subject contains no reagents.\n" - - else - msg += "Subject contains no reagents.\n" - if(M.reagents.addiction_list.len) - msg += "Subject is addicted to the following reagents:\n" - for(var/datum/reagent/R in M.reagents.addiction_list) - msg += "[R.name]\n" - else - msg += "Subject is not addicted to any reagents.\n" - - var/datum/reagent/impure/fermiTox/F = M.reagents.has_reagent(/datum/reagent/impure/fermiTox) - if(istype(F,/datum/reagent/impure/fermiTox)) - switch(F.volume) - if(5 to 10) - msg += "Subject contains a low amount of toxic isomers.\n" - if(10 to 25) - msg += "Subject contains toxic isomers.\n" - if(25 to 50) - msg += "Subject contains a substantial amount of toxic isomers.\n" - if(50 to 95) - msg += "Subject contains a high amount of toxic isomers.\n" - if(95 to INFINITY) - msg += "Subject contains a extremely dangerous amount of toxic isomers.\n" - - msg += "*---------*" - to_chat(user, msg) - -/obj/item/healthanalyzer/verb/toggle_mode() - set name = "Switch Verbosity" - set category = "Object" - - var/mob/living/L = usr - if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE)) - return - - mode = !mode - switch (mode) - if(1) - to_chat(usr, "The scanner now shows specific limb damage.") - if(0) - to_chat(usr, "The scanner no longer shows limb damage.") - -/obj/item/healthanalyzer/advanced - name = "advanced health analyzer" - icon_state = "health_adv" - desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy." - advanced = TRUE - -/obj/item/analyzer - desc = "A hand-held environmental scanner which reports current gas levels. Alt-Click to use the built in barometer function." - name = "analyzer" - icon = 'icons/obj/device.dmi' - icon_state = "analyzer" - item_state = "analyzer" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - w_class = WEIGHT_CLASS_SMALL - flags_1 = CONDUCT_1 - item_flags = NOBLUDGEON - slot_flags = ITEM_SLOT_BELT - throwforce = 0 - throw_speed = 3 - throw_range = 7 - tool_behaviour = TOOL_ANALYZER - custom_materials = list(/datum/material/iron=30, /datum/material/glass=20) - grind_results = list(/datum/reagent/mercury = 5, /datum/reagent/iron = 5, /datum/reagent/silicon = 5) - var/cooldown = FALSE - var/cooldown_time = 250 - var/accuracy // 0 is the best accuracy. - -/obj/item/analyzer/examine(mob/user) - . = ..() - . += "Alt-click [src] to activate the barometer function." - -/obj/item/analyzer/suicide_act(mob/living/carbon/user) - user.visible_message("[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!") - return BRUTELOSS - -/obj/item/analyzer/attack_self(mob/user) - add_fingerprint(user) - - if (user.stat || user.eye_blind) - return - - // Skyrat change: Functionality moved down to proc/scan_turf() - var/turf/location = get_turf(user) - if(!istype(location)) - return - - scan_turf(user, location) - -/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens - . = ..() - - if(user.canUseTopic(src)) - . = TRUE - if(cooldown) - to_chat(user, "[src]'s barometer function is preparing itself.") - return - - var/turf/T = get_turf(user) - if(!T) - return - - playsound(src, 'sound/effects/pop.ogg', 100) - var/area/user_area = T.loc - var/datum/weather/ongoing_weather = null - - if(!user_area.outdoors) - to_chat(user, "[src]'s barometer function won't work indoors!") - return - - for(var/V in SSweather.processing) - var/datum/weather/W = V - if(W.barometer_predictable && (T.z in W.impacted_z_levels) && W.area_type == user_area.type && !(W.stage == END_STAGE)) - ongoing_weather = W - break - - if(ongoing_weather) - if((ongoing_weather.stage == MAIN_STAGE) || (ongoing_weather.stage == WIND_DOWN_STAGE)) - to_chat(user, "[src]'s barometer function can't trace anything while the storm is [ongoing_weather.stage == MAIN_STAGE ? "already here!" : "winding down."]") - return - - to_chat(user, "The next [ongoing_weather] will hit in [butchertime(ongoing_weather.next_hit_time - world.time)].") - if(ongoing_weather.aesthetic) - to_chat(user, "[src]'s barometer function says that the next storm will breeze on by.") - else - var/next_hit = SSweather.next_hit_by_zlevel["[T.z]"] - var/fixed = next_hit ? next_hit - world.time : -1 - if(fixed < 0) - to_chat(user, "[src]'s barometer function was unable to trace any weather patterns.") - else - to_chat(user, "[src]'s barometer function says a storm will land in approximately [butchertime(fixed)].") - cooldown = TRUE - addtimer(CALLBACK(src,/obj/item/analyzer/proc/ping), cooldown_time) - -/obj/item/analyzer/proc/ping() - if(isliving(loc)) - var/mob/living/L = loc - to_chat(L, "[src]'s barometer function is ready!") - playsound(src, 'sound/machines/click.ogg', 100) - cooldown = FALSE - -/obj/item/analyzer/proc/butchertime(amount) - if(!amount) - return - if(accuracy) - var/inaccurate = round(accuracy*(1/3)) - if(prob(50)) - amount -= inaccurate - if(prob(50)) - amount += inaccurate - return DisplayTimeText(max(1,amount)) - -/proc/atmosanalyzer_scan(mixture, mob/living/user, atom/target = src, visible = TRUE) - var/icon = target - if(visible) - user.visible_message("[user] has used the analyzer on [icon2html(icon, viewers(user))] [target].", "You use the analyzer on [icon2html(icon, user)] [target].") - to_chat(user, "Results of analysis of [icon2html(icon, user)] [target].") - - var/list/airs = islist(mixture) ? mixture : list(mixture) - for(var/g in airs) - if(airs.len > 1) //not a unary gas mixture - to_chat(user, "Node [airs.Find(g)]") - var/datum/gas_mixture/air_contents = g - - var/total_moles = air_contents.total_moles() - var/pressure = air_contents.return_pressure() - var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess? - var/temperature = air_contents.temperature - var/cached_scan_results = air_contents.analyzer_results - - if(total_moles > 0) - to_chat(user, "Moles: [round(total_moles, 0.01)] mol") - to_chat(user, "Volume: [volume] L") - to_chat(user, "Pressure: [round(pressure,0.01)] kPa") - - var/list/cached_gases = air_contents.gases - for(var/id in cached_gases) - var/gas_concentration = cached_gases[id]/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)") - to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") - - else - if(airs.len > 1) - to_chat(user, "This node is empty!") - else - to_chat(user, "[target] is empty!") - - if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected - var/fusion_power = round(cached_scan_results["fusion"], 0.01) - var/tier = fusionpower2text(fusion_power) - to_chat(user, "Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.") - to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") - return - -// Skyrat change -/obj/item/analyzer/proc/scan_turf(mob/user, turf/location) - var/datum/gas_mixture/environment = location.return_air() - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - var/cached_scan_results = environment.analyzer_results - - to_chat(user, "Results:") - if(abs(pressure - ONE_ATMOSPHERE) < 10) - to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") - else - to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") - if(total_moles) - var/list/env_gases = environment.gases - - var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles - var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles - var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles - var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles - - if(abs(n2_concentration - N2STANDARD) < 20) - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") - else - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") - - if(abs(o2_concentration - O2STANDARD) < 2) - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") - else - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") - - if(co2_concentration > 0.01) - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") - else - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") - - if(plasma_concentration > 0.005) - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") - else - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") - - GAS_GARBAGE_COLLECT(environment.gases) - - for(var/id in env_gases) - if(id in GLOB.hardcoded_gases) - continue - var/gas_concentration = env_gases[id]/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)") - to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)") - - if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected - var/fusion_power = round(cached_scan_results["fusion"], 0.01) - var/tier = fusionpower2text(fusion_power) - to_chat(user, "Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.") - to_chat(user, "Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.") - -/obj/item/analyzer/ranged - desc = "A hand-held scanner which uses advanced spectroscopy and infrared readings to analyze gases as a distance. Alt-Click to use the built in barometer function." - name = "long-range analyzer" - icon = 'modular_skyrat/icons/obj/device.dmi' - icon_state = "ranged_analyzer" - -/obj/item/analyzer/ranged/afterattack(atom/target, mob/user, proximity_flag, click_parameters) - . = ..() - if(target.tool_act(user, src, tool_behaviour)) - return - // Tool act didn't scan it, so let's get it's turf. - var/turf/location = get_turf(target) - scan_turf(user, location) -// End skyrat change - -//slime scanner - -/obj/item/slime_scanner - name = "slime scanner" - desc = "A device that analyzes a slime's internal composition and measures its stats." - icon = 'icons/obj/device.dmi' - icon_state = "adv_spectrometer" - item_state = "analyzer" - lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - w_class = WEIGHT_CLASS_SMALL - flags_1 = CONDUCT_1 - throwforce = 0 - throw_speed = 3 - throw_range = 7 - custom_materials = list(/datum/material/iron=30, /datum/material/glass=20) - -/obj/item/slime_scanner/attack(mob/living/M, mob/living/user) - if(user.stat || user.eye_blind) - return - if (!isslime(M)) - to_chat(user, "This device can only scan slimes!") - return - var/mob/living/simple_animal/slime/T = M - slime_scan(T, user) - -/proc/slime_scan(mob/living/simple_animal/slime/T, mob/living/user) - to_chat(user, "========================") - to_chat(user, "Slime scan results:") - to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime") - to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]") - if (T.nutrition < T.get_starve_nutrition()) - to_chat(user, "Warning: slime is starving!") - else if (T.nutrition < T.get_hunger_nutrition()) - to_chat(user, "Warning: slime is hungry") - to_chat(user, "Electric change strength: [T.powerlevel]") - to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]%") - if (T.slime_mutation[4] == T.colour) - to_chat(user, "This slime does not evolve any further.") - else - if (T.slime_mutation[3] == T.slime_mutation[4]) - if (T.slime_mutation[2] == T.slime_mutation[1]) - to_chat(user, "Possible mutation: [T.slime_mutation[3]]") - to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting") - else - to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)") - to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting") - else - to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]") - to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting") - if (T.cores > 1) - to_chat(user, "Multiple cores detected") - to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]") - if(T.effectmod) - to_chat(user, "Core mutation in progress: [T.effectmod]") - to_chat(user, "Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]") - to_chat(user, "========================") - - -/obj/item/nanite_scanner - name = "nanite scanner" - icon = 'icons/obj/device.dmi' - icon_state = "nanite_scanner" - item_state = "nanite_remote" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - desc = "A hand-held body scanner able to detect nanites and their programming." - flags_1 = CONDUCT_1 - item_flags = NOBLUDGEON - slot_flags = ITEM_SLOT_BELT - throwforce = 3 - w_class = WEIGHT_CLASS_TINY - throw_speed = 3 - throw_range = 7 - custom_materials = list(/datum/material/iron=200) - -/obj/item/nanite_scanner/attack(mob/living/M, mob/living/carbon/human/user) - user.visible_message("[user] has analyzed [M]'s nanites.") - - add_fingerprint(user) - - var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE) - if(!response) - to_chat(user, "No nanites detected in the subject.") - -/obj/item/sequence_scanner - name = "genetic sequence scanner" - icon = 'icons/obj/device.dmi' - icon_state = "gene" - item_state = "healthanalyzer" - lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' - desc = "A hand-held scanner for analyzing someones gene sequence on the fly. Hold near a DNA console to update the internal database." - flags_1 = CONDUCT_1 - item_flags = NOBLUDGEON - slot_flags = ITEM_SLOT_BELT - throwforce = 3 - w_class = WEIGHT_CLASS_TINY - throw_speed = 3 - throw_range = 7 - custom_materials = list(/datum/material/iron=200) - var/list/discovered = list() //hit a dna console to update the scanners database - var/list/buffer - var/ready = TRUE - var/cooldown = 200 - -/obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user) - add_fingerprint(user) - if (!HAS_TRAIT_NOT_FROM(M, TRAIT_RADIMMUNE,BLOODSUCKER_TRAIT)) //no scanning if its a husk or DNA-less Species - user.visible_message("[user] analyzes [M]'s genetic sequence.", \ - "You analyze [M]'s genetic sequence.") - gene_scan(M, user) - - else - user.visible_message("[user] failed to analyse [M]'s genetic sequence.", "[M] has no readable genetic sequence!") - -/obj/item/sequence_scanner/attack_self(mob/user) - display_sequence(user) - -/obj/item/sequence_scanner/attack_self_tk(mob/user) - return - -/obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity) - . = ..() - if(!istype(O) || !proximity) - return - - if(istype(O, /obj/machinery/computer/scan_consolenew)) - var/obj/machinery/computer/scan_consolenew/C = O - if(C.stored_research) - to_chat(user, "[name] linked to central research database.") - discovered = C.stored_research.discovered_mutations - else - to_chat(user,"No database to update from.") - -/obj/item/sequence_scanner/proc/gene_scan(mob/living/carbon/C, mob/living/user) - if(!iscarbon(C) || !C.has_dna()) - return - buffer = C.dna.mutation_index - to_chat(user, "Subject [C.name]'s DNA sequence has been saved to buffer.") - if(LAZYLEN(buffer)) - for(var/A in buffer) - to_chat(user, "[get_display_name(A)]") - - -/obj/item/sequence_scanner/proc/display_sequence(mob/living/user) - if(!LAZYLEN(buffer) || !ready) - return - var/list/options = list() - for(var/A in buffer) - options += get_display_name(A) - - var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options) - if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) - var/sequence - for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list - if(get_display_name(A) == answer) - sequence = buffer[A] - break - - if(sequence) - var/display - for(var/i in 0 to length_char(sequence) / DNA_MUTATION_BLOCKS-1) - if(i) - display += "-" - display += copytext_char(sequence, 1 + i*DNA_MUTATION_BLOCKS, DNA_MUTATION_BLOCKS*(1+i) + 1) - - to_chat(user, "[display]
    ") - - ready = FALSE - icon_state = "[icon_state]_recharging" - addtimer(CALLBACK(src, .proc/recharge), cooldown, TIMER_UNIQUE) - -/obj/item/sequence_scanner/proc/recharge() - icon_state = initial(icon_state) - ready = TRUE - -/obj/item/sequence_scanner/proc/get_display_name(mutation) - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation) - if(!HM) - return "ERROR" - if(mutation in discovered) - return "[HM.name] ([HM.alias])" - else - return HM.alias diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 86d1cc75e1..dd3b5e60ac 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -709,7 +709,7 @@ GENETICS SCANNER var/total_moles = air_contents.total_moles() var/pressure = air_contents.return_pressure() var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess? - var/temperature = air_contents.temperature + var/temperature = air_contents.return_temperature var/cached_scan_results = air_contents.analyzer_results if(total_moles > 0) @@ -717,10 +717,9 @@ GENETICS SCANNER to_chat(user, "Volume: [volume] L") to_chat(user, "Pressure: [round(pressure,0.01)] kPa") - var/list/cached_gases = air_contents.gases - for(var/id in cached_gases) - var/gas_concentration = cached_gases[id]/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)") + for(var/id in air_contents.get_gases()) + var/gas_concentration = air_contents.get_moles(id)/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)") to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") else From fdaa4b4372ff1cd738ceaca89d401617a733728a Mon Sep 17 00:00:00 2001 From: SiliconMain <65544193+SiliconMain@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:07:48 -0500 Subject: [PATCH 086/142] aaaaaaaaaaa --- code/game/objects/items/devices/scanners.dm | 25 +++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index dd3b5e60ac..76f1daae0f 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -709,7 +709,7 @@ GENETICS SCANNER var/total_moles = air_contents.total_moles() var/pressure = air_contents.return_pressure() var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess? - var/temperature = air_contents.return_temperature + var/temperature = air_contents.return_temperature() var/cached_scan_results = air_contents.analyzer_results if(total_moles > 0) @@ -718,8 +718,8 @@ GENETICS SCANNER to_chat(user, "Pressure: [round(pressure,0.01)] kPa") for(var/id in air_contents.get_gases()) - var/gas_concentration = air_contents.get_moles(id)/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)") + var/gas_concentration = air_contents.get_moles(id)/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)") to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") else @@ -747,12 +747,11 @@ GENETICS SCANNER else to_chat(user, "Pressure: [round(pressure, 0.01)] kPa") if(total_moles) - var/list/env_gases = environment.gases - var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles - var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles - var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles - var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles + var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles + var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles + var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles + var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles if(abs(n2_concentration - N2STANDARD) < 20) to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") @@ -774,14 +773,12 @@ GENETICS SCANNER else to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") - GAS_GARBAGE_COLLECT(environment.gases) - - for(var/id in env_gases) + for(var/id in environment.get_gases()) if(id in GLOB.hardcoded_gases) continue - var/gas_concentration = env_gases[id]/total_moles - to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)") - to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)") + var/gas_concentration = environment.get_moles(id)/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)") + to_chat(user, "Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)") if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected var/fusion_power = round(cached_scan_results["fusion"], 0.01) From e11dab552f2c3439837d1c50f519fc69511de7c1 Mon Sep 17 00:00:00 2001 From: SiliconMain <65544193+SiliconMain@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:28:21 -0500 Subject: [PATCH 087/142] it just werks --- code/game/objects/items/devices/scanners.dm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 76f1daae0f..fae2833c8a 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -736,7 +736,9 @@ GENETICS SCANNER return /obj/item/analyzer/proc/scan_turf(mob/user, turf/location) + var/datum/gas_mixture/environment = location.return_air() + var/pressure = environment.return_pressure() var/total_moles = environment.total_moles() var/cached_scan_results = environment.analyzer_results @@ -754,24 +756,24 @@ GENETICS SCANNER var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles if(abs(n2_concentration - N2STANDARD) < 20) - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)") else - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)") if(abs(o2_concentration - O2STANDARD) < 2) - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)") else - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)") if(co2_concentration > 0.01) - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)") else - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)") if(plasma_concentration > 0.005) - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)") else - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)") for(var/id in environment.get_gases()) if(id in GLOB.hardcoded_gases) @@ -779,7 +781,7 @@ GENETICS SCANNER var/gas_concentration = environment.get_moles(id)/total_moles to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)") to_chat(user, "Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)") - + if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected var/fusion_power = round(cached_scan_results["fusion"], 0.01) var/tier = fusionpower2text(fusion_power) From 63bb9fe0f3778475afb9e177c64d2cddaf55baec Mon Sep 17 00:00:00 2001 From: SiliconMain <65544193+SiliconMain@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:35:50 -0500 Subject: [PATCH 088/142] the dangers of copypaste --- code/modules/research/designs/tool_designs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm index 593fac50d4..0a278602c1 100644 --- a/code/modules/research/designs/tool_designs.dm +++ b/code/modules/research/designs/tool_designs.dm @@ -92,7 +92,7 @@ category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO - /datum/design/ranged_analyzer // Skyrat addition + /datum/design/ranged_analyzer name = "Long-range Analyzer" desc = "A new advanced atmospheric analyzer design, capable of performing scans at long range." id = "ranged_analyzer" From 7d7f40ce90ceb25d23bcdb340173c0db1cf798cd Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 14:56:03 -0700 Subject: [PATCH 089/142] fixes --- code/_onclick/ai.dm | 6 +++--- code/_onclick/click.dm | 3 ++- code/_onclick/cyborg.dm | 12 +++-------- code/_onclick/other_mobs.dm | 5 +++-- code/game/objects/buckling.dm | 10 +++++++++ code/game/turfs/simulated/floor.dm | 2 +- .../clockcult/clock_mobs/_eminence.dm | 21 +++++++++++-------- .../antagonists/disease/disease_mob.dm | 17 ++++++++------- .../revenant/revenant_abilities.dm | 1 + .../integrated_electronics/core/assemblies.dm | 1 + .../mob/living/simple_animal/astral.dm | 6 +++++- code/modules/photography/camera/camera.dm | 2 +- 12 files changed, 52 insertions(+), 34 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 0699915859..18aaf66659 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -75,11 +75,11 @@ if(aicamera.in_camera_mode) aicamera.camera_mode_off() - aicamera.captureimage(pixel_turf, usr) + INVOKE_ASYNC(aicamera, /obj/item/camera.proc/captureimage, pixel_turf, usr) return if(waypoint_mode) - waypoint_mode = 0 - set_waypoint(A) + waypoint_mode = FALSE + INVOKE_ASYNC(src, .proc/set_waypoint, A) return A.attack_ai(src) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 94b161f0d2..042ab3aaee 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -48,7 +48,8 @@ * item/afterattack(atom,user,adjacent,params) - used both ranged and adjacent * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed */ -/mob/proc/ClickOn( atom/A, params) +/mob/proc/ClickOn(atom/A, params) + SHOULD_NOT_SLEEP(TRUE) if(check_click_intercept(params,A)) return diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 3dc3176205..372fe46046 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -7,7 +7,6 @@ */ /mob/living/silicon/robot/ClickOn(var/atom/A, var/params) - set waitfor = FALSE if(check_click_intercept(params,A)) return @@ -41,7 +40,7 @@ */ if(aicamera.in_camera_mode) //Cyborg picture taking aicamera.camera_mode_off() - aicamera.captureimage(A, usr) + INVOKE_ASYNC(aicamera, /obj/item/camera.proc/captureimage, A, usr) return var/obj/item/W = get_active_held_item() @@ -49,13 +48,8 @@ if(!W && A.Adjacent(src) && (isobj(A) || ismob(A))) var/atom/movable/C = A if(C.can_buckle && C.has_buckled_mobs()) - if(C.buckled_mobs.len > 1) - var/unbuckled = input(src, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in C.buckled_mobs - if(C.user_unbuckle_mob(unbuckled,src)) - return - else - if(C.user_unbuckle_mob(C.buckled_mobs[1],src)) - return + INVOKE_ASYNC(C, /atom/movable.proc/precise_user_unbuckle_mob, src) + return if(!W && (get_dist(src,A) <= interaction_range)) A.attack_robot(src) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 03dc64d5be..362a15005c 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -16,6 +16,8 @@ to_chat(src, "The damage in your [check_arm.name] is preventing you from using it! Get it fixed, or at least splinted!") return + . = NONE + // Special glove functions: // If the gloves do anything, have them return 1 to stop // normal attack_hand() here. @@ -25,8 +27,6 @@ if(. & INTERRUPT_UNARMED_ATTACK) return - . = NONE - for(var/datum/mutation/human/HM in dna.mutations) . |= HM.on_attack_hand(A, proximity, intent, flags) @@ -37,6 +37,7 @@ return . | A.attack_hand(src, intent, flags) /atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) + SHOULD_NOT_SLEEP(TRUE) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 36e7496bd3..bdb748925c 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -145,3 +145,13 @@ var/mob/living/L = M.pulledby L.set_pull_offsets(M, L.grab_state) return M + +/atom/movable/proc/precise_user_unbuckle_mob(mob/user) + if(!buckled_mobs) + return + else if(length(buckled_mobs) == 1) + return user_unbuckle_mob(buckled_mobs[1], user) + else + var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs + return user_unbuckle_mob(unbuckled, user) + diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index bdca384bd0..758f824727 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -162,7 +162,7 @@ return 0 /turf/open/floor/crowbar_act(mob/living/user, obj/item/I) - return intact ? pry_tile(I, user) : FALSE + return intact ? FORCE_BOOLEAN(pry_tile(I, user)) : FALSE /turf/open/floor/proc/try_replace_tile(obj/item/stack/tile/T, mob/user, params) if(T.turf_type == type) diff --git a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm index faa5e025ca..2f6a018a4c 100644 --- a/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm +++ b/code/modules/antagonists/clockcult/clock_mobs/_eminence.dm @@ -114,24 +114,27 @@ superheat_wall(A) return if(modifiers["middle"] || modifiers["ctrl"]) - issue_command(A) + INVOKE_ASYNC(src, .proc/issue_command, A) return if(GLOB.ark_of_the_clockwork_justiciar == A) var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar - if(G.recalling) - return - if(!G.recalls_remaining) - to_chat(src, "The Ark can no longer recall!") - return - if(alert(src, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity) - return - G.initiate_mass_recall() //wHOOPS LOOKS LIKE A HULK GOT THROUGH + INVOKE_ASYNC(src, .proc/attempt_recall, G) else if(istype(A, /obj/structure/destructible/clockwork/trap/trigger)) var/obj/structure/destructible/clockwork/trap/trigger/T = A T.visible_message("[T] clunks as it's activated remotely.") to_chat(src, "You activate [T].") T.activate() +/mob/camera/eminence/proc/attempt_recall(obj/structure/destructible/clockwork/massive/celestial_gateway/G) + if(G.recalling) + return + if(!G.recalls_remaining) + to_chat(src, "The Ark can no longer recall!") + return + if(alert(src, "Initiate mass recall?", "Mass Recall", "Yes", "No") != "Yes" || QDELETED(src) || QDELETED(G) || !G.obj_integrity) + return + G.initiate_mass_recall() //wHOOPS LOOKS LIKE A HULK GOT THROUGH + /mob/camera/eminence/ratvar_act() name = "\improper Radiance" real_name = "\improper Radiance" diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index e876beb5dc..6a05d07b38 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -291,16 +291,19 @@ the new instance inside the host to be updated to the template's stats. /mob/camera/disease/ClickOn(var/atom/A, params) if(freemove && ishuman(A)) - var/mob/living/carbon/human/H = A - if(alert(src, "Select [H.name] as your initial host?", "Select Host", "Yes", "No") != "Yes") - return - if(!freemove) - return - if(QDELETED(H) || !force_infect(H)) - to_chat(src, "[H ? H.name : "Host"] cannot be infected.") + confirm_initial_infection(A) else ..() +/mob/camera/disease/proc/confirm_initial_infection(mob/living/carbon/human/H) + set waitfor = FALSE + if(alert(src, "Select [H.name] as your initial host?", "Select Host", "Yes", "No") != "Yes") + return + if(!freemove) + return + if(QDELETED(H) || !force_infect(H)) + to_chat(src, "[H ? H.name : "Host"] cannot be infected.") + /mob/camera/disease/proc/adapt_cooldown() to_chat(src, "You have altered your genetic structure. You will be unable to adapt again for [DisplayTimeText(adaptation_cooldown)].") next_adaptation_time = world.time + adaptation_cooldown diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 2d84ed7c22..7a2f661fd9 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -17,6 +17,7 @@ //Harvest; activated ly clicking the target, will try to drain their essence. /mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target) + set waitfor = FALSE if(!castcheck(0)) return if(draining) diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index c85e5cc2ca..7c9f811c34 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -519,6 +519,7 @@ /obj/item/electronic_assembly/attack_self(mob/user) + set waitfor = FALSE if(!check_interactivity(user)) return if(opened) diff --git a/code/modules/mob/living/simple_animal/astral.dm b/code/modules/mob/living/simple_animal/astral.dm index eee42c214f..f79a2b5b3e 100644 --- a/code/modules/mob/living/simple_animal/astral.dm +++ b/code/modules/mob/living/simple_animal/astral.dm @@ -41,7 +41,11 @@ to_chat(src, "Your astral projection is interrupted and your mind is sent back to your body with a shock!") /mob/living/simple_animal/astral/ClickOn(var/atom/A, var/params) - ..() + . = ..() + attempt_possess(A) + +/mob/living/simple_animal/astral/proc/attempt_possess(atom/A) + set waitfor = FALSE if(pseudo_death == FALSE) if(isliving(A)) if(ishuman(A)) diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index 3e76fc874a..b925c67940 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -221,4 +221,4 @@ p.set_picture(picture, TRUE, TRUE) if(CONFIG_GET(flag/picture_logging_camera)) - picture.log_to_file() \ No newline at end of file + picture.log_to_file() From 49070d732b9d3c3c90b9fa2b2ed4869f54d25101 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 15:10:08 -0700 Subject: [PATCH 090/142] ohhhhhhh boy --- _maps/_basemap.dm | 2 +- code/__DEFINES/_flags/return_values.dm | 4 ++++ code/_onclick/other_mobs.dm | 22 +++++++++---------- code/modules/clothing/gloves/miscellaneous.dm | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/_maps/_basemap.dm b/_maps/_basemap.dm index 213211fc42..9bb74575f0 100644 --- a/_maps/_basemap.dm +++ b/_maps/_basemap.dm @@ -1,4 +1,4 @@ -//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it. +#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it. #include "map_files\generic\CentCom.dmm" diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm index 1bcb54bdb7..80908fdc8e 100644 --- a/code/__DEFINES/_flags/return_values.dm +++ b/code/__DEFINES/_flags/return_values.dm @@ -12,6 +12,10 @@ #define NO_AUTO_CLICKDELAY_HANDLING (1<<2) /// Only used with UnarmedAttack(). Interrupts unarmed attack from progressing. #define INTERRUPT_UNARMED_ATTACK (1<<3) +/// Attack hand should not set next action even if the atom wants it to be an action +#define ATTACK_HAND_IGNORE_ACTION (1<<4) +/// Attack hand should not at all check last_action/attack_hand_speed even if the atom wants to +#define ATTACK_HAND_IGNORE_CLICKDELAY (1<<5) // UnarmedAttack() flags /// Attack is from a parry counterattack diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 362a15005c..008dd06d1e 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -34,25 +34,25 @@ return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) - return . | A.attack_hand(src, intent, flags) + return . | A.attack_hand(src, intent, flags, .) -/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags, clickchain_flags) SHOULD_NOT_SLEEP(TRUE) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND) return - if(attack_hand_speed) + if(attack_hand_speed && !(clickchain_flags & ATTACK_HAND_IGNORE_CLICKDELAY)) if(!user.CheckActionCooldown(attack_hand_speed)) return if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) . = _try_interact(user) - on_attack_hand(user, act_intent, unarmed_attack_flags) - if(attack_hand_unwieldlyness) - user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) - else if(attack_hand_is_action) - user.DelayNextAction() - return attack_hand_is_action + INVOKE_ASYNC(src, .proc/on_attack_hand, user, act_intent, unarmed_attack_flags) + if(!(clickchain_flags & ATTACK_HAND_IGNORE_ACTION)) + if(attack_hand_unwieldlyness) + user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) + else if(attack_hand_is_action) + user.DelayNextAction() /atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) @@ -62,7 +62,6 @@ return interact(user) if(can_interact(user)) return interact(user) - return FALSE /atom/proc/can_interact(mob/user) if(!user.can_interact_with(src)) @@ -92,8 +91,7 @@ else add_fingerprint(user) if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT) - return ui_interact(user) - return FALSE + ui_interact(user) /* /mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index f30fa02879..df74f8e49e 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -109,7 +109,7 @@ if(warcry) M.say("[warcry]", ignore_spam = TRUE, forced = TRUE) - return NO_AUTO_CLICKDELAY_HANDLING + return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION /obj/item/clothing/gloves/fingerless/pugilist/rapid/AltClick(mob/user) var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7) @@ -137,7 +137,7 @@ else M.SetNextAction(CLICK_CD_RAPID) - return NO_AUTO_CLICKDELAY_HANDLING + return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION /obj/item/clothing/gloves/botanic_leather name = "botanist's leather gloves" From bd645b0e564eba0f9f20203066c571e6eaf5d91e Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 15:11:34 -0700 Subject: [PATCH 091/142] WOOPS --- _maps/_basemap.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_maps/_basemap.dm b/_maps/_basemap.dm index 9bb74575f0..213211fc42 100644 --- a/_maps/_basemap.dm +++ b/_maps/_basemap.dm @@ -1,4 +1,4 @@ -#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it. +//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it. #include "map_files\generic\CentCom.dmm" From bf4b2dfbf593f26e62cfb68ef9c7c00fe521a967 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 15:59:56 -0700 Subject: [PATCH 092/142] ok --- code/modules/mob/living/carbon/human/species.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index ba6fde421d..a2e2fb0a51 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1827,6 +1827,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) return TRUE CHECK_DNA_AND_SPECIES(M) CHECK_DNA_AND_SPECIES(H) + if(!M.CheckActionCooldown()) + return + M.DelayNextAction(CLICK_CD_MELEE) if(!istype(M)) //sanity check for drones. return TRUE From 791bfabc9b5186bbfbd51ae728c55e14ea687e95 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:03:57 -0700 Subject: [PATCH 093/142] walls --- code/game/turfs/simulated/walls.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 7983e60f53..37248f814c 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -9,6 +9,8 @@ thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall + attack_hand_speed = 8 + attack_hand_is_action = TRUE baseturfs = /turf/open/floor/plating @@ -118,6 +120,7 @@ /turf/closed/wall/attack_animal(mob/living/simple_animal/M) if(!M.CheckActionCooldown(CLICK_CD_MELEE)) return + M.DelayNextAction() M.do_attack_animation(src) if((M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS)) playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) @@ -137,8 +140,6 @@ return TRUE /turf/closed/wall/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) - if(!user.CheckActionCooldown(CLICK_CD_MELEE)) - return to_chat(user, "You push the wall but nothing happens!") playsound(src, 'sound/weapons/genhit.ogg', 25, 1) add_fingerprint(user) @@ -154,6 +155,7 @@ if(!isturf(user.loc)) return //can't do this stuff whilst inside objects and such + user.DelayNextAction() add_fingerprint(user) var/turf/T = user.loc //get user's location for delay checks From cebd21696ff435b5515d5c65c01689618409f697 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:18:12 -0700 Subject: [PATCH 094/142] Update living_active_parry.dm --- code/modules/mob/living/living_active_parry.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 4fd2459e70..7c1a8e3a1c 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -59,7 +59,7 @@ return FALSE //QOL: Try to enable combat mode if it isn't already SEND_SIGNAL(src, COMSIG_ENABLE_COMBAT_MODE) - if(!SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) + if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) to_chat(src, "You must be in combat mode to parry!") return FALSE data = return_block_parry_datum(data) From 3ee5611b1de2afc28664051f7f426e97a3711c61 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:19:43 -0700 Subject: [PATCH 095/142] Update living_active_block.dm --- code/modules/mob/living/living_active_block.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/living_active_block.dm b/code/modules/mob/living/living_active_block.dm index 4211b2cfd9..94d49b85b3 100644 --- a/code/modules/mob/living/living_active_block.dm +++ b/code/modules/mob/living/living_active_block.dm @@ -97,7 +97,7 @@ return // QOL: Attempt to toggle on combat mode if it isn't already SEND_SIGNAL(src, COMSIG_ENABLE_COMBAT_MODE) - if(!SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) + if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) to_chat(src, "You must be in combat mode to actively block!") return FALSE var/datum/block_parry_data/data = I.get_block_parry_data() From d954588c9adf6d7ab85ad2ce757c2d7a4261031b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:30:50 -0700 Subject: [PATCH 096/142] Update portable_turret.dm --- .../machinery/porta_turret/portable_turret.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 1887ee46c0..6de8c71eba 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -1,4 +1,4 @@ -#define TURRET_STUN 0 +w#define TURRET_STUN 0 #define TURRET_LETHAL 1 #define POPUP_ANIM_TIME 5 @@ -17,6 +17,7 @@ active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power req_access = list(ACCESS_SEC_DOORS) power_channel = EQUIP //drains power from the EQUIPMENT channel + speed_process = TRUE var/base_icon_state = "standard" var/scan_range = 7 @@ -53,7 +54,7 @@ var/last_fired = 0 //world.time the turret last fired var/shot_delay = 15 //ticks until next shot (1.5 ?) - + var/shot_stagger = 0 // sleep() shots to stagger attacks var/check_records = 1 //checks if it can use the security records var/criminals = 1 //checks if it can shoot people on arrest @@ -436,6 +437,9 @@ else if(!always_up) popDown() // no valid targets, close the cover +/obj/machinery/porta_turret/proc/randomize_shot_stagger() + shot_stagger = rand(0, min(2 SECONDS, round(shot_delay/3, world.tick_lag))) + /obj/machinery/porta_turret/proc/tryToShootAt(list/atom/movable/targets) while(targets.len > 0) var/atom/movable/M = pick(targets) @@ -443,7 +447,6 @@ if(target(M)) return 1 - /obj/machinery/porta_turret/proc/popUp() //pops the turret up if(!anchored) return @@ -525,11 +528,14 @@ if(target) popUp() //pop the turret up if it's not already up. setDir(get_dir(base, target))//even if you can't shoot, follow the target - shootAt(target) + INVOKE_ASYNC(src, .proc/shootAt, target) return 1 return -/obj/machinery/porta_turret/proc/shootAt(atom/movable/target) +/obj/machinery/porta_turret/proc/shootAt(atom/movable/target, stagger_enabled = FALSE) + if(stagger_enabled) + randomize_shot_stagger() + sleep(shot_stagger) if(!raised) //the turret has to be raised in order to fire - makes sense, right? return From d52892f000539efad804ae32e99c6cacaa68965d Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:32:20 -0700 Subject: [PATCH 097/142] Update portable_turret.dm --- code/game/machinery/porta_turret/portable_turret.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 6de8c71eba..2a60711a81 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -1,4 +1,4 @@ -w#define TURRET_STUN 0 +#define TURRET_STUN 0 #define TURRET_LETHAL 1 #define POPUP_ANIM_TIME 5 From ea1ea6dde1d9305723c0dfff2901af558bb1c849 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:41:27 -0700 Subject: [PATCH 098/142] Update weaponry.dm --- code/game/objects/items/weaponry.dm | 692 +--------------------------- 1 file changed, 5 insertions(+), 687 deletions(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index f94140db3c..6606ca321e 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -1,4 +1,4 @@ -/obj/item/banhammer +w/obj/item/banhammer desc = "A banhammer." name = "banhammer" icon = 'icons/obj/items_and_weapons.dmi' @@ -286,6 +286,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 parry_efficiency_to_counterattack = 100 parry_efficiency_considered_successful = 65 // VERY generous parry_efficiency_perfect = 120 + parry_efficiency_perfect_override = list( + "[ATTACK_TYPE_PROJECTILE]" = 30, + ) parry_failed_stagger_duration = 3 SECONDS parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 2.5) // 7*2.5 = 17.5, 8*2.5 = 20, 9*2.5 = 22.5, 10*2.5 = 25 @@ -329,689 +332,4 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/melee/bokken/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/pen)) - var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bokken", 30) - if(new_name) - name = new_name - if(I.tool_behaviour == TOOL_WELDER) - var/new_burn = stripped_input(user, "What do you wish to burn into [src]?", "Burnt Inscription","", 140) - if(new_burn) - burned_in = new_burn - if(!burnt) - icon_state += "_burnt" - item_state += "_burnt" - burnt = TRUE - update_icon() - update_icon_state() - if(istype(I, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = I - if(!reinforced) - if(R.use(1)) - force++ - reinforced = TRUE - to_chat(user, "You slide a metal rod into [src]\'s hilt. It feels a little heftier in your hands.") - else - to_chat(user, "[src] already has a weight slid into the hilt.") - -/obj/item/melee/bokken/examine(mob/user) - . = ..() - if(quick_parry) - . += " [src] is gripped in a way to emphasize quicker parries." - if(reinforced) - . += " There's a metal rod shoved into the base." - if(burnt) - . += " Burned into the \"blade\" is [burned_in]." - -/obj/item/wirerod - name = "wired rod" - desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." - icon_state = "wiredrod" - item_state = "rods" - flags_1 = CONDUCT_1 - force = 9 - throwforce = 10 - w_class = WEIGHT_CLASS_NORMAL - custom_materials = list(/datum/material/iron=1150, /datum/material/glass=75) - attack_verb = list("hit", "bludgeoned", "whacked", "bonked") - -/obj/item/wirerod/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/shard)) - var/obj/item/spear/S = new /obj/item/spear - - remove_item_from_storage(user) - if (!user.transferItemToLoc(I, S)) - return - S.CheckParts(list(I)) - qdel(src) - - user.put_in_hands(S) - to_chat(user, "You fasten the glass shard to the top of the rod with the cable.") - - else if(istype(I, /obj/item/assembly/igniter) && !HAS_TRAIT(I, TRAIT_NODROP)) - var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod - - remove_item_from_storage(user) - - to_chat(user, "You fasten [I] to the top of the rod with the cable.") - - qdel(I) - qdel(src) - - user.put_in_hands(P) - else - return ..() - - -/obj/item/throwing_star - name = "throwing star" - desc = "An ancient weapon still used to this day, due to its ease of lodging itself into its victim's body parts." - icon_state = "throwingstar" - item_state = "eshield0" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - force = 2 - throwforce = 20 //This is never used on mobs since this has a 100% embed chance. - throw_speed = 4 - embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15) - armour_penetration = 40 - - w_class = WEIGHT_CLASS_SMALL - sharpness = IS_SHARP - custom_materials = list(/datum/material/iron=500, /datum/material/glass=500) - resistance_flags = FIRE_PROOF - -/obj/item/throwing_star/stamina - name = "shock throwing star" - desc = "An aerodynamic disc designed to cause excruciating pain when stuck inside fleeing targets, hopefully without causing fatal harm." - throwforce = 5 - embedding = list("pain_chance" = 5, "embed_chance" = 100, "fall_chance" = 0, "jostle_chance" = 10, "pain_stam_pct" = 0.8, "jostle_pain_mult" = 3) - -/obj/item/throwing_star/toy - name = "toy throwing star" - desc = "An aerodynamic disc strapped with adhesive for sticking to people, good for playing pranks and getting yourself killed by security." - sharpness = IS_BLUNT - force = 0 - throwforce = 0 - embedding = list("pain_mult" = 0, "jostle_pain_mult" = 0, "embed_chance" = 100, "fall_chance" = 0) - -/obj/item/switchblade - name = "switchblade" - icon_state = "switchblade" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - desc = "A sharp, concealable, spring-loaded knife." - flags_1 = CONDUCT_1 - force = 3 - w_class = WEIGHT_CLASS_SMALL - throwforce = 5 - throw_speed = 3 - throw_range = 6 - custom_materials = list(/datum/material/iron=12000) - hitsound = 'sound/weapons/genhit.ogg' - attack_verb = list("stubbed", "poked") - resistance_flags = FIRE_PROOF - var/extended = 0 - var/extended_force = 20 - var/extended_throwforce = 23 - var/extended_icon_state = "switchblade_ext" - var/retracted_icon_state = "switchblade" - -/obj/item/switchblade/attack_self(mob/user) - extended = !extended - playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) - if(extended) - force = extended_force - w_class = WEIGHT_CLASS_NORMAL - throwforce = extended_throwforce - icon_state = extended_icon_state - attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - hitsound = 'sound/weapons/bladeslice.ogg' - sharpness = IS_SHARP - else - force = initial(force) - w_class = WEIGHT_CLASS_SMALL - throwforce = initial(throwforce) - icon_state = retracted_icon_state - attack_verb = list("stubbed", "poked") - hitsound = 'sound/weapons/genhit.ogg' - sharpness = IS_BLUNT - -/obj/item/switchblade/suicide_act(mob/user) - user.visible_message("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!") - return (BRUTELOSS) - -/obj/item/phone - name = "red phone" - desc = "Should anything ever go wrong..." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "red_phone" - force = 3 - throwforce = 2 - throw_speed = 3 - throw_range = 4 - w_class = WEIGHT_CLASS_SMALL - attack_verb = list("called", "rang") - hitsound = 'sound/weapons/ring.ogg' - -/obj/item/phone/suicide_act(mob/user) - if(locate(/obj/structure/chair/stool) in user.loc) - user.visible_message("[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") - else - user.visible_message("[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") - return(OXYLOSS) - -/obj/item/cane - name = "cane" - desc = "A cane used by a true gentleman. Or a clown." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "cane" - item_state = "stick" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 5 - throwforce = 5 - w_class = WEIGHT_CLASS_SMALL - custom_materials = list(/datum/material/iron=50) - attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") - -/obj/item/staff - name = "wizard staff" - desc = "Apparently a staff used by the wizard." - icon = 'icons/obj/wizard.dmi' - icon_state = "staff" - lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' - force = 3 - throwforce = 5 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - armour_penetration = 100 - attack_verb = list("bludgeoned", "whacked", "disciplined") - resistance_flags = FLAMMABLE - -/obj/item/staff/broom - name = "broom" - desc = "Used for sweeping, and flying into the night while cackling. Black cat not included." - icon = 'icons/obj/wizard.dmi' - icon_state = "broom" - resistance_flags = FLAMMABLE - -/obj/item/staff/stick - name = "stick" - desc = "A great tool to drag someone else's drinks across the bar." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "cane" - item_state = "stick" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 3 - throwforce = 5 - throw_speed = 2 - throw_range = 5 - w_class = WEIGHT_CLASS_SMALL - -/obj/item/ectoplasm - name = "ectoplasm" - desc = "Spooky." - gender = PLURAL - icon = 'icons/obj/wizard.dmi' - icon_state = "ectoplasm" - -/obj/item/ectoplasm/suicide_act(mob/user) - user.visible_message("[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!") - return (OXYLOSS) - -/obj/item/mounted_chainsaw - name = "mounted chainsaw" - desc = "A chainsaw that has replaced your arm." - icon_state = "chainsaw_on" - item_state = "mounted_chainsaw" - lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' - item_flags = ABSTRACT | DROPDEL - w_class = WEIGHT_CLASS_BULKY - force = 24 - throwforce = 0 - throw_range = 0 - throw_speed = 0 - sharpness = IS_SHARP - attack_verb = list("sawed", "torn", "cut", "chopped", "diced") - hitsound = 'sound/weapons/chainsawhit.ogg' - total_mass = TOTAL_MASS_HAND_REPLACEMENT - tool_behaviour = TOOL_SAW - toolspeed = 1 - -/obj/item/mounted_chainsaw/Initialize() - . = ..() - ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT) - -/obj/item/mounted_chainsaw/Destroy() - var/obj/item/bodypart/part - new /obj/item/chainsaw(get_turf(src)) - if(iscarbon(loc)) - var/mob/living/carbon/holder = loc - var/index = holder.get_held_index_of_item(src) - if(index) - part = holder.hand_bodyparts[index] - . = ..() - if(part) - part.drop_limb() - -/obj/item/statuebust - name = "bust" - desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it - icon = 'icons/obj/statue.dmi' - icon_state = "bust" - force = 15 - throwforce = 10 - throw_speed = 5 - throw_range = 2 - attack_verb = list("busted") - var/impressiveness = 45 - -/obj/item/statuebust/Initialize() - . = ..() - AddElement(/datum/element/art, impressiveness) - addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0) - -/obj/item/tailclub - name = "tail club" - desc = "For the beating to death of lizards with their own tails." - icon_state = "tailclub" - force = 14 - throwforce = 1 // why are you throwing a club do you even weapon - throw_speed = 1 - throw_range = 1 - attack_verb = list("clubbed", "bludgeoned") - -/obj/item/melee/chainofcommand/tailwhip - name = "liz o' nine tails" - desc = "A whip fashioned from the severed tails of lizards." - icon_state = "tailwhip" - item_flags = NONE - -/obj/item/melee/chainofcommand/tailwhip/kitty - name = "cat o' nine tails" - desc = "A whip fashioned from the severed tails of cats." - icon_state = "catwhip" - -/obj/item/melee/skateboard - name = "improvised skateboard" - desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon." - icon_state = "skateboard" - item_state = "skateboard" - force = 12 - throwforce = 4 - w_class = WEIGHT_CLASS_NORMAL - attack_verb = list("smacked", "whacked", "slammed", "smashed") - ///The vehicle counterpart for the board - var/board_item_type = /obj/vehicle/ridden/scooter/skateboard - -/obj/item/melee/skateboard/attack_self(mob/user) - if(!user.canUseTopic(src, TRUE, FALSE, TRUE)) - return - var/obj/vehicle/ridden/scooter/skateboard/S = new board_item_type(get_turf(user)) - S.buckle_mob(user) - qdel(src) - -/obj/item/melee/skateboard/pro - name = "skateboard" - desc = "A RaDSTORMz brand professional skateboard. It looks sturdy and well made." - icon_state = "skateboard2" - item_state = "skateboard2" - board_item_type = /obj/vehicle/ridden/scooter/skateboard/pro - custom_premium_price = 500 - -/obj/item/melee/skateboard/hoverboard - name = "hoverboard" - desc = "A blast from the past, so retro!" - icon_state = "hoverboard_red" - item_state = "hoverboard_red" - board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard - custom_premium_price = 2015 - -/obj/item/melee/skateboard/hoverboard/admin - name = "\improper Board Of Directors" - desc = "The engineering complexity of a spaceship concentrated inside of a board. Just as expensive, too." - icon_state = "hoverboard_nt" - item_state = "hoverboard_nt" - board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard/admin - -/obj/item/melee/baseball_bat - name = "baseball bat" - desc = "There ain't a skull in the league that can withstand a swatter." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "baseball_bat" - item_state = "baseball_bat" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 10 - wound_bonus = -10 - throwforce = 12 - attack_verb = list("beat", "smacked") - custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5) - w_class = WEIGHT_CLASS_BULKY - var/homerun_ready = 0 - var/homerun_able = 0 - total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google - -/obj/item/melee/baseball_bat/chaplain - name = "blessed baseball bat" - desc = "There ain't a cult in the league that can withstand a swatter." - force = 14 - throwforce = 14 - obj_flags = UNIQUE_RENAME - var/chaplain_spawnable = TRUE - total_mass = TOTAL_MASS_MEDIEVAL_WEAPON - -/obj/item/melee/baseball_bat/chaplain/Initialize() - . = ..() - AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE) - -/obj/item/melee/baseball_bat/homerun - name = "home run bat" - desc = "This thing looks dangerous... Dangerously good at baseball, that is." - homerun_able = 1 - -/obj/item/melee/baseball_bat/attack_self(mob/user) - if(!homerun_able) - ..() - return - if(homerun_ready) - to_chat(user, "You're already ready to do a home run!") - ..() - return - to_chat(user, "You begin gathering strength...") - playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1) - if(do_after(user, 90, target = src)) - to_chat(user, "You gather power! Time for a home run!") - homerun_ready = 1 - ..() - -/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user) - . = ..() - var/atom/throw_target = get_edge_target_turf(target, user.dir) - if(homerun_ready) - user.visible_message("It's a home run!") - target.throw_at(throw_target, rand(8,10), 14, user) - target.ex_act(EXPLODE_HEAVY) - playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1) - homerun_ready = 0 - return - else if(!target.anchored) - var/whack_speed = (prob(60) ? 1 : 4) - target.throw_at(throw_target, rand(1, 2), whack_speed, user) // sorry friends, 7 speed batting caused wounds to absolutely delete whoever you knocked your target into (and said target) - -/obj/item/melee/baseball_bat/ablative - name = "metal baseball bat" - desc = "This bat is made of highly reflective, highly armored material." - icon_state = "baseball_bat_metal" - item_state = "baseball_bat_metal" - force = 12 - throwforce = 15 - -/obj/item/melee/baseball_bat/ablative/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) - //some day this will reflect thrown items instead of lasers - if(is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE)) - var/turf = get_turf(src) - playsound(turf, pick('sound/weapons/effects/batreflect1.ogg', 'sound/weapons/effects/batreflect2.ogg'), 50, 1) - return BLOCK_SUCCESS | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL | BLOCK_REDIRECTED - return ..() - -/obj/item/melee/baseball_bat/ablative/syndi - name = "syndicate major league bat" - desc = "A metal bat made by the syndicate for the major league team." - force = 18 //Spear damage... - throwforce = 30 - -/obj/item/melee/flyswatter - name = "flyswatter" - desc = "Useful for killing insects of all sizes." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "flyswatter" - item_state = "flyswatter" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 1 - throwforce = 1 - attack_verb = list("swatted", "smacked") - hitsound = 'sound/effects/snap.ogg' - w_class = WEIGHT_CLASS_SMALL - //Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. - var/list/strong_against - var/list/spider_panic - -/obj/item/melee/flyswatter/Initialize() - . = ..() - strong_against = typecacheof(list( - /mob/living/simple_animal/hostile/poison/bees/, - /mob/living/simple_animal/butterfly, - /mob/living/simple_animal/cockroach, - /obj/item/queen_bee - )) - spider_panic = typecacheof(list( - /mob/living/simple_animal/banana_spider, - /mob/living/simple_animal/hostile/poison/giant_spider, - )) - -/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag) - . = ..() - if(proximity_flag) - if(is_type_in_typecache(target, strong_against)) - new /obj/effect/decal/cleanable/insectguts(target.drop_location()) - to_chat(user, "You easily splat the [target].") - if(istype(target, /mob/living/)) - var/mob/living/bug = target - bug.death(1) - if(is_type_in_typecache(target, spider_panic)) - to_chat(user, "You easily land a critical blow on the [target].") - if(istype(target, /mob/living/)) - var/mob/living/bug = target - bug.adjustBruteLoss(35) //What kinda mad man would go into melee with a spider?! - else - qdel(target) - -/obj/item/circlegame - name = "circled hand" - desc = "If somebody looks at this while it's below your waist, you get to bop them." - icon_state = "madeyoulook" - force = 0 - throwforce = 0 - item_flags = DROPDEL | ABSTRACT - attack_verb = list("bopped") - -/obj/item/circlegame/Initialize() - . = ..() - var/mob/living/owner = loc - if(!istype(owner)) - return - RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/ownerExamined) - -/obj/item/circlegame/Destroy() - var/mob/owner = loc - if(istype(owner)) - UnregisterSignal(owner, COMSIG_PARENT_EXAMINE) - return ..() - -/obj/item/circlegame/dropped(mob/user) - UnregisterSignal(user, COMSIG_PARENT_EXAMINE) //loc will have changed by the time this is called, so Destroy() can't catch it - // this is a dropdel item. - return ..() - -/// Stage 1: The mistake is made -/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker) - if(!istype(sucker) || !in_range(owner, sucker)) - return - addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4) - -/// Stage 2: Fear sets in -/obj/item/circlegame/proc/waitASecond(mob/living/owner, mob/living/sucker) - if(QDELETED(sucker) || QDELETED(src) || QDELETED(owner)) - return - - if(owner == sucker) // big mood - to_chat(owner, "Wait a second... you just looked at your own [src.name]!") - addtimer(CALLBACK(src, .proc/selfGottem, owner), 10) - else - to_chat(sucker, "Wait a second... was that a-") - addtimer(CALLBACK(src, .proc/GOTTEM, owner, sucker), 6) - -/// Stage 3A: We face our own failures -/obj/item/circlegame/proc/selfGottem(mob/living/owner) - if(QDELETED(src) || QDELETED(owner)) - return - - playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1) - owner.visible_message("[owner] shamefully bops [owner.p_them()]self with [owner.p_their()] [src.name].", "You shamefully bop yourself with your [src.name].", \ - "You hear a dull thud!") - log_combat(owner, owner, "bopped", src.name, "(self)") - owner.do_attack_animation(owner) - owner.apply_damage(100, STAMINA) - owner.Knockdown(10) - qdel(src) - -/// Stage 3B: We face our reckoning (unless we moved away or they're incapacitated) -/obj/item/circlegame/proc/GOTTEM(mob/living/owner, mob/living/sucker) - if(QDELETED(sucker)) - return - - if(QDELETED(src) || QDELETED(owner)) - to_chat(sucker, "Nevermind... must've been your imagination...") - return - - if(!in_range(owner, sucker) || !(owner.mobility_flags & MOBILITY_USE)) - to_chat(sucker, "Phew... you moved away before [owner] noticed you saw [owner.p_their()] [src.name]...") - return - - to_chat(owner, "[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!") - to_chat(sucker, "[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!") - - playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1) - owner.do_attack_animation(sucker) - - if(HAS_TRAIT(owner, TRAIT_HULK)) - owner.visible_message("[owner] bops [sucker] with [owner.p_their()] [src.name] much harder than intended, sending [sucker.p_them()] flying!", \ - "You bop [sucker] with your [src.name] much harder than intended, sending [sucker.p_them()] flying!", "You hear a sickening sound of flesh hitting flesh!", ignored_mobs=list(sucker)) - to_chat(sucker, "[owner] bops you incredibly hard with [owner.p_their()] [src.name], sending you flying!") - sucker.apply_damage(50, STAMINA) - sucker.Knockdown(50) - log_combat(owner, sucker, "bopped", src.name, "(setup- Hulk)") - var/atom/throw_target = get_edge_target_turf(sucker, owner.dir) - sucker.throw_at(throw_target, 6, 3, owner) - else - owner.visible_message("[owner] bops [sucker] with [owner.p_their()] [src.name]!", "You bop [sucker] with your [src.name]!", \ - "You hear a dull thud!", ignored_mobs=list(sucker)) - sucker.apply_damage(15, STAMINA) - log_combat(owner, sucker, "bopped", src.name, "(setup)") - to_chat(sucker, "[owner] bops you with [owner.p_their()] [src.name]!") - qdel(src) - -/obj/item/slapper - name = "slapper" - desc = "This is how real men fight." - icon_state = "latexballon" - item_state = "nothing" - force = 0 - throwforce = 0 - item_flags = DROPDEL | ABSTRACT - attack_verb = list("slapped") - hitsound = 'sound/effects/snap.ogg' - -/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user) - if(ishuman(M)) - var/mob/living/carbon/human/L = M - if(L && L.dna && L.dna.species) - L.dna.species.stop_wagging_tail(M) - if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD))) - user.do_attack_animation(M) - playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1) - user.visible_message("[user] slaps [M]!", - "You slap [M]!",\ - "You hear a slap.") - return - else - ..() - -/obj/item/proc/can_trigger_gun(mob/living/user) - if(!user.can_use_guns(src)) - return FALSE - return TRUE - -/obj/item/extendohand - name = "extendo-hand" - desc = "Futuristic tech has allowed these classic spring-boxing toys to essentially act as a fully functional hand-operated hand prosthetic." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "extendohand" - item_state = "extendohand" - lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - force = 0 - throwforce = 5 - reach = 2 - -/obj/item/extendohand/acme - name = "\improper ACME Extendo-Hand" - desc = "A novelty extendo-hand produced by the ACME corporation. Originally designed to knock out roadrunners." - -/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user) - var/dist = get_dist(M, user) - if(dist < reach) - to_chat(user, "[M] is too close to use [src] on.") - return - M.attack_hand(user) - -//HF blade - -/obj/item/vibro_weapon - icon_state = "hfrequency0" - lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' - righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - name = "vibro sword" - desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire." - armour_penetration = 100 - block_chance = 40 - throwforce = 20 - throw_speed = 4 - sharpness = IS_SHARP - attack_verb = list("cut", "sliced", "diced") - w_class = WEIGHT_CLASS_BULKY - slot_flags = ITEM_SLOT_BACK - hitsound = 'sound/weapons/bladeslice.ogg' - var/wielded = FALSE // track wielded status on item - -/obj/item/vibro_weapon/Initialize() - . = ..() - RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield) - RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield) - -/obj/item/vibro_weapon/ComponentInitialize() - . = ..() - AddComponent(/datum/component/butchering, 20, 105) - AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="hfrequency1") - AddElement(/datum/element/sword_point) - -/// triggered on wield of two handed item -/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user) - wielded = TRUE - -/// triggered on unwield of two handed item -/obj/item/vibro_weapon/proc/on_unwield(obj/item/source, mob/user) - wielded = FALSE - -/obj/item/vibro_weapon/update_icon_state() - icon_state = "hfrequency0" - -/obj/item/vibro_weapon/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) - if(wielded) - final_block_chance *= 2 - if(wielded || !(attack_type & ATTACK_TYPE_PROJECTILE)) - if(prob(final_block_chance)) - if(attack_type & ATTACK_TYPE_PROJECTILE) - owner.visible_message("[owner] deflects [attack_text] with [src]!") - playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) - block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT - return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL - else - owner.visible_message("[owner] parries [attack_text] with [src]!") - return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL - return NONE + var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bo From 21988d47f5654e3bb0dc8ab17bd328a447a8a741 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:42:51 -0700 Subject: [PATCH 099/142] woops --- code/game/objects/items/weaponry.dm | 689 +++++++++++++++++++++++++++- 1 file changed, 687 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 6606ca321e..04cdc85b19 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -1,4 +1,4 @@ -w/obj/item/banhammer +/obj/item/banhammer desc = "A banhammer." name = "banhammer" icon = 'icons/obj/items_and_weapons.dmi' @@ -332,4 +332,689 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/melee/bokken/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/pen)) - var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bo + var/new_name = stripped_input(user, "What do you wish to name [src]?", "New Name", "bokken", 30) + if(new_name) + name = new_name + if(I.tool_behaviour == TOOL_WELDER) + var/new_burn = stripped_input(user, "What do you wish to burn into [src]?", "Burnt Inscription","", 140) + if(new_burn) + burned_in = new_burn + if(!burnt) + icon_state += "_burnt" + item_state += "_burnt" + burnt = TRUE + update_icon() + update_icon_state() + if(istype(I, /obj/item/stack/rods)) + var/obj/item/stack/rods/R = I + if(!reinforced) + if(R.use(1)) + force++ + reinforced = TRUE + to_chat(user, "You slide a metal rod into [src]\'s hilt. It feels a little heftier in your hands.") + else + to_chat(user, "[src] already has a weight slid into the hilt.") + +/obj/item/melee/bokken/examine(mob/user) + . = ..() + if(quick_parry) + . += " [src] is gripped in a way to emphasize quicker parries." + if(reinforced) + . += " There's a metal rod shoved into the base." + if(burnt) + . += " Burned into the \"blade\" is [burned_in]." + +/obj/item/wirerod + name = "wired rod" + desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." + icon_state = "wiredrod" + item_state = "rods" + flags_1 = CONDUCT_1 + force = 9 + throwforce = 10 + w_class = WEIGHT_CLASS_NORMAL + custom_materials = list(/datum/material/iron=1150, /datum/material/glass=75) + attack_verb = list("hit", "bludgeoned", "whacked", "bonked") + +/obj/item/wirerod/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/shard)) + var/obj/item/spear/S = new /obj/item/spear + + remove_item_from_storage(user) + if (!user.transferItemToLoc(I, S)) + return + S.CheckParts(list(I)) + qdel(src) + + user.put_in_hands(S) + to_chat(user, "You fasten the glass shard to the top of the rod with the cable.") + + else if(istype(I, /obj/item/assembly/igniter) && !HAS_TRAIT(I, TRAIT_NODROP)) + var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod + + remove_item_from_storage(user) + + to_chat(user, "You fasten [I] to the top of the rod with the cable.") + + qdel(I) + qdel(src) + + user.put_in_hands(P) + else + return ..() + + +/obj/item/throwing_star + name = "throwing star" + desc = "An ancient weapon still used to this day, due to its ease of lodging itself into its victim's body parts." + icon_state = "throwingstar" + item_state = "eshield0" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + force = 2 + throwforce = 20 //This is never used on mobs since this has a 100% embed chance. + throw_speed = 4 + embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15) + armour_penetration = 40 + + w_class = WEIGHT_CLASS_SMALL + sharpness = IS_SHARP + custom_materials = list(/datum/material/iron=500, /datum/material/glass=500) + resistance_flags = FIRE_PROOF + +/obj/item/throwing_star/stamina + name = "shock throwing star" + desc = "An aerodynamic disc designed to cause excruciating pain when stuck inside fleeing targets, hopefully without causing fatal harm." + throwforce = 5 + embedding = list("pain_chance" = 5, "embed_chance" = 100, "fall_chance" = 0, "jostle_chance" = 10, "pain_stam_pct" = 0.8, "jostle_pain_mult" = 3) + +/obj/item/throwing_star/toy + name = "toy throwing star" + desc = "An aerodynamic disc strapped with adhesive for sticking to people, good for playing pranks and getting yourself killed by security." + sharpness = IS_BLUNT + force = 0 + throwforce = 0 + embedding = list("pain_mult" = 0, "jostle_pain_mult" = 0, "embed_chance" = 100, "fall_chance" = 0) + +/obj/item/switchblade + name = "switchblade" + icon_state = "switchblade" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + desc = "A sharp, concealable, spring-loaded knife." + flags_1 = CONDUCT_1 + force = 3 + w_class = WEIGHT_CLASS_SMALL + throwforce = 5 + throw_speed = 3 + throw_range = 6 + custom_materials = list(/datum/material/iron=12000) + hitsound = 'sound/weapons/genhit.ogg' + attack_verb = list("stubbed", "poked") + resistance_flags = FIRE_PROOF + var/extended = 0 + var/extended_force = 20 + var/extended_throwforce = 23 + var/extended_icon_state = "switchblade_ext" + var/retracted_icon_state = "switchblade" + +/obj/item/switchblade/attack_self(mob/user) + extended = !extended + playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) + if(extended) + force = extended_force + w_class = WEIGHT_CLASS_NORMAL + throwforce = extended_throwforce + icon_state = extended_icon_state + attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' + sharpness = IS_SHARP + else + force = initial(force) + w_class = WEIGHT_CLASS_SMALL + throwforce = initial(throwforce) + icon_state = retracted_icon_state + attack_verb = list("stubbed", "poked") + hitsound = 'sound/weapons/genhit.ogg' + sharpness = IS_BLUNT + +/obj/item/switchblade/suicide_act(mob/user) + user.visible_message("[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!") + return (BRUTELOSS) + +/obj/item/phone + name = "red phone" + desc = "Should anything ever go wrong..." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "red_phone" + force = 3 + throwforce = 2 + throw_speed = 3 + throw_range = 4 + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("called", "rang") + hitsound = 'sound/weapons/ring.ogg' + +/obj/item/phone/suicide_act(mob/user) + if(locate(/obj/structure/chair/stool) in user.loc) + user.visible_message("[user] begins to tie a noose with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") + else + user.visible_message("[user] is strangling [user.p_them()]self with [src]'s cord! It looks like [user.p_theyre()] trying to commit suicide!") + return(OXYLOSS) + +/obj/item/cane + name = "cane" + desc = "A cane used by a true gentleman. Or a clown." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "cane" + item_state = "stick" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 5 + throwforce = 5 + w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/iron=50) + attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") + +/obj/item/staff + name = "wizard staff" + desc = "Apparently a staff used by the wizard." + icon = 'icons/obj/wizard.dmi' + icon_state = "staff" + lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' + force = 3 + throwforce = 5 + throw_speed = 2 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + armour_penetration = 100 + attack_verb = list("bludgeoned", "whacked", "disciplined") + resistance_flags = FLAMMABLE + +/obj/item/staff/broom + name = "broom" + desc = "Used for sweeping, and flying into the night while cackling. Black cat not included." + icon = 'icons/obj/wizard.dmi' + icon_state = "broom" + resistance_flags = FLAMMABLE + +/obj/item/staff/stick + name = "stick" + desc = "A great tool to drag someone else's drinks across the bar." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "cane" + item_state = "stick" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 3 + throwforce = 5 + throw_speed = 2 + throw_range = 5 + w_class = WEIGHT_CLASS_SMALL + +/obj/item/ectoplasm + name = "ectoplasm" + desc = "Spooky." + gender = PLURAL + icon = 'icons/obj/wizard.dmi' + icon_state = "ectoplasm" + +/obj/item/ectoplasm/suicide_act(mob/user) + user.visible_message("[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!") + return (OXYLOSS) + +/obj/item/mounted_chainsaw + name = "mounted chainsaw" + desc = "A chainsaw that has replaced your arm." + icon_state = "chainsaw_on" + item_state = "mounted_chainsaw" + lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' + item_flags = ABSTRACT | DROPDEL + w_class = WEIGHT_CLASS_BULKY + force = 24 + throwforce = 0 + throw_range = 0 + throw_speed = 0 + sharpness = IS_SHARP + attack_verb = list("sawed", "torn", "cut", "chopped", "diced") + hitsound = 'sound/weapons/chainsawhit.ogg' + total_mass = TOTAL_MASS_HAND_REPLACEMENT + tool_behaviour = TOOL_SAW + toolspeed = 1 + +/obj/item/mounted_chainsaw/Initialize() + . = ..() + ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT) + +/obj/item/mounted_chainsaw/Destroy() + var/obj/item/bodypart/part + new /obj/item/chainsaw(get_turf(src)) + if(iscarbon(loc)) + var/mob/living/carbon/holder = loc + var/index = holder.get_held_index_of_item(src) + if(index) + part = holder.hand_bodyparts[index] + . = ..() + if(part) + part.drop_limb() + +/obj/item/statuebust + name = "bust" + desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it + icon = 'icons/obj/statue.dmi' + icon_state = "bust" + force = 15 + throwforce = 10 + throw_speed = 5 + throw_range = 2 + attack_verb = list("busted") + var/impressiveness = 45 + +/obj/item/statuebust/Initialize() + . = ..() + AddElement(/datum/element/art, impressiveness) + addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0) + +/obj/item/tailclub + name = "tail club" + desc = "For the beating to death of lizards with their own tails." + icon_state = "tailclub" + force = 14 + throwforce = 1 // why are you throwing a club do you even weapon + throw_speed = 1 + throw_range = 1 + attack_verb = list("clubbed", "bludgeoned") + +/obj/item/melee/chainofcommand/tailwhip + name = "liz o' nine tails" + desc = "A whip fashioned from the severed tails of lizards." + icon_state = "tailwhip" + item_flags = NONE + +/obj/item/melee/chainofcommand/tailwhip/kitty + name = "cat o' nine tails" + desc = "A whip fashioned from the severed tails of cats." + icon_state = "catwhip" + +/obj/item/melee/skateboard + name = "improvised skateboard" + desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon." + icon_state = "skateboard" + item_state = "skateboard" + force = 12 + throwforce = 4 + w_class = WEIGHT_CLASS_NORMAL + attack_verb = list("smacked", "whacked", "slammed", "smashed") + ///The vehicle counterpart for the board + var/board_item_type = /obj/vehicle/ridden/scooter/skateboard + +/obj/item/melee/skateboard/attack_self(mob/user) + if(!user.canUseTopic(src, TRUE, FALSE, TRUE)) + return + var/obj/vehicle/ridden/scooter/skateboard/S = new board_item_type(get_turf(user)) + S.buckle_mob(user) + qdel(src) + +/obj/item/melee/skateboard/pro + name = "skateboard" + desc = "A RaDSTORMz brand professional skateboard. It looks sturdy and well made." + icon_state = "skateboard2" + item_state = "skateboard2" + board_item_type = /obj/vehicle/ridden/scooter/skateboard/pro + custom_premium_price = 500 + +/obj/item/melee/skateboard/hoverboard + name = "hoverboard" + desc = "A blast from the past, so retro!" + icon_state = "hoverboard_red" + item_state = "hoverboard_red" + board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard + custom_premium_price = 2015 + +/obj/item/melee/skateboard/hoverboard/admin + name = "\improper Board Of Directors" + desc = "The engineering complexity of a spaceship concentrated inside of a board. Just as expensive, too." + icon_state = "hoverboard_nt" + item_state = "hoverboard_nt" + board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard/admin + +/obj/item/melee/baseball_bat + name = "baseball bat" + desc = "There ain't a skull in the league that can withstand a swatter." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "baseball_bat" + item_state = "baseball_bat" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 10 + wound_bonus = -10 + throwforce = 12 + attack_verb = list("beat", "smacked") + custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5) + w_class = WEIGHT_CLASS_BULKY + var/homerun_ready = 0 + var/homerun_able = 0 + total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google + +/obj/item/melee/baseball_bat/chaplain + name = "blessed baseball bat" + desc = "There ain't a cult in the league that can withstand a swatter." + force = 14 + throwforce = 14 + obj_flags = UNIQUE_RENAME + var/chaplain_spawnable = TRUE + total_mass = TOTAL_MASS_MEDIEVAL_WEAPON + +/obj/item/melee/baseball_bat/chaplain/Initialize() + . = ..() + AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE) + +/obj/item/melee/baseball_bat/homerun + name = "home run bat" + desc = "This thing looks dangerous... Dangerously good at baseball, that is." + homerun_able = 1 + +/obj/item/melee/baseball_bat/attack_self(mob/user) + if(!homerun_able) + ..() + return + if(homerun_ready) + to_chat(user, "You're already ready to do a home run!") + ..() + return + to_chat(user, "You begin gathering strength...") + playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1) + if(do_after(user, 90, target = src)) + to_chat(user, "You gather power! Time for a home run!") + homerun_ready = 1 + ..() + +/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user) + . = ..() + var/atom/throw_target = get_edge_target_turf(target, user.dir) + if(homerun_ready) + user.visible_message("It's a home run!") + target.throw_at(throw_target, rand(8,10), 14, user) + target.ex_act(EXPLODE_HEAVY) + playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1) + homerun_ready = 0 + return + else if(!target.anchored) + var/whack_speed = (prob(60) ? 1 : 4) + target.throw_at(throw_target, rand(1, 2), whack_speed, user) // sorry friends, 7 speed batting caused wounds to absolutely delete whoever you knocked your target into (and said target) + +/obj/item/melee/baseball_bat/ablative + name = "metal baseball bat" + desc = "This bat is made of highly reflective, highly armored material." + icon_state = "baseball_bat_metal" + item_state = "baseball_bat_metal" + force = 12 + throwforce = 15 + +/obj/item/melee/baseball_bat/ablative/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) + //some day this will reflect thrown items instead of lasers + if(is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE)) + var/turf = get_turf(src) + playsound(turf, pick('sound/weapons/effects/batreflect1.ogg', 'sound/weapons/effects/batreflect2.ogg'), 50, 1) + return BLOCK_SUCCESS | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL | BLOCK_REDIRECTED + return ..() + +/obj/item/melee/baseball_bat/ablative/syndi + name = "syndicate major league bat" + desc = "A metal bat made by the syndicate for the major league team." + force = 18 //Spear damage... + throwforce = 30 + +/obj/item/melee/flyswatter + name = "flyswatter" + desc = "Useful for killing insects of all sizes." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "flyswatter" + item_state = "flyswatter" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 1 + throwforce = 1 + attack_verb = list("swatted", "smacked") + hitsound = 'sound/effects/snap.ogg' + w_class = WEIGHT_CLASS_SMALL + //Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. + var/list/strong_against + var/list/spider_panic + +/obj/item/melee/flyswatter/Initialize() + . = ..() + strong_against = typecacheof(list( + /mob/living/simple_animal/hostile/poison/bees/, + /mob/living/simple_animal/butterfly, + /mob/living/simple_animal/cockroach, + /obj/item/queen_bee + )) + spider_panic = typecacheof(list( + /mob/living/simple_animal/banana_spider, + /mob/living/simple_animal/hostile/poison/giant_spider, + )) + +/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag) + . = ..() + if(proximity_flag) + if(is_type_in_typecache(target, strong_against)) + new /obj/effect/decal/cleanable/insectguts(target.drop_location()) + to_chat(user, "You easily splat the [target].") + if(istype(target, /mob/living/)) + var/mob/living/bug = target + bug.death(1) + if(is_type_in_typecache(target, spider_panic)) + to_chat(user, "You easily land a critical blow on the [target].") + if(istype(target, /mob/living/)) + var/mob/living/bug = target + bug.adjustBruteLoss(35) //What kinda mad man would go into melee with a spider?! + else + qdel(target) + +/obj/item/circlegame + name = "circled hand" + desc = "If somebody looks at this while it's below your waist, you get to bop them." + icon_state = "madeyoulook" + force = 0 + throwforce = 0 + item_flags = DROPDEL | ABSTRACT + attack_verb = list("bopped") + +/obj/item/circlegame/Initialize() + . = ..() + var/mob/living/owner = loc + if(!istype(owner)) + return + RegisterSignal(owner, COMSIG_PARENT_EXAMINE, .proc/ownerExamined) + +/obj/item/circlegame/Destroy() + var/mob/owner = loc + if(istype(owner)) + UnregisterSignal(owner, COMSIG_PARENT_EXAMINE) + return ..() + +/obj/item/circlegame/dropped(mob/user) + UnregisterSignal(user, COMSIG_PARENT_EXAMINE) //loc will have changed by the time this is called, so Destroy() can't catch it + // this is a dropdel item. + return ..() + +/// Stage 1: The mistake is made +/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker) + if(!istype(sucker) || !in_range(owner, sucker)) + return + addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4) + +/// Stage 2: Fear sets in +/obj/item/circlegame/proc/waitASecond(mob/living/owner, mob/living/sucker) + if(QDELETED(sucker) || QDELETED(src) || QDELETED(owner)) + return + + if(owner == sucker) // big mood + to_chat(owner, "Wait a second... you just looked at your own [src.name]!") + addtimer(CALLBACK(src, .proc/selfGottem, owner), 10) + else + to_chat(sucker, "Wait a second... was that a-") + addtimer(CALLBACK(src, .proc/GOTTEM, owner, sucker), 6) + +/// Stage 3A: We face our own failures +/obj/item/circlegame/proc/selfGottem(mob/living/owner) + if(QDELETED(src) || QDELETED(owner)) + return + + playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1) + owner.visible_message("[owner] shamefully bops [owner.p_them()]self with [owner.p_their()] [src.name].", "You shamefully bop yourself with your [src.name].", \ + "You hear a dull thud!") + log_combat(owner, owner, "bopped", src.name, "(self)") + owner.do_attack_animation(owner) + owner.apply_damage(100, STAMINA) + owner.Knockdown(10) + qdel(src) + +/// Stage 3B: We face our reckoning (unless we moved away or they're incapacitated) +/obj/item/circlegame/proc/GOTTEM(mob/living/owner, mob/living/sucker) + if(QDELETED(sucker)) + return + + if(QDELETED(src) || QDELETED(owner)) + to_chat(sucker, "Nevermind... must've been your imagination...") + return + + if(!in_range(owner, sucker) || !(owner.mobility_flags & MOBILITY_USE)) + to_chat(sucker, "Phew... you moved away before [owner] noticed you saw [owner.p_their()] [src.name]...") + return + + to_chat(owner, "[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!") + to_chat(sucker, "[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!") + + playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1) + owner.do_attack_animation(sucker) + + if(HAS_TRAIT(owner, TRAIT_HULK)) + owner.visible_message("[owner] bops [sucker] with [owner.p_their()] [src.name] much harder than intended, sending [sucker.p_them()] flying!", \ + "You bop [sucker] with your [src.name] much harder than intended, sending [sucker.p_them()] flying!", "You hear a sickening sound of flesh hitting flesh!", ignored_mobs=list(sucker)) + to_chat(sucker, "[owner] bops you incredibly hard with [owner.p_their()] [src.name], sending you flying!") + sucker.apply_damage(50, STAMINA) + sucker.Knockdown(50) + log_combat(owner, sucker, "bopped", src.name, "(setup- Hulk)") + var/atom/throw_target = get_edge_target_turf(sucker, owner.dir) + sucker.throw_at(throw_target, 6, 3, owner) + else + owner.visible_message("[owner] bops [sucker] with [owner.p_their()] [src.name]!", "You bop [sucker] with your [src.name]!", \ + "You hear a dull thud!", ignored_mobs=list(sucker)) + sucker.apply_damage(15, STAMINA) + log_combat(owner, sucker, "bopped", src.name, "(setup)") + to_chat(sucker, "[owner] bops you with [owner.p_their()] [src.name]!") + qdel(src) + +/obj/item/slapper + name = "slapper" + desc = "This is how real men fight." + icon_state = "latexballon" + item_state = "nothing" + force = 0 + throwforce = 0 + item_flags = DROPDEL | ABSTRACT + attack_verb = list("slapped") + hitsound = 'sound/effects/snap.ogg' + +/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user) + if(ishuman(M)) + var/mob/living/carbon/human/L = M + if(L && L.dna && L.dna.species) + L.dna.species.stop_wagging_tail(M) + if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD))) + user.do_attack_animation(M) + playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1) + user.visible_message("[user] slaps [M]!", + "You slap [M]!",\ + "You hear a slap.") + return + else + ..() + +/obj/item/proc/can_trigger_gun(mob/living/user) + if(!user.can_use_guns(src)) + return FALSE + return TRUE + +/obj/item/extendohand + name = "extendo-hand" + desc = "Futuristic tech has allowed these classic spring-boxing toys to essentially act as a fully functional hand-operated hand prosthetic." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "extendohand" + item_state = "extendohand" + lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' + force = 0 + throwforce = 5 + reach = 2 + +/obj/item/extendohand/acme + name = "\improper ACME Extendo-Hand" + desc = "A novelty extendo-hand produced by the ACME corporation. Originally designed to knock out roadrunners." + +/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user) + var/dist = get_dist(M, user) + if(dist < reach) + to_chat(user, "[M] is too close to use [src] on.") + return + M.attack_hand(user) + +//HF blade + +/obj/item/vibro_weapon + icon_state = "hfrequency0" + lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' + name = "vibro sword" + desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire." + armour_penetration = 100 + block_chance = 40 + throwforce = 20 + throw_speed = 4 + sharpness = IS_SHARP + attack_verb = list("cut", "sliced", "diced") + w_class = WEIGHT_CLASS_BULKY + slot_flags = ITEM_SLOT_BACK + hitsound = 'sound/weapons/bladeslice.ogg' + var/wielded = FALSE // track wielded status on item + +/obj/item/vibro_weapon/Initialize() + . = ..() + RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield) + RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield) + +/obj/item/vibro_weapon/ComponentInitialize() + . = ..() + AddComponent(/datum/component/butchering, 20, 105) + AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="hfrequency1") + AddElement(/datum/element/sword_point) + +/// triggered on wield of two handed item +/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user) + wielded = TRUE + +/// triggered on unwield of two handed item +/obj/item/vibro_weapon/proc/on_unwield(obj/item/source, mob/user) + wielded = FALSE + +/obj/item/vibro_weapon/update_icon_state() + icon_state = "hfrequency0" + +/obj/item/vibro_weapon/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) + if(wielded) + final_block_chance *= 2 + if(wielded || !(attack_type & ATTACK_TYPE_PROJECTILE)) + if(prob(final_block_chance)) + if(attack_type & ATTACK_TYPE_PROJECTILE) + owner.visible_message("[owner] deflects [attack_text] with [src]!") + playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) + block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT + return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL + else + owner.visible_message("[owner] parries [attack_text] with [src]!") + return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL + return NONE From 349874e51285520c4e60ec3f418b55f166cc144e Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:49:47 -0700 Subject: [PATCH 100/142] haha --- code/game/objects/items/melee/energy.dm | 6 ++++++ code/game/objects/items/melee/transforming.dm | 2 +- code/modules/mob/living/living_defense.dm | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 20960da7c6..e479aa95a8 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -147,6 +147,12 @@ return NONE return ..() +/obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) + . = ..() + if(parry_efficiency == 100) // perfect parry + return_list[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER + . |= BLOCK_SHOULD_REDIRECT + /obj/item/melee/transforming/energy/sword/cyborg sword_color = "red" light_color = "#ff0000" diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index 386a6e9acc..66752c4c9a 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -84,4 +84,4 @@ /obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user) if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") - user.take_bodypart_damage(5,5) \ No newline at end of file + user.take_bodypart_damage(5,5) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index e24e9641bf..39111a3a16 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -77,6 +77,7 @@ final_percent = returnlist[BLOCK_RETURN_PROJECTILE_BLOCK_PERCENTAGE] if(returned & BLOCK_SHOULD_REDIRECT) handle_projectile_attack_redirection(P, returnlist[BLOCK_RETURN_REDIRECT_METHOD]) + return BULLET_ACT_FORCE_PIERCE if(returned & BLOCK_REDIRECTED) return BULLET_ACT_FORCE_PIERCE if(returned & BLOCK_SUCCESS) From 279b3e7aed3b47a674319db8a12d217a9b8fa52c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 16:52:16 -0700 Subject: [PATCH 101/142] fix --- code/game/objects/items/melee/energy.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index e479aa95a8..a4ff38fb0d 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -150,7 +150,7 @@ /obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) . = ..() if(parry_efficiency == 100) // perfect parry - return_list[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER + block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER . |= BLOCK_SHOULD_REDIRECT /obj/item/melee/transforming/energy/sword/cyborg From 3ab4b62dc1c53194367284b5fe8addf2b6c54680 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:03:52 -0700 Subject: [PATCH 102/142] huh --- code/game/objects/items/melee/energy.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index a4ff38fb0d..3d62a06cb0 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -149,7 +149,7 @@ /obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) . = ..() - if(parry_efficiency == 100) // perfect parry + if(parry_efficiency >= 90) // (near) perfect parry block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER . |= BLOCK_SHOULD_REDIRECT From 0b17c761e7267bd127137108f532cc0b15c72938 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:11:23 -0700 Subject: [PATCH 103/142] whew --- code/game/objects/items/melee/energy.dm | 4 ++-- code/modules/mob/living/carbon/human/human_defines.dm | 2 +- code/modules/mob/living/living_active_parry.dm | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 3d62a06cb0..5b090836a8 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -147,9 +147,9 @@ return NONE return ..() -/obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) +/obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) . = ..() - if(parry_efficiency >= 90) // (near) perfect parry + if(parry_efficiency >= 90) // perfect parry block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER . |= BLOCK_SHOULD_REDIRECT diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index aea4ee2ead..54100c4bac 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -102,7 +102,7 @@ "HUMAN_PARRY_MININUM_EFFICIENCY" = 0.9 ) -/mob/living/carbon/human/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) +/mob/living/carbon/human/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) var/datum/block_parry_data/D = return_block_parry_datum(block_parry_data) if(!owner.Adjacent(attacker)) return ..() diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index 4fd2459e70..07102d3ee8 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -160,17 +160,17 @@ /** * Called when an attack is parried using this, whether or not the parry was successful. */ -/obj/item/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) +/obj/item/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) /** * Called when an attack is parried innately, whether or not the parry was successful. */ -/mob/living/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) +/mob/living/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) /** * Called when an attack is parried using this, whether or not the parry was successful. */ -/datum/martial_art/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, parry_efficiency, parry_time) +/datum/martial_art/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) /** * Called when an attack is parried and block_parra_data indicates to use a proc to handle counterattack. From 308c52df002abc9e8ad833e003296f0f4fb71d6c Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:14:38 -0700 Subject: [PATCH 104/142] ok --- code/modules/mob/living/living_blocking_parrying.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/living_blocking_parrying.dm b/code/modules/mob/living/living_blocking_parrying.dm index 9f1ad1c27a..47dae8849d 100644 --- a/code/modules/mob/living/living_blocking_parrying.dm +++ b/code/modules/mob/living/living_blocking_parrying.dm @@ -126,6 +126,8 @@ GLOBAL_LIST_EMPTY(block_parry_data) var/list/parry_imperfect_falloff_percent_override /// Efficiency in percent on perfect parry. var/parry_efficiency_perfect = 120 + /// Override for attack types, list("[ATTACK_TYPE_DEFINE]" = perecntage) for perfect efficiency. + var/parry_efficiency_perfect_override /// Parry effect data. var/list/parry_data = list( PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 1 @@ -180,7 +182,11 @@ GLOBAL_LIST_EMPTY(block_parry_data) if(isnull(leeway)) leeway = parry_time_perfect_leeway difference -= leeway - . = parry_efficiency_perfect + var/perfect = attack_type_list_scan(parry_efficiency_perfect_override, attack_type) + if(isnull(perfect)) + . = parry_efficiency_perfect + else + . = perfect if(difference <= 0) return var/falloff = attack_type_list_scan(parry_imperfect_falloff_percent_override, attack_type) @@ -276,6 +282,7 @@ GLOBAL_LIST_EMPTY(block_parry_data) RENDER_VARIABLE_SIMPLE(parry_imperfect_falloff_percent, "Linear falloff in percent per decisecond for attacks parried outside of perfect window.") RENDER_OVERRIDE_LIST(parry_imperfect_falloff_percent_override, "Override for the above for each attack type") RENDER_VARIABLE_SIMPLE(parry_efficiency_perfect, "Efficiency in percentage a parry in the perfect window is considered.") + RENDER_OVERRIDE_LIST(parry_efficiency_perfect_override, "Override for the above for each attack type") // parry_data dat += "" RENDER_VARIABLE_SIMPLE(parry_efficiency_considered_successful, "Minimum parry efficiency to be considered a successful parry.") From 4256826aaed0ea6230865c2ca523aeff66692cd7 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:15:12 -0700 Subject: [PATCH 105/142] epic --- code/game/objects/items/weaponry.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 04cdc85b19..e21c4aaffa 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -287,7 +287,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 parry_efficiency_considered_successful = 65 // VERY generous parry_efficiency_perfect = 120 parry_efficiency_perfect_override = list( - "[ATTACK_TYPE_PROJECTILE]" = 30, + TEXT_ATTACK_TYPE_PROJECTILE = 30, ) parry_failed_stagger_duration = 3 SECONDS parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 2.5) // 7*2.5 = 17.5, 8*2.5 = 20, 9*2.5 = 22.5, 10*2.5 = 25 From 69335bae0e8775d70a1d8b75e20e127fa32e34e6 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:20:21 -0700 Subject: [PATCH 106/142] buff --- code/game/objects/items/melee/energy.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 5b090836a8..e0b08ba8ef 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -149,7 +149,7 @@ /obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) . = ..() - if(parry_efficiency >= 90) // perfect parry + if(parry_efficiency >= 80) // perfect parry block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER . |= BLOCK_SHOULD_REDIRECT From 8f9abfd63ad30a290e4a347450235cbb07a76c09 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 17:30:20 -0700 Subject: [PATCH 107/142] no return --- code/_onclick/other_mobs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 008dd06d1e..6cbcd4dbb0 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -127,7 +127,7 @@ Animals & All Unspecified */ /mob/living/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) - return !isnull(A.attack_animal(src, intent, flags)) + A.attack_animal(src, intent, flags) /atom/proc/attack_animal(mob/user) SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ANIMAL, user) @@ -266,7 +266,7 @@ if(dextrous && !ismob(A)) return ..() else - return AttackingTarget() + AttackingTarget() /* New Players: From 22efdbffcd2f3b5105ae4f4aeefcfb54a5c9eb98 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 26 Jul 2020 23:08:41 -0700 Subject: [PATCH 108/142] woops --- code/modules/events/spacevine.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 4dd787849f..7cf11848e8 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -324,7 +324,7 @@ damage_dealt *= 4 if(I.damtype == BURN) damage_dealt *= 4 - + user.DelayNextAction() for(var/datum/spacevine_mutation/SM in mutations) damage_dealt = SM.on_hit(src, user, I, damage_dealt) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further take_damage(damage_dealt, I.damtype, "melee", 1) From 9f3e7755aed01bc1f2f2213c639f4815e6bbb46b Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Mon, 27 Jul 2020 21:30:13 +0200 Subject: [PATCH 109/142] two line fix tin --- code/modules/events/travelling_trader.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/events/travelling_trader.dm b/code/modules/events/travelling_trader.dm index b7afc3440e..6017e530b2 100644 --- a/code/modules/events/travelling_trader.dm +++ b/code/modules/events/travelling_trader.dm @@ -282,6 +282,7 @@ mob/living/carbon/human/dummy/travelling_trader/animal_hunter/Initialize() ..() /datum/outfit/artifact_dealer + name = "Artifact Dealer" uniform = /obj/item/clothing/under/suit/black_really shoes = /obj/item/clothing/shoes/combat head = /obj/item/clothing/head/that @@ -323,6 +324,7 @@ mob/living/carbon/human/dummy/travelling_trader/animal_hunter/Initialize() reward.insert_organ(new_implant) /datum/outfit/otherworldly_surgeon + name = "Otherworldly Surgeon" uniform = /obj/item/clothing/under/pants/white shoes = /obj/item/clothing/shoes/sneakers/white gloves = /obj/item/clothing/gloves/color/latex From 67b518bf42d2ee7707c2da67337ddde106b93354 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 27 Jul 2020 13:09:54 -0700 Subject: [PATCH 110/142] experimental --- code/__DEFINES/_flags/return_values.dm | 20 ++++++++----------- code/_onclick/item_attack.dm | 15 +++++++------- code/_onclick/other_mobs.dm | 14 ++++++------- code/modules/clothing/gloves/miscellaneous.dm | 4 ++-- .../mob/living/carbon/carbon_defense.dm | 2 +- .../mob/living/carbon/human/human_defines.dm | 2 +- .../mob/living/carbon/human/species.dm | 12 +++++------ .../modules/mob/living/living_active_parry.dm | 2 +- code/modules/mob/living/living_defense.dm | 4 ++-- .../hostile/megafauna/blood_drunk_miner.dm | 10 +++++----- 10 files changed, 41 insertions(+), 44 deletions(-) diff --git a/code/__DEFINES/_flags/return_values.dm b/code/__DEFINES/_flags/return_values.dm index 80908fdc8e..28606265b3 100644 --- a/code/__DEFINES/_flags/return_values.dm +++ b/code/__DEFINES/_flags/return_values.dm @@ -1,8 +1,6 @@ -// melee_attack_chain() attackchain_flags -/// The attack is from a parry counterattack. -#define ATTACKCHAIN_PARRY_COUNTERATTACK (1<<0) - +/////////// ATTACKCHAIN_FLAGS //////////// // melee_attack_chain(), attackby(), pre_attack(), afterattack(), and tool_act(), attack() and **anything that is called by ClickOn()** return values. +// These are all passed down through the attack chain and are binary OR'd into each other! /// Stop the attack chain if still in melee_attack_chain() #define STOP_ATTACK_PROC_CHAIN (1<<0) /// This attack should discard last_action instead of flushing (storing) it). You should probably know what you're doing if you use this considering this is how clickdelay is enforced. @@ -12,14 +10,12 @@ #define NO_AUTO_CLICKDELAY_HANDLING (1<<2) /// Only used with UnarmedAttack(). Interrupts unarmed attack from progressing. #define INTERRUPT_UNARMED_ATTACK (1<<3) -/// Attack hand should not set next action even if the atom wants it to be an action -#define ATTACK_HAND_IGNORE_ACTION (1<<4) -/// Attack hand should not at all check last_action/attack_hand_speed even if the atom wants to -#define ATTACK_HAND_IGNORE_CLICKDELAY (1<<5) - -// UnarmedAttack() flags -/// Attack is from a parry counterattack -#define UNARMED_ATTACK_PARRY (1<<0) +/// Attack should not set next action even if the atom wants it to be an action +#define ATTACK_IGNORE_ACTION (1<<4) +/// Attack should not at all check last_action/attack_hand_speed even if the atom wants to +#define ATTACK_IGNORE_CLICKDELAY (1<<5) +/// This attack is from a parry counterattack +#define ATTACK_IS_PARRY_COUNTERATTACK (1<<6) // obj/item/dropped() /// dropped() relocated this item, return FALSE for doUnEquip. diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 95f3fa5f1e..a669f9024f 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -7,17 +7,18 @@ *and lastly *afterattack. The return value does not matter. */ -/obj/item/proc/melee_attack_chain(mob/user, atom/target, params, flags, damage_multiplier = 1) +/obj/item/proc/melee_attack_chain(mob/user, atom/target, params, attackchain_flags, damage_multiplier = 1) if(isliving(user)) var/mob/living/L = user - if(!CHECK_MOBILITY(L, MOBILITY_USE) && !(flags & ATTACKCHAIN_PARRY_COUNTERATTACK)) + if(!CHECK_MOBILITY(L, MOBILITY_USE) && !(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)) to_chat(L, "You are unable to swing [src] right now!") return + . = attackchain_flags if(tool_behaviour && ((. = target.tool_act(user, src, tool_behaviour)) & STOP_ATTACK_PROC_CHAIN)) return - if((. |= pre_attack(target, user, params)) & STOP_ATTACK_PROC_CHAIN) + if((. |= pre_attack(target, user, params, ., damage_multiplier)) & STOP_ATTACK_PROC_CHAIN) return - if((. |= target.attackby(src, user, params, flags, damage_multiplier)) & STOP_ATTACK_PROC_CHAIN) + if((. |= target.attackby(src, user, params, ., damage_multiplier)) & STOP_ATTACK_PROC_CHAIN) return if(QDELETED(src) || QDELETED(target)) return @@ -38,10 +39,10 @@ return interact(user) -/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby! +/obj/item/proc/pre_attack(atom/A, mob/living/user, params, attackchain_flags, damage_multiplier) //do stuff before attackby! if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK) return STOP_ATTACK_PROC_CHAIN - if(!CheckAttackCooldown(user, A)) + if(!(attackchain_flags & ATTACK_IGNORE_CLICKDELAY) && !CheckAttackCooldown(user, A)) return STOP_ATTACK_PROC_CHAIN // No comment @@ -148,7 +149,7 @@ /mob/living/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) var/list/block_return = list() var/totitemdamage = pre_attacked_by(I, user) * damage_multiplier - if((user != src) && mob_run_block(I, totitemdamage, "the [I.name]", ((attackchain_flags & ATTACKCHAIN_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, null, block_return) & BLOCK_SUCCESS) + if((user != src) && mob_run_block(I, totitemdamage, "the [I.name]", ((attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)? ATTACK_IS_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, null, block_return) & BLOCK_SUCCESS) return FALSE totitemdamage = block_calculate_resultant_damage(totitemdamage, block_return) send_item_attack_message(I, user, null, totitemdamage) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 6cbcd4dbb0..0c950bf327 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -16,7 +16,7 @@ to_chat(src, "The damage in your [check_arm.name] is preventing you from using it! Get it fixed, or at least splinted!") return - . = NONE + . = flags // Special glove functions: // If the gloves do anything, have them return 1 to stop @@ -28,27 +28,27 @@ return for(var/datum/mutation/human/HM in dna.mutations) - . |= HM.on_attack_hand(A, proximity, intent, flags) + . |= HM.on_attack_hand(A, proximity, intent, .) if(. & INTERRUPT_UNARMED_ATTACK) return SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) - return . | A.attack_hand(src, intent, flags, .) + return . | A.attack_hand(src, intent, .) -/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags, clickchain_flags) +/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, flags) SHOULD_NOT_SLEEP(TRUE) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND) return - if(attack_hand_speed && !(clickchain_flags & ATTACK_HAND_IGNORE_CLICKDELAY)) + if(attack_hand_speed && !(. & ATTACK_IGNORE_CLICKDELAY)) if(!user.CheckActionCooldown(attack_hand_speed)) return if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) . = _try_interact(user) - INVOKE_ASYNC(src, .proc/on_attack_hand, user, act_intent, unarmed_attack_flags) - if(!(clickchain_flags & ATTACK_HAND_IGNORE_ACTION)) + INVOKE_ASYNC(src, .proc/on_attack_hand, user, act_intent, .) + if(!(. & ATTACK_IGNORE_ACTION)) if(attack_hand_unwieldlyness) user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action) else if(attack_hand_is_action) diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index df74f8e49e..5f5f228b00 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -109,7 +109,7 @@ if(warcry) M.say("[warcry]", ignore_spam = TRUE, forced = TRUE) - return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION + return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_IGNORE_ACTION /obj/item/clothing/gloves/fingerless/pugilist/rapid/AltClick(mob/user) var/input = stripped_input(user,"What do you want your battlecry to be? Max length of 6 characters.", ,"", 7) @@ -137,7 +137,7 @@ else M.SetNextAction(CLICK_CD_RAPID) - return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_HAND_IGNORE_ACTION + return NO_AUTO_CLICKDELAY_HANDLING | ATTACK_IGNORE_ACTION /obj/item/clothing/gloves/botanic_leather name = "botanist's leather gloves" diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 1b0aee04e4..ac261e6d5b 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -69,7 +69,7 @@ var/totitemdamage = pre_attacked_by(I, user) * damage_multiplier var/impacting_zone = (user == src)? check_zone(user.zone_selected) : ran_zone(user.zone_selected) var/list/block_return = list() - if((user != src) && (mob_run_block(I, totitemdamage, "the [I]", ((attackchain_flags & ATTACKCHAIN_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, impacting_zone, block_return) & BLOCK_SUCCESS)) + if((user != src) && (mob_run_block(I, totitemdamage, "the [I]", ((attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, impacting_zone, block_return) & BLOCK_SUCCESS)) return FALSE totitemdamage = block_calculate_resultant_damage(totitemdamage, block_return) var/obj/item/bodypart/affecting = get_bodypart(impacting_zone) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index aea4ee2ead..a04fa1cbfe 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -110,7 +110,7 @@ return ..() visible_message("[src] strikes back perfectly at [attacker], staggering them!") if(D.parry_data["HUMAN_PARRY_PUNCH"]) - UnarmedAttack(attacker, TRUE, INTENT_HARM, UNARMED_ATTACK_PARRY) + UnarmedAttack(attacker, TRUE, INTENT_HARM, ATTACK_IS_PARRY_COUNTERATTACK | ATTACK_IGNORE_ACTION | ATTACK_IGNORE_CLICKDELAY | NO_AUTO_CLICKDELAY_HANDLING) var/mob/living/L = attacker if(istype(L)) L.Stagger(D.parry_data["HUMAN_PARRY_STAGGER"]) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index a2e2fb0a51..9ed191a4cf 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1445,7 +1445,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) target.grabbedby(user) return 1 -/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style, unarmed_attack_flags = NONE) +/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style, attackchain_flags = NONE) if(!attacker_style && HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm [target]!") return FALSE @@ -1457,7 +1457,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) target_message = "[target] blocks your attack!") return FALSE - if(!(unarmed_attack_flags & UNARMED_ATTACK_PARRY)) + if(!(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)) if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes punching cause staminaloss but funny martial artist types get a discount user.adjustStaminaLossBuffered(1.5) else @@ -1499,7 +1499,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected)) var/miss_chance = 100//calculate the odds that a punch misses entirely. considers stamina and brute damage of the puncher. punches miss by default to prevent weird cases - if(unarmed_attack_flags & UNARMED_ATTACK_PARRY) + if(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK) miss_chance = 0 else if(user.dna.species.punchdamagelow) @@ -1686,7 +1686,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) /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, act_intent, unarmed_attack_flags) +/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style, act_intent, attackchain_flags) if(!istype(M)) return CHECK_DNA_AND_SPECIES(M) @@ -1706,7 +1706,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) grab(M, H, attacker_style) if("harm") - harm(M, H, attacker_style, unarmed_attack_flags) + harm(M, H, attacker_style, attackchain_flags) if("disarm") disarm(M, H, attacker_style) @@ -1716,7 +1716,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) // Allows you to put in item-specific reactions based on species if(user != H) var/list/block_return = list() - if(H.mob_run_block(I, totitemdamage, "the [I.name]", ((attackchain_flags & ATTACKCHAIN_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, affecting.body_zone, block_return) & BLOCK_SUCCESS) + if(H.mob_run_block(I, totitemdamage, "the [I.name]", ((attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE) | ATTACK_TYPE_MELEE, I.armour_penetration, user, affecting.body_zone, block_return) & BLOCK_SUCCESS) return 0 totitemdamage = block_calculate_resultant_damage(totitemdamage, block_return) if(H.check_martial_melee_block()) diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm index c19fefbe8a..243e811205 100644 --- a/code/modules/mob/living/living_active_parry.dm +++ b/code/modules/mob/living/living_active_parry.dm @@ -277,7 +277,7 @@ if(data.parry_data[PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN]) switch(parrying) if(ITEM_PARRY) - active_parry_item.melee_attack_chain(src, attacker, null, ATTACKCHAIN_PARRY_COUNTERATTACK, data.parry_data[PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN]) + active_parry_item.melee_attack_chain(src, attacker, null, ATTACK_IS_PARRY_COUNTERATTACK | ATTACK_IGNORE_CLICKDELAY | ATTACK_IGNORE_ACTION | NO_AUTO_CLICKDELAY_HANDLING, data.parry_data[PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN]) effect_text += "reflexively counterattacking with [active_parry_item]" if(UNARMED_PARRY) // WARNING: If you are using these two, the attackchain parry counterattack flags and damage multipliers are unimplemented. Be careful with how you handle this. UnarmedAttack(attacker) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 216670a7d3..c59727fb83 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -270,10 +270,10 @@ user.set_pull_offsets(src, grab_state) return 1 -/mob/living/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/mob/living/on_attack_hand(mob/user, act_intent = user.a_intent, attackchain_flags) ..() //Ignoring parent return value here. SEND_SIGNAL(src, COMSIG_MOB_ATTACK_HAND, user) - if((user != src) && act_intent != INTENT_HELP && (mob_run_block(user, 0, user.name, ATTACK_TYPE_UNARMED | ATTACK_TYPE_MELEE | ((unarmed_attack_flags & UNARMED_ATTACK_PARRY)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE), null, user, check_zone(user.zone_selected), null) & BLOCK_SUCCESS)) + if((user != src) && act_intent != INTENT_HELP && (mob_run_block(user, 0, user.name, ATTACK_TYPE_UNARMED | ATTACK_TYPE_MELEE | ((attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)? ATTACK_TYPE_PARRY_COUNTERATTACK : NONE), null, user, check_zone(user.zone_selected), null) & BLOCK_SUCCESS)) log_combat(user, src, "attempted to touch") visible_message("[user] attempted to touch [src]!", "[user] attempted to touch you!", target = user, diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 9b1cc3b355..12bd4f2828 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -87,7 +87,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE) var/adjustment_amount = amount * 0.1 if(world.time + adjustment_amount > next_action) - DelayNextAction(adjustment_amount) //attacking it interrupts it attacking, but only briefly + DelayNextAction(adjustment_amount, flush = TRUE) //attacking it interrupts it attacking, but only briefly . = ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death() @@ -125,8 +125,8 @@ Difficulty: Medium adjustHealth(-(L.maxHealth * 0.5)) L.gib() return TRUE - DelayNextAction(CLICK_CD_MELEE) - miner_saw.melee_attack_chain(src, target) + DelayNextAction(CLICK_CD_MELEE, flush = TRUE) + miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY) if(guidance) adjustHealth(-2) transform_weapon() @@ -161,7 +161,7 @@ Difficulty: Medium face_atom(target) new /obj/effect/temp_visual/dir_setting/firing_effect(loc, dir) Shoot(target) - DelayNextAction(CLICK_CD_RANGE) + DelayNextAction(CLICK_CD_RANGE, flush = TRUE) //I'm still of the belief that this entire proc needs to be wiped from existence. // do not take my touching of it to be endorsement of it. ~mso @@ -173,7 +173,7 @@ Difficulty: Medium return if(dashing || !CheckActionCooldown() || !Adjacent(target)) if(dashing && next_action <= world.time) - SetNextAction(1, considered_action = FALSE, immediate = FALSE) + SetNextAction(1, considered_action = FALSE, immediate = FALSE, flush = TRUE) INVOKE_ASYNC(src, .proc/quick_attack_loop) //lets try that again. return AttackingTarget() From dc278d7b02f42a6c1408741656142025004b8707 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 27 Jul 2020 13:11:26 -0700 Subject: [PATCH 111/142] woops --- code/_onclick/other_mobs.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 0c950bf327..975c6e62d4 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -5,7 +5,7 @@ Otherwise pretty standard. */ -/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, intent = a_intent, flags = NONE) +/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, intent = a_intent, attackchain_flags = NONE) if(!has_active_hand()) //can't attack without a hand. to_chat(src, "You look at your arm and sigh.") @@ -16,8 +16,7 @@ to_chat(src, "The damage in your [check_arm.name] is preventing you from using it! Get it fixed, or at least splinted!") return - . = flags - + . = attackchain_flags // Special glove functions: // If the gloves do anything, have them return 1 to stop // normal attack_hand() here. @@ -36,12 +35,13 @@ SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) return . | A.attack_hand(src, intent, .) -/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, flags) +/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, attackchain_flags) SHOULD_NOT_SLEEP(TRUE) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND) return + . = attackchain_flags if(attack_hand_speed && !(. & ATTACK_IGNORE_CLICKDELAY)) if(!user.CheckActionCooldown(attack_hand_speed)) return From dc14c0257046d52c69a8016fd5f9d4f944869007 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Mon, 27 Jul 2020 21:55:51 +0100 Subject: [PATCH 112/142] fix crates --- code/game/objects/items/stacks/sheets/sheet_types.dm | 6 +++--- code/game/objects/structures/crates_lockers/closets.dm | 5 +++-- code/game/objects/structures/crates_lockers/crates.dm | 9 +++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index a73545c685..5f6341ea21 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -184,13 +184,13 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \ new /datum/stack_recipe("trash cart", /obj/structure/closet/crate/trashcart, 5, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("medical crate", /obj/structure/closet/crate/medical, 5, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("freezer crate", /obj/structure/closet/crate/freezer, 8, time = 50, one_per_turf = 1, on_floor = 1), \ - new /datum/stack_recipe("blood bag crate", /obj/structure/closet/crate/freezer/blood, 8, time = 50, one_per_turf = 1, on_floor = 1), \ - new /datum/stack_recipe("surplus limbs crate", /obj/structure/closet/crate/freezer/surplus_limbs, 8, time = 50, one_per_turf = 1, on_floor = 1), \ + new /datum/stack_recipe("blood bag crate", /obj/structure/closet/crate/freezer/blood/fake, 8, time = 50, one_per_turf = 1, on_floor = 1), \ + new /datum/stack_recipe("surplus limbs crate", /obj/structure/closet/crate/freezer/surplus_limbs/fake, 8, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("radiation containment crate", /obj/structure/closet/crate/radiation, 8, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("hydroponics crate", /obj/structure/closet/crate/hydroponics, 5, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("engineering crate", /obj/structure/closet/crate/engineering, 5, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("eletrical crate", /obj/structure/closet/crate/engineering/electrical, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new /datum/stack_recipe("RCD storage crate", /obj/structure/closet/crate/rcd, 5, time = 50, one_per_turf = 1, on_floor = 1), \ + new /datum/stack_recipe("RCD storage crate", /obj/structure/closet/crate/rcd/fake, 5, time = 50, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("science crate", /obj/structure/closet/crate/science, 5, time = 50, one_per_turf = 1, on_floor = 1), \ )), \ new /datum/stack_recipe_list("airlock assemblies", list( \ diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 4b9251d8ec..3d9a1865d3 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -37,12 +37,13 @@ var/lock_in_use = FALSE //Someone is doing some stuff with the lock here, better not proceed further var/eigen_teleport = FALSE //If the closet leads to Mr Tumnus. var/obj/structure/closet/eigen_target //Where you go to. - + var/should_populate_contents = TRUE /obj/structure/closet/Initialize(mapload) . = ..() update_icon() - PopulateContents() + if(should_populate_contents) + PopulateContents() if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents addtimer(CALLBACK(src, .proc/take_contents), 0) if(secure) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 99bce305f8..09834a7530 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -144,6 +144,9 @@ desc = "A freezer containing packs of blood." icon_state = "surgery" +/obj/structure/closet/crate/freezer/blood/fake + should_populate_contents = FALSE + /obj/structure/closet/crate/freezer/blood/PopulateContents() . = ..() new /obj/item/reagent_containers/blood(src) @@ -164,6 +167,9 @@ name = "surplus prosthetic limbs" desc = "A crate containing an assortment of cheap prosthetic limbs." +/obj/structure/closet/crate/freezer/surplus_limbs/fake + should_populate_contents = FALSE + /obj/structure/closet/crate/freezer/surplus_limbs/PopulateContents() . = ..() new /obj/item/bodypart/l_arm/robot/surplus(src) @@ -198,6 +204,9 @@ name = "\improper RCD crate" icon_state = "engi_crate" +/obj/structure/closet/crate/rcd/fake + should_populate_contents = FALSE + /obj/structure/closet/crate/rcd/PopulateContents() ..() for(var/i in 1 to 4) From 5bf4afcadefd3933237dcfe4f131b35564d5da22 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 27 Jul 2020 14:09:37 -0700 Subject: [PATCH 113/142] sigh --- code/_onclick/item_attack.dm | 6 +++--- code/modules/mining/lavaland/necropolis_chests.dm | 13 +++++++------ code/modules/mob/clickdelay.dm | 4 ++-- .../hostile/megafauna/blood_drunk_miner.dm | 5 +++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index a669f9024f..199e401e39 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -63,7 +63,7 @@ return . |= I.attack(src, user, attackchain_flags, damage_multiplier) if(!(. & NO_AUTO_CLICKDELAY_HANDLING)) // SAFETY NET - unless the proc tells us we should not handle this, give them the basic melee cooldown! - I.ApplyAttackCooldown(user, src) + I.ApplyAttackCooldown(user, src, attackchain_flags) /** * Called when someone uses us to attack a mob in melee combat. @@ -138,13 +138,13 @@ if(!(SKILL_TRAIN_ATTACK_OBJ in I.used_skills[skill])) continue user.mind.auto_gain_experience(skill, I.skill_gain) - I.ApplyAttackCooldown(user, src) + if(!(attackchain_flags & NO_AUTO_CLICKDELAY_HANDLING)) + I.ApplyAttackCooldown(user, src, attackchain_flags) if(totitemdamage) visible_message("[user] has hit [src] with [I]!", null, null, COMBAT_MESSAGE_RANGE) //only witnesses close by and the victim see a hit message. log_combat(user, src, "attacked", I) take_damage(totitemdamage, I.damtype, "melee", 1) - return TRUE /mob/living/attacked_by(obj/item/I, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) var/list/block_return = list() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index c993026105..270d3601fd 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -667,6 +667,8 @@ var/bleed_stacks_per_hit = 3 total_mass = 2.75 total_mass_on = 5 + attack_speed = 0 + attack_unwieldlyness = CLICK_CD_MELEE * 0.5 /obj/item/melee/transforming/cleaving_saw/examine(mob/user) . = ..() @@ -685,8 +687,12 @@ return FALSE . = ..() if(.) + if(active) + attack_unwieldlyness = CLICK_CD_MELEE + else + attack_unwieldlyness = CLICK_CD_MELEE * 0.5 transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5) - user.SetNextAction(CLICK_CD_MELEE * 0.25) + user.SetNextAction(CLICK_CD_MELEE * 0.25, considered_action = FALSE, flush = TRUE) /obj/item/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text) if(!supress_message_text) @@ -701,11 +707,6 @@ to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) -/obj/item/melee/transforming/cleaving_saw/ApplyAttackCooldown(mob/user, atom/target) - . = ..() - if(!active) - user.SetNextAction(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly - /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) if(!B) diff --git a/code/modules/mob/clickdelay.dm b/code/modules/mob/clickdelay.dm index d570650789..b1df87303e 100644 --- a/code/modules/mob/clickdelay.dm +++ b/code/modules/mob/clickdelay.dm @@ -190,8 +190,8 @@ /** * Called after a successful attack to set a mob's clickdelay. */ -/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target) - user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass) +/obj/item/proc/ApplyAttackCooldown(mob/user, atom/target, attackchain_flags) + user.DelayNextAction(attack_unwieldlyness, clickdelay_mod_bypass, !(attackchain_flags & ATTACK_IGNORE_ACTION)) /** * Get estimated time that a user has to not attack for to use us diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 12bd4f2828..8e9f5574e0 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -87,7 +87,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE) var/adjustment_amount = amount * 0.1 if(world.time + adjustment_amount > next_action) - DelayNextAction(adjustment_amount, flush = TRUE) //attacking it interrupts it attacking, but only briefly + DelayNextAction(adjustment_amount, considered_action = FALSE, flush = TRUE) //attacking it interrupts it attacking, but only briefly . = ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death() @@ -126,7 +126,8 @@ Difficulty: Medium L.gib() return TRUE DelayNextAction(CLICK_CD_MELEE, flush = TRUE) - miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY) + miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY | ATTACK_IGNORE_ACTION | NO_AUTO_CLICKDELAY_HANDLING) + DiscardCurrentAction() if(guidance) adjustHealth(-2) transform_weapon() From ffcfd21613a994c77af2a5c4116830002bba74ed Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 27 Jul 2020 14:24:10 -0700 Subject: [PATCH 114/142] fix --- code/modules/mob/inventory.dm | 8 -------- code/modules/mob/living/silicon/robot/inventory.dm | 2 -- .../simple_animal/hostile/megafauna/blood_drunk_miner.dm | 5 ++--- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 83cc09a624..caebb9cf10 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -5,13 +5,11 @@ /mob/proc/get_active_held_item() return get_item_for_held_index(active_hand_index) - //Finds the opposite limb for the active one (eg: upper left arm will find the item in upper right arm) //So we're treating each "pair" of limbs as a team, so "both" refers to them /mob/proc/get_inactive_held_item() return get_item_for_held_index(get_inactive_hand_index()) - //Finds the opposite index for the active one (eg: upper left arm will find the item in upper right arm) //So we're treating each "pair" of limbs as a team, so "both" refers to them /mob/proc/get_inactive_hand_index() @@ -24,12 +22,9 @@ other_hand = 0 return other_hand - /mob/proc/get_item_for_held_index(i) if(i > 0 && i <= held_items.len) return held_items[i] - return FALSE - //Odd = left. Even = right /mob/proc/held_index_to_dir(i) @@ -37,17 +32,14 @@ return "r" return "l" - //Check we have an organ for this hand slot (Dismemberment), Only relevant for humans /mob/proc/has_hand_for_held_index(i) return TRUE - //Check we have an organ for our active hand slot (Dismemberment),Only relevant for humans /mob/proc/has_active_hand() return has_hand_for_held_index(active_hand_index) - //Finds the first available (null) index OR all available (null) indexes in held_items based on a side. //Lefts: 1, 3, 5, 7... //Rights:2, 4, 6, 8... diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 0d8a0880a8..a063d090db 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -16,8 +16,6 @@ return item return module_active - - /mob/living/silicon/robot/proc/uneq_module(obj/item/O) if(!O) return 0 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 8e9f5574e0..5c1229c130 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -125,9 +125,8 @@ Difficulty: Medium adjustHealth(-(L.maxHealth * 0.5)) L.gib() return TRUE - DelayNextAction(CLICK_CD_MELEE, flush = TRUE) - miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY | ATTACK_IGNORE_ACTION | NO_AUTO_CLICKDELAY_HANDLING) - DiscardCurrentAction() + miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY) + FlushCurrentAction() if(guidance) adjustHealth(-2) transform_weapon() From b0f03eac12396dd0acd3cd36b21cb0c2322593ed Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 27 Jul 2020 21:06:03 -0700 Subject: [PATCH 115/142] ok --- code/game/objects/items.dm | 1 + code/modules/zombie/items.dm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index fb0788c191..5870c8a780 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -465,6 +465,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb usr.UnarmedAttack(src, TRUE) if(usr.get_active_held_item() == src) melee_attack_chain(usr, over) + usr.FlushCurrentAction() return TRUE //returning TRUE as a "is this overridden?" flag if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index 7038e9df7c..cf61e4b210 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -37,11 +37,11 @@ if(!proximity_flag) return else - if(istype(target, /obj/)) //do far more damage to non mobs so we can get through airlocks + if(istype(target, /obj)) //do far more damage to non mobs so we can get through airlocks var/obj/target_object = target target_object.take_damage(force * 3, BRUTE, "melee", 0) - else - if(isliving(target) && ishuman(target)) + else if(isliving(target)) + if(ishuman(target)) try_to_zombie_infect(target) else check_feast(target, user) From 8a32cac8db1feb91c27aca84f0f8060011bbe885 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Tue, 28 Jul 2020 10:47:07 -0500 Subject: [PATCH 116/142] window rotation fix --- code/datums/components/rotation.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index f5da669c3a..129faabdb7 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -98,16 +98,16 @@ /datum/component/simple_rotation/proc/HandRot(datum/source, mob/user, rotation = default_rotation_direction) if(can_be_rotated) - if(!can_be_rotated.Invoke(user, default_rotation_direction)) + if(!can_be_rotated.Invoke(user, rotation)) return else - if(!default_can_be_rotated(user, default_rotation_direction)) + if(!default_can_be_rotated(user, rotation)) return if(can_user_rotate) - if(!can_user_rotate.Invoke(user, default_rotation_direction)) + if(!can_user_rotate.Invoke(user, rotation)) return else - if(!default_can_user_rotate(user, default_rotation_direction)) + if(!default_can_user_rotate(user, rotation)) return BaseRot(user, rotation) return TRUE From c8960624d304486f30cda594691c988c05050e1b Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Tue, 28 Jul 2020 18:37:01 +0100 Subject: [PATCH 117/142] sorry artur --- code/modules/mob/living/blood.dm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 478599e2c0..56582386f1 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -28,20 +28,15 @@ to_chat(src, "The blood soaks through your bandage.") -/mob/living/carbon/monkey/handle_blood() - if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. - //Blood regeneration if there is some space - if(blood_volume < (BLOOD_VOLUME_NORMAL * blood_ratio)) - blood_volume += 0.1 // regenerate blood VERY slowly - if(blood_volume < (BLOOD_VOLUME_OKAY * blood_ratio)) - adjustOxyLoss(round(((BLOOD_VOLUME_NORMAL * blood_ratio) - blood_volume) * 0.02, 1)) - // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood() if(NOBLOOD in dna.species.species_traits || bleedsuppress || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) return + if(HAS_TRAIT(src, TRAIT_NOMARROW)) //Bloodsuckers don't need to be here. + return + if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space From 83134856328658f7965acb88c266ff8a69a2b5a0 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 28 Jul 2020 11:31:28 -0700 Subject: [PATCH 118/142] fix --- code/game/objects/structures/grille.dm | 4 ++-- code/modules/NTNet/relays.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 1d3450097c..36e4f825da 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -10,6 +10,8 @@ layer = BELOW_OBJ_LAYER armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0) max_integrity = 50 + attack_hand_is_action = TRUE + attack_hand_speed = 8 integrity_failure = 0.4 var/rods_type = /obj/item/stack/rods var/rods_amount = 2 @@ -103,8 +105,6 @@ . = ..() if(.) return - 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) log_combat(user, src, "hit") diff --git a/code/modules/NTNet/relays.dm b/code/modules/NTNet/relays.dm index 2101a72960..c64e2332cc 100644 --- a/code/modules/NTNet/relays.dm +++ b/code/modules/NTNet/relays.dm @@ -118,4 +118,4 @@ D.target = null D.error = "Connection to quantum relay severed" - return ..() \ No newline at end of file + return ..() From 1f508ef15defb3193d1133cab48ec18e2bcee3f2 Mon Sep 17 00:00:00 2001 From: Adelphon Date: Tue, 28 Jul 2020 15:04:58 -0400 Subject: [PATCH 119/142] Adds Camo To AutoDrobe (fix) Adds syndicate Camo to Autodrobe WITHOUT the armor bonuses. --- code/modules/clothing/under/syndicate.dm | 3 +++ code/modules/vending/autodrobe.dm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/under/syndicate.dm b/code/modules/clothing/under/syndicate.dm index 8a88e99d05..6a6c38d26e 100644 --- a/code/modules/clothing/under/syndicate.dm +++ b/code/modules/clothing/under/syndicate.dm @@ -73,6 +73,9 @@ item_state = "g_suit" can_adjust = FALSE +/obj/item/clothing/under/syndicate/camo/cosmetic + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + /obj/item/clothing/under/syndicate/soviet name = "Ratnik 5 tracksuit" desc = "Badly translated labels tell you to clean this in Vodka. Great for squatting in." diff --git a/code/modules/vending/autodrobe.dm b/code/modules/vending/autodrobe.dm index 260b124283..bc824cc994 100644 --- a/code/modules/vending/autodrobe.dm +++ b/code/modules/vending/autodrobe.dm @@ -116,7 +116,8 @@ /obj/item/gun/magic/wand = 2, /obj/item/clothing/glasses/sunglasses/garb = 2, /obj/item/clothing/glasses/sunglasses/blindfold = 1, - /obj/item/clothing/mask/muzzle = 2) + /obj/item/clothing/mask/muzzle = 2, + /obj/item/clothing/under/syndicate/camo/cosmetic = 3) premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman/fake = 1, From 0152dcda65027d54233ff28a59fb5ad3b2fa7a44 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 28 Jul 2020 13:24:45 -0700 Subject: [PATCH 120/142] fix --- code/game/objects/items/storage/book.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 5d5f0eaa24..7532aacbfa 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -104,7 +104,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) return 1 -/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE) +/obj/item/storage/book/bible/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1, heal_mode = TRUE) if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") @@ -238,11 +238,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", var/ownername = H.real_name desc += "The name [ownername] is written in blood inside the cover." -/obj/item/storage/book/bible/syndicate/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE) - if (user.a_intent == INTENT_HELP) - return ..() - else - return ..(M,user,heal_mode = FALSE) +/obj/item/storage/book/bible/syndicate/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1, heal_mode = TRUE) + if(user.a_intent != INTENT_HELP) + heal_mode = FALSE //args pass over + return ..() // to ..() /obj/item/storage/book/bible/syndicate/add_blood_DNA(list/blood_dna) return FALSE From 1ef086dffb962e206c7158b9a4c16c9eb68b62b2 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 15:26:11 -0500 Subject: [PATCH 121/142] Automatic changelog generation for PR #12951 [ci skip] --- html/changelogs/AutoChangeLog-pr-12951.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12951.yml diff --git a/html/changelogs/AutoChangeLog-pr-12951.yml b/html/changelogs/AutoChangeLog-pr-12951.yml new file mode 100644 index 0000000000..35bfeea6a2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12951.yml @@ -0,0 +1,4 @@ +author: "timothyteakettle" +delete-after: True +changes: + - bugfix: "bloodsuckers are not affected by bloodloss" From 08a6d140aae82cee9579cf9b749f0b6c4944bb21 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 15:26:26 -0500 Subject: [PATCH 122/142] Automatic changelog generation for PR #12942 [ci skip] --- html/changelogs/AutoChangeLog-pr-12942.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12942.yml diff --git a/html/changelogs/AutoChangeLog-pr-12942.yml b/html/changelogs/AutoChangeLog-pr-12942.yml new file mode 100644 index 0000000000..5b11da4888 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12942.yml @@ -0,0 +1,4 @@ +author: "DeltaFire15" +delete-after: True +changes: + - bugfix: "The 'Naked' outfit is no longer broken." From 8c2e23e603547a73b4e9aa9f19ab73ca2bf4e92b Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 15:27:16 -0500 Subject: [PATCH 123/142] Automatic changelog generation for PR #12948 [ci skip] --- html/changelogs/AutoChangeLog-pr-12948.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12948.yml diff --git a/html/changelogs/AutoChangeLog-pr-12948.yml b/html/changelogs/AutoChangeLog-pr-12948.yml new file mode 100644 index 0000000000..ef74298edc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12948.yml @@ -0,0 +1,4 @@ +author: "Hatterhat" +delete-after: True +changes: + - bugfix: "Directional windows can now be rotated counterclockwise properly again." From 7bc458b43e3faaeb2baa97cb59ea5a34a0160b0a Mon Sep 17 00:00:00 2001 From: Changelogs Date: Wed, 29 Jul 2020 00:11:03 +0000 Subject: [PATCH 124/142] Automatic changelog compile [ci skip] --- html/changelog.html | 35 ++++++++++++++++++++++ html/changelogs/.all_changelog.yml | 23 ++++++++++++++ html/changelogs/AutoChangeLog-pr-12936.yml | 4 --- html/changelogs/AutoChangeLog-pr-12937.yml | 5 ---- html/changelogs/AutoChangeLog-pr-12938.yml | 4 --- html/changelogs/AutoChangeLog-pr-12940.yml | 5 ---- html/changelogs/AutoChangeLog-pr-12941.yml | 4 --- html/changelogs/AutoChangeLog-pr-12942.yml | 4 --- html/changelogs/AutoChangeLog-pr-12945.yml | 4 --- html/changelogs/AutoChangeLog-pr-12948.yml | 4 --- html/changelogs/AutoChangeLog-pr-12950.yml | 4 --- html/changelogs/AutoChangeLog-pr-12951.yml | 4 --- 12 files changed, 58 insertions(+), 42 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-12936.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12937.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12938.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12940.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12941.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12942.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12945.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12948.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12950.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12951.yml diff --git a/html/changelog.html b/html/changelog.html index 420461ee63..3248f6d729 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,41 @@ -->
    +

    29 July 2020

    +

    DeltaFire15 updated:

    +
      +
    • The 'Naked' outfit is no longer broken.
    • +
    +

    Ghommie updated:

    +
      +
    • fixed cremator trays, paleness examination strings, chat message for stamping paper, looping sounds, load away missions/VR admin verb, access requirements for using the sechuds.
    • +
    • Alt-Clicking a cigarette packet should pull the lighter out first if present, then cigarettes.
    • +
    +

    Hatterhat updated:

    +
      +
    • Directional windows can now be rotated counterclockwise properly again.
    • +
    +

    NecromancerAnne, Sirich96 updated:

    +
      +
    • Stunbaton sprites by Sirich96.
    • +
    • New sprites for the stunsword.
    • +
    +

    necromanceranne updated:

    +
      +
    • Adds some in-hands for the rapier sheath.
    • +
    +

    timothyteakettle updated:

    +
      +
    • tail wagging should work in all cases now
    • +
    • bluespace jars work as intended now
    • +
    • aliens can remove embeds now
    • +
    • bloodsuckers are not affected by bloodloss
    • +
    +

    zeroisthebiggay updated:

    +
      +
    • Flannel jackets and bartender winter coat
    • +
    +

    28 July 2020

    Cacogen updated:

      diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 3af19f51ae..cd3f5c04bc 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -26581,3 +26581,26 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. things inside them and also the text shown for resist times is accurate zeroisthebiggay: - rscadd: Black Box theft objective +2020-07-29: + DeltaFire15: + - bugfix: The 'Naked' outfit is no longer broken. + Ghommie: + - bugfix: fixed cremator trays, paleness examination strings, chat message for stamping + paper, looping sounds, load away missions/VR admin verb, access requirements + for using the sechuds. + - tweak: Alt-Clicking a cigarette packet should pull the lighter out first if present, + then cigarettes. + Hatterhat: + - bugfix: Directional windows can now be rotated counterclockwise properly again. + NecromancerAnne, Sirich96: + - rscadd: Stunbaton sprites by Sirich96. + - rscadd: New sprites for the stunsword. + necromanceranne: + - rscadd: Adds some in-hands for the rapier sheath. + timothyteakettle: + - bugfix: tail wagging should work in all cases now + - bugfix: bluespace jars work as intended now + - bugfix: aliens can remove embeds now + - bugfix: bloodsuckers are not affected by bloodloss + zeroisthebiggay: + - rscadd: Flannel jackets and bartender winter coat diff --git a/html/changelogs/AutoChangeLog-pr-12936.yml b/html/changelogs/AutoChangeLog-pr-12936.yml deleted file mode 100644 index 8bb3b76912..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12936.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "zeroisthebiggay" -delete-after: True -changes: - - rscadd: "Flannel jackets and bartender winter coat" diff --git a/html/changelogs/AutoChangeLog-pr-12937.yml b/html/changelogs/AutoChangeLog-pr-12937.yml deleted file mode 100644 index c1d8c67870..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12937.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Ghommie" -delete-after: True -changes: - - bugfix: "fixed cremator trays, paleness examination strings, chat message for stamping paper, looping sounds, load away missions/VR admin verb, access requirements for using the sechuds." - - tweak: "Alt-Clicking a cigarette packet should pull the lighter out first if present, then cigarettes." diff --git a/html/changelogs/AutoChangeLog-pr-12938.yml b/html/changelogs/AutoChangeLog-pr-12938.yml deleted file mode 100644 index 20d64c123a..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12938.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "necromanceranne" -delete-after: True -changes: - - rscadd: "Adds some in-hands for the rapier sheath." diff --git a/html/changelogs/AutoChangeLog-pr-12940.yml b/html/changelogs/AutoChangeLog-pr-12940.yml deleted file mode 100644 index f2dcf496ba..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12940.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "NecromancerAnne, Sirich96" -delete-after: True -changes: - - rscadd: "Stunbaton sprites by Sirich96." - - rscadd: "New sprites for the stunsword." diff --git a/html/changelogs/AutoChangeLog-pr-12941.yml b/html/changelogs/AutoChangeLog-pr-12941.yml deleted file mode 100644 index 51c855520c..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12941.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "aliens can remove embeds now" diff --git a/html/changelogs/AutoChangeLog-pr-12942.yml b/html/changelogs/AutoChangeLog-pr-12942.yml deleted file mode 100644 index 5b11da4888..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12942.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "DeltaFire15" -delete-after: True -changes: - - bugfix: "The 'Naked' outfit is no longer broken." diff --git a/html/changelogs/AutoChangeLog-pr-12945.yml b/html/changelogs/AutoChangeLog-pr-12945.yml deleted file mode 100644 index 730a2b8887..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12945.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "bluespace jars work as intended now" diff --git a/html/changelogs/AutoChangeLog-pr-12948.yml b/html/changelogs/AutoChangeLog-pr-12948.yml deleted file mode 100644 index ef74298edc..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12948.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Hatterhat" -delete-after: True -changes: - - bugfix: "Directional windows can now be rotated counterclockwise properly again." diff --git a/html/changelogs/AutoChangeLog-pr-12950.yml b/html/changelogs/AutoChangeLog-pr-12950.yml deleted file mode 100644 index 8de78f9a6a..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12950.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "tail wagging should work in all cases now" diff --git a/html/changelogs/AutoChangeLog-pr-12951.yml b/html/changelogs/AutoChangeLog-pr-12951.yml deleted file mode 100644 index 35bfeea6a2..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12951.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "bloodsuckers are not affected by bloodloss" From 3825bb73df9d8a6e0540320fe971cdc3db1882a2 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:45:14 -0500 Subject: [PATCH 125/142] Automatic changelog generation for PR #12930 [ci skip] --- html/changelogs/AutoChangeLog-pr-12930.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12930.yml diff --git a/html/changelogs/AutoChangeLog-pr-12930.yml b/html/changelogs/AutoChangeLog-pr-12930.yml new file mode 100644 index 0000000000..d3df829756 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12930.yml @@ -0,0 +1,5 @@ +author: "silicons" +delete-after: True +changes: + - rscadd: "turrets now automatically stagger their shots. Happy parrying/blocking." + - bugfix: "turrets now speed_process, they were shooting slower than they should be" From 9e07eeb84dbfb5dc3910004888cc03570eafebf4 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:45:58 -0500 Subject: [PATCH 126/142] Automatic changelog generation for PR #12932 [ci skip] --- html/changelogs/AutoChangeLog-pr-12932.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12932.yml diff --git a/html/changelogs/AutoChangeLog-pr-12932.yml b/html/changelogs/AutoChangeLog-pr-12932.yml new file mode 100644 index 0000000000..62af146dcc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12932.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - rscadd: "energy sword perfect parries now reflect projectiles back at their shooters." From 13e50ced557e85dd41e91af02ad0ca964b0998e9 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:48:07 -0500 Subject: [PATCH 127/142] Automatic changelog generation for PR #12928 [ci skip] --- html/changelogs/AutoChangeLog-pr-12928.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12928.yml diff --git a/html/changelogs/AutoChangeLog-pr-12928.yml b/html/changelogs/AutoChangeLog-pr-12928.yml new file mode 100644 index 0000000000..442b685b25 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12928.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - balance: "any mob can now parry if they have the right item" From 3371022275c94df0c9fcfe5d7da074aad784e334 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:48:17 -0500 Subject: [PATCH 128/142] Automatic changelog generation for PR #12929 [ci skip] --- html/changelogs/AutoChangeLog-pr-12929.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12929.yml diff --git a/html/changelogs/AutoChangeLog-pr-12929.yml b/html/changelogs/AutoChangeLog-pr-12929.yml new file mode 100644 index 0000000000..bc238805a5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12929.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - balance: "anything can now block with the right items" From 2e63c1745665876d2dc86a9cdc1f4f738df02ee8 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:51:14 -0500 Subject: [PATCH 129/142] Automatic changelog generation for PR #12834 [ci skip] --- html/changelogs/AutoChangeLog-pr-12834.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12834.yml diff --git a/html/changelogs/AutoChangeLog-pr-12834.yml b/html/changelogs/AutoChangeLog-pr-12834.yml new file mode 100644 index 0000000000..c58a6b14ea --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12834.yml @@ -0,0 +1,10 @@ +author: "silicons" +delete-after: True +changes: + - refactor: "clickdelay has been refactored into an experimental hybrid system. Check code/modules/mob/clickdelay.dm for more information." + - balance: "Resisting no longer checks clickdelay, but is standardized to a 2 second per resist system for most forms of resisting. It still sets clickdelay, though." + - rscadd: "Meters have been added for estimating time until next attack/resist. Won't be that useful due to our clickdelay currently being very short, though. They're visible from your hand and resist HUD elements. +experimental: Most attacks and forms of attacking (minus unarmed because it's too much of a pain to refactor how hugs/gloves of the north star works) now check for time-since-last-attack rather than making it so you can't attack for said time. This means you can very quickly switch to a gun from a melee weapon, whereas in the old system a melee weapon would put you on lockout for 0.8 seconds, in the new system all the gun cares about is that you did not attack for at least 0.4 seconds." + - code_imp: "All clickdelay setting/reading are now procs, so it should be trivial to implement another system where drawing/switching to a weapon requires you to have it out for x seconds before using it. I am not personally doing it at this point in time though because it will likely just annoy everyone with no real gain unless we do something like putting a 0.8 second switch-to cooldown for guns (which I did not, yet)" + - refactor: "attack_hand has been refactored to on_attack_hand +remove: sexchems no longer impact click delay" From be20861294f132d522d8002c989494223e502e4d Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 21:51:46 -0500 Subject: [PATCH 130/142] Automatic changelog generation for PR #12734 [ci skip] --- html/changelogs/AutoChangeLog-pr-12734.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12734.yml diff --git a/html/changelogs/AutoChangeLog-pr-12734.yml b/html/changelogs/AutoChangeLog-pr-12734.yml new file mode 100644 index 0000000000..952ee721e0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12734.yml @@ -0,0 +1,6 @@ +author: "Ryll-Ryll ported by silicons" +delete-after: True +changes: + - rscadd: "Shoelaces are now a thing. You can untie them by laying down next to someone." + - tweak: "shoes now have lace delays and some can't be laced at all" + - refactor: "do after now tracks who's interacting with who, meaning some actions now break when the target moves away." From 105cc8dc703a55c29add5e0f97cee6f4f7dc6011 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 22:05:42 -0500 Subject: [PATCH 131/142] Automatic changelog generation for PR #12883 [ci skip] --- html/changelogs/AutoChangeLog-pr-12883.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12883.yml diff --git a/html/changelogs/AutoChangeLog-pr-12883.yml b/html/changelogs/AutoChangeLog-pr-12883.yml new file mode 100644 index 0000000000..53aa8c6b4e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12883.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - rscadd: "beam rifles now go into emitters properly" From 481f29fc072bebd9caeda6bb068b19d764225a78 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 22:11:34 -0500 Subject: [PATCH 132/142] Automatic changelog generation for PR #12944 [ci skip] --- html/changelogs/AutoChangeLog-pr-12944.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12944.yml diff --git a/html/changelogs/AutoChangeLog-pr-12944.yml b/html/changelogs/AutoChangeLog-pr-12944.yml new file mode 100644 index 0000000000..b055145583 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12944.yml @@ -0,0 +1,4 @@ +author: "timothyteakettle" +delete-after: True +changes: + - bugfix: "some crafted crates won't contain items now, and thus have stopped breaking the laws of physics" From dbc766a7ca4cadb5d1b0f2d92f7e987bbdcde1ef Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 28 Jul 2020 22:17:10 -0500 Subject: [PATCH 133/142] Automatic changelog generation for PR #12922 [ci skip] --- html/changelogs/AutoChangeLog-pr-12922.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12922.yml diff --git a/html/changelogs/AutoChangeLog-pr-12922.yml b/html/changelogs/AutoChangeLog-pr-12922.yml new file mode 100644 index 0000000000..ff2fac660f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12922.yml @@ -0,0 +1,4 @@ +author: "timothyteakettle" +delete-after: True +changes: + - tweak: "beepskys hats now follow the laws of gravity and move up/down when he bobs up and down" From 78312c23bfe1f952fa89e23b8c1c9b27c2e632d9 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 28 Jul 2020 21:53:07 -0700 Subject: [PATCH 134/142] sigh --- code/_onclick/hud/alert.dm | 2 +- code/_onclick/item_attack.dm | 11 +++++++++++ code/modules/mob/mob_defines.dm | 3 --- code/modules/reagents/reagent_containers.dm | 3 ++- .../modules/reagents/reagent_containers/glass.dm | 5 +++++ .../reagents/reagent_containers/hypospray.dm | 4 ++++ code/modules/reagents/reagent_containers/pill.dm | 16 +++++++++------- .../reagents/reagent_containers/syringes.dm | 5 ++++- .../code/game/objects/cit_screenshake.dm | 12 ------------ 9 files changed, 36 insertions(+), 25 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 3942d96f29..64250f6dd0 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -624,7 +624,7 @@ so as to remain in compliance with the most up-to-date laws." var/mob/living/carbon/C = usr if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes) return - C.changeNext_move(CLICK_CD_RESIST) + C.MarkResistTime() C.shoes.handle_tying(C) // PRIVATE = only edit, use, or override these if you're editing the system as a whole diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 199e401e39..eba125384b 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -104,6 +104,17 @@ if(weight) user.adjustStaminaLossBuffered(weight) + // CIT SCREENSHAKE + if(force >= 15) + shake_camera(user, ((force - 10) * 0.01 + 1), ((force - 10) * 0.01)) + if(M.client) + switch (M.client.prefs.damagescreenshake) + if (1) + shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) + if (2) + if(!CHECK_MOBILITY(M, MOBILITY_MOVE)) + shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) + //the equivalent of the standard version of attack() but for object targets. /obj/item/proc/attack_obj(obj/O, mob/living/user) if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 0da221ef49..195c50e958 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -162,6 +162,3 @@ var/typing_indicator_timerid /// Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays. var/typing_indicator_current - - ///For storing what do_after's someone has, in case we want to restrict them to only one of a certain do_after at a time - var/list/do_afters diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index fbdbb5f656..b71584982c 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -69,7 +69,8 @@ to_chat(user, "[src]'s transfer amount is now [amount_per_transfer_from_this] units.") return -/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) + . = ..() if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 37ea2ca70d..ec26182813 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -9,6 +9,11 @@ container_HP = 2 /obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target) + // WARNING: This entire section is shitcode and prone to breaking at any time. + INVOKE_ASYNC(src, .proc/attempt_feed, M, user, target) // for example, the arguments in this proc are wrong + // but i don't have time to properly fix it right now. + +/obj/item/reagent_containers/glass/proc/attempt_feed(mob/M, mob/user, obj/target) if(!canconsume(M, user)) return diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index c36dc9d1db..27db55d7af 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -368,6 +368,10 @@ return /obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity) + . = ..() + INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity) + +/obj/item/hypospray/mkii/proc/attempt_inject(atom/target, mob/user, proximity) if(!vial || !proximity || !isliving(target)) return var/mob/living/L = target diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index ec1e7823ed..3c23794e5a 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -28,22 +28,24 @@ /obj/item/reagent_containers/pill/get_w_volume() // DEFAULT_VOLUME_TINY at 25u, DEFAULT_VOLUME_SMALL at 50u return DEFAULT_VOLUME_TINY/2 + reagents.total_volume / reagents.maximum_volume * DEFAULT_VOLUME_TINY -/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/pill/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1) + INVOKE_ASYNC(src, .proc/attempt_feed, M, user) + +/obj/item/reagent_containers/pill/proc/attempt_feed(mob/living/M, mob/living/user) if(!canconsume(M, user)) - return 0 + return FALSE if(M == user) M.visible_message("[user] attempts to [apply_method] [src].") if(self_delay) if(!do_mob(user, M, self_delay)) - return 0 + return FALSE to_chat(M, "You [apply_method] [src].") - else M.visible_message("[user] attempts to force [M] to [apply_method] [src].", \ "[user] attempts to force [M] to [apply_method] [src].") if(!do_mob(user, M)) - return 0 + return FALSE M.visible_message("[user] forces [M] to [apply_method] [src].", \ "[user] forces [M] to [apply_method] [src].") @@ -56,8 +58,7 @@ reagents.reaction(M, apply_type) reagents.trans_to(M, reagents.total_volume) qdel(src) - return 1 - + return TRUE /obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity) . = ..() @@ -77,6 +78,7 @@ "You dissolve [src] in [target].", vision_distance = 2) reagents.trans_to(target, reagents.total_volume) qdel(src) + return STOP_ATTACK_PROC_CHAIN /obj/item/reagent_containers/pill/tox name = "toxins pill" diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 52284b2c11..0220802c3e 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -52,8 +52,11 @@ /obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params) return -/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity) +/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user, proximity) . = ..() + INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity) + +/obj/item/reagent_containers/syringe/proc/attempt_inject(atom/target, mob/user, proximity) if(busy) return if(!proximity) diff --git a/modular_citadel/code/game/objects/cit_screenshake.dm b/modular_citadel/code/game/objects/cit_screenshake.dm index 188b8a48f9..222de37f82 100644 --- a/modular_citadel/code/game/objects/cit_screenshake.dm +++ b/modular_citadel/code/game/objects/cit_screenshake.dm @@ -45,18 +45,6 @@ . = ..() shake_camera(user, (pressureSetting * 0.75 + 1), (pressureSetting * 0.75)) -/obj/item/attack(mob/living/M, mob/living/user) - . = ..() - if(force >= 15) - shake_camera(user, ((force - 10) * 0.01 + 1), ((force - 10) * 0.01)) - if(M.client) - switch (M.client.prefs.damagescreenshake) - if (1) - shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) - if (2) - if(!CHECK_MOBILITY(M, MOBILITY_MOVE)) - shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015)) - /obj/item/attack_obj(obj/O, mob/living/user) . = ..() if(force >= 20) From f8f29826f511d3f46be3d8bc3be33a8facb0243b Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 29 Jul 2020 03:09:51 -0500 Subject: [PATCH 136/142] Automatic changelog generation for PR #12924 [ci skip] --- html/changelogs/AutoChangeLog-pr-12924.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12924.yml diff --git a/html/changelogs/AutoChangeLog-pr-12924.yml b/html/changelogs/AutoChangeLog-pr-12924.yml new file mode 100644 index 0000000000..e106d42bef --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12924.yml @@ -0,0 +1,4 @@ +author: "SiliconMain" +delete-after: True +changes: + - rscadd: "Ported the long range atmos analyzer from sk*rat, credit to NotRanged" From bc823b544fc2cd4824fc854ca1790ddc33197f86 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 29 Jul 2020 01:17:16 -0700 Subject: [PATCH 137/142] sigh --- code/game/machinery/telecomms/machines/message_server.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 4 ++-- code/modules/research/designs/tool_designs.dm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index c6386241ee..04fd5f6af5 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -21,7 +21,7 @@ . = ..() stored = new /obj/item/blackbox(src) -/obj/machinery/blackbox_recorder/attack_hand(mob/living/user) +/obj/machinery/blackbox_recorder/on_attack_hand(mob/living/user, act_intent, unarmed_attack_flags) . = ..() if(stored) to_chat(user, "You start struggling to pry the [stored] from the [src]...") diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index c12702424b..746bd3458a 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -268,13 +268,13 @@ our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied) -/obj/item/clothing/shoes/attack_hand(mob/living/carbon/human/user) +/obj/item/clothing/shoes/on_attack_hand(mob/living/user, act_intent, unarmed_attack_flags) if(!istype(user)) return ..() if(loc == user && tied != SHOES_TIED && (user.mobility_flags & MOBILITY_USE)) handle_tying(user) return - ..() + return ..() /obj/item/clothing/shoes/attack_self(mob/user) . = ..() diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm index 0a278602c1..dd7e130f17 100644 --- a/code/modules/research/designs/tool_designs.dm +++ b/code/modules/research/designs/tool_designs.dm @@ -92,7 +92,7 @@ category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO - /datum/design/ranged_analyzer +/datum/design/ranged_analyzer name = "Long-range Analyzer" desc = "A new advanced atmospheric analyzer design, capable of performing scans at long range." id = "ranged_analyzer" From 9a9993c7be4e5acc3e8b2e1876a38aaa98cccac7 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Wed, 29 Jul 2020 19:00:06 +0100 Subject: [PATCH 138/142] yep --- code/modules/research/designs/tool_designs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm index 0a278602c1..4fe07cb02f 100644 --- a/code/modules/research/designs/tool_designs.dm +++ b/code/modules/research/designs/tool_designs.dm @@ -91,8 +91,8 @@ build_path = /obj/item/construction/rld/mini category = list("Tool Designs") departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO - - /datum/design/ranged_analyzer + +/datum/design/ranged_analyzer name = "Long-range Analyzer" desc = "A new advanced atmospheric analyzer design, capable of performing scans at long range." id = "ranged_analyzer" From 097327b4f386788c2f5a115e8fda55e56a5b74ab Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Wed, 29 Jul 2020 19:02:18 +0100 Subject: [PATCH 139/142] Revert "Merge branch 'master' into travis-patch-1" This reverts commit de3d6310b2345e52dfbfbe5b2c36f7d864afe020, reversing changes made to f8f29826f511d3f46be3d8bc3be33a8facb0243b. --- html/changelogs/.all_changelog.yml | 232 +++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 662e458972..cd3f5c04bc 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -26372,3 +26372,235 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - bugfix: small error with pet carrier logic fixed and also making sure simple mobs are catered for properly inside bluespace jars - bugfix: fixes coin related issue +2020-07-17: + ShizCalev, Fikou: + - bugfix: Added some sanity checking for varedit values. + - bugfix: Fixed an exploit involving coins and mints that could crash the server. + - bugfix: Fixed an exploit that would allow you to destroy round-critical / indestructible + items with folders. + - bugfix: Swarmers can no longer cut power lines by deconstructing catwalks underneath + them. + - bugfix: Fixed a scenario that allowed infinite resource generation via ore machines. + - bugfix: you can no longer inject html in ahelps + - admin: you cant either, jannies + timothyteakettle: + - bugfix: fixes a small pickle related issue + - rscadd: recent culinary and scientific advancements have brought forth new pickle + related technologies +2020-07-19: + Arturlang: + - rscadd: TGUI 3.0 and enables all the UIs, plus the smart asset cache, and all + the things required for them + EmeraldSundisk: + - rscadd: Adds a pool to Delta Station + - rscadd: Adds light fixtures to specified areas + - tweak: Relocates objects in impacted areas of Delta's starboard maintenance + MrJWhit: + - rscadd: Adds a small light next to the kitchen counter + Putnam3145: + - bugfix: Pen uplinks no longer broken + TheObserver-sys: + - rscadd: 'Adds a new reaction: Slime Extractification. Take 30u Slime Jelly, 5u + Frost Oil, and 5u plasma to generate a fresh grey slime extract.' + Yakumo Chen: + - tweak: Hierophant club now checks for friendly fire by default. + b1tt3r1n0: + - rscadd: Added the updated circle game + silicons: + - rscadd: Unarmed parry is now a thing. + timothyteakettle: + - rscadd: plushies in the loadout have been replaced with a box that lets you choose + one instead + - bugfix: wrestling should no longer have the ability to permanently rotate people + - rscadd: you can now select to wear a snail shell as your backpack in the customization + menu + zeroisthebiggay: + - tweak: martial arts twenty minpop + - bugfix: records +2020-07-20: + lolman360: + - tweak: Service borgs now have synthesizers instead of a violin and guitar. + - bugfix: borg RSF +2020-07-21: + Arturlang: + - bugfix: Decal painter ui now works, yay? + CameronWoof: + - rscadd: Adds aloe, a new growable plant + - rscadd: Adds medicated sutures and advanced regenerative meshes + - bugfix: Polypyrylium oligomers and liquid electricity now correctly populate + Chiirno: + - rscadd: Alt-click pill bottles places top-most pill into active hand. + - tweak: Moved dice bags from pill_bottle/dice to box/dice to avoid dice bags being + affected from medical specific pill bottle changes. + DeltaFire15: + - bugfix: Swarmers can once again eat items as long as there's nothing living in + them. + Funce: + - bugfix: Genetics spiderwebs are no longer impassable walls + Kraseo: + - balance: Damp rags no longer instantly apply their chemicals onto someone. + SiliconMain: + - tweak: Geigers can no longer be contaminated + TheSpaghetti: + - rscadd: new snowflake trait + kappa-sama: + - balance: advanced surgery duffel bag no longer comes with a nukie medkit. it costs + 4 less telecrystals to make up for this colossal nerf. + - tweak: quartered the weight of the stray cargo pod event from 2x normal to 1/2 + normal + silicons: + - tweak: survivalists (from summon guns/magic) are proper objective'd pseudoantagonists + again + - tweak: summon guns/magic can only be used once each + - tweak: summon guns/magic now only cost one point each + - imageadd: ':dsmile: :dfrown: :dhsmile: :dpog: :dneutral:' + - bugfix: gravity should update for mobs a fair bit faster + - rscadd: voting can now be done from the stat panel if the system is plurality + and approval + timothyteakettle: + - rscadd: new fried component used for frying objects + - bugfix: various frying bugs fixed such as being able to unfry items and frying + turfs with cold cooking oil +2020-07-22: + Ludox: + - rscdel: You can no longer be brainwashed into giving birth to a fake baby + kappa-sama: + - balance: brainwashing disk has lost its cost buffs (3->5) and is role restricted + once more (medical doctor/roboticist) +2020-07-23: + DeltaFire15: + - bugfix: Traits are no longer fucked + Putnam3145: + - tweak: Slight optimization in chat code. + kappa-sama: + - bugfix: tendril chests being empty + zeroisthebiggay: + - rscadd: fetish content +2020-07-24: + EmeraldSundisk: + - rscadd: Adds a CMO office, along with Virology and Genetics labs to Omega Station + - rscadd: Adds a second chemistry station to the chemistry lab + - tweak: Adjusts the locations of some objects in medical to accommodate these new + additions + - tweak: Relocates the morgue + - tweak: Relocates items in impacted areas of maintenance as well as the library + - bugfix: Fixes an air line Bartholomew somehow knocked out + Linzolle: + - bugfix: wounds now have a description on examine + Owai-Seek: + - rscadd: Meatball Sub, Meatloaf + Meatloaf Slices, Bear Chili, Mashed Potatoes + - rscadd: Buttered Potatoes, Fancy Cracker Pack, Spiral Soup, Sweet and Sour Chicken + - tweak: Organised the Food DMI a bit. + - tweak: Deleted some stray pixels on some sprites. + - tweak: Nuggie boxes are now centered correctly. + - imageadd: Icons for the the food items in this PR. + Sneakyrat6: + - bugfix: Fixes dressers not giving you undies + - bugfix: Fixes Snaxi not loading properly because of typos + - rscadd: You can now burn photos + Zandario: + - spellcheck: Murdered **tipes** and gave birth to **is**. + silicons: + - tweak: sanitization now doesn't cut off 15.7 or something million possible colors + from character preferences (instead of only allowing 16 values for R G and B, + it now allows 256 each) + - balance: projectiles are by default 17.5 tiles per second instead of 12.5 + timothyteakettle: + - rscadd: due to recent innovative research in the medical field, you now have bones + - tweak: zombie claws are now sharp and do less damage, but can destroy non-lifeforms + far faster + - tweak: zombies now take less stamina damage + - rscadd: beepsky can now wear hats + zeroisthebiggay: + - imageadd: rad and kravglove sprites +2020-07-25: + CameronWoof: + - bugfix: Aloe now has an icon. + timothyteakettle: + - bugfix: beepsky replaces the word THREAT_LEVEL with the actual threat level +2020-07-26: + DeltaFire15: + - bugfix: Organs now decay again. + Iatots: + - tweak: Licking wounds now may cause you to spit out a hairball once in a while! + - rscadd: You can now craft a catgirl plushie with 3 of a new ingredient occasionally + found in medbay! + dapnee: + - tweak: removed legacy public mining shuttle area and remade lounge +2020-07-27: + Hatterhat: + - rscadd: Training bokkens! Make 'em from wood, use 'em in-hand to toggle between + harmful and not-so-harmful, practice your parrying with them! + - bugfix: Marker beacons should have a sprite again. + silicons: + - rscadd: clownops and clown mobs now share the same faction. HONK! + timothyteakettle: + - bugfix: modern pickle technology now allows people who have been turned into pickles, + to be retrieved through the medical course of dying +2020-07-28: + Cacogen: + - rscadd: OSHA has more pull than anyone could have expected. All armor provided + by Nanotrasen and the syndicate now have tags that accurately lists defenses + and resistances of a piece of clothing. + CameronWoof: + - tweak: Exotic seed crates now contain a spaceman's trumpet seed packet. + EmeraldSundisk: + - rscadd: Renovates Snow Taxi's northeast bathroom to have multiple non-urinal toilets + and showers + - rscadd: Adds signage/labeling to improve map readability + - rscadd: Adds a bathroom to the northwest station + - rscadd: Adds a filing cabinet to the cargo department + - tweak: Area designation adjustments to account for the above changes + - bugfix: Adds a missing airlock cyclelink near medical + Ludox235: + - tweak: Makes the flavour text that appears when you become a zombie tell you to + act like one. + MrJWhit: + - tweak: Decluttered toxins and hid the yellow mix line in atmos, for metastation + SiliconMain: + - tweak: Paramedic heirloom is now a zippo + - tweak: Durathread belts now protect their contents from radiation, and can hold + full sized extinguishers + Sishen1542: + - rscdel: removed zoomba + dapnee: + - tweak: added a fan to the listening outpost + - bugfix: added two missing r-walls near the SM, removed random light and wire node + below the engine, and fixed the missing cable in the courtroom on Kilo + kappa-sama: + - balance: Stimpaks cost 5tc once more, up from 3tc. + silicons: + - rscadd: polychromatic cloaks to loadout + - rscdel: no more self healing with medibeam guns + - balance: oh no, taser buff. alt fire delay dropped to 0.4 seconds. + - rscadd: you can now shoot yourself by disarm-intenting yourself with a gun. + timothyteakettle: + - tweak: species code is now slightly less messy + - bugfix: slight tweak to how material crafting works + - bugfix: changed up pet carriers / bluespace jars a bit so you can't fit certain + things inside them and also the text shown for resist times is accurate + zeroisthebiggay: + - rscadd: Black Box theft objective +2020-07-29: + DeltaFire15: + - bugfix: The 'Naked' outfit is no longer broken. + Ghommie: + - bugfix: fixed cremator trays, paleness examination strings, chat message for stamping + paper, looping sounds, load away missions/VR admin verb, access requirements + for using the sechuds. + - tweak: Alt-Clicking a cigarette packet should pull the lighter out first if present, + then cigarettes. + Hatterhat: + - bugfix: Directional windows can now be rotated counterclockwise properly again. + NecromancerAnne, Sirich96: + - rscadd: Stunbaton sprites by Sirich96. + - rscadd: New sprites for the stunsword. + necromanceranne: + - rscadd: Adds some in-hands for the rapier sheath. + timothyteakettle: + - bugfix: tail wagging should work in all cases now + - bugfix: bluespace jars work as intended now + - bugfix: aliens can remove embeds now + - bugfix: bloodsuckers are not affected by bloodloss + zeroisthebiggay: + - rscadd: Flannel jackets and bartender winter coat From d4469b8db8ad714581230e61a521748401a61422 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 29 Jul 2020 15:48:47 -0500 Subject: [PATCH 140/142] Automatic changelog generation for PR #12953 [ci skip] --- html/changelogs/AutoChangeLog-pr-12953.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12953.yml diff --git a/html/changelogs/AutoChangeLog-pr-12953.yml b/html/changelogs/AutoChangeLog-pr-12953.yml new file mode 100644 index 0000000000..d99f66b45a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12953.yml @@ -0,0 +1,4 @@ +author: "Adelphon" +delete-after: True +changes: + - rscadd: "Created a Cosmetic version of the camo." From 62cbe958565808e3d5af38c2d7be97252332ff32 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 29 Jul 2020 16:02:26 -0500 Subject: [PATCH 141/142] Automatic changelog generation for PR #12955 [ci skip] --- html/changelogs/AutoChangeLog-pr-12955.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-12955.yml diff --git a/html/changelogs/AutoChangeLog-pr-12955.yml b/html/changelogs/AutoChangeLog-pr-12955.yml new file mode 100644 index 0000000000..16669e36cd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-12955.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - code_imp: "Bloodsucker LifeTick runs from BiologicalLife now" From 0711e45d18801a7c4a71c1ae75e159ad53a334ac Mon Sep 17 00:00:00 2001 From: Changelogs Date: Thu, 30 Jul 2020 00:11:15 +0000 Subject: [PATCH 142/142] Automatic changelog compile [ci skip] --- html/changelog.html | 39 ++++++++++++++++++ html/changelogs/.all_changelog.yml | 46 ++++++++++++++++++++++ html/changelogs/AutoChangeLog-pr-12734.yml | 6 --- html/changelogs/AutoChangeLog-pr-12834.yml | 10 ----- html/changelogs/AutoChangeLog-pr-12883.yml | 4 -- html/changelogs/AutoChangeLog-pr-12922.yml | 4 -- html/changelogs/AutoChangeLog-pr-12924.yml | 4 -- html/changelogs/AutoChangeLog-pr-12928.yml | 4 -- html/changelogs/AutoChangeLog-pr-12929.yml | 4 -- html/changelogs/AutoChangeLog-pr-12930.yml | 5 --- html/changelogs/AutoChangeLog-pr-12932.yml | 4 -- html/changelogs/AutoChangeLog-pr-12944.yml | 4 -- html/changelogs/AutoChangeLog-pr-12953.yml | 4 -- html/changelogs/AutoChangeLog-pr-12955.yml | 4 -- 14 files changed, 85 insertions(+), 57 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-12734.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12834.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12883.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12922.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12924.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12928.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12929.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12930.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12932.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12944.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12953.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-12955.yml diff --git a/html/changelog.html b/html/changelog.html index 3248f6d729..8c93566692 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,45 @@ -->
      +

      30 July 2020

      +

      Adelphon updated:

      +
        +
      • Created a Cosmetic version of the camo.
      • +
      +

      Arturlang updated:

      +
        +
      • Bloodsucker LifeTick runs from BiologicalLife now
      • +
      +

      Ryll-Ryll ported by silicons updated:

      +
        +
      • Shoelaces are now a thing. You can untie them by laying down next to someone.
      • +
      • shoes now have lace delays and some can't be laced at all
      • +
      • do after now tracks who's interacting with who, meaning some actions now break when the target moves away.
      • +
      +

      SiliconMain updated:

      +
        +
      • Ported the long range atmos analyzer from sk*rat, credit to NotRanged
      • +
      +

      silicons updated:

      +
        +
      • energy sword perfect parries now reflect projectiles back at their shooters.
      • +
      • any mob can now parry if they have the right item
      • +
      • beam rifles now go into emitters properly
      • +
      • clickdelay has been refactored into an experimental hybrid system. Check code/modules/mob/clickdelay.dm for more information.
      • +
      • Resisting no longer checks clickdelay, but is standardized to a 2 second per resist system for most forms of resisting. It still sets clickdelay, though.
      • +
      • Meters have been added for estimating time until next attack/resist. Won't be that useful due to our clickdelay currently being very short, though. They're visible from your hand and resist HUD elements. experimental: Most attacks and forms of attacking (minus unarmed because it's too much of a pain to refactor how hugs/gloves of the north star works) now check for time-since-last-attack rather than making it so you can't attack for said time. This means you can very quickly switch to a gun from a melee weapon, whereas in the old system a melee weapon would put you on lockout for 0.8 seconds, in the new system all the gun cares about is that you did not attack for at least 0.4 seconds.
      • +
      • All clickdelay setting/reading are now procs, so it should be trivial to implement another system where drawing/switching to a weapon requires you to have it out for x seconds before using it. I am not personally doing it at this point in time though because it will likely just annoy everyone with no real gain unless we do something like putting a 0.8 second switch-to cooldown for guns (which I did not, yet)
      • +
      • attack_hand has been refactored to on_attack_hand remove: sexchems no longer impact click delay
      • +
      • turrets now automatically stagger their shots. Happy parrying/blocking.
      • +
      • turrets now speed_process, they were shooting slower than they should be
      • +
      • anything can now block with the right items
      • +
      +

      timothyteakettle updated:

      +
        +
      • some crafted crates won't contain items now, and thus have stopped breaking the laws of physics
      • +
      • beepskys hats now follow the laws of gravity and move up/down when he bobs up and down
      • +
      +

      29 July 2020

      DeltaFire15 updated:

        diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index cd3f5c04bc..6f8b79bb80 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -26604,3 +26604,49 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - bugfix: bloodsuckers are not affected by bloodloss zeroisthebiggay: - rscadd: Flannel jackets and bartender winter coat +2020-07-30: + Adelphon: + - rscadd: Created a Cosmetic version of the camo. + Arturlang: + - code_imp: Bloodsucker LifeTick runs from BiologicalLife now + Ryll-Ryll ported by silicons: + - rscadd: Shoelaces are now a thing. You can untie them by laying down next to someone. + - tweak: shoes now have lace delays and some can't be laced at all + - refactor: do after now tracks who's interacting with who, meaning some actions + now break when the target moves away. + SiliconMain: + - rscadd: Ported the long range atmos analyzer from sk*rat, credit to NotRanged + silicons: + - rscadd: energy sword perfect parries now reflect projectiles back at their shooters. + - balance: any mob can now parry if they have the right item + - rscadd: beam rifles now go into emitters properly + - refactor: clickdelay has been refactored into an experimental hybrid system. Check + code/modules/mob/clickdelay.dm for more information. + - balance: Resisting no longer checks clickdelay, but is standardized to a 2 second + per resist system for most forms of resisting. It still sets clickdelay, though. + - rscadd: 'Meters have been added for estimating time until next attack/resist. + Won''t be that useful due to our clickdelay currently being very short, though. + They''re visible from your hand and resist HUD elements. experimental: Most + attacks and forms of attacking (minus unarmed because it''s too much of a pain + to refactor how hugs/gloves of the north star works) now check for time-since-last-attack + rather than making it so you can''t attack for said time. This means you can + very quickly switch to a gun from a melee weapon, whereas in the old system + a melee weapon would put you on lockout for 0.8 seconds, in the new system all + the gun cares about is that you did not attack for at least 0.4 seconds.' + - code_imp: All clickdelay setting/reading are now procs, so it should be trivial + to implement another system where drawing/switching to a weapon requires you + to have it out for x seconds before using it. I am not personally doing it at + this point in time though because it will likely just annoy everyone with no + real gain unless we do something like putting a 0.8 second switch-to cooldown + for guns (which I did not, yet) + - refactor: 'attack_hand has been refactored to on_attack_hand remove: sexchems + no longer impact click delay' + - rscadd: turrets now automatically stagger their shots. Happy parrying/blocking. + - bugfix: turrets now speed_process, they were shooting slower than they should + be + - balance: anything can now block with the right items + timothyteakettle: + - bugfix: some crafted crates won't contain items now, and thus have stopped breaking + the laws of physics + - tweak: beepskys hats now follow the laws of gravity and move up/down when he bobs + up and down diff --git a/html/changelogs/AutoChangeLog-pr-12734.yml b/html/changelogs/AutoChangeLog-pr-12734.yml deleted file mode 100644 index 952ee721e0..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12734.yml +++ /dev/null @@ -1,6 +0,0 @@ -author: "Ryll-Ryll ported by silicons" -delete-after: True -changes: - - rscadd: "Shoelaces are now a thing. You can untie them by laying down next to someone." - - tweak: "shoes now have lace delays and some can't be laced at all" - - refactor: "do after now tracks who's interacting with who, meaning some actions now break when the target moves away." diff --git a/html/changelogs/AutoChangeLog-pr-12834.yml b/html/changelogs/AutoChangeLog-pr-12834.yml deleted file mode 100644 index c58a6b14ea..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12834.yml +++ /dev/null @@ -1,10 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - refactor: "clickdelay has been refactored into an experimental hybrid system. Check code/modules/mob/clickdelay.dm for more information." - - balance: "Resisting no longer checks clickdelay, but is standardized to a 2 second per resist system for most forms of resisting. It still sets clickdelay, though." - - rscadd: "Meters have been added for estimating time until next attack/resist. Won't be that useful due to our clickdelay currently being very short, though. They're visible from your hand and resist HUD elements. -experimental: Most attacks and forms of attacking (minus unarmed because it's too much of a pain to refactor how hugs/gloves of the north star works) now check for time-since-last-attack rather than making it so you can't attack for said time. This means you can very quickly switch to a gun from a melee weapon, whereas in the old system a melee weapon would put you on lockout for 0.8 seconds, in the new system all the gun cares about is that you did not attack for at least 0.4 seconds." - - code_imp: "All clickdelay setting/reading are now procs, so it should be trivial to implement another system where drawing/switching to a weapon requires you to have it out for x seconds before using it. I am not personally doing it at this point in time though because it will likely just annoy everyone with no real gain unless we do something like putting a 0.8 second switch-to cooldown for guns (which I did not, yet)" - - refactor: "attack_hand has been refactored to on_attack_hand -remove: sexchems no longer impact click delay" diff --git a/html/changelogs/AutoChangeLog-pr-12883.yml b/html/changelogs/AutoChangeLog-pr-12883.yml deleted file mode 100644 index 53aa8c6b4e..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12883.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - rscadd: "beam rifles now go into emitters properly" diff --git a/html/changelogs/AutoChangeLog-pr-12922.yml b/html/changelogs/AutoChangeLog-pr-12922.yml deleted file mode 100644 index ff2fac660f..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12922.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - tweak: "beepskys hats now follow the laws of gravity and move up/down when he bobs up and down" diff --git a/html/changelogs/AutoChangeLog-pr-12924.yml b/html/changelogs/AutoChangeLog-pr-12924.yml deleted file mode 100644 index e106d42bef..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12924.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "SiliconMain" -delete-after: True -changes: - - rscadd: "Ported the long range atmos analyzer from sk*rat, credit to NotRanged" diff --git a/html/changelogs/AutoChangeLog-pr-12928.yml b/html/changelogs/AutoChangeLog-pr-12928.yml deleted file mode 100644 index 442b685b25..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12928.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - balance: "any mob can now parry if they have the right item" diff --git a/html/changelogs/AutoChangeLog-pr-12929.yml b/html/changelogs/AutoChangeLog-pr-12929.yml deleted file mode 100644 index bc238805a5..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12929.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - balance: "anything can now block with the right items" diff --git a/html/changelogs/AutoChangeLog-pr-12930.yml b/html/changelogs/AutoChangeLog-pr-12930.yml deleted file mode 100644 index d3df829756..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12930.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - rscadd: "turrets now automatically stagger their shots. Happy parrying/blocking." - - bugfix: "turrets now speed_process, they were shooting slower than they should be" diff --git a/html/changelogs/AutoChangeLog-pr-12932.yml b/html/changelogs/AutoChangeLog-pr-12932.yml deleted file mode 100644 index 62af146dcc..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12932.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "silicons" -delete-after: True -changes: - - rscadd: "energy sword perfect parries now reflect projectiles back at their shooters." diff --git a/html/changelogs/AutoChangeLog-pr-12944.yml b/html/changelogs/AutoChangeLog-pr-12944.yml deleted file mode 100644 index b055145583..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12944.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "some crafted crates won't contain items now, and thus have stopped breaking the laws of physics" diff --git a/html/changelogs/AutoChangeLog-pr-12953.yml b/html/changelogs/AutoChangeLog-pr-12953.yml deleted file mode 100644 index d99f66b45a..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12953.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Adelphon" -delete-after: True -changes: - - rscadd: "Created a Cosmetic version of the camo." diff --git a/html/changelogs/AutoChangeLog-pr-12955.yml b/html/changelogs/AutoChangeLog-pr-12955.yml deleted file mode 100644 index 16669e36cd..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12955.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Arturlang" -delete-after: True -changes: - - code_imp: "Bloodsucker LifeTick runs from BiologicalLife now"