mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-18 04:41:27 +01:00
0c8488b0ae
* testing makes me feel good * invalid lists * get rid of those boards * show expected mats * oop * error * wip techweb porting * more techweb entries * ported too * disable those for now * okay nevermind i guess * already exists * assemblies * moar * welding helmet * many entries * lol tg * fix test * again * fixagain * more moved * update techweb test * catch that too * screeee * more fixes * missing announcement * orphaned sleevecard * some more fixing * test * more * oops * glasses * illegal icons * non starting * it's starting * messed up * cleanup * more generic stuff * morrrreee * the plastic set * oops * correct value * barbed wires * more cleaning * many more * gone * cleanup * no longer * do not allow duped designs * it's own node * proper order no dupes * last of the broken nodes * fix bad path * cleanup * more test more limits * gone * almost done * these are gone * syringe gun * bioregenerator design * all moved * organized and webbed * more fixes * oops * cleaning up * organization * clean up * organize * organized * didn't save * wrong mat * adds many missing ammo types * svd doesn't exist * 10mm pistol added * magazines not casings * these are pistols * this is used by like, one weapon * m1 is ancient * this is hunting * extremely botched untested lathe * disk junk * rough foundations * slowly converting * slowly building this * local materials * almost * big reorganization * more cleanup * more cleaning * lathe stuff * small fixes * oops * many fixes * mat fix * more fixes * actually isolate the hacked designs * protolathe hacking * imprinter hacking * missing ammos * sheet printing for autolathe * fixs * again * fixed test * test test * fix * fix * WHY * fix it... * here we go * material print * on turf * body disk * consistant name * Many weapons to hacked lathe * missing node * wrong section * fixes * this list should be unified * ammo boxes * don't do single shells anymore * wat * specifics * snowflake * not needed * already available * pickaxe too * tweak * removed unneeded node * missing surgery items * Apply suggestion from @Cameron-The-Raven * Adds RMS * typo * illegal needs hacked * disabled material weapons * circuit testing * STRING TEST * test * fixing some things * huh? * hidden circuits * some flakey boards * grammar * fixes * more hidden * wrong board * security cams * alert consoles * spaceheater is simple enough to not have one * pcus * cargo vendors * tcomms stuff * solar tracker circuit * artifact stuff * SM stuff * illegal machines * med machines * no longer needed * more stuff * these are not standard * moreeee * doppler and more * organized * finishing * oop * use the define * inheret * dopper fixes * space heater * doing some organization * explain the var * some tweaks * wrong one * fixed test * material test too * simple roto gens * use the define * emergency power node * tgui fixes for icons * not needed * color blended material designs * icons for large research * oops * unshit that * use stack here * center math * . * . * . * . * . * unifi * fix these * NO COPYPASTA * ILLEEGGALLL * mandate descriptions * agony * actually lets do this * use macros * description * desc * desc * desc * desc * desc * desc * gps desc * telecomms component desc --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
164 lines
5.9 KiB
Plaintext
164 lines
5.9 KiB
Plaintext
//////////////////////////////
|
|
// The zone control console, fluffed ingame as
|
|
// a scanner console for the asteroid belt
|
|
//////////////////////////////
|
|
|
|
/obj/machinery/computer/roguezones
|
|
name = "asteroid belt scanning computer"
|
|
desc = "Used to monitor the nearby asteroid belt and detect new areas."
|
|
icon_keyboard = "tech_key"
|
|
icon_screen = "request"
|
|
light_color = "#315ab4"
|
|
use_power = USE_POWER_IDLE
|
|
idle_power_usage = 250
|
|
active_power_usage = 500
|
|
circuit = /obj/item/circuitboard/roguezones
|
|
|
|
var/debug = 0
|
|
var/debug_scans = 0
|
|
var/scanning = 0
|
|
var/legacy_zone = 0 //Disable scanning and whatnot.
|
|
var/obj/machinery/computer/shuttle_control/belter/shuttle_control
|
|
|
|
/obj/machinery/computer/roguezones/Initialize(mapload)
|
|
. = ..()
|
|
shuttle_control = locate(/obj/machinery/computer/shuttle_control/belter)
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/machinery/computer/roguezones/LateInitialize()
|
|
if(!GLOB.rm_controller)
|
|
GLOB.rm_controller = new /datum/controller/rogue()
|
|
|
|
/obj/machinery/computer/roguezones/attack_ai(mob/user as mob)
|
|
return attack_hand(user)
|
|
|
|
/obj/machinery/computer/roguezones/attack_hand(mob/user as mob)
|
|
add_fingerprint(user)
|
|
if(stat & (BROKEN|NOPOWER))
|
|
return
|
|
tgui_interact(user)
|
|
|
|
/obj/machinery/computer/roguezones/tgui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "RogueZones", name)
|
|
ui.open()
|
|
|
|
/obj/machinery/computer/roguezones/tgui_data(mob/user)
|
|
var/chargePercent = min(100, ((((world.time - GLOB.rm_controller.last_scan) / 10) / 60) / GLOB.rm_controller.scan_wait) * 100)
|
|
var/curZoneOccupied = GLOB.rm_controller.current_zone ? GLOB.rm_controller.current_zone.is_occupied() : 0
|
|
|
|
var/list/data = ..()
|
|
data["timeout_percent"] = chargePercent
|
|
data["diffstep"] = GLOB.rm_controller.diffstep
|
|
data["difficulty"] = GLOB.rm_controller.diffstep_strs[GLOB.rm_controller.diffstep]
|
|
data["occupied"] = curZoneOccupied
|
|
data["scanning"] = scanning
|
|
data["updated"] = world.time - GLOB.rm_controller.last_scan < 200 //Very recently scanned (20 seconds)
|
|
data["debug"] = debug
|
|
|
|
if(!shuttle_control)
|
|
data["shuttle_location"] = "Unknown"
|
|
data["shuttle_at_station"] = 0
|
|
else if(shuttle_control.z in using_map.belter_docked_z)
|
|
data["shuttle_location"] = "Landed"
|
|
data["shuttle_at_station"] = 1
|
|
else if(shuttle_control.z == using_map.belter_transit_z)
|
|
data["shuttle_location"] = "In-transit"
|
|
data["shuttle_at_station"] = 0
|
|
else if(shuttle_control.z == using_map.belter_belt_z)
|
|
data["shuttle_location"] = "Belt"
|
|
data["shuttle_at_station"] = 0
|
|
|
|
var/can_scan = 0
|
|
if(chargePercent >= 100) //Keep having weird problems with these in one 'if' statement
|
|
if(shuttle_control && (shuttle_control.z in using_map.belter_docked_z)) //Even though I put them all in parens to avoid OoO problems...
|
|
if(!curZoneOccupied) //Not sure why.
|
|
if(!scanning)
|
|
can_scan = 1
|
|
|
|
if(debug_scans) can_scan = 1
|
|
data["scan_ready"] = can_scan
|
|
|
|
// Permit emergency recall of the shuttle if its stranded in a zone with just dead people.
|
|
data["can_recall_shuttle"] = (shuttle_control && (shuttle_control.z in using_map.belter_belt_z) && !curZoneOccupied)
|
|
return data
|
|
|
|
/obj/machinery/computer/roguezones/tgui_act(action, list/params, datum/tgui/ui)
|
|
if(..())
|
|
return TRUE
|
|
switch(action)
|
|
if("scan_for_new")
|
|
scan_for_new_zone()
|
|
. = TRUE
|
|
if("recall_shuttle")
|
|
failsafe_shuttle_recall(ui.user)
|
|
. = TRUE
|
|
|
|
add_fingerprint(ui.user)
|
|
|
|
/obj/machinery/computer/roguezones/proc/scan_for_new_zone()
|
|
if(scanning)
|
|
return
|
|
|
|
//Set some kinda scanning var to pause UI input on console
|
|
GLOB.rm_controller.last_scan = world.time
|
|
scanning = 1
|
|
sleep(60)
|
|
|
|
//Break the shuttle temporarily.
|
|
shuttle_control.shuttle_tag = null
|
|
|
|
//Build and get a new zone.
|
|
var/datum/rogue/zonemaster/ZM_target = GLOB.rm_controller.prepare_new_zone()
|
|
|
|
//Update shuttle destination.
|
|
var/datum/shuttle/autodock/ferry/S = SSshuttles.shuttles["Belter"]
|
|
S.landmark_offsite = ZM_target.myshuttle_landmark
|
|
S.next_location = S.get_location_waypoint(!S.location)
|
|
|
|
//Re-enable shuttle.
|
|
shuttle_control.shuttle_tag = "Belter"
|
|
|
|
//Update rm_previous
|
|
GLOB.rm_controller.previous_zone = GLOB.rm_controller.current_zone
|
|
|
|
//Update rm_current
|
|
GLOB.rm_controller.current_zone = ZM_target
|
|
|
|
//Unset scanning
|
|
scanning = 0
|
|
|
|
return
|
|
|
|
|
|
/obj/machinery/computer/roguezones/proc/failsafe_shuttle_recall(mob/user)
|
|
if(!shuttle_control)
|
|
return // Shuttle computer has been destroyed
|
|
if (!(shuttle_control.z in using_map.belter_belt_z))
|
|
return // Usable only when shuttle is away
|
|
if(GLOB.rm_controller.current_zone && GLOB.rm_controller.current_zone.is_occupied())
|
|
return // Not usable if shuttle is in occupied zone
|
|
// Okay do it
|
|
var/datum/shuttle/autodock/ferry/S = SSshuttles.shuttles["Belter"]
|
|
S.launch(user)
|
|
|
|
/obj/item/circuitboard/roguezones
|
|
name = T_BOARD("asteroid belt scanning computer")
|
|
build_path = /obj/machinery/computer/roguezones
|
|
origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1)
|
|
hidden = TRUE // Might have issues on maps without belters?
|
|
|
|
/obj/item/paper/rogueminer
|
|
name = "R-38 Scanner Console Guide"
|
|
info = {"<h4>Getting Started</h4>
|
|
Congratulations, your station has purchased the R-38 industrial asteroid belt scanner!<br>
|
|
Using the R-38 is almost as simple as brain surgery! Simply press the scan button to scan for a new mineral-rich asteroid belt location!<br>
|
|
<b>That's all there is to it!</b><br>
|
|
Notice, scan may cause extreme brain damage to those present in asteroid belt, so scanning will be disabled in that case.<br>
|
|
Existing minerals and living creatures interfere with the scans, so the more minerals extracted and creatures 'removed'/made-not-living in the belt, the more accurate future scans will be.<br>
|
|
<h4>Traveling to the belt</h4>
|
|
When a new zone has been scanned, your station's shuttle destination will be updated to direct it to the newly discovered area automatically.<br>
|
|
You can then travel to the new area to mine in that location.<br>
|
|
<br> "} + span_small("This technology produced under license from Thinktronic Systems, LTD.")
|