mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#3433)
* Converts many proc overrides to properly use list/modifiers, lots of other smaller things * Update human_defense.dm Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
LemonInTheDark
Gandalf2k15
parent
6f01502b33
commit
43febe3145
@@ -800,7 +800,7 @@
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
/obj/machinery/power/apc/attack_hand(mob/user, params)
|
||||
/obj/machinery/power/apc/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -809,7 +809,6 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/species/ethereal/E = H.dna.species
|
||||
var/charge_limit = ETHEREAL_CHARGE_DANGEROUS - APC_POWER_GAIN
|
||||
var/list/modifiers = params2list(params)
|
||||
if(H.combat_mode && E.drain_time < world.time)
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK)) //Disarm
|
||||
if(cell.charge == cell.maxcharge)
|
||||
|
||||
@@ -701,7 +701,7 @@ GLOBAL_LIST(hub_radial_layer_list)
|
||||
/obj/structure/cable/multilayer/attack_robot(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/cable/multilayer/attack_hand(mob/living/user)
|
||||
/obj/structure/cable/multilayer/attack_hand(mob/living/user, list/modifiers)
|
||||
if(!user)
|
||||
return
|
||||
if(!GLOB.hub_radial_layer_list)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/floodlight/attack_hand(mob/user)
|
||||
/obj/machinery/power/floodlight/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -87,7 +87,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, modifiers)
|
||||
/obj/machinery/gravity_generator/part/attack_hand(mob/user, list/modifiers)
|
||||
return main_part.attack_hand(user, modifiers)
|
||||
|
||||
/obj/machinery/gravity_generator/part/set_broken()
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
else
|
||||
. += "<span class='danger'>This casing doesn't support power cells for backup power.</span>"
|
||||
|
||||
/obj/structure/light_construct/attack_hand(mob/user)
|
||||
/obj/structure/light_construct/attack_hand(mob/user, list/modifiers)
|
||||
if(cell)
|
||||
user.visible_message("<span class='notice'>[user] removes [cell] from [src]!</span>", "<span class='notice'>You remove [cell].</span>")
|
||||
user.put_in_hands(cell)
|
||||
@@ -712,7 +712,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/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -257,7 +257,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
name = "pipe cleaner [amount < 3 ? "piece" : "coil"]"
|
||||
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/stack/pipe_cleaner_coil/attack_hand(mob/user)
|
||||
/obj/item/stack/pipe_cleaner_coil/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_paw(mob/user)
|
||||
/obj/machinery/power/port_gen/pacman/attack_paw(mob/user, list/modifiers)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/ui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/machinery/field/containment/attack_hand(mob/user)
|
||||
/obj/machinery/field/containment/attack_hand(mob/user, list/modifiers)
|
||||
if(get_dist(src, user) > 1)
|
||||
return FALSE
|
||||
else
|
||||
@@ -54,14 +54,14 @@
|
||||
/obj/machinery/field/containment/ex_act(severity, target)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/field/containment/attack_animal(mob/living/simple_animal/M)
|
||||
/obj/machinery/field/containment/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(!FG1 || !FG2)
|
||||
qdel(src)
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
M.visible_message("<span class='warning'>[M] glows fiercely as the containment field flickers out!</span>")
|
||||
if(ismegafauna(user))
|
||||
user.visible_message("<span class='warning'>[user] glows fiercely as the containment field flickers out!</span>")
|
||||
FG1.calc_power(INFINITY) //rip that 'containment' field
|
||||
M.adjustHealth(-M.obj_damage)
|
||||
user.adjustHealth(-user.obj_damage)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -166,14 +166,14 @@
|
||||
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/M)
|
||||
if(ismegafauna(M) && anchored)
|
||||
/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(ismegafauna(user) && anchored)
|
||||
set_anchored(FALSE)
|
||||
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
|
||||
user.visible_message("<span class='warning'>[user] rips [src] free from its moorings!</span>")
|
||||
else
|
||||
. = ..()
|
||||
if(. && !anchored)
|
||||
step(src, get_dir(M, src))
|
||||
step(src, get_dir(user, src))
|
||||
|
||||
/obj/machinery/power/emitter/process(delta_time)
|
||||
if(machine_stat & (BROKEN))
|
||||
|
||||
@@ -148,14 +148,14 @@ no power level overlay is currently in the overlays list.
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
|
||||
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(user.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
|
||||
set_anchored(FALSE)
|
||||
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
|
||||
user.visible_message("<span class='warning'>[user] rips [src] free from its moorings!</span>")
|
||||
else
|
||||
..()
|
||||
if(!anchored)
|
||||
step(src, get_dir(M, src))
|
||||
step(src, get_dir(user, src))
|
||||
|
||||
/obj/machinery/field/generator/blob_act(obj/structure/blob/B)
|
||||
if(active)
|
||||
|
||||
@@ -870,20 +870,20 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
return COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/attack_paw(mob/user)
|
||||
/obj/machinery/power/supermatter_crystal/attack_paw(mob/user, list/modifiers)
|
||||
dust_mob(user, cause = "monkey attack")
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/attack_alien(mob/user)
|
||||
/obj/machinery/power/supermatter_crystal/attack_alien(mob/user, list/modifiers)
|
||||
dust_mob(user, cause = "alien attack")
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/attack_animal(mob/living/simple_animal/S)
|
||||
/obj/machinery/power/supermatter_crystal/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
var/murder
|
||||
if(!S.melee_damage_upper && !S.melee_damage_lower)
|
||||
murder = S.friendly_verb_continuous
|
||||
if(!user.melee_damage_upper && !user.melee_damage_lower)
|
||||
murder = user.friendly_verb_continuous
|
||||
else
|
||||
murder = S.attack_verb_continuous
|
||||
dust_mob(S, \
|
||||
"<span class='danger'>[S] unwisely [murder] [src], and [S.p_their()] body burns brilliantly before flashing into ash!</span>", \
|
||||
murder = user.attack_verb_continuous
|
||||
dust_mob(user, \
|
||||
"<span class='danger'>[user] unwisely [murder] [src], and [user.p_their()] body burns brilliantly before flashing into ash!</span>", \
|
||||
"<span class='userdanger'>You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops.</span>", \
|
||||
"simple animal attack")
|
||||
|
||||
@@ -894,7 +894,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)
|
||||
/obj/machinery/power/supermatter_crystal/attack_hand(mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user