mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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:
co-authored by
Toastical
Toastical
parent
6ded7786fd
commit
202249a137
@@ -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