Makes the supply shuttle process in a tighter loop

Conflicts:
	code/game/supplyshuttle.dm
This commit is contained in:
mwerezak
2014-06-18 21:24:57 -04:00
committed by ZomgPonies
parent 723979115c
commit 175c48240d
2 changed files with 17 additions and 6 deletions
+11 -6
View File
@@ -172,12 +172,18 @@ var/list/mechtoys = list(
iteration++
points += points_per_process
var/datum/shuttle/ferry/supply/shuttle = get_shuttle()
if (shuttle)
shuttle.process_shuttle()
sleep(processing_interval)
spawn(0)
set background = 1
while(1)
if(processing)
var/datum/shuttle/ferry/supply/shuttle = get_shuttle()
if (shuttle && shuttle.in_use)
shuttle.process_shuttle()
sleep(10)
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
if(istype(A,/mob/living))
@@ -498,7 +504,6 @@ var/list/mechtoys = list(
dat += {"<HR>\nSupply points: [supply_controller.points]<BR>\n<BR>
// [shuttle.at_station() ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=categories'>Order items</A><BR>\n<BR>"]
\n<A href='?src=\ref[src];order=categories'>Order items</A><BR>\n<BR>
\n<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR>\n<BR>
\n<A href='?src=\ref[src];vieworders=1'>View orders</A><BR>\n<BR>
@@ -677,7 +682,7 @@ var/list/mechtoys = list(
temp = "Current requests: <BR><BR>"
for(var/S in supply_controller.requestlist)
var/datum/supply_order/SO = S
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] [shuttle.idle() ? "":shuttle.at_station() ? "":"<A href='?src=\ref[src];confirmorder=[SO.ordernum]'>Approve</A> <A href='?src=\ref[src];rreq=[SO.ordernum]'>Remove</A>"]<BR>"
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] <A href='?src=\ref[src];confirmorder=[SO.ordernum]'>Approve</A> <A href='?src=\ref[src];rreq=[SO.ordernum]'>Remove</A><BR>"
temp += "<BR><A href='?src=\ref[src];clearreq=1'>Clear list</A>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
+6
View File
@@ -6,6 +6,8 @@
/datum/shuttle/ferry/supply
var/away_location = 1 //the location to hide at while pretending to be in-transit
var/arrive_time = 0
var/late_chance = 80
var/max_late_time = 300
/datum/shuttle/ferry/supply/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE)
@@ -47,6 +49,10 @@
if (destination != away_area)
move(away_area, destination)
//late
if (prob(late_chance))
sleep(rand(0,max_late_time))
moving_status = SHUTTLE_IDLE
if (!at_station()) //at centcom