mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Attack chain, initial setup. (pull *immediately* for *any* TM issues) (#26834)
* refactor: Attack chain, initial setup. * migrate curtain to make dreamchecker happy * update thurible * don't call attacked_by separately for legacy attack chain * remove duplicate proc * condense similar code, put allowances for legacy code in new procs * update docs, include diagram source * add comment on how to update diagram * fix admonition * mindflayer updates * remove commented out code * clarify all steps * after_attack should be overridable * whoops * retrofit recent changes * duh, can't restrict this yet because of tool_acts * i hate ore bags with the fire of a thousand suns * return correct value for object attack logic * Various cleanups. We don't want to attempt to pull stuff out of `/obj/item/attackby`, because those pieces are part of the related objects' migrations, not `/obj/item` itself. Attempting to do this causes knockon effects where things expected to call e.g. `/obj/item/storage/attackby` in the call chain were not ferried over to the new item interaction code, because the related objects hadn't actually been migrated over yet. I've used refactoring /obj/vehicle as the example for migrating `attackby` methods instead. * simplify some argument names * fuck it * make it do the thing * Rename CI module call * Prove that CI works * improve test output * aaand fix it again * fix curtain tool interactions * fix compile error * fix compile error * Better docs, introduce migration plan tool.
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/closet/crate/secure/loot/attackby__legacy__attackchain(obj/item/W, mob/user)
|
||||
if(locked)
|
||||
if(istype(W, /obj/item/card/emag))
|
||||
boom(user)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
var/obj/item/crusher_trophy/T = t
|
||||
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
|
||||
|
||||
/obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user)
|
||||
/obj/item/kinetic_crusher/attackby__legacy__attackchain(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/crusher_trophy))
|
||||
var/obj/item/crusher_trophy/T = I
|
||||
T.add_to(src, user)
|
||||
@@ -72,7 +72,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There are no trophies on [src].</span>")
|
||||
|
||||
/obj/item/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
|
||||
/obj/item/kinetic_crusher/attack__legacy__attackchain(mob/living/target, mob/living/carbon/user)
|
||||
if(!HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
to_chat(user, "<span class='warning'>[src] is too heavy to use with one hand. You fumble and drop everything.</span>")
|
||||
user.drop_r_hand()
|
||||
@@ -103,7 +103,7 @@
|
||||
if(ismob(user) && isturf(user.loc))
|
||||
return user.loc
|
||||
|
||||
/obj/item/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
|
||||
/obj/item/kinetic_crusher/afterattack__legacy__attackchain(atom/target, mob/living/user, proximity_flag, clickparams)
|
||||
. = ..()
|
||||
if(!HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
return
|
||||
@@ -245,7 +245,7 @@
|
||||
/obj/item/crusher_trophy/proc/effect_desc()
|
||||
return "errors"
|
||||
|
||||
/obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user)
|
||||
/obj/item/crusher_trophy/attackby__legacy__attackchain(obj/item/A, mob/living/user)
|
||||
if(istype(A, /obj/item/kinetic_crusher))
|
||||
add_to(A, user)
|
||||
else
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/malfunctioning = 0
|
||||
var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it
|
||||
|
||||
/obj/item/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag)
|
||||
/obj/item/lazarus_injector/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
|
||||
if(!loaded)
|
||||
return
|
||||
if(isliving(target) && proximity_flag)
|
||||
@@ -91,7 +91,7 @@
|
||||
QDEL_NULL(captured)
|
||||
return ..()
|
||||
|
||||
/obj/item/mobcapsule/attack(mob/living/simple_animal/S, mob/user, prox_flag)
|
||||
/obj/item/mobcapsule/attack__legacy__attackchain(mob/living/simple_animal/S, mob/user, prox_flag)
|
||||
if(istype(S) && S.sentience_type == capture_type)
|
||||
capture(S, user)
|
||||
return TRUE
|
||||
@@ -121,7 +121,7 @@
|
||||
captured.forceMove(get_turf(src))
|
||||
captured = null
|
||||
|
||||
/obj/item/mobcapsule/attack_self(mob/user)
|
||||
/obj/item/mobcapsule/attack_self__legacy__attackchain(mob/user)
|
||||
colorindex += 1
|
||||
if(colorindex >= 6)
|
||||
colorindex = 0
|
||||
|
||||
@@ -47,7 +47,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
|
||||
/obj/item/stack/marker_beacon/update_icon_state()
|
||||
icon_state = "[base_icon_state][lowertext(picked_color)]"
|
||||
|
||||
/obj/item/stack/marker_beacon/attack_self(mob/user)
|
||||
/obj/item/stack/marker_beacon/attack_self__legacy__attackchain(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "<span class='warning'>You need more space to place a [singular_name] here.</span>")
|
||||
return
|
||||
@@ -125,7 +125,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/marker_beacon/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/marker_beacon/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/marker_beacon))
|
||||
var/obj/item/stack/marker_beacon/M = I
|
||||
to_chat(user, "<span class='notice'>You start picking [src] up...</span>")
|
||||
@@ -157,7 +157,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
|
||||
/obj/structure/marker_beacon/dock_marker/update_icon_state()
|
||||
set_light(light_range, light_power, LIGHT_COLOR_BLUE)
|
||||
|
||||
/obj/structure/marker_beacon/dock_marker/attackby()
|
||||
/obj/structure/marker_beacon/dock_marker/attackby__legacy__attackchain()
|
||||
return
|
||||
|
||||
/obj/structure/marker_beacon/dock_marker/attack_hand()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
origin_tech = "engineering=1;magnets=1"
|
||||
|
||||
/obj/item/mining_scanner/attack_self(mob/user)
|
||||
/obj/item/mining_scanner/attack_self__legacy__attackchain(mob/user)
|
||||
if(!user.client)
|
||||
return
|
||||
if(current_cooldown <= world.time)
|
||||
@@ -24,7 +24,7 @@
|
||||
//Debug item to identify all ore spread quickly
|
||||
/obj/item/mining_scanner/admin
|
||||
|
||||
/obj/item/mining_scanner/admin/attack_self(mob/user)
|
||||
/obj/item/mining_scanner/admin/attack_self__legacy__attackchain(mob/user)
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
if(M.ore?.scan_icon_state)
|
||||
M.icon_state = M.ore.scan_icon_state
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
if(timer_off)
|
||||
. += "<span class='notice'>The mining charge is connected to a detonator.</span>"
|
||||
|
||||
/obj/item/grenade/plastic/miningcharge/attack_self(mob/user)
|
||||
/obj/item/grenade/plastic/miningcharge/attack_self__legacy__attackchain(mob/user)
|
||||
if(nadeassembly)
|
||||
nadeassembly.attack_self(user)
|
||||
nadeassembly.attack_self__legacy__attackchain(user)
|
||||
|
||||
/obj/item/grenade/plastic/miningcharge/afterattack(atom/movable/AM, mob/user, flag)
|
||||
/obj/item/grenade/plastic/miningcharge/afterattack__legacy__attackchain(atom/movable/AM, mob/user, flag)
|
||||
if(!ismineralturf(AM) && !hacked)
|
||||
return
|
||||
if(is_ancient_rock(AM) && !hacked)
|
||||
@@ -55,7 +55,7 @@
|
||||
installed = TRUE
|
||||
target.overlays += image_overlay
|
||||
|
||||
/obj/item/grenade/plastic/miningcharge/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/grenade/plastic/miningcharge/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(!istype(I, /obj/item/detonator))
|
||||
return
|
||||
var/obj/item/detonator/detonator = I
|
||||
@@ -157,7 +157,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>This scanner has an extra port for overriding mining charge safeties.</span>"
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/syndicate/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/obj/item/t_scanner/adv_mining_scanner/syndicate/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!istype(target, /obj/item/grenade/plastic/miningcharge))
|
||||
return
|
||||
var/obj/item/grenade/plastic/miningcharge/charge = target
|
||||
@@ -200,7 +200,7 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/detonator/attack_self(mob/user)
|
||||
/obj/item/detonator/attack_self__legacy__attackchain(mob/user)
|
||||
playsound(src, 'sound/items/detonator.ogg', 40)
|
||||
if(length(bombs))
|
||||
to_chat(user, "<span class='notice'>Activating explosives...</span>")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
/obj/item/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user)
|
||||
/obj/item/hivelordstabilizer/afterattack__legacy__attackchain(obj/item/organ/internal/M, mob/user)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/regenerative_core/C = M
|
||||
if(!istype(C, /obj/item/organ/internal/regenerative_core))
|
||||
@@ -90,12 +90,12 @@
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/afterattack(atom/target, mob/user, proximity_flag)
|
||||
/obj/item/organ/internal/regenerative_core/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(proximity_flag)
|
||||
applyto(target, user)
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/attack_self(mob/user)
|
||||
/obj/item/organ/internal/regenerative_core/attack_self__legacy__attackchain(mob/user)
|
||||
applyto(user, user)
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/insert(mob/living/carbon/M, special = 0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/// the number that is added to the failure_prob, which is the probability of whether it will spread or not
|
||||
var/adding_failure = 50
|
||||
|
||||
/obj/item/resonator/attack_self(mob/user)
|
||||
/obj/item/resonator/attack_self__legacy__attackchain(mob/user)
|
||||
if(mode == RESONATOR_MODE_AUTO)
|
||||
to_chat(user, "<span class='notice'>You set the [name]'s fields to detonate only after you hit it with [src].</span>")
|
||||
mode = RESONATOR_MODE_MANUAL
|
||||
@@ -37,7 +37,7 @@
|
||||
fieldlimit = 6
|
||||
quick_burst_mod = 1
|
||||
|
||||
/obj/item/resonator/upgraded/attack_self(mob/user)
|
||||
/obj/item/resonator/upgraded/attack_self__legacy__attackchain(mob/user)
|
||||
if(mode == RESONATOR_MODE_AUTO)
|
||||
to_chat(user, "<span class='notice'>You set [src]'s fields to detonate only after being attacked by [src].</span>")
|
||||
mode = RESONATOR_MODE_MANUAL
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
. += "This capsule has the [template.name] stored."
|
||||
. += template.description
|
||||
|
||||
/obj/item/survivalcapsule/attack_self()
|
||||
/obj/item/survivalcapsule/attack_self__legacy__attackchain()
|
||||
// Can't grab when capsule is New() because templates aren't loaded then
|
||||
get_template()
|
||||
if(!used)
|
||||
@@ -217,7 +217,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/economy/vending/wallmed/survival_pod,
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gps/computer/attack_hand(mob/user)
|
||||
attack_self(user)
|
||||
attack_self__legacy__attackchain(user)
|
||||
|
||||
//Bed
|
||||
/obj/structure/bed/pod
|
||||
|
||||
@@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
|
||||
origin_tech = "bluespace=2"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/wormhole_jaunter/attack_self(mob/user)
|
||||
/obj/item/wormhole_jaunter/attack_self__legacy__attackchain(mob/user)
|
||||
user.visible_message("<span class='notice'>[user.name] activates the [name]!</span>")
|
||||
activate(user, TRUE)
|
||||
|
||||
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
|
||||
return
|
||||
destination = L[desc]
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/attack_self(mob/user) // message is later down
|
||||
/obj/item/wormhole_jaunter/contractor/attack_self__legacy__attackchain(mob/user) // message is later down
|
||||
activate(user, TRUE)
|
||||
|
||||
/obj/item/wormhole_jaunter/contractor/activate(mob/user)
|
||||
@@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
|
||||
thrower = null
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/jaunter_grenade/attack_self(mob/user)
|
||||
/obj/item/grenade/jaunter_grenade/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
thrower = user
|
||||
|
||||
@@ -261,7 +261,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
|
||||
/// The turf where we activated the wormwhole.
|
||||
var/wormhole_loc
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/attack_self(mob/user)
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/attack_self__legacy__attackchain(mob/user)
|
||||
activate(user, TRUE)
|
||||
|
||||
/obj/item/wormhole_jaunter/wormhole_weaver/emp_act(severity)
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
. = ..()
|
||||
. += "It has [uses_left] use\s remaining."
|
||||
|
||||
/obj/item/extraction_pack/attack_self(mob/user)
|
||||
/obj/item/extraction_pack/attack_self__legacy__attackchain(mob/user)
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in GLOB.total_extraction_beacons)
|
||||
var/obj/structure/extraction_point/EP = B
|
||||
@@ -38,7 +38,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
beacon = A
|
||||
to_chat(user, "You link the extraction pack to the beacon system.")
|
||||
|
||||
/obj/item/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
/obj/item/extraction_pack/afterattack__legacy__attackchain(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
. = ..()
|
||||
if(!beacon)
|
||||
to_chat(user, "<span class='warning'>[src] is not linked to a beacon, and cannot be used!</span>")
|
||||
@@ -151,7 +151,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "folded_extraction"
|
||||
|
||||
/obj/item/fulton_core/attack_self(mob/user)
|
||||
/obj/item/fulton_core/attack_self__legacy__attackchain(mob/user)
|
||||
if(do_after(user, 15, target = user) && !QDELETED(src))
|
||||
new /obj/structure/extraction_point(get_turf(user))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
QDEL_NULL(announcer)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/labor_prisoner_shuttle_console/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/labor_prisoner_shuttle_console/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
if(inserted_id_uid)
|
||||
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
|
||||
@@ -172,7 +172,7 @@
|
||||
return
|
||||
user.examinate(src)
|
||||
|
||||
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/labor_points_checker/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
var/obj/item/card/id/prisoner/prisoner_id = I
|
||||
if(!prisoner_id.goal)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
desc = initial(desc)
|
||||
harvested = FALSE
|
||||
|
||||
/obj/structure/flora/ash/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/flora/ash/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(!harvested && needs_sharp_harvest && W.sharp)
|
||||
user.visible_message("<span class='notice'>[user] starts to harvest from [src] with [W].</span>","<span class='notice'>You begin to harvest from [src] with [W].</span>")
|
||||
if(do_after(user, harvest_time, target = src))
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
else
|
||||
. += "It glows weakly."
|
||||
|
||||
/obj/item/melee/ghost_sword/attack_self(mob/user)
|
||||
/obj/item/melee/ghost_sword/attack_self__legacy__attackchain(mob/user)
|
||||
if(summon_cooldown > world.time)
|
||||
to_chat(user, "You just recently called out for aid. You don't want to annoy the spirits.")
|
||||
return
|
||||
@@ -163,7 +163,7 @@
|
||||
break
|
||||
|
||||
|
||||
/obj/item/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
/obj/item/melee/ghost_sword/attack__legacy__attackchain(mob/living/target, mob/living/carbon/human/user)
|
||||
force = 0
|
||||
var/ghost_counter = length(orbs)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "vial"
|
||||
|
||||
/obj/item/dragons_blood/attack_self(mob/living/carbon/human/user)
|
||||
/obj/item/dragons_blood/attack_self__legacy__attackchain(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
. = ..()
|
||||
banned_turfs = typecacheof(list(/turf/space/transit, /turf/simulated/wall, /turf/simulated/mineral))
|
||||
|
||||
/obj/item/lava_staff/attack(mob/target, mob/living/user)
|
||||
/obj/item/lava_staff/attack__legacy__attackchain(mob/target, mob/living/user)
|
||||
if(!cigarette_lighter_act(user, target))
|
||||
return ..()
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
cig.light(user, target)
|
||||
return TRUE
|
||||
|
||||
/obj/item/lava_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/obj/item/lava_staff/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
..()
|
||||
if(timer > world.time)
|
||||
return
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "vial"
|
||||
|
||||
/obj/item/mayhem/attack_self(mob/user)
|
||||
/obj/item/mayhem/attack_self__legacy__attackchain(mob/user)
|
||||
for(var/mob/living/carbon/human/H in range(7,user))
|
||||
spawn()
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(H)
|
||||
@@ -104,7 +104,7 @@
|
||||
desc = "Mark your target for death."
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/blood_contract/attack_self(mob/user)
|
||||
/obj/item/blood_contract/attack_self__legacy__attackchain(mob/user)
|
||||
if(used)
|
||||
return
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
..()
|
||||
ActivationReaction(user,"touch")
|
||||
|
||||
/obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/anomalous_crystal/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
ActivationReaction(user,"weapon")
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return OBLITERATION
|
||||
|
||||
|
||||
/obj/item/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/obj/item/hierophant_club/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
..()
|
||||
if(world.time < timer)
|
||||
return
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
. += "<span class='notice'>Use it on targets to summon thunderbolts from the sky.</span>"
|
||||
. += "<span class='notice'>The thunderbolts are boosted if in an area with weather effects.</span>"
|
||||
|
||||
/obj/item/storm_staff/attack(mob/living/target, mob/living/user)
|
||||
/obj/item/storm_staff/attack__legacy__attackchain(mob/living/target, mob/living/user)
|
||||
if(cigarette_lighter_act(user, target))
|
||||
return TRUE
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
thunder_charges--
|
||||
return TRUE
|
||||
|
||||
/obj/item/storm_staff/attack_self(mob/user)
|
||||
/obj/item/storm_staff/attack_self__legacy__attackchain(mob/user)
|
||||
var/area/user_area = get_area(user)
|
||||
var/turf/user_turf = get_turf(user)
|
||||
if(!user_area || !user_turf)
|
||||
@@ -92,7 +92,7 @@
|
||||
user.transform *= 1.2
|
||||
animate(user, color = old_color, transform = old_transform, time = 1 SECONDS)
|
||||
|
||||
/obj/item/storm_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
/obj/item/storm_staff/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
// This early return stops the staff from shooting lightning at someone when being used as a lighter.
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/cig_haver = target
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_ADJACENCY_TRANSPARENT, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/shared_storage/attackby(obj/item/W, mob/user, params)
|
||||
bag?.attackby(W, user, params)
|
||||
/obj/item/shared_storage/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
bag?.attackby__legacy__attackchain(W, user, params)
|
||||
|
||||
/obj/item/shared_storage/attack_ghost(mob/user)
|
||||
if(isobserver(user))
|
||||
@@ -54,7 +54,7 @@
|
||||
bag?.show_to(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/shared_storage/attack_self(mob/living/carbon/user)
|
||||
/obj/item/shared_storage/attack_self__legacy__attackchain(mob/living/carbon/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(user.is_holding(src))
|
||||
@@ -108,7 +108,7 @@
|
||||
icon_state = "book1"
|
||||
w_class = 2
|
||||
|
||||
/obj/item/book_of_babel/attack_self(mob/user)
|
||||
/obj/item/book_of_babel/attack_self__legacy__attackchain(mob/user)
|
||||
to_chat(user, "You flip through the pages of the book, quickly and conveniently learning every language in existence. Somewhat less conveniently, the aging book crumbles to dust in the process. Whoops.")
|
||||
user.grant_all_babel_languages()
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(user))
|
||||
@@ -183,7 +183,7 @@
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "ship_bottle"
|
||||
|
||||
/obj/item/ship_in_a_bottle/attack_self(mob/user)
|
||||
/obj/item/ship_in_a_bottle/attack_self__legacy__attackchain(mob/user)
|
||||
to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.")
|
||||
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
|
||||
new /obj/vehicle/lavaboat/dragon(get_turf(src))
|
||||
@@ -210,7 +210,7 @@
|
||||
var/sight_flags = SEE_MOBS
|
||||
var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
/obj/item/wisp_lantern/attack_self(mob/user)
|
||||
/obj/item/wisp_lantern/attack_self__legacy__attackchain(mob/user)
|
||||
if(!wisp)
|
||||
to_chat(user, "<span class='warning'>The wisp has gone missing!</span>")
|
||||
icon_state = "lantern"
|
||||
@@ -282,7 +282,7 @@
|
||||
linked = null
|
||||
return ..()
|
||||
|
||||
/obj/item/warp_cube/attack_self(mob/user)
|
||||
/obj/item/warp_cube/attack_self__legacy__attackchain(mob/user)
|
||||
if(!linked)
|
||||
to_chat(user, "[src] fizzles uselessly.")
|
||||
return
|
||||
@@ -402,7 +402,7 @@
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/obj/item/immortality_talisman/attack_self(mob/user)
|
||||
/obj/item/immortality_talisman/attack_self__legacy__attackchain(mob/user)
|
||||
if(cooldown < world.time)
|
||||
SSblackbox.record_feedback("amount", "immortality_talisman_uses", 1) // usage
|
||||
cooldown = world.time + 600
|
||||
@@ -433,7 +433,7 @@
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_EFFECT_CAN_TELEPORT, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/effect/immortality_talisman/attackby()
|
||||
/obj/effect/immortality_talisman/attackby__legacy__attackchain()
|
||||
return
|
||||
|
||||
/obj/effect/immortality_talisman/ex_act()
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
var/usedHand
|
||||
var/mob/living/carbon/owner
|
||||
|
||||
/obj/item/rod_of_asclepius/attack_self(mob/user)
|
||||
/obj/item/rod_of_asclepius/attack_self__legacy__attackchain(mob/user)
|
||||
if(activated)
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
@@ -435,7 +435,7 @@
|
||||
return // It's a shard
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/katana/attack_self(mob/living/carbon/user, modifiers)
|
||||
/obj/item/organ/internal/cyberimp/arm/katana/attack_self__legacy__attackchain(mob/living/carbon/user, modifiers)
|
||||
. = ..()
|
||||
to_chat(user,"<span class='userdanger'>The mass goes up your arm and inside it!</span>")
|
||||
playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE)
|
||||
@@ -546,11 +546,11 @@
|
||||
. = ..()
|
||||
reset_inputs(null, TRUE)
|
||||
|
||||
/obj/item/cursed_katana/attack_self(mob/user)
|
||||
/obj/item/cursed_katana/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
reset_inputs(user, TRUE)
|
||||
|
||||
/obj/item/cursed_katana/attack(mob/living/target, mob/user, click_parameters)
|
||||
/obj/item/cursed_katana/attack__legacy__attackchain(mob/living/target, mob/user, click_parameters)
|
||||
if(target.stat == DEAD || target == user) //No, you can not stab yourself to cloak / not take the penalty for not drawing blood
|
||||
return ..()
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
message_sent = TRUE
|
||||
|
||||
// Interactions
|
||||
/obj/machinery/mineral/ore_redemption/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/ore_redemption/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/part_replacer))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
return FALSE
|
||||
add_fingerprint()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/equipment_vendor/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(panel_open)
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
@@ -446,7 +446,7 @@
|
||||
EQUIPMENT("Point Transfer Card", /obj/item/card/mining_point_card, 500),
|
||||
)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/explorer/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/equipment_vendor/explorer/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "explorer-open", "explorer", I))
|
||||
return
|
||||
if(panel_open)
|
||||
@@ -501,7 +501,7 @@
|
||||
icon_state = "data"
|
||||
var/points = 500
|
||||
|
||||
/obj/item/card/mining_point_card/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/card/mining_point_card/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(points)
|
||||
var/obj/item/card/id/C = I
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
. += "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params)
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner))
|
||||
to_chat(user, "<span class='notice'>You instruct [src] to drop any collected ore.</span>")
|
||||
DropOre()
|
||||
@@ -188,7 +188,7 @@
|
||||
/mob/living/simple_animal/hostile/mining_drone/OpenFire(atom/A)
|
||||
if(CheckFriendlyFire(A))
|
||||
return
|
||||
stored_gun.afterattack(A, src) //of the possible options to allow minebots to have KA mods, would you believe this is the best?
|
||||
stored_gun.afterattack__legacy__attackchain(A, src) //of the possible options to allow minebots to have KA mods, would you believe this is the best?
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre()
|
||||
for(var/obj/item/stack/ore/O in range(1, src))
|
||||
@@ -287,7 +287,7 @@
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
/obj/item/mine_bot_upgrade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
|
||||
/obj/item/mine_bot_upgrade/afterattack__legacy__attackchain(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
|
||||
if(!istype(M) || !proximity)
|
||||
return
|
||||
upgrade_bot(M, user)
|
||||
@@ -350,7 +350,7 @@
|
||||
icon_state = "minedronecube"
|
||||
item_state = "electronic"
|
||||
|
||||
/obj/item/mining_drone_cube/attack_self(mob/user)
|
||||
/obj/item/mining_drone_cube/attack_self__legacy__attackchain(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [src] suddenly expands into a fully functional mining drone!</span>", \
|
||||
"<span class='warning'>You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!</span>")
|
||||
new /mob/living/simple_animal/hostile/mining_drone(get_turf(src))
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
if("ejectBag")
|
||||
eject_bag(usr)
|
||||
|
||||
/obj/machinery/mineral/mint/attackby(obj/item/I, mob/user, params)
|
||||
/obj/machinery/mineral/mint/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/bag/money))
|
||||
if(money_bag)
|
||||
to_chat(user, "<span class='notice'>There is already a [money_bag.name] inside!</span>")
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
var/mob/living/L = AM
|
||||
if(istype(L.pulling, /obj/structure/ore_box))
|
||||
var/obj/structure/ore_box/box = L.pulling
|
||||
box.attackby(OB, AM)
|
||||
box.attackby__legacy__attackchain(OB, AM)
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
@@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/item/gibtonite/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gibtonite/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(!wires && istype(I, /obj/item/assembly/igniter))
|
||||
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
|
||||
wires = new(src)
|
||||
@@ -305,7 +305,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
if(wires)
|
||||
wires.Interact(user)
|
||||
|
||||
/obj/item/gibtonite/attack_self(mob/user)
|
||||
/obj/item/gibtonite/attack_self__legacy__attackchain(mob/user)
|
||||
if(wires)
|
||||
wires.Interact(user)
|
||||
else
|
||||
@@ -422,7 +422,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
if(!QDELETED(src) && !P.nodamage && (P.damage_type == BURN))
|
||||
log_and_set_aflame(P.firer, P)
|
||||
|
||||
/obj/item/coin/plasma/attackby(obj/item/I, mob/living/user, params)
|
||||
/obj/item/coin/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(!I.get_heat())
|
||||
return ..()
|
||||
log_and_set_aflame(user, I)
|
||||
@@ -448,7 +448,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
credits = 160
|
||||
COOLDOWN_DECLARE(radiation_cooldown)
|
||||
|
||||
/obj/item/coin/uranium/attack_self(mob/user)
|
||||
/obj/item/coin/uranium/attack_self__legacy__attackchain(mob/user)
|
||||
..()
|
||||
if(!COOLDOWN_FINISHED(src, radiation_cooldown))
|
||||
return
|
||||
@@ -501,7 +501,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
name = "syndicate coin"
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/coin/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
@@ -548,7 +548,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
user.put_in_hands(ring)
|
||||
|
||||
|
||||
/obj/item/coin/attack_self(mob/user as mob)
|
||||
/obj/item/coin/attack_self__legacy__attackchain(mob/user as mob)
|
||||
if(cooldown < world.time - 15)
|
||||
var/coinflip = pick(sideslist)
|
||||
cooldown = world.time
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
density = TRUE
|
||||
pressure_resistance = 5 * ONE_ATMOSPHERE
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/ore_box/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/ore))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user