mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Fix map_export admin verb not saving objects properly (#90998)
## About The Pull Request When using the `map_export` admin verb the following things are fixed: - All objects density, anchored, opacity, atom_integrity, and resistance_flags vars are saved - Multi-tile objects being spammed on all tiles the sprite reaches - Dirt decals error icon - Airlocks error icon and to save welded state - Dark Wizard Simple Mobs error icon - Closets to save welded, open, and locked states - Air alarms to save name - Air scrubbers/vents to save name and welded states - APCs to save name, charge, cell, lighting, equipment, and environmental states - APCs spawning a duplicated terminal underneath it when one already exists - SMES to save charge, input, and output states - Holodecks to revert any holodeck turfs to the empty turf and skip saving any hologram items - Photos and Paintings error icons - Bloody Footprints error icons - False Walls error icons - Docking Ports runtimes because the map template var would change - Effects (lasers, portals, beams, sparks, etc.) saving when they should be omitted I would have loved to get `component_parts` to save for machines and turf decals, but perhaps that is for another day since it requires complicated solutions. Here are some before and after pictures:     ## Why It's Good For The Game Better map saving code. ## Changelog 🆑 fix: Fix `map_export` admin verb not properly saving a massive amount of objects. /🆑
This commit is contained in:
@@ -109,6 +109,14 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
|
||||
fire = 70
|
||||
acid = 60
|
||||
|
||||
/obj/structure/closet/get_save_vars()
|
||||
. = ..()
|
||||
. += NAMEOF(src, welded)
|
||||
. += NAMEOF(src, opened)
|
||||
. += NAMEOF(src, locked)
|
||||
. += NAMEOF(src, anchorable)
|
||||
return .
|
||||
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = FALSE
|
||||
|
||||
/obj/structure/falsewall/get_save_vars()
|
||||
. = ..()
|
||||
. -= NAMEOF(src, icon)
|
||||
return .
|
||||
|
||||
/obj/structure/falsewall/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -33,6 +37,7 @@
|
||||
set_custom_materials(initialized_mineral.mats_per_unit, mineral_amount)
|
||||
qdel(initialized_mineral)
|
||||
air_update_turf(TRUE, TRUE)
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user, list/modifiers)
|
||||
if(opening)
|
||||
|
||||
Reference in New Issue
Block a user