From ff6790b174fcf35ed6837a79b939db676a528990 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Tue, 14 Feb 2017 01:02:07 -0500 Subject: [PATCH] Console percentage and sizing fixed but not button Dunno why button dun work --- code/controllers/shuttle_controller.dm | 2 +- code/game/objects/structures/window_vr.dm | 3 +++ code/modules/rogueminer_vr/controller.dm | 1 + code/modules/rogueminer_vr/wrappers.dm | 20 ++++++++++++-------- code/modules/rogueminer_vr/zone_console.dm | 19 +++++++++++++------ code/modules/shuttles/shuttles_vr.dm | 5 ++++- maps/virgo-5.dmm | 2 +- maps/virgo-7.dmm | 1 + nano/templates/zone_console.tmpl | 6 +++--- vorestation.dme | 1 + 10 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 code/game/objects/structures/window_vr.dm diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index a514573b7a..9a52780683 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -404,7 +404,7 @@ var/global/datum/shuttle_controller/shuttle_controller shuttle.location = 0 shuttle.warmup_time = 6 shuttle.area_station = locate(/area/shuttle/belter/station) - shuttle.area_offsite = locate(/area/shuttle/belter/belt) + shuttle.area_offsite = locate(/area/shuttle/belter/belt/zone1) shuttle.area_transition = locate(/area/shuttle/belter/transit) shuttle.docking_controller_tag = "belter_docking" shuttle.dock_target_station = "belter_nodocking" //Fake tags to prevent the shuttle from opening doors. diff --git a/code/game/objects/structures/window_vr.dm b/code/game/objects/structures/window_vr.dm new file mode 100644 index 0000000000..e3d2781653 --- /dev/null +++ b/code/game/objects/structures/window_vr.dm @@ -0,0 +1,3 @@ +/obj/structure/window/shuttle/New() + //Just don't. + return \ No newline at end of file diff --git a/code/modules/rogueminer_vr/controller.dm b/code/modules/rogueminer_vr/controller.dm index 16352a4d14..03150ec86b 100644 --- a/code/modules/rogueminer_vr/controller.dm +++ b/code/modules/rogueminer_vr/controller.dm @@ -36,6 +36,7 @@ var/datum/controller/rogue/rm_controller = new() // The world.time at which the scanner was last run (for cooldown) var/last_scan = 0 + var/scan_wait = 10 //In minutes var/debugging = 0 diff --git a/code/modules/rogueminer_vr/wrappers.dm b/code/modules/rogueminer_vr/wrappers.dm index 3f832ce6ef..0e19a5cb00 100644 --- a/code/modules/rogueminer_vr/wrappers.dm +++ b/code/modules/rogueminer_vr/wrappers.dm @@ -58,24 +58,28 @@ //These are placed ON the side they are named after. /obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/onleft/New() - teleport_x = quad_R + margin - teleport_x_offset = quad_R + margin - teleport_y = quad_U - margin - teleport_y_offset = quad_D + margin + ..() + teleport_x = quad_R - margin + teleport_x_offset = quad_R - margin + teleport_y = quad_D + margin + teleport_y_offset = quad_U - margin /obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/onright/New() + ..() teleport_x = quad_L + margin teleport_x_offset = quad_L + margin - teleport_y = quad_U - margin - teleport_y_offset = quad_D + margin + teleport_y = quad_D + margin + teleport_y_offset = quad_U - margin /obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/ontop/New() + ..() teleport_x = quad_L + margin teleport_x_offset = quad_R - margin - teleport_y = quad_D - margin - teleport_y_offset = quad_D - margin + teleport_y = quad_D + margin + teleport_y_offset = quad_D + margin /obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/onbottom/New() + ..() teleport_x = quad_L + margin teleport_x_offset = quad_R - margin teleport_y = quad_U - margin diff --git a/code/modules/rogueminer_vr/zone_console.dm b/code/modules/rogueminer_vr/zone_console.dm index 42a9371057..6c2a4bbe15 100644 --- a/code/modules/rogueminer_vr/zone_console.dm +++ b/code/modules/rogueminer_vr/zone_console.dm @@ -27,8 +27,15 @@ /obj/machinery/computer/roguezones/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - var/chargePercent = max(100, (world.time - rm_controller.last_scan) / (10 MINUTES) * 100) + var/chargePercent = min(100, ((((world.time - rm_controller.last_scan) / 10) / 60) / rm_controller.scan_wait) * 100) + /* + world.time - rm_controller.last_scan = deciseconds since last scan + /10 = seconds since last scan + /60 = minutes since last scan + /scan_wait = decimal percentage recharged + *100 = percentage recharged + */ var/list/data = list() data["timeout_percent"] = chargePercent data["diffstep"] = rm_controller.diffstep @@ -37,24 +44,24 @@ var/obj/machinery/computer/shuttle_control/belter/belter = locate() if(belter.z == 5) - data["shuttle_location"] = "outpost" + data["shuttle_location"] = "Landed" data["shuttle_at_station"] = 1 else if(belter.z == 2) - data["shuttle_location"] = "transit" + data["shuttle_location"] = "In-transit" data["shuttle_at_station"] = 0 else if(belter.z == 7) - data["shuttle_location"] = "belt" + data["shuttle_location"] = "Belt" data["shuttle_at_station"] = 0 // Check this stuff - if(data["shuttle_at_station"] == 1 && data["occupied"] == 0 && chargePercent >= 100) + if((data["shuttle_at_station"] == 1) && (data["occupied"] == 0) && (chargePercent >= 100)) data["scan_ready"] = 1 else data["scan_ready"] = 0 ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) - ui = new(user, src, ui_key, "zone_console.tmpl", src.name, 400, 450) + ui = new(user, src, ui_key, "zone_console.tmpl", src.name, 600, 400) ui.set_initial_data(data) ui.open() ui.set_auto_update(5) diff --git a/code/modules/shuttles/shuttles_vr.dm b/code/modules/shuttles/shuttles_vr.dm index 2398dc9bc7..1ac76b78cc 100644 --- a/code/modules/shuttles/shuttles_vr.dm +++ b/code/modules/shuttles/shuttles_vr.dm @@ -11,7 +11,10 @@ /obj/machinery/computer/shuttle_control/belter name = "belter control console" req_access = list(access_mining) - shuttle_tag = "Belter" + +/obj/machinery/computer/shuttle_control/belter/process() + if(!shuttle_tag && rm_controller.last_scan > 0) //Can't use the shuttle until you scan once at least + shuttle_tag = "Belter" /obj/machinery/computer/shuttle_control/mining name = "mining elevator control console" diff --git a/maps/virgo-5.dmm b/maps/virgo-5.dmm index f99dc009a7..83f3e690d3 100644 --- a/maps/virgo-5.dmm +++ b/maps/virgo-5.dmm @@ -1539,7 +1539,7 @@ "DE" = (/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/machinery/power/terminal{icon_state = "term"; dir = 1},/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/outpost/engineering/mining/power) "DF" = (/obj/structure/cable/yellow{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/structure/cable/yellow{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plating,/area/outpost/engineering/mining/power) "DG" = (/obj/machinery/atmospherics/pipe/manifold/visible/yellow{tag = "icon-map (NORTH)"; icon_state = "map"; dir = 1},/obj/effect/landmark{name = "bluespacerift"},/turf/simulated/floor/tiled,/area/outpost/research/anomaly) -"DH" = (/obj/machinery/computer/shuttle_control/belter,/turf/simulated/floor/tiled/asteroid_steel/airless,/area/mine/explored) +"DH" = (/obj/machinery/computer/roguezones,/turf/simulated/floor/tiled/asteroid_steel/airless,/area/mine/explored) "DI" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/effect/landmark{name = "bluespacerift"},/turf/simulated/floor/tiled,/area/outpost/mining_main/north_hall) "DJ" = (/obj/effect/landmark{name = "bluespacerift"},/turf/simulated/floor/tiled,/area/outpost/mining_main/eva) "DK" = (/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/obj/effect/landmark{name = "bluespacerift"},/turf/simulated/floor/tiled,/area/outpost/mining_main/south_hall) diff --git a/maps/virgo-7.dmm b/maps/virgo-7.dmm index 4f693582de..270cd01072 100644 --- a/maps/virgo-7.dmm +++ b/maps/virgo-7.dmm @@ -333,3 +333,4 @@ qqqqqqqqqqqqqrqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqrqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsqqqqqqqqqqqqqqtttttttttttttuttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttvttttttttttttt qqqqqqqqqqqqqrqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsqqqqqqqqqqqqqqtttttttttttttuttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttvttttttttttttt "} + diff --git a/nano/templates/zone_console.tmpl b/nano/templates/zone_console.tmpl index 88e278a2e7..bf319e0bf5 100644 --- a/nano/templates/zone_console.tmpl +++ b/nano/templates/zone_console.tmpl @@ -1,7 +1,7 @@
- Scanner Ramestat Core Charge: + Scn. Ramestat Core:
{{:helper.displayBar(data.timeout_percent, 0, 100, (data.timeout_percent < 75) ? 'bad' : (data.timeout_percent < 100) ? 'average' : 'good')}} @@ -10,7 +10,7 @@
- Difficulty: + Mineral Content:
{{:data.difficulty}} @@ -31,7 +31,7 @@ WARNING:
- Area Occupied by {{:data.occupied}} personell! + Area Occupied by {{:data.occupied}} personnel!
{{/if}} diff --git a/vorestation.dme b/vorestation.dme index e6ac2b981c..92e4a928fa 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -996,6 +996,7 @@ #include "code\game\objects\structures\windoor_assembly.dm" #include "code\game\objects\structures\window.dm" #include "code\game\objects\structures\window_spawner.dm" +#include "code\game\objects\structures\window_vr.dm" #include "code\game\objects\structures\crates_lockers\closets.dm" #include "code\game\objects\structures\crates_lockers\crates.dm" #include "code\game\objects\structures\crates_lockers\crates_vr.dm"