Begin clickcode attack_self fix (#18797)

* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
This commit is contained in:
Cameron Lennox
2025-12-29 13:21:10 -05:00
committed by GitHub
parent b770d9fa54
commit d5849910e5
350 changed files with 2603 additions and 969 deletions
+3 -1
View File
@@ -84,7 +84,9 @@
grid[x][y] = canvas_color
/obj/item/canvas/attack_self(mob/user)
. = ..()
. = ..(user)
if(.)
return TRUE
tgui_interact(user)
/obj/item/canvas/dropped(mob/user)
+8 -1
View File
@@ -18,12 +18,19 @@ LINEN BINS
w_class = ITEMSIZE_SMALL
drop_sound = 'sound/items/drop/clothing.ogg'
pickup_sound = 'sound/items/pickup/clothing.ogg'
///var used for attack_self chain
var/special_handling = FALSE
/obj/item/bedsheet/Initialize(mapload)
. = ..()
AddElement(/datum/element/rotatable/onlyflip)
/obj/item/bedsheet/attack_self(mob/user as mob)
/obj/item/bedsheet/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(special_handling)
return FALSE
user.drop_item()
if(layer == initial(layer))
layer = ABOVE_MOB_LAYER
@@ -6,8 +6,15 @@
drop_sound = 'sound/items/drop/rubber.ogg'
w_class = ITEMSIZE_NORMAL
var/deploy_path = /obj/structure/inflatable
///Var used for attack_self chain
var/special_handling = FALSE
/obj/item/inflatable/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(special_handling)
return FALSE
inflate(user,user.loc)
/obj/item/inflatable/afterattack(var/atom/A, var/mob/user)
@@ -246,8 +253,12 @@
desc = "A folded membrane which rapidly expands into a large cubical shape on activation. It is too torn to be usable."
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_wall_torn"
special_handling = TRUE
/obj/item/inflatable/torn/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
to_chat(user, span_notice("The inflatable wall is too torn to be inflated!"))
add_fingerprint(user)
@@ -256,8 +267,12 @@
desc = "A folded membrane which rapidly expands into a simple door on activation. It is too torn to be usable."
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_door_torn"
special_handling = TRUE
/obj/item/inflatable/door/torn/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
to_chat(user, span_notice("The inflatable door is too torn to be inflated!"))
add_fingerprint(user)
+5 -1
View File
@@ -8,8 +8,12 @@
slot_flags = 0
var/pile_type = "/obj/structure/bed/pillowpile"
throw_range = 7
special_handling = TRUE
/obj/item/bedsheet/pillow/attack_self(mob/user as mob)
/obj/item/bedsheet/pillow/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
user.drop_item()
if(icon_state == initial(icon_state))
icon_state = "[icon_state]_placed"
@@ -264,6 +264,9 @@
pickup_sound = 'sound/items/pickup/axe.ogg'
/obj/item/roller/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/obj/structure/bed/roller/R = new bedtype(user.loc)
R.add_fingerprint(user)
qdel(src)
@@ -299,8 +302,10 @@
. = ..()
held = new /obj/item/roller(src)
/obj/item/roller_holder/attack_self(mob/user as mob)
/obj/item/roller_holder/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(!held)
to_chat(user, span_notice("The rack is empty."))
return
@@ -8,6 +8,9 @@
var/unfolded_type = /obj/structure/bed/chair/wheelchair
/obj/item/wheelchair/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/obj/structure/bed/chair/wheelchair/R = new unfolded_type(user.loc)
R.add_fingerprint(user)
R.name = src.name
+75 -59
View File
@@ -312,18 +312,7 @@
slot_l_hand_str = 'icons/mob/items/lefthand.dmi',
slot_r_hand_str = 'icons/mob/items/righthand.dmi',
)
honk_sound = 'sound/voice/quack.ogg' //VOREStation edit
var/honk_text = 0
/obj/item/bikehorn/rubberducky/attack_self(mob/user)
if(spam_flag == 0)
spam_flag = 1
playsound(src, honk_sound, 50, 1)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
return
honk_sound = 'sound/voice/quack.ogg'
//Admin spawn duckies
@@ -335,21 +324,24 @@
item_state = "rubberducky_red"
honk_sound = 'sound/effects/adminhelp.ogg'
var/honk_count = 0
special_handling = TRUE
/obj/item/bikehorn/rubberducky/red/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(honk_count >= 3)
var/turf/epicenter = get_turf(src)
explosion(epicenter, 0, 0, 1, 3)
qdel(src)
return
else if(spam_flag == 0)
spam_flag = 1
else if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
src.add_fingerprint(user)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
honk_count ++
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
honk_count++
return
/obj/item/bikehorn/rubberducky/blue
@@ -359,18 +351,20 @@
icon_state = "rubberducky_blue"
item_state = "rubberducky_blue"
honk_sound = 'sound/effects/bubbles.ogg'
var/honk_count = 0
special_handling = TRUE
/obj/item/bikehorn/rubberducky/blue/attack_self(mob/user)
if(spam_flag == 0)
var/turf/simulated/whereweare = get_turf(src)
whereweare.wet_floor(2)
spam_flag = 1
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
var/turf/simulated/whereweare = get_turf(src)
whereweare.wet_floor(2)
return
/obj/item/bikehorn/rubberducky/pink
@@ -380,23 +374,24 @@
icon_state = "rubberducky_pink"
item_state = "rubberducky_pink"
honk_sound = 'sound/vore/sunesound/pred/insertion_01.ogg'
var/honk_count = 0
special_handling = TRUE
/obj/item/bikehorn/rubberducky/pink/attack_self(mob/user)
if(spam_flag == 0)
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
if(!user.devourable)
to_chat(user, span_vnotice("You can't bring yourself to squeeze it..."))
return
spam_flag = 1
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
user.drop_item()
user.forceMove(src)
to_chat(user, span_vnotice("You have been swallowed alive by the rubber ducky. Your entire body compacted up and squeezed into the tiny space that makes up the oddly realistic and not at all rubbery stomach. The walls themselves are kneading over you, grinding some sort of fluids into your trapped body. You can even hear the sound of bodily functions echoing around you..."))
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
return
/obj/item/bikehorn/rubberducky/pink/container_resist(var/mob/living/escapee)
if(isdisposalpacket(loc))
@@ -412,23 +407,26 @@
icon_state = "rubberducky_grey"
item_state = "rubberducky_grey"
honk_sound = 'sound/effects/ghost.ogg'
var/honk_count = 0
special_handling = TRUE
/obj/item/bikehorn/rubberducky/grey/attack_self(mob/user)
if(spam_flag == 0)
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
for(var/obj/machinery/light/L in GLOB.machines)
if(L.z != user.z || get_dist(user,L) > 10)
continue
else
L.flicker(10)
spam_flag = 1
playsound(src, honk_sound, 50, 1)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
user.drop_item()
var/turf/T = locate(rand(1, 140), rand(1, 140), user.z)
src.forceMove(T)
forceMove(T)
return
/obj/item/bikehorn/rubberducky/green
@@ -438,7 +436,6 @@
icon_state = "rubberducky_green"
item_state = "rubberducky_green"
honk_sound = 'sound/arcade/mana.ogg'
var/honk_count = 0
var/list/flora = list(/obj/structure/flora/ausbushes,
/obj/structure/flora/ausbushes/reedbush,
/obj/structure/flora/ausbushes/leafybush,
@@ -455,18 +452,21 @@
/obj/structure/flora/ausbushes/ppflowers,
/obj/structure/flora/ausbushes/sparsegrass,
/obj/structure/flora/ausbushes/fullgrass)
special_handling = TRUE
/obj/item/bikehorn/rubberducky/green/attack_self(mob/user)
if(spam_flag == 0)
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
var/turf/simulated/whereweare = get_turf(src)
var/obj/P = pick(flora)
new P(whereweare)
spam_flag = 1
playsound(src, honk_sound, 50, 1)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
return
/obj/item/bikehorn/rubberducky/white
@@ -476,16 +476,19 @@
icon_state = "rubberducky_white"
item_state = "rubberducky_white"
honk_sound = 'sound/effects/lightningshock.ogg'
var/honk_count = 0
special_handling = TRUE
/obj/item/bikehorn/rubberducky/white/attack_self(mob/user)
if(spam_flag == 0)
lightning_strike(get_turf(src), 1)
spam_flag = 1
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
src.add_fingerprint(user)
lightning_strike(get_turf(src), 1)
qdel(src)
return
@@ -505,11 +508,16 @@
icon_state = "rubberducky_gold"
item_state = "rubberducky_gold"
honk_sound = 'sound/voice/quack_reverb.ogg'
special_handling = TRUE
/obj/item/bikehorn/rubberducky/gold/attack_self(mob/user)
if(spam_flag == 0)
spam_flag = 1
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
if(isliving(user))
@@ -527,16 +535,20 @@
item_state = "rubberducky_viking"
honk_sound = 'sound/voice/scream_jelly_m1.ogg'
honk_text = "DUK ROH DAH!"
special_handling = TRUE
/obj/item/bikehorn/rubberducky/viking/attack_self(mob/user)
if(spam_flag == 0)
spam_flag = 1
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
user.drop_item()
user.throw_at_random(FALSE,9,2)
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
return
/obj/item/bikehorn/rubberducky/galaxy
@@ -546,11 +558,16 @@
icon_state = "rubberducky_galaxy"
item_state = "rubberducky_galaxy"
honk_sound = 'sound/effects/teleport.ogg'
special_handling = TRUE
/obj/item/bikehorn/rubberducky/galaxy/attack_self(mob/user)
if(spam_flag == 0)
spam_flag = 1
. = ..(user)
if(.)
return TRUE
if(cooldown <= world.time)
cooldown = (world.time + 2 SECONDS)
playsound(src, honk_sound, 50, 1)
add_fingerprint(user)
if(honk_text)
audible_message(span_maroon("[honk_text]"))
var/list/possible_orbiters = list()
@@ -560,7 +577,6 @@
possible_orbiters += M
var/atom/movable/selected_orbiter = pick(possible_orbiters)
selected_orbiter.orbit(user,32,TRUE,20,36)
addtimer(VARSET_CALLBACK(src, spam_flag, 0), 20, TIMER_DELETE_ME)
return
//////////////////////////////SINKS//////////////////////////////