mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +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
@@ -38,7 +38,7 @@
|
||||
))
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user, list/modifiers)
|
||||
if(!user.combat_mode || pushed_over)
|
||||
return ..()
|
||||
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
toggle_paddles()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/defibrillator/attack_hand(mob/user)
|
||||
/obj/item/defibrillator/attack_hand(mob/user, list/modifiers)
|
||||
if(loc == user)
|
||||
if(slot_flags == ITEM_SLOT_BACK)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BACK) == src)
|
||||
|
||||
@@ -131,16 +131,16 @@
|
||||
master.disrupt()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/effect/dummy/chameleon/attack_hand()
|
||||
/obj/effect/dummy/chameleon/attack_hand(mob/user, list/modifiers)
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_animal()
|
||||
/obj/effect/dummy/chameleon/attack_animal(mob/user, list/modifiers)
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_slime()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_alien()
|
||||
/obj/effect/dummy/chameleon/attack_alien(mob/user, list/modifiers)
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/ex_act(S, T)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/item/stack/circuit_stack/attack_self(mob/user)// Prevents the crafting menu, and tells you how to use it.
|
||||
to_chat(user, "<span class='warning'>You can't use [src] by itself, you'll have to try and remove one of these circuits by hand... carefully.</span>")
|
||||
|
||||
/obj/item/stack/circuit_stack/attack_hand(mob/user)
|
||||
/obj/item/stack/circuit_stack/attack_hand(mob/user, list/modifiers)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(user.get_inactive_held_item() != src)
|
||||
return ..()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
beaker = new_beaker
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/attack_hand(mob/user)
|
||||
/obj/item/storage/portable_chem_mixer/attack_hand(mob/user, list/modifiers)
|
||||
if (loc != user)
|
||||
return ..()
|
||||
else
|
||||
|
||||
@@ -90,13 +90,13 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/powersink/attack_paw()
|
||||
/obj/item/powersink/attack_paw(mob/user, list/modifiers)
|
||||
return
|
||||
|
||||
/obj/item/powersink/attack_ai()
|
||||
return
|
||||
|
||||
/obj/item/powersink/attack_hand(mob/user)
|
||||
/obj/item/powersink/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return (FIRELOSS)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/electropack/attack_hand(mob/user)
|
||||
/obj/item/electropack/attack_hand(mob/user, list/modifiers)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(src == C.back)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/item/radio/intercom/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/intercom/attack_hand(mob/user)
|
||||
/obj/item/radio/intercom/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
to_chat(loc, "<span class='userdanger'>*ding*</span>")
|
||||
addtimer(CALLBACK(src, .proc/snap), 2)
|
||||
|
||||
/obj/item/reverse_bear_trap/attack_hand(mob/user)
|
||||
/obj/item/reverse_bear_trap/attack_hand(mob/user, list/modifiers)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.get_item_by_slot(ITEM_SLOT_HEAD) == src)
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/taperecorder/attack_hand(mob/user)
|
||||
/obj/item/taperecorder/attack_hand(mob/user, list/modifiers)
|
||||
if(loc != user || !mytape || !user.is_holding(src))
|
||||
return ..()
|
||||
eject(user)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
attached_device.Crossed(AM)
|
||||
|
||||
//Triggers mousetraps
|
||||
/obj/item/transfer_valve/attack_hand()
|
||||
/obj/item/transfer_valve/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
/obj/item/dnainjector/attack_paw(mob/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_GENELESS) && !HAS_TRAIT(M, TRAIT_BADDNA))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/etherealball/attack_hand(mob/living/carbon/human/user)
|
||||
/obj/structure/etherealball/attack_hand(mob/living/carbon/human/user, list/modifiers)
|
||||
. = ..()
|
||||
if(TurnedOn)
|
||||
TurnOff()
|
||||
|
||||
@@ -163,8 +163,8 @@
|
||||
if(det_time == previous_time)
|
||||
det_time = 50
|
||||
|
||||
/obj/item/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
/obj/item/grenade/attack_paw(mob/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/projectile/P = hitby
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user, list/modifiers)
|
||||
Crossed(user) //honk
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
anchored = TRUE
|
||||
hand_activated = FALSE
|
||||
|
||||
/obj/item/hourglass/admin/attack_hand(mob/user)
|
||||
/obj/item/hourglass/admin/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(user.client && user.client.holder)
|
||||
toggle(user)
|
||||
|
||||
@@ -611,7 +611,7 @@
|
||||
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user)
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user, list/modifiers)
|
||||
..()
|
||||
if (held_sausage)
|
||||
user.put_in_hands(held_sausage)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user, list/modifiers)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/medical/mesh/attack_hand(mob/user)
|
||||
/obj/item/stack/medical/mesh/attack_hand(mob/user, list/modifiers)
|
||||
if(!is_open && user.get_inactive_held_item() == src)
|
||||
to_chat(user, "<span class='warning'>You need to open [src] first.</span>")
|
||||
return
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
. = ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/attack_hand(mob/user)
|
||||
/obj/item/stack/attack_hand(mob/user, list/modifiers)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
inhand_icon_state = null
|
||||
alpha = 0
|
||||
|
||||
/obj/item/storage/box/mime/attack_hand(mob/user)
|
||||
/obj/item/storage/box/mime/attack_hand(mob/user, list/modifiers)
|
||||
..()
|
||||
if(user.mind.miming)
|
||||
alpha = 255
|
||||
@@ -1337,7 +1337,7 @@
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/poster/tail_board(src)
|
||||
new /obj/item/tail_pin(src)
|
||||
|
||||
|
||||
/obj/item/storage/box/emergencytank
|
||||
name = "emergency oxygen tank box"
|
||||
desc = "A box of emergency oxygen tanks."
|
||||
@@ -1347,7 +1347,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/tank/internals/emergency_oxygen(src) //in case anyone ever wants to do anything with spawning them, apart from crafting the box
|
||||
|
||||
|
||||
/obj/item/storage/box/engitank
|
||||
name = "extended-capacity emergency oxygen tank box"
|
||||
desc = "A box of extended-capacity emergency oxygen tanks."
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/pen(src)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user)
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
M.temporarilyRemoveItemFromInventory(noz, TRUE)
|
||||
noz.forceMove(src)
|
||||
|
||||
/obj/item/watertank/attack_hand(mob/user)
|
||||
/obj/item/watertank/attack_hand(mob/user, list/modifiers)
|
||||
if (user.get_item_by_slot(user.getBackSlot()) == src)
|
||||
toggle_mister(user)
|
||||
else
|
||||
|
||||
@@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
|
||||
|
||||
GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
|
||||
/obj/item/tcgcard/attack_hand(mob/user)
|
||||
/obj/item/tcgcard/attack_hand(mob/user, list/modifiers)
|
||||
if(!isturf(loc))
|
||||
return ..()
|
||||
var/list/choices = GLOB.tcgcard_radial_choices
|
||||
@@ -198,7 +198,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
|
||||
. = ..()
|
||||
. += "<span class='notice'>\The [src] has [contents.len] cards inside.</span>"
|
||||
|
||||
/obj/item/tcgcard_deck/attack_hand(mob/user)
|
||||
/obj/item/tcgcard_deck/attack_hand(mob/user, list/modifiers)
|
||||
var/list/choices = list(
|
||||
"Draw" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_draw"),
|
||||
"Shuffle" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_shuffle"),
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/prize/attack_hand(mob/user)
|
||||
/obj/item/toy/prize/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -550,8 +550,8 @@
|
||||
var/phomeme
|
||||
|
||||
// Talking toys are language universal, and thus all species can use them
|
||||
/obj/item/toy/talking/attack_alien(mob/user)
|
||||
return attack_hand(user)
|
||||
/obj/item/toy/talking/attack_alien(mob/user, list/modifiers)
|
||||
return attack_hand(user, modifiers)
|
||||
|
||||
/obj/item/toy/talking/attack_self(mob/user)
|
||||
if(!cooldown)
|
||||
@@ -695,7 +695,7 @@
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
//ATTACK HAND NOT CALLING PARENT
|
||||
/obj/item/toy/cards/deck/attack_hand(mob/user)
|
||||
/obj/item/toy/cards/deck/attack_hand(mob/user, list/modifiers)
|
||||
draw_card(user)
|
||||
|
||||
/obj/item/toy/cards/deck/proc/draw_card(mob/user)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
explosion(get_turf(src), devastation_range = 0, heavy_impact_range = 0, light_impact_range = 1, flash_range = 3, flame_range = 1, smoke = TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/pinpointer_dispenser/attack_hand(mob/living/user)
|
||||
/obj/machinery/pinpointer_dispenser/attack_hand(mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
|
||||
Reference in New Issue
Block a user