map exporting now supports puzzle pieces and similar (#81759)

## About The Pull Request
What it reads on the tin. `puzzle_id` vars and the such are now
supported by the map exporting verb.

## Why It's Good For The Game
If anyone ever so wishes to export maps with puzzle doors and stuff.

## Changelog
N/A
This commit is contained in:
Ghom
2024-03-21 20:32:24 +00:00
committed by GitHub
parent 8a36ea7eff
commit bd8a641a5a
4 changed files with 43 additions and 2 deletions
+3 -1
View File
@@ -25,7 +25,6 @@
/obj/machinery/door/password/voice
voice_activated = TRUE
/datum/armor/door_password
melee = 100
bullet = 100
@@ -42,6 +41,9 @@
become_hearing_sensitive()
AddElement(/datum/element/empprotection, EMP_PROTECT_ALL)
/obj/machinery/door/password/get_save_vars()
return ..() + NAMEOF(src, password)
/obj/machinery/door/password/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list(), message_range)
. = ..()
if(!density || !voice_activated || radio_freq)
+3
View File
@@ -32,6 +32,9 @@
fire = 100
acid = 70
/obj/machinery/door/poddoor/get_save_vars()
return ..() + NAMEOF(src, id)
/obj/machinery/door/poddoor/screwdriver_act(mob/living/user, obj/item/tool)
. = ..()
if (density)
+36
View File
@@ -16,6 +16,9 @@
resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF | LAVA_PROOF
var/puzzle_id = null
/obj/item/keycard/get_save_vars()
return ..() + NAMEOF(src, puzzle_id)
//Two test keys for use alongside the two test doors.
/obj/item/keycard/yellow
name = "yellow keycard"
@@ -53,6 +56,9 @@
/// Message that occurs when the door is opened
var/open_message = "The door beeps, and slides opens."
/obj/machinery/door/puzzle/get_save_vars()
return ..() + NAMEOF(src, puzzle_id)
//Standard Expressions to make keycard doors basically un-cheeseable
/datum/armor/door_puzzle
melee = 100
@@ -160,6 +166,9 @@
var/reward = /obj/item/food/cookie
var/claimed = FALSE
/obj/item/pressure_plate/hologrid/get_save_vars()
return ..() + NAMEOF(src, reward)
/obj/item/pressure_plate/hologrid/Initialize(mapload)
. = ..()
if(undertile_pressureplate)
@@ -210,6 +219,9 @@
/// queue size, must match count of objects this activates!
var/queue_size = 2
/obj/structure/light_puzzle/get_save_vars()
return ..() + list(NAMEOF(src, queue_size), NAMEOF(src, puzzle_id))
/datum/armor/structure_light_puzzle
melee = 100
bullet = 100
@@ -302,6 +314,9 @@
/// should the puzzle machinery perform the final step of the queue link on LateInitialize? An alternative to queue size
var/late_initialize_pop = FALSE
/obj/machinery/puzzle/get_save_vars()
return ..() + list(NAMEOF(src, queue_size), NAMEOF(src, id))
/obj/machinery/puzzle/Initialize(mapload)
. = ..()
if(!isnull(id))
@@ -378,6 +393,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/keycardpad, 32)
///Decides whether the max length of the input is MAX_NAME_LEN or the length of the password.
var/input_max_len_is_pass = FALSE
/obj/machinery/puzzle/password/get_save_vars()
return ..() + list(NAMEOF(src, password), NAMEOF(src, tgui_text), NAMEOF(src, tgui_title), NAMEOF(src, input_max_len_is_pass))
/obj/machinery/puzzle/password/interact(mob/user, list/modifiers)
if(used && single_use)
return
@@ -408,6 +426,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password, 32)
///associate a color to each digit that may be found in the password.
var/list/digit_to_color = list()
/obj/machinery/puzzle/password/pin/get_save_vars()
return ..() + NAMEOF(src, pin_length)
/obj/machinery/puzzle/password/pin/Initialize(mapload)
. = ..()
@@ -448,6 +469,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
/// if we receive a puzzle signal with this id we get destroyed
var/id
/obj/structure/puzzle_blockade/get_save_vars()
return ..() + NAMEOF(src, id)
/obj/structure/puzzle_blockade/Initialize(mapload)
. = ..()
if(!isnull(id))
@@ -499,6 +523,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
/// door id
var/id
/obj/effect/puzzle_poddoor_open/get_save_vars()
return ..() + list(NAMEOF(src, queue_id), NAMEOF(src, id))
/obj/effect/puzzle_poddoor_open/Initialize(mapload)
. = ..()
if(isnull(id) || isnull(queue_id))
@@ -537,6 +564,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
///The id of the puzzle we're linked to.
var/id
/obj/effect/decal/puzzle_dots/get_save_vars()
return ..() + NAMEOF(src, id)
/obj/effect/decal/puzzle_dots/Initialize(mapload)
. = ..()
if(id)
@@ -571,6 +601,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
///The id of the puzzle we're linked to.
var/puzzle_id
/obj/effect/decal/cleanable/crayon/puzzle/get_save_vars()
return ..() + NAMEOF(src, puzzle_id)
/obj/effect/decal/cleanable/crayon/puzzle/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null)
. = ..()
name = "number"
@@ -604,6 +637,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
///The ID associated to the puzzle we're part of.
var/puzzle_id
/obj/item/paper/fluff/scrambled_pass/get_save_vars()
return ..() + NAMEOF(src, puzzle_id)
/obj/item/paper/fluff/scrambled_pass/Initialize(mapload)
. = ..()
if(mapload && puzzle_id)
+1 -1
View File
@@ -86,7 +86,7 @@
)
/obj/get_save_vars()
return ..() + NAMEOF(src, req_access)
return ..() + list(NAMEOF(src, req_access), NAMEOF(src, id_tag))
/obj/item/stack/get_save_vars()
return ..() + NAMEOF(src, amount)