From d8f31dbb55645b20f3ae0b111d18286ed2c05dad Mon Sep 17 00:00:00 2001 From: GunHog Date: Tue, 23 Aug 2016 00:25:01 -0500 Subject: [PATCH] Aux Mining Base Tweaks (#20015) * Aux Mining Base Tweaks - Multiple landing zones may now be set for the mining base. - The coordinates of each landing zone is shown in the list. - Miners now each get a remote in their starting lockers. - The Aux mining base now requires lighting while on station - The Aux Mining Base now has a GPS signal. * More tweaks - The shuttle landing beacon no longer requires line of sight, just a distance check. - Beacon now has a description. - Landing site name updated - Adds support for stat logging base drops. * Mining Shuttle Interface - The aux base can now interface with the mining shuttle once the shuttle beacon is deployed near the base. - Updated descriptions to explain this. * Launch Warning Keeps the launch warning without it going off each time it is used to move the mining shuttle. --- code/modules/mining/mine_items.dm | 55 +++++++++++++++++++++---------- code/modules/telesci/gps.dm | 4 +++ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 071314025e0..a0866e0ad08 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -46,6 +46,7 @@ new /obj/item/weapon/gun/energy/kinetic_accelerator(src) new /obj/item/clothing/glasses/meson(src) new /obj/item/weapon/survivalcapsule(src) + new /obj/item/device/assault_pod/mining(src) /**********************Shuttle Computer**************************/ @@ -505,30 +506,51 @@ /area/shuttle/auxillary_base name = "Auxillary Base" - + luminosity = 0 //Lighting gets lost when it lands anyway /obj/machinery/computer/shuttle/auxillary_base - name = "auxillary base launch control" + name = "auxillary base management console" icon = 'icons/obj/terminals.dmi' icon_state = "dorm_available" shuttleId = "colony_drop" + desc = "Allows a deployable expedition base to be dropped from the station to a designated mining location. It can also \ +interface with the mining shuttle at the landing site if a mobile beacon is also deployed." + var/launch_warning = TRUE + req_access = list(access_heads) possible_destinations = null clockwork = TRUE + var/obj/item/device/gps/internal/base/locator + +/obj/machinery/computer/shuttle/auxillary_base/New(location, obj/item/weapon/circuitboard/computer/shuttle/C) + ..() + locator = new /obj/item/device/gps/internal/base(src) /obj/machinery/computer/shuttle/auxillary_base/Topic(href, href_list) if(href_list["move"]) - if(z != ZLEVEL_STATION) + if(z != ZLEVEL_STATION && shuttleId == "colony_drop") usr << "You can't move the base again!" return 0 + if(launch_warning) + say("Launch sequence activated! Prepare for drop!") + playsound(loc, 'sound/machines/warning-buzzer.ogg', 70, 0) + launch_warning = FALSE + feedback_add_details("colonies_dropped") //Number of times a base has been dropped! ..() +/obj/machinery/computer/shuttle/auxillary_base/proc/set_mining_mode() + if(z == ZLEVEL_MINING) //The console switches to controlling the mining shuttle once landed. + req_access = list() + shuttleId = "mining" //The base can only be dropped once, so this gives the console a new purpose. + possible_destinations = "mining_home;mining_away;landing_zone_dock" + /obj/item/device/assault_pod/mining name = "Landing Field Designator" icon_state = "gangtool-purple" item_state = "electronic" icon = 'icons/obj/device.dmi' desc = "Deploy to designate the landing zone of the auxillary base." + w_class = 2 shuttle_id = "colony_drop" var/setting = FALSE var/no_restrictions = FALSE //Badmin variable to let you drop the colony ANYWHERE. @@ -546,7 +568,7 @@ if(T.z != ZLEVEL_MINING) user << "Wouldn't do much good dropping a mining base away from the mining area!" return - var/colony_radius = max(width, height)/2 + var/colony_radius = max(width, height)*0.5 var/list/area_counter = get_areas_in_range(colony_radius, T) if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one user << "Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one." @@ -562,7 +584,7 @@ var/obj/docking_port/stationary/landing_zone = new /obj/docking_port/stationary(T) landing_zone.id = "colony_drop(\ref[src])" - landing_zone.name = "Landing Zone" + landing_zone.name = "Landing Zone ([T.x], [T.y])" landing_zone.dwidth = dwidth landing_zone.dheight = dheight landing_zone.width = width @@ -573,7 +595,7 @@ for(var/obj/machinery/computer/shuttle/S in machines) if(S.shuttleId == shuttle_id) - S.possible_destinations = "[landing_zone.id]" + S.possible_destinations += "[landing_zone.id];" //Serves as a nice mechanic to people get ready for the launch. minor_announce("Auxiliary base landing zone coordinates locked in for [get_area(user)]. Launch command now available!") @@ -587,9 +609,6 @@ no_restrictions = TRUE -/area/shuttle/auxillary_base - name = "Auxillary Base" - /obj/docking_port/mobile/auxillary_base name = "auxillary base" id = "colony_drop" @@ -603,14 +622,16 @@ /obj/structure/mining_shuttle_beacon name = "mining shuttle beacon" + desc = "A bluespace beacon calibrated to mark a landing spot for the mining shuttle when deployed near the auxillary mining base." anchored = 0 density = 0 var/shuttle_ID = "landing_zone_dock" icon = 'icons/obj/objects.dmi' - icon_state = "miningbeacon" //Temp until proper sprite + icon_state = "miningbeacon" var/obj/docking_port/stationary/Mport //Linked docking port for the mining shuttle pressure_resistance = 200 //So it does not get blown into lava. var/anti_spam_cd = 0 //The linking process might be a bit intensive, so this here to prevent over use. + var/console_range = 15 //Wifi range of the beacon to find the aux base console /obj/structure/mining_shuttle_beacon/attack_hand(mob/user) if(anchored) @@ -629,11 +650,10 @@ if(landing_spot.z != ZLEVEL_MINING) user << "This device is only to be used in a mining zone." return - - if(!locate(/obj/machinery/computer/shuttle/auxillary_base) in view(src,15)) - user << "The aux base console must be within view in order to interface." - return //It does not really interface with the base console, it just needs to be near. - + var/obj/machinery/computer/shuttle/auxillary_base/aux_base_console = locate(/obj/machinery/computer/shuttle/auxillary_base) in machines + if(!aux_base_console || get_dist(landing_spot, aux_base_console) > console_range) + user << "The auxillary base's console must be within [console_range] meters in order to interface." + return //Needs to be near the base to serve as its dock and configure it to control the mining shuttle. //Mining shuttles may not be created equal, so we find the map's shuttle dock and size accordingly. @@ -646,7 +666,7 @@ Mport = new(landing_spot) Mport.id = "landing_zone_dock" - Mport.name = "landing zone dock" + Mport.name = "auxillary base landing site" Mport.dwidth = SM.dwidth Mport.dheight = SM.dheight Mport.width = SM.width @@ -685,7 +705,8 @@ qdel(Mport) return - user << "Mining shuttle calibration successful!" + aux_base_console.set_mining_mode() //Lets the colony park the shuttle there, now that it has a dock. + user << "Mining shuttle calibration successful! Shuttle interface available at base console." anchored = 1 //Locks in place to mark the landing zone. playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index 4c8f6125d6d..52c67830aa9 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -119,6 +119,10 @@ var/list/GPS_list = list() gpstag = "MINER" desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life." +/obj/item/device/gps/internal/base + gpstag = "NT_AUX" + desc = "A homing signal from Nanotrasen's mining base." + /obj/item/device/gps/visible_debug name = "visible GPS" gpstag = "ADMIN"