Files
VOREStation/code/modules/maintenance_panels/maintpanel_stack.dm
T
Cameron Lennox d5849910e5 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
2025-12-29 13:21:10 -05:00

75 lines
2.3 KiB
Plaintext

// Maintenance panel sheets
/obj/item/stack/tile/maintenance_panel
name = "maintenance panel"
desc = "A maintenance panel"
singular_name = "panel"
icon_state = "maintpanel"
force = 6.0
matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 4)
throwforce = 15.0
throw_speed = 5
throw_range = 20
can_weld = TRUE
no_variants = FALSE
custom_handling = TRUE
/obj/item/stack/tile/maintenance_panel/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/turf/T = user.loc
if(!user || (loc != user && !isrobot(user)) || user.stat || user.loc != T)
return FALSE
if(!user.IsAdvancedToolUser())
to_chat(user, span_warning("This task is too complex for your clumsy hands."))
return TRUE
// Get data for building windows here.
var/list/possible_directions = GLOB.cardinal.Copy()
var/window_count = 0
for (var/obj/structure/window/check_window in user.loc)
window_count++
possible_directions -= check_window.dir
for (var/obj/structure/windoor_assembly/check_assembly in user.loc)
window_count++
possible_directions -= check_assembly.dir
for (var/obj/machinery/door/window/check_windoor in user.loc)
window_count++
possible_directions -= check_windoor.dir
// Get the closest available dir to the user's current facing.
var/build_dir = SOUTHWEST //Default to southwest for fulltile windows.
var/failed_to_build
if(window_count >= 4)
failed_to_build = 1
else
if(possible_directions.len)
for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,270), turn(user.dir,180)))
if(direction in possible_directions)
build_dir = direction
break
else
failed_to_build = 1
if(failed_to_build)
to_chat(user, span_warning("There is no room in this location."))
return TRUE
var/sheets_needed = 1
if(get_amount() < sheets_needed)
to_chat(user, span_warning("You need at least [sheets_needed] sheets to build this."))
return TRUE
if(build_dir == SOUTHWEST)
to_chat(user, span_warning("A maintenance panel cannot be built like that!"))
return TRUE
// Build the structure and update sheet count etc.
use(sheets_needed)
new /obj/structure/window/maintenance_panel(T, build_dir, 1)
return TRUE
// Spawner
/obj/fiftyspawner/maintenance_panel
name = "stack of maintenance panels"
type_to_spawn = /obj/item/stack/tile/maintenance_panel