diff --git a/_maps/RandomRuins/AnywhereRuins/golem_ship.dmm b/_maps/RandomRuins/AnywhereRuins/golem_ship.dmm index 61311b3f036..cddd5a08206 100644 --- a/_maps/RandomRuins/AnywhereRuins/golem_ship.dmm +++ b/_maps/RandomRuins/AnywhereRuins/golem_ship.dmm @@ -337,7 +337,7 @@ /area/ruin/powered/golem_ship) "un" = ( /obj/structure/table/wood, -/obj/item/areaeditor/blueprints/golem{ +/obj/item/blueprints/golem{ pixel_y = 3; pixel_x = -2 }, diff --git a/code/__DEFINES/_flags.dm b/code/__DEFINES/_flags.dm index 8597092fbf6..5969f81bccb 100644 --- a/code/__DEFINES/_flags.dm +++ b/code/__DEFINES/_flags.dm @@ -115,7 +115,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define UNIQUE_AREA (1<<8) /// If people are allowed to suicide in it. Mostly for OOC stuff like minigames #define BLOCK_SUICIDE (1<<9) -/// Can the Xenobio management console transverse this area by default? +/// If set, this area will be innately traversable by Xenobiology camera consoles. #define XENOBIOLOGY_COMPATIBLE (1<<10) /// If Abductors are unable to teleport in with their observation console #define ABDUCTOR_PROOF (1<<11) diff --git a/code/__DEFINES/area_editor.dm b/code/__DEFINES/area_editor.dm deleted file mode 100644 index f0ef57c7e52..00000000000 --- a/code/__DEFINES/area_editor.dm +++ /dev/null @@ -1,5 +0,0 @@ -// Used to edit areas. -#define AREA_ERRNONE 0 -#define AREA_STATION 1 -#define AREA_SPACE 2 -#define AREA_SPECIAL 3 diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index 8df182c90d0..dc2f66c2ed0 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -293,3 +293,51 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(list( mobs_in_area += mob break return mobs_in_area + +/** + * rename_area + * Renames an area to the given new name, updating all machines' names and firedoors + * to properly ensure alarms and machines are named correctly at all times. + * Args: + * - area_to_rename: The area that's being renamed. + * - new_name: The name we're changing said area to. + */ +/proc/rename_area(area/area_to_rename, new_name) + var/prevname = "[area_to_rename.name]" + set_area_machinery_title(area_to_rename, new_name, prevname) + area_to_rename.name = new_name + require_area_resort() //area renamed so resort the names + + if(LAZYLEN(area_to_rename.firedoors)) + for(var/obj/machinery/door/firedoor/area_firedoors as anything in area_to_rename.firedoors) + area_firedoors.CalculateAffectingAreas() + area_to_rename.update_areasize() + return TRUE + +/** + * Renames all machines in a defined area from the old title to the new title. + * Used when renaming an area to ensure that all machiens are labeled the new area's machine. + * Args: + * - area_renaming: The area being renamed, which we'll check turfs from to rename machines in. + * - title: The new name of the area that we're swapping into. + * - oldtitle: The old name of the area that we're replacing text from. + */ +/proc/set_area_machinery_title(area/area_renaming, title, oldtitle) + if(!oldtitle) // or replacetext goes to infinite loop + return + + //stuff tied to the area to rename + var/static/list/to_rename = typecacheof(list( + /obj/machinery/airalarm, + /obj/machinery/atmospherics/components/unary/vent_scrubber, + /obj/machinery/atmospherics/components/unary/vent_pump, + /obj/machinery/door, + /obj/machinery/firealarm, + /obj/machinery/light_switch, + /obj/machinery/power/apc, + /obj/machinery/camera, + )) + for(var/list/zlevel_turfs as anything in area_renaming.get_zlevel_turf_lists()) + for(var/turf/area_turf as anything in zlevel_turfs) + for(var/obj/machine as anything in typecache_filter_list(area_turf.contents, to_rename)) + machine.name = replacetext(machine.name, oldtitle, title) diff --git a/code/__HELPERS/turfs.dm b/code/__HELPERS/turfs.dm index 32a570ae8fc..c44845a5854 100644 --- a/code/__HELPERS/turfs.dm +++ b/code/__HELPERS/turfs.dm @@ -413,3 +413,20 @@ Turf and target are separate in case you want to teleport some distance from a t if(locate(type_to_find) in location) return TRUE return FALSE + +/** + * get_blueprint_data + * Gets a list of turfs around a central turf and gets the blueprint data in a list + * Args: + * - central_turf: The center turf we're getting data from. + * - viewsize: The viewsize we're getting the turfs around central_turf of. + */ +/proc/get_blueprint_data(turf/central_turf, viewsize) + var/list/blueprint_data_returned = list() + var/list/dimensions = getviewsize(viewsize) + var/horizontal_radius = dimensions[1] / 2 + var/vertical_radius = dimensions[2] / 2 + for(var/turf/nearby_turf as anything in RECT_TURFS(horizontal_radius, vertical_radius, central_turf)) + if(nearby_turf.blueprint_data) + blueprint_data_returned += nearby_turf.blueprint_data + return blueprint_data_returned diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 99438be18cc..cb7c3972993 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -258,7 +258,7 @@ return TRUE // Station blueprints do that too, but only if the wires are not randomized. - if(user.is_holding_item_of_type(/obj/item/areaeditor/blueprints) && !randomize) + if(user.is_holding_item_of_type(/obj/item/blueprints) && !randomize) return TRUE return FALSE diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 491f0f71fb9..328531d88c6 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -525,7 +525,7 @@ /datum/objective_item/steal/blueprints name = "the station blueprints" - targetitem = /obj/item/areaeditor/blueprints + targetitem = /obj/item/blueprints excludefromjob = list(JOB_CHIEF_ENGINEER) item_owner = list(JOB_CHIEF_ENGINEER) altitems = list(/obj/item/photo) @@ -533,11 +533,11 @@ difficulty = 3 steal_hint = "The blueprints of the station, found in the Chief Engineer's locker, or on their person. A picture may suffice." -/obj/item/areaeditor/blueprints/add_stealing_item_objective() - return add_item_to_steal(src, /obj/item/areaeditor/blueprints) +/obj/item/blueprints/add_stealing_item_objective() + return add_item_to_steal(src, /obj/item/blueprints) /datum/objective_item/steal/blueprints/check_special_completion(obj/item/I) - if(istype(I, /obj/item/areaeditor/blueprints)) + if(istype(I, /obj/item/blueprints)) return TRUE if(istype(I, /obj/item/photo)) var/obj/item/photo/P = I diff --git a/code/game/machinery/barsigns.dm b/code/game/machinery/barsigns.dm index 006620ec5f4..e59de18ffcb 100644 --- a/code/game/machinery/barsigns.dm +++ b/code/game/machinery/barsigns.dm @@ -36,8 +36,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) if(!istype(sign)) return + var/area/bar_area = get_area(src) if(change_area_name && sign.rename_area) - rename_area(src, sign.name) + rename_area(bar_area, sign.name) chosen_sign = sign update_appearance() @@ -152,7 +153,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) /obj/machinery/barsign/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/areaeditor/blueprints) && !change_area_name) + if(istype(attacking_item, /obj/item/blueprints) && !change_area_name) if(!panel_open) balloon_alert(user, "open the panel first!") return TRUE diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 82fc3437f20..d11c6e21d69 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -1,254 +1,255 @@ -/obj/item/areaeditor - name = "area modification item" +///The area is a "Station" area, showing no special text. +#define AREA_STATION 1 +///The area is in outdoors (lavaland/icemoon/jungle/space), therefore unclaimed territories. +#define AREA_OUTDOORS 2 +///The area is special (shuttles/centcom), therefore can't be claimed. +#define AREA_SPECIAL 3 + +///The blueprints are currently reading the list of all wire datums. +#define LEGEND_VIEWING_LIST "watching_list" +///The blueprints are on the main page. +#define LEGEND_OFF "off" + +/** + * Blueprints + * Used to see the wires of machines on the station, the roundstart layout of pipes/cables/tubes, + * as well as allowing you to rename existing areas and create new ones. + * Used by the station, cyborgs, and golems. + */ +/obj/item/blueprints + name = "station blueprints" + desc = "Blueprints of the station. There is a \"Classified\" stamp and several coffee stains on it." icon = 'icons/obj/scrolls.dmi' icon_state = "blueprints" inhand_icon_state = "blueprints" attack_verb_continuous = list("attacks", "baps", "hits") attack_verb_simple = list("attack", "bap", "hit") - var/fluffnotice = "Nobody's gonna read this stuff!" - var/in_use = FALSE - ///When using it to create a new area, this will be its type. - var/new_area_type = /area - -/obj/item/areaeditor/attack_self(mob/user) - add_fingerprint(user) - . = "[src] \ -

[station_name()] [src.name]

\ - [fluffnotice]
" - switch(get_area_type()) - if(AREA_SPACE) - . += "

According to the [src.name], you are now in an unclaimed territory.

" - if(AREA_SPECIAL) - . += "

This place is not noted on the [src.name].

" - . += "

Create or modify an existing area

" - - -/obj/item/areaeditor/Topic(href, href_list) - if(..()) - return TRUE - if(!usr.can_perform_action(src) || usr != loc) - usr << browse(null, "window=blueprints") - return TRUE - if(href_list["create_area"]) - if(in_use) - return - var/area/A = get_area(usr) - if(A.area_flags & NOTELEPORT) - to_chat(usr, span_warning("You cannot edit restricted areas.")) - return - in_use = TRUE - create_area(usr, new_area_type) - in_use = FALSE - updateUsrDialog() - -//Station blueprints!!! -/obj/item/areaeditor/blueprints - name = "station blueprints" - desc = "Blueprints of the station. There is a \"Classified\" stamp and several coffee stains on it." - icon = 'icons/obj/scrolls.dmi' - icon_state = "blueprints" - fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage." resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY + + ///A string of flavortext to be displayed at the top of the UI, related to the type of blueprints we are. + var/fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage." + ///Boolean on whether the blueprints are currently being used, which prevents double-using them to rename/create areas. + var/in_use = FALSE + ///The type of area we'll create when we make a new area. This is a typepath. + var/area/new_area_type = /area + ///The legend type the blueprints are currently looking at, which is either modularly + ///set by wires datums, the main page, or an overview of them all. + var/legend_viewing = LEGEND_OFF + + ///List of images that we're showing to a client, used for showing blueprint data. var/list/image/showing = list() + ///The client that is being shown the list of 'showing' images of blueprint data. var/client/viewing - var/legend = FALSE //Viewing the wire legend - -/obj/item/areaeditor/blueprints/Destroy() +/obj/item/blueprints/Destroy() clear_viewer() return ..() - -/obj/item/areaeditor/blueprints/attack_self(mob/user) +/obj/item/blueprints/dropped(mob/user) . = ..() - if(!legend) - var/area/A = get_area(user) - if(get_area_type() == AREA_STATION) - . += "

According to \the [src], you are now in \"[html_encode(A.name)]\".

" - . += "

Change area name

" - . += "

View wire colour legend

" - if(!viewing) - . += "

View structural data

" - else - . += "

Refresh structural data

" - . += "

Hide structural data

" - else - if(legend == TRUE) - . += "<< Back" - . += view_wire_devices(user); - else - //legend is a wireset - . += "<< Back" - . += view_wire_set(user, legend) - var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500) - popup.set_content(.) - popup.open() - onclose(user, "blueprints") + clear_viewer() + legend_viewing = LEGEND_OFF +/obj/item/blueprints/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Blueprints", name) + ui.open() -/obj/item/areaeditor/blueprints/Topic(href, href_list) - if(..()) +/obj/item/blueprints/ui_state(mob/user) + return GLOB.inventory_state + +/obj/item/blueprints/ui_data(mob/user) + var/list/data = list() + switch(get_area_type(user)) + if(AREA_OUTDOORS) + data["area_notice"] = "You are in unclaimed territory." + if(AREA_SPECIAL) + data["area_notice"] = "This area has no notes." + else + var/area/current_area = get_area(user) + data["area_notice"] = "You are now in \the [current_area.name]" + var/area/area_inside_of = get_area(user) + data["area_name"] = html_encode(area_inside_of.name) + data["legend"] = legend_viewing + data["viewing"] = !!viewing + data["wire_data"] = list() + if(legend_viewing != LEGEND_VIEWING_LIST && legend_viewing != LEGEND_OFF) + for(var/device in GLOB.wire_color_directory) + if("[device]" != legend_viewing) + continue + data["wires_name"] = GLOB.wire_name_directory[device] + for(var/individual_color in GLOB.wire_color_directory[device]) + var/wire_name = GLOB.wire_color_directory[device][individual_color] + if(findtext(wire_name, WIRE_DUD_PREFIX)) //don't show duds + continue + data["wire_data"] += list(list( + "color" = individual_color, + "message" = wire_name, + )) + return data + +/obj/item/blueprints/ui_static_data(mob/user) + var/list/data = list() + data["legend_viewing_list"] = LEGEND_VIEWING_LIST + data["legend_off"] = LEGEND_OFF + data["fluff_notice"] = fluffnotice + data["station_name"] = station_name() + data["wire_devices"] = list() + for(var/wireset in GLOB.wire_color_directory) + data["wire_devices"] += list(list( + "name" = GLOB.wire_name_directory[wireset], + "ref" = wireset, + )) + return data + +/obj/item/blueprints/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) return - if(href_list["edit_area"]) - if(get_area_type() != AREA_STATION) - return - if(in_use) - return - in_use = TRUE - edit_area() - in_use = FALSE - if(href_list["exit_legend"]) - legend = FALSE; - if(href_list["view_legend"]) - legend = TRUE; - if(href_list["view_wireset"]) - legend = href_list["view_wireset"]; - if(href_list["view_blueprints"]) - set_viewer(usr, span_notice("You flip the blueprints over to view the complex information diagram.")) - if(href_list["hide_blueprints"]) - clear_viewer(usr,span_notice("You flip the blueprints over to view the simple information diagram.")) - if(href_list["refresh"]) - clear_viewer(usr) - set_viewer(usr) - attack_self(usr) //this is not the proper way, but neither of the old update procs work! it's too ancient and I'm tired shush. + var/mob/user = ui.user + if(!user.can_perform_action(src, NEED_LITERACY|NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING)) + return TRUE -/obj/item/areaeditor/blueprints/proc/get_images(turf/central_turf, viewsize) - . = list() - var/list/dimensions = getviewsize(viewsize) - var/horizontal_radius = dimensions[1] / 2 - var/vertical_radius = dimensions[2] / 2 - for(var/turf/nearby_turf as anything in RECT_TURFS(horizontal_radius, vertical_radius, central_turf)) - if(nearby_turf.blueprint_data) - . += nearby_turf.blueprint_data - -/obj/item/areaeditor/blueprints/proc/set_viewer(mob/user, message = "") - if(user?.client) - if(viewing) + switch(action) + if("create_area") + if(in_use) + return + in_use = TRUE + create_area(user, new_area_type) + in_use = FALSE + if("edit_area") + if(get_area_type(user) != AREA_STATION) + return + if(in_use) + return + in_use = TRUE + edit_area(user) + in_use = FALSE + if("exit_legend") + legend_viewing = LEGEND_OFF + if("view_legend") + legend_viewing = LEGEND_VIEWING_LIST + if("view_wireset") + var/setting_wireset = params["view_wireset"] + for(var/device in GLOB.wire_color_directory) + if("[device]" == setting_wireset) //I know... don't change it... + legend_viewing = setting_wireset + return TRUE + if("view_blueprints") + playsound(src, 'sound/items/paper_flip.ogg', 40, TRUE) + user.balloon_alert_to_viewers("flips blueprints over") + set_viewer(user) + if("hide_blueprints") + playsound(src, 'sound/items/paper_flip.ogg', 40, TRUE) + user.balloon_alert_to_viewers("flips blueprints over") clear_viewer() - viewing = user.client - showing = get_images(get_turf(viewing.eye || user), viewing.view) - viewing.images |= showing - if(message) - to_chat(user, message) + if("refresh") + playsound(src, 'sound/items/paper_flip.ogg', 40, TRUE) + clear_viewer() + set_viewer(user) + return TRUE -/obj/item/areaeditor/blueprints/proc/clear_viewer(mob/user, message = "") +/** + * Sets the user's client as the person viewing blueprint data, and builds blueprint data + * around the user. + * Args: + * - user: The person who's client we're giving images to. + */ +/obj/item/blueprints/proc/set_viewer(mob/user) + if(!user || !user.client) + return + if(viewing) + clear_viewer() + viewing = user.client + showing = get_blueprint_data(get_turf(viewing.eye || user), viewing.view) + viewing.images |= showing + +/** + * Clears the client we're showig images to and deletes the images of blueprint data + * we made to show them. + */ +/obj/item/blueprints/proc/clear_viewer() if(viewing) viewing.images -= showing viewing = null showing.Cut() - if(message) - to_chat(user, message) -/obj/item/areaeditor/blueprints/dropped(mob/user) - ..() - clear_viewer() - legend = FALSE - - -/obj/item/areaeditor/proc/get_area_type(area/A) - if (!A) - A = get_area(usr) - if(A.outdoors) - return AREA_SPACE - var/list/SPECIALS = list( +/** + * Gets the area type the user is currently standing in. + * Returns: AREA_STATION, AREA_OUTDOORS, or AREA_SPECIAL + * Args: + * - user: The person we're getting the area of to check if it's a special area. + */ +/obj/item/blueprints/proc/get_area_type(mob/user) + var/area/area_checking = get_area(user) + if(area_checking.outdoors) + return AREA_OUTDOORS + var/static/list/special_areas = typecacheof(list( /area/shuttle, /area/centcom, /area/centcom/asteroid, /area/centcom/tdome, /area/centcom/wizard_station, /area/misc/hilbertshotel, - /area/misc/hilbertshotelstorage - ) - for (var/type in SPECIALS) - if ( istype(A,type) ) - return AREA_SPECIAL + /area/misc/hilbertshotelstorage, + )) + if(area_checking.type in special_areas) + return AREA_SPECIAL return AREA_STATION -/obj/item/areaeditor/blueprints/proc/view_wire_devices(mob/user) - var/message = "
You examine the wire legend.
" - for(var/wireset in GLOB.wire_color_directory) - message += "
[GLOB.wire_name_directory[wireset]]" - message += "

" - return message - -/obj/item/areaeditor/blueprints/proc/view_wire_set(mob/user, wireset) - //for some reason you can't use wireset directly as a derefencer so this is the next best :/ - for(var/device in GLOB.wire_color_directory) - if("[device]" == wireset) //I know... don't change it... - var/message = "

[GLOB.wire_name_directory[device]]:" - for(var/Col in GLOB.wire_color_directory[device]) - var/wire_name = GLOB.wire_color_directory[device][Col] - if(!findtext(wire_name, WIRE_DUD_PREFIX)) //don't show duds - message += "

[Col]: [wire_name]

" - message += "

" - return message - return "" - -/obj/item/areaeditor/proc/edit_area() - var/area/A = get_area(usr) - var/prevname = "[A.name]" - var/str = tgui_input_text(usr, "New area name", "Area Creation", max_length = MAX_NAME_LEN) - if(!str || !length(str) || str == prevname) //cancel - return - if(length(str) > 50) - to_chat(usr, span_warning("The given name is too long. The area's name is unchanged.")) +/** + * edit_area + * Takes input from the player and renames the area the blueprints are currently in. + */ +/obj/item/blueprints/proc/edit_area(mob/user) + var/area/area_editing = get_area(src) + var/prevname = "[area_editing.name]" + var/new_name = tgui_input_text(user, "New area name", "Area Creation", max_length = MAX_NAME_LEN) + if(isnull(new_name) || !length(new_name) || new_name == prevname) return - rename_area(A, str) - - to_chat(usr, span_notice("You rename the '[prevname]' to '[str]'.")) - usr.log_message("has renamed [prevname] to [str]", LOG_GAME) - A.update_areasize() - interact() + rename_area(area_editing, new_name) + user.balloon_alert(user, "area renamed to [new_name]") + user.log_message("has renamed [prevname] to [new_name]", LOG_GAME) return TRUE -//Blueprint Subtypes - -/obj/item/areaeditor/blueprints/cyborg +///Cyborg blueprints - The same as regular but with a different fluff text. +/obj/item/blueprints/cyborg name = "station schematics" desc = "A digital copy of the station blueprints stored in your memory." - icon = 'icons/obj/scrolls.dmi' - icon_state = "blueprints" fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station." -/obj/item/areaeditor/blueprints/golem +///Golem blueprints - Used to make golem areas that won't give the hazardous area debuffs. +/obj/item/blueprints/golem name = "land claim" desc = "Use it to build new structures in the wastes." fluffnotice = "In memory of the Liberator's brother, Delaminator, and his Scarlet Macaw-iathan, from which this artifact was stolen." new_area_type = /area/golem -/proc/rename_area(a, new_name) - var/area/A = get_area(a) - var/prevname = "[A.name]" - set_area_machinery_title(A, new_name, prevname) - A.name = new_name - require_area_resort() //area renamed so resort the names +///Slime blueprints - Makes areas colored and compatible with xenobiology camera consoles, one time use. +/obj/item/blueprints/slime + name = "cerulean prints" + desc = "A one use yet of blueprints made of jelly like organic material. Extends the reach of the management console." + fluffnotice = "Copyright by Science Inc. Renaming areas will allow for management consoles to traverse them." + color = "#2956B2" - if(A.firedoors) - for(var/D in A.firedoors) - var/obj/machinery/door/firedoor/FD = D - FD.CalculateAffectingAreas() - A.update_areasize() - return TRUE +/obj/item/blueprints/slime/edit_area(mob/user) + . = ..() + var/area/area = get_area(src) + for(var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists()) + for(var/turf/area_turf as anything in zlevel_turfs) + area_turf.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) + area_turf.add_atom_colour("#2956B2", FIXED_COLOUR_PRIORITY) + area.area_flags |= XENOBIOLOGY_COMPATIBLE + qdel(src) +#undef LEGEND_VIEWING_LIST +#undef LEGEND_OFF -/proc/set_area_machinery_title(area/area, title, oldtitle) - if(!oldtitle) // or replacetext goes to infinite loop - return +#undef AREA_STATION +#undef AREA_OUTDOORS +#undef AREA_SPECIAL - //stuff tied to the area to rename - var/static/list/to_rename = typecacheof(list( - /obj/machinery/airalarm, - /obj/machinery/atmospherics/components/unary/vent_scrubber, - /obj/machinery/atmospherics/components/unary/vent_pump, - /obj/machinery/door, - /obj/machinery/firealarm, - /obj/machinery/light_switch, - /obj/machinery/power/apc, - )) - for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists()) - for (var/turf/area_turf as anything in zlevel_turfs) - for(var/obj/machine as anything in typecache_filter_list(area_turf.contents, to_rename)) - machine.name = replacetext(machine.name, oldtitle, title) - //TODO: much much more. Unnamed airlocks, cameras, etc. diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index d90212ca113..3dc59fb9ce2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -23,7 +23,7 @@ . = ..() // Traitor steal objective - new /obj/item/areaeditor/blueprints(src) + new /obj/item/blueprints(src) new /obj/item/pipe_dispenser(src) /obj/structure/closet/secure_closet/engineering_electrical diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index 6d9646b49ee..db20562039b 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -388,7 +388,7 @@ ) head = /obj/item/clothing/head/utility/hardhat/welding mask = /obj/item/clothing/mask/gas/atmos - l_hand = /obj/item/areaeditor/blueprints + l_hand = /obj/item/blueprints /datum/outfit/centcom/ert/clown/party name = "ERP Comedian" diff --git a/code/modules/hallucination/fake_message.dm b/code/modules/hallucination/fake_message.dm index a1040496f5e..de5616d83c6 100644 --- a/code/modules/hallucination/fake_message.dm +++ b/code/modules/hallucination/fake_message.dm @@ -25,7 +25,7 @@ // in the future, this could / should be de-harcoded and // just draw from a pool uplink, theft, and antag item typepaths var/static/list/stash_item_paths = list( - /obj/item/areaeditor/blueprints, + /obj/item/blueprints, /obj/item/assembly/flash, /obj/item/card/id/advanced/gold/captains_spare, /obj/item/card/emag, diff --git a/code/modules/mining/boulder_processing/brm.dm b/code/modules/mining/boulder_processing/brm.dm index 259c3eed5f6..61c5469b459 100644 --- a/code/modules/mining/boulder_processing/brm.dm +++ b/code/modules/mining/boulder_processing/brm.dm @@ -101,7 +101,7 @@ if(default_deconstruction_crowbar(tool)) return ITEM_INTERACT_SUCCESS -///To allow boulders on a conveyer belt to move unobstructed if multiple machines are made on a single line +///To allow boulders on a conveyor belt to move unobstructed if multiple machines are made on a single line /obj/machinery/brm/CanAllowThrough(atom/movable/mover, border_dir) if(!anchored) return FALSE diff --git a/code/modules/mob/living/silicon/robot/robot_model.dm b/code/modules/mob/living/silicon/robot/robot_model.dm index fe57733b391..18bb3e51147 100644 --- a/code/modules/mob/living/silicon/robot/robot_model.dm +++ b/code/modules/mob/living/silicon/robot/robot_model.dm @@ -368,7 +368,7 @@ /obj/item/t_scanner, /obj/item/analyzer, /obj/item/assembly/signaler/cyborg, - /obj/item/areaeditor/blueprints/cyborg, + /obj/item/blueprints/cyborg, /obj/item/electroadaptive_pseudocircuit, /obj/item/stack/sheet/iron, /obj/item/stack/sheet/glass, diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 207b8351a58..0712e516de4 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -547,7 +547,7 @@ GLOBAL_LIST_INIT(paper_blanks, init_paper_blanks()) toner_cartridge = object balloon_alert(user, "cartridge inserted") - else if(istype(object, /obj/item/areaeditor/blueprints)) + else if(istype(object, /obj/item/blueprints)) to_chat(user, span_warning("\The [object] is too large to put into the copier. You need to find something else to record the document.")) else if(istype(object, /obj/item/paperwork)) diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index 0d5f37cb867..a0a51da165f 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -206,7 +206,7 @@ turfs += placeholder for(var/mob/M in placeholder) mobs += M - if(locate(/obj/item/areaeditor/blueprints) in placeholder) + if(locate(/obj/item/blueprints) in placeholder) blueprints = TRUE // do this before picture is taken so we can reveal revenants for the photo diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index ce13c9c70de..6407ff0fb8b 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -456,7 +456,7 @@ required_container = /obj/item/slime_extract/cerulean /datum/chemical_reaction/slime/slime_territory/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) - new /obj/item/areaeditor/blueprints/slime(get_turf(holder.my_atom)) + new /obj/item/blueprints/slime(get_turf(holder.my_atom)) ..() //Sepia diff --git a/code/modules/recycling/conveyor.dm b/code/modules/recycling/conveyor.dm index 44ad6bf6da7..3c04bd924ec 100644 --- a/code/modules/recycling/conveyor.dm +++ b/code/modules/recycling/conveyor.dm @@ -615,9 +615,9 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) if(!attached_switch) return - INVOKE_ASYNC(src, PROC_REF(update_conveyers), port) + INVOKE_ASYNC(src, PROC_REF(update_conveyors), port) -/obj/item/circuit_component/conveyor_switch/proc/update_conveyers(datum/port/input/port) +/obj/item/circuit_component/conveyor_switch/proc/update_conveyors(datum/port/input/port) if(!attached_switch) return diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 1551d6eb952..3d4d9bc4b45 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -1082,17 +1082,3 @@ turf_type = /turf/open/floor/sepia merge_type = /obj/item/stack/tile/sepia -/obj/item/areaeditor/blueprints/slime - name = "cerulean prints" - desc = "A one use yet of blueprints made of jelly like organic material. Extends the reach of the management console." - color = "#2956B2" - -/obj/item/areaeditor/blueprints/slime/edit_area() - ..() - var/area/area = get_area(src) - for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists()) - for(var/turf/area_turf as anything in zlevel_turfs) - area_turf.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - area_turf.add_atom_colour("#2956B2", FIXED_COLOUR_PRIORITY) - area.area_flags |= XENOBIOLOGY_COMPATIBLE - qdel(src) diff --git a/sound/attributions.txt b/sound/attributions.txt index c81aa3e664b..39f206e982a 100644 --- a/sound/attributions.txt +++ b/sound/attributions.txt @@ -140,3 +140,6 @@ https://freesound.org/people/steaq/sounds/560124/ refinery.ogg, smelter.ogg, and wooping_teleport.ogg are all original works by ArcaneMusic, with smelter.ogg using samples from rock_break alongside original sound effects from a warrior electric drill, where refinery and wooping_teleport are modifications of that same electric drill recording. + +paper_flip.ogg is made by gynation from Freesound.org, CC0 +https://freesound.org/people/gynation/sounds/82378/ diff --git a/sound/items/paper_flip.ogg b/sound/items/paper_flip.ogg new file mode 100644 index 00000000000..9e6aca59675 Binary files /dev/null and b/sound/items/paper_flip.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 057a8c53e31..b3b468849a9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -43,7 +43,6 @@ #include "code\__DEFINES\apc_defines.dm" #include "code\__DEFINES\appearance.dm" #include "code\__DEFINES\arcades.dm" -#include "code\__DEFINES\area_editor.dm" #include "code\__DEFINES\art.dm" #include "code\__DEFINES\assemblies.dm" #include "code\__DEFINES\assert.dm" diff --git a/tgui/packages/tgui/interfaces/Blueprints.tsx b/tgui/packages/tgui/interfaces/Blueprints.tsx new file mode 100644 index 00000000000..644412a9a77 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Blueprints.tsx @@ -0,0 +1,186 @@ +import { BooleanLike } from 'common/react'; + +import { useBackend } from '../backend'; +import { Box, Button, Divider, Section, Stack } from '../components'; +import { Window } from '../layouts'; + +type Data = { + area_notice: string; + area_name: string; + wire_data: WireData[]; + legend: string; + legend_viewing_list: string; + legend_off: string; + fluff_notice: string; + station_name: string; + wires_name: string; + wire_devices: WireDevices[]; + viewing: BooleanLike; +}; + +type WireDevices = { + name: string; + ref: string; +}; + +type WireData = { + color: string; + message: string; +}; + +export const Blueprints = () => { + const { act, data } = useBackend(); + const { legend, legend_viewing_list, legend_off } = data; + + return ( + + + {legend === legend_viewing_list ? ( + + ) : legend === legend_off ? ( + + ) : ( + + )} + + + ); +}; + +const WireList = () => { + const { act, data } = useBackend(); + const { wire_devices = [] } = data; + + return ( +
+ + + {wire_devices.map((wire) => ( + + ))} + +
+ ); +}; + +const WireArea = () => { + const { act, data } = useBackend(); + const { wires_name, wire_data = [] } = data; + + return ( +
+ + {wires_name} wires: + {wire_data.map((wire) => ( + + {wire.color}:{' '} + {wire.message} + + ))} +
+ ); +}; + +const MainMenu = () => { + const { act, data } = useBackend(); + const { area_notice, area_name, fluff_notice, station_name, viewing } = data; + + return ( +
+ + {fluff_notice} + + + + {area_notice} + + + + + + + + + + + + {viewing ? ( + <> + + + + + + + + ) : ( + + + + )} + +
+ ); +}; diff --git a/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt b/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt index 6b5a0e4c5e6..2111d891fc3 100644 --- a/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt +++ b/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt @@ -1,7 +1,7 @@ # removes advanced design, and moves bepis tech disks to its new type /obj/item/disk/design_disk/adv : /obj/item/disk/design_disk{@OLD} -/obj/item/disk/design_disk/adv/@SUBTPYES : /obj/item/disk/design_disk/@SUBTYPES{@OLD} +/obj/item/disk/design_disk/adv/@SUBTYPES : /obj/item/disk/design_disk/@SUBTYPES{@OLD} /obj/item/disk/tech_disk/major : /obj/item/disk/design_disk/bepis/remove_tech /obj/item/disk/tech_disk/spaceloot : /obj/item/disk/design_disk/bepis diff --git a/tools/UpdatePaths/Scripts/82565_blueprints_repath.txt b/tools/UpdatePaths/Scripts/82565_blueprints_repath.txt new file mode 100644 index 00000000000..08ff26217cf --- /dev/null +++ b/tools/UpdatePaths/Scripts/82565_blueprints_repath.txt @@ -0,0 +1 @@ +/obj/item/areaeditor/@SUBTYPES{@OLD} : /obj/item/blueprints/@SUBTYPES{@OLD}