mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
migrates /obj/effect to the new attack chain (#28066)
* the great migration * pleasing the linter * whoops * smol fixes * review * hallucination attack proc --------- Co-authored-by: Toastical <toast@toaster.com> Co-authored-by: Toastical <toastical@toaster.com>
This commit is contained in:
@@ -94,9 +94,10 @@
|
||||
// Else, anomaly core gets deleted by qdel(src).
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/anomaly/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/analyzer))
|
||||
/obj/effect/anomaly/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/analyzer))
|
||||
to_chat(user, "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/effect/anomaly/grav
|
||||
name = "gravitational anomaly"
|
||||
|
||||
@@ -38,11 +38,13 @@
|
||||
playsound(L, 'sound/effects/attackblob.ogg', 50, TRUE)
|
||||
to_chat(L, "<span class='userdanger'>[src] sticks to you!</span>")
|
||||
|
||||
/obj/effect/decal/cleanable/tar/attackby__legacy__attackchain(obj/item/welder, mob/living/user, params)
|
||||
if(!welder.get_heat() || !Adjacent(user))
|
||||
return
|
||||
playsound(welder, 'sound/items/welder.ogg', 50, TRUE)
|
||||
/obj/effect/decal/cleanable/tar/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
var/obj/item/weldingtool/fire_tool = used
|
||||
if(!fire_tool.get_heat() || !Adjacent(user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
playsound(fire_tool, 'sound/items/welder.ogg', 50, TRUE)
|
||||
if(do_after(user, 3 SECONDS, FALSE, user))
|
||||
if(welder.get_heat() && Adjacent(user))
|
||||
user.visible_message("<span class='danger'>[user] burns away [src] with [welder]!</span>", "<span class='danger'>You burn away [src]!</span>")
|
||||
if(fire_tool.get_heat() && Adjacent(user))
|
||||
user.visible_message("<span class='danger'>[user] burns away [src] with [fire_tool]!</span>", "<span class='danger'>You burn away [src]!</span>")
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
move_resist = INFINITY
|
||||
anchored = TRUE
|
||||
can_be_hit = FALSE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
return
|
||||
@@ -103,11 +104,12 @@
|
||||
if(desc)
|
||||
. += desc
|
||||
|
||||
/obj/effect/decal/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks))
|
||||
scoop(I, user)
|
||||
/obj/effect/decal/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/reagent_containers/glass) || istype(used, /obj/item/reagent_containers/drinks))
|
||||
scoop(used, user)
|
||||
else if(issimulatedturf(loc))
|
||||
I.melee_attack_chain(user, loc)
|
||||
used.melee_attack_chain(user, loc)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/effect/decal/attack_animal(mob/living/simple_animal/M)
|
||||
if(issimulatedturf(loc))
|
||||
|
||||
@@ -146,12 +146,11 @@ GLOBAL_LIST_INIT(meteors_gore, list(/obj/effect/meteor/meaty = 5, /obj/effect/me
|
||||
/obj/effect/meteor/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/meteor/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/pickaxe))
|
||||
/obj/effect/meteor/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/pickaxe))
|
||||
make_debris()
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/effect/meteor/proc/make_debris()
|
||||
for(var/throws = dropamt, throws > 0, throws--)
|
||||
|
||||
@@ -97,17 +97,15 @@
|
||||
user.put_in_hands(SB)
|
||||
to_chat(user, "<span class='notice'>You scoop up some snow and make \a [SB]!</span>")
|
||||
|
||||
/obj/effect/snow/attackby__legacy__attackchain(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/shovel))
|
||||
var/obj/item/shovel/S = I
|
||||
/obj/effect/snow/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/shovel))
|
||||
var/obj/item/shovel/shovel = used
|
||||
user.visible_message("<span class='notice'>[user] is clearing away [src]...</span>", "<span class='notice'>You begin clearing away [src]...</span>", "<span class='warning'>You hear a wettish digging sound.</span>")
|
||||
playsound(loc, S.usesound, 50, TRUE)
|
||||
if(!do_after(user, 50 * S.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] clears away [src]!</span>", "<span class='notice'>You clear away [src]!</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
playsound(loc, shovel.usesound, 50, TRUE)
|
||||
if(do_after(user, 50 * shovel.toolspeed, target = src))
|
||||
user.visible_message("<span class='notice'>[user] clears away [src]!</span>", "<span class='notice'>You clear away [src]!</span>")
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/effect/snow/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
|
||||
@@ -117,8 +117,10 @@
|
||||
master = C
|
||||
master.active_dummy = src
|
||||
|
||||
/obj/effect/dummy/chameleon/attackby__legacy__attackchain()
|
||||
for(var/mob/M in src)
|
||||
/obj/effect/dummy/chameleon/attack_by(obj/item/attacking, mob/user, params)
|
||||
if(..())
|
||||
return FINISH_ATTACK
|
||||
for(var/mob/M in src)
|
||||
to_chat(M, "<span class='danger'>Your [src] deactivates.</span>")
|
||||
master.disrupt()
|
||||
|
||||
@@ -186,8 +188,8 @@
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/active = FALSE
|
||||
var/activationCost = 300
|
||||
var/activationUpkeep = 50
|
||||
var/activation_cost = 300
|
||||
var/activation_upkeep = 50
|
||||
var/image/disguise
|
||||
var/mob/living/silicon/robot/syndicate/saboteur/S
|
||||
|
||||
@@ -205,13 +207,13 @@
|
||||
disrupt(user)
|
||||
|
||||
/obj/item/borg_chameleon/attack_self__legacy__attackchain(mob/living/silicon/robot/syndicate/saboteur/user)
|
||||
if(user && user.cell && user.cell.charge > activationCost)
|
||||
if(user && user.cell && user.cell.charge > activation_cost)
|
||||
if(isturf(user.loc))
|
||||
toggle(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't use [src] while inside something!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [activationCost] charge in your cell to use [src]!</span>")
|
||||
to_chat(user, "<span class='warning'>You need at least [activation_cost] charge in your cell to use [src]!</span>")
|
||||
|
||||
/obj/item/borg_chameleon/proc/toggle(mob/living/silicon/robot/syndicate/saboteur/user)
|
||||
if(active)
|
||||
@@ -220,7 +222,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You activate [src].</span>")
|
||||
apply_wibbly_filters(user)
|
||||
if(do_after(user, 5 SECONDS, target = user) && user.cell.use(activationCost))
|
||||
if(do_after(user, 5 SECONDS, target = user) && user.cell.use(activation_cost))
|
||||
activate(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The chameleon field fizzles.</span>")
|
||||
@@ -229,7 +231,7 @@
|
||||
|
||||
/obj/item/borg_chameleon/process()
|
||||
if(S)
|
||||
if(!S.cell || !S.cell.use(activationUpkeep))
|
||||
if(!S.cell || !S.cell.use(activation_upkeep))
|
||||
disrupt(S)
|
||||
return
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -39,19 +39,16 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You can't move.</span>")
|
||||
|
||||
/obj/effect/spresent/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
if(!istype(W, /obj/item/wirecutters))
|
||||
/obj/effect/spresent/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='notice'>I need wirecutters for that.</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
to_chat(user, "<span class='notice'>You cut open the present.</span>")
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.forceMove(loc)
|
||||
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/a_gift/attack_self__legacy__attackchain(mob/M as mob)
|
||||
var/gift_type = pick(
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
|
||||
if(istype(O, /obj/structure/janitorialcart))
|
||||
var/obj/structure/janitorialcart/janicart = O
|
||||
var/obj/structure/janitorialcart/janicart = O
|
||||
if(!janicart.my_mop)
|
||||
janicart.my_mop = src
|
||||
janicart.put_in_cart(user, src)
|
||||
@@ -104,7 +104,7 @@
|
||||
/// Self-refill toggle for when a janitor decides to mop with something other than water.
|
||||
var/refill_enabled = TRUE
|
||||
/// Rate per process() tick mop refills itself
|
||||
var/refill_rate = 1
|
||||
var/refill_rate = 1
|
||||
/// Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
|
||||
var/refill_reagent = "water"
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
/obj/item/mop/advanced/activate_self(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
refill_enabled = !refill_enabled
|
||||
if(refill_enabled)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
Reference in New Issue
Block a user