MULE destination update

- MULE destination selection is now handled using a list
This commit is contained in:
Loganbacca
2015-05-15 00:03:38 +12:00
parent 9ed8f69e02
commit e3564a5d80
3 changed files with 23 additions and 6 deletions

View File

@@ -305,7 +305,14 @@
if("destination")
refresh=0
var/new_dest = input("Enter new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", destination) as text|null
var/new_dest
var/list/beaconlist = new()
for(var/obj/machinery/navbeacon/N in navbeacons)
beaconlist.Add(N.location)
if(beaconlist.len)
new_dest = input("Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", destination) in beaconlist
else
alert("No destination beacons available.")
refresh=1
if(new_dest)
set_destination(new_dest)
@@ -741,11 +748,6 @@
if(!on)
return
/*
world << "rec signal: [signal.source]"
for(var/x in signal.data)
world << "* [x] = [signal.data[x]]"
*/
var/recv = signal.data["command"]
// process all-bot input
if(recv=="bot_status" && wires.RemoteRX())

View File

@@ -1,6 +1,9 @@
// Navigation beacon for AI robots
// Functions as a transponder: looks for incoming signal matching
var/global/list/navbeacons // no I don't like putting this in, but it will do for now
/obj/machinery/navbeacon
icon = 'icons/obj/objects.dmi'
@@ -27,6 +30,13 @@
var/turf/T = loc
hide(T.intact)
// add beacon to MULE bot beacon list
if(freq == 1400)
if(!navbeacons)
navbeacons = new()
navbeacons += src
spawn(5) // must wait for map loading to finish
if(radio_controller)
@@ -241,6 +251,7 @@ Transponder Codes:<UL>"}
updateDialog()
/obj/machinery/navbeacon/Destroy()
navbeacons.Remove(src)
if(radio_controller)
radio_controller.remove_object(src, freq)
..()

View File

@@ -0,0 +1,4 @@
author: Loganbacca
delete-after: True
changes:
- tweak: "Changed MULE destination selection to be list based."