From 6eb311dc1d237ee07a5009279b33ff2ce4b3e62a Mon Sep 17 00:00:00 2001
From: "C.L" This place is not noted on the [src.name]. Create or modify an existing area (3x3 space) Create new area or merge two areas. (Whole Room) Create or modify an existing area (3x3 space) (1 Charge) Create new area or merge two areas. (Whole Room.) (5 Charges)[station_name()] [src.name]
"
@@ -75,9 +109,15 @@
if(AREA_SPECIAL)
. += "[station_name()] [src.name]
"
+ if(legend == TRUE)
+ . += view_station_wire_devices(user);
+ else
+ //legend is a wireset
+ . += "<< Back"
+ . += view_station_wire_set(user, legend)
+
+ var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
+ popup.set_content(.)
+ popup.open()
+ onclose(user, "blueprints")
+
+/obj/item/wire_reader/Topic(href, href_list)
+ if(..())
+ return
+ if(href_list["view_wireset"])
+ legend = href_list["view_wireset"];
+ if(href_list["view_legend"])
+ legend = TRUE
+ attack_self(usr)
+
+/obj/item/wire_reader/proc/view_station_wire_devices(mob/user)
+ var/message = "
You examine the wire legend.
"
+ for(var/wireset in GLOB.wire_color_directory)
+ //if(istype(wireset,/datum/wires/grid_checker))//Uncomment this in if you want the grid checker minigame to not be revealed here.
+ // continue
+ message += "
[GLOB.wire_name_directory[wireset]]"
+ 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 "" + //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." - var/list/image/showing = list() - var/client/viewing + //var/list/image/showing = list() //For viewing pipes. Unused. + //var/client/viewing //For viewing pipes. Unused. + can_override = 1 //In case there is a reason for building in a non-blacklisted, non-buildable area. + +/obj/item/areaeditor/blueprints/engineers + name = "writing blueprints" + desc = "A piece of paper that allows for expansion of the station and creaiton of new areas. There is a \"For Official Use Only\" stamp on it. NOT to be mistaken with the staion blueprints." + station_master = 0 + uses_charges = 1 + can_override = 0 + + /obj/item/areaeditor/blueprints/Destroy() @@ -126,13 +236,9 @@ if(!legend) if(get_area_type() == AREA_STATION) . += "According to \the [src], you are now in \"[html_encode(A.name)]\".
" - . += "" - . += "" - //if(!viewing) - // . += "" - //else - // . += "" - // . += "" + . += "" //You can change the name without charges. + if(wire_schematics) + . += "" else if(legend == TRUE) . += "<< Back" @@ -161,19 +267,12 @@ if(href_list["exit_legend"]) legend = FALSE; if(href_list["view_legend"]) - legend = TRUE; + if(wire_schematics) //No href hacks allow for you, my friend! + 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. + if(wire_schematics) //No href hacks allow for you, my friend! + legend = href_list["view_wireset"]; + attack_self(usr) //Code for viewing pipes or whatnot. Think t-ray scanner. @@ -350,7 +449,12 @@ found_turfs += origin //If this isn't done, it just adds the 8 tiles around the user. return found_turfs -/proc/create_area(mob/creator) +/proc/create_area(mob/creator, var/obj/item/areaeditor/AO) + if(AO && istype(AO,/obj/item/areaeditor)) + if(AO.uses_charges && AO.charges < 1) + to_chat(creator, span_warning("You need more paper before you can even think of editing this area!")) + return + var/list/turfs = detect_room(get_turf(creator), area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2) if(!turfs) to_chat(creator, span_warning("The new area must have a floor and not a part of a shuttle.")) @@ -403,6 +507,9 @@ set_area_machinery(newA, newA.name, oldA.name)// Change the name and area defines of all the machinery to the correct area. oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it. to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")) + if(AO && istype(AO,/obj/item/areaeditor)) + if(AO.uses_charges) + AO.charges -= 1 return TRUE @@ -411,7 +518,10 @@ // OLD CODE. DON'T TOUCH OR 100 RABID SQUIRRELS WILL DEVOUR YOU. // I say old code, but it truly isn't. It's a bastardization of the new create_area code and the old create_area code. // In essence, it does a few things: Ensure no blacklisted areas are nearby, get the nearby areas (to allow merging), and allow you to make a whole near area. -/obj/item/areaeditor/proc/create_area_whole(mob/creator) //Gets the entire enclosed space and makes a new area out of it. Can overwrite old areas. +/obj/item/areaeditor/proc/create_area_whole(mob/creator, var/override = 0) //Gets the entire enclosed space and makes a new area out of it. Can overwrite old areas. + if(uses_charges && charges < 5) + to_chat(creator, span_warning("You need more paper before you can even think of editing this area!")) + return var/res = detect_room_ex(get_turf(creator), can_create_areas_into, area_or_turf_fail_types) if(!res) @@ -438,6 +548,7 @@ var/area/newA //The new area var/area/oldA = get_area(get_turf(creator)) //The old area (area currently standing in) var/str //What the new area is named. + var/can_make_new_area = 1 //If they can make a new area here or not. var/list/nearby_turfs_to_check = detect_room(get_turf(creator), area_or_turf_fail_types, BP_MAX_ROOM_SIZE*2) //Get the nearby areas. @@ -453,6 +564,8 @@ if(blacklisted_areas[place.type]) if(!creator.lastarea != place) //Stops them from merging a blacklisted area to make it larger. Allows them to merge a blacklisted area into an allowed area. (Expansion!) continue + if(!BUILDABLE_AREA_TYPES[place.type]) //TODOTODOTODO + can_make_new_area = 0 if(!place.requires_power || (place.flags & BLUE_SHIELDED)) continue // No expanding powerless rooms etc areas[place.name] = place @@ -465,12 +578,11 @@ area_choice = areas[area_choice] - var/confirm = tgui_alert(creator, "Are you sure you want to turn [oldA.name] into [area_choice]?", "READ CAREFULLY", list("No", "Yes")) - if(confirm == "No") - to_chat(creator, "No changes made.") - return if(!isarea(area_choice)) //They chose "New Area" + if(!can_make_new_area && !can_override) + to_chat(creator, "Making a new area here would be meaningless. Renaming it would be a better option.") + return str = tgui_input_text(creator, "New area name", "Blueprint Editing", max_length = MAX_NAME_LEN) str = sanitize(str,MAX_NAME_LEN) if(!str || !length(str)) //cancel @@ -482,10 +594,20 @@ if(A.name == str) to_chat(creator, "An area in the world alreay has this name.") return + + var/confirm = tgui_alert(creator, "Are you sure you want to change [oldA.name] into a new area named [str]?", "READ CAREFULLY", list("No", "Yes")) + if(confirm == "No") + to_chat(creator, "No changes made.") + return + newA = new area_choice newA.setup(str) newA.has_gravity = oldA.has_gravity else + var/confirm = tgui_alert(creator, "Are you sure you want to change [oldA.name] into [area_choice]?", "READ CAREFULLY", list("No", "Yes")) + if(confirm == "No") + to_chat(creator, "No changes made.") + return newA = area_choice //They selected to turn the area they're standing on into the selected area. if(str) //New area, new name. @@ -503,7 +625,7 @@ set_area_machinery(newA, newA.name, oldA.name) oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it. to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")) - + charges -= 5 spawn(5) interact() @@ -620,4 +742,4 @@ usr.client.images.Remove(i) -#undef BP_MAX_ROOM_SIZE \ No newline at end of file +#undef BP_MAX_ROOM_SIZE 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 53dfbe471e8..7aa869ac15f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -6,6 +6,7 @@ starts_with = list( /obj/item/clothing/accessory/storage/brown_vest, /obj/item/areaeditor/blueprints, + /obj/item/wire_reader, ///obj/item/clamp, //VOREStation Removal: without leaks those are pointless, ///obj/item/clamp, //VOREStation Removal: without leaks those are pointless, /obj/item/clothing/under/rank/chief_engineer, @@ -99,7 +100,8 @@ /obj/item/clothing/shoes/boots/winter/engineering, /obj/item/weapon/tank/emergency/oxygen/engi, /obj/item/weapon/storage/belt/utility, //VOREStation Add - /obj/item/weapon/reagent_containers/spray/windowsealant) //VOREStation Add + /obj/item/weapon/reagent_containers/spray/windowsealant, //VOREStation Add + /obj/item/areaeditor/blueprints/engineers) //VOREStation Add /obj/structure/closet/secure_closet/engineering_personal/Initialize() if(prob(50))