mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge pull request #2366 from Fox-McCloud/supply-controller-refactor
Supply Controller Refactor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/datum/controller/process/supply/setup()
|
||||
name = "supply"
|
||||
schedule_interval = 300 // every 30 seconds
|
||||
schedule_interval = 10 // every second
|
||||
|
||||
/datum/controller/process/supply/doWork()
|
||||
supply_controller.process()
|
||||
@@ -33,17 +33,3 @@
|
||||
user << "It is calibrated for the Emergency Secondary Authentication Key."
|
||||
else
|
||||
user << "It is switched off."
|
||||
|
||||
/datum/supply_packs/key_pinpointer
|
||||
name = "Authentication Key Pinpointer crate"
|
||||
contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key)
|
||||
cost = 250
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Authentication Key Pinpointer crate"
|
||||
access = access_heads
|
||||
group = "Operations"
|
||||
|
||||
New()
|
||||
// This crate is only accessible during mutiny rounds
|
||||
if (istype(ticker.mode,/datum/game_mode/mutiny))
|
||||
..()
|
||||
|
||||
@@ -146,7 +146,7 @@ var/list/mechtoys = list(
|
||||
//processing_interval = 300
|
||||
//supply points
|
||||
var/points = 50
|
||||
var/points_per_process = 1
|
||||
var/points_per_process = 0.05
|
||||
var/points_per_slip = 2
|
||||
var/points_per_crate = 5
|
||||
var/points_per_plasma = 5
|
||||
@@ -168,21 +168,14 @@ var/list/mechtoys = list(
|
||||
/datum/controller/supply/New()
|
||||
ordernum = rand(1,9000)
|
||||
|
||||
//Supply shuttle ticker - handles supply point regeneration and shuttle travelling between centcomm and the station
|
||||
/datum/controller/supply/proc/process()
|
||||
for(var/typepath in subtypesof(/datum/supply_packs))
|
||||
var/datum/supply_packs/P = new typepath()
|
||||
if(P.name == "HEADER")
|
||||
qdel(P)
|
||||
continue
|
||||
if(P.name == "HEADER") continue
|
||||
supply_packs[P.name] = P
|
||||
|
||||
spawn(0)
|
||||
if(processing)
|
||||
iteration++
|
||||
points += points_per_process
|
||||
|
||||
//sleep(processing_interval)
|
||||
//Supply shuttle ticker - handles supply point regeneration and shuttle travelling between centcomm and the station
|
||||
/datum/controller/supply/proc/process()
|
||||
points += points_per_process
|
||||
|
||||
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
|
||||
/datum/controller/supply/proc/forbidden_atoms_check(atom/A)
|
||||
|
||||
Reference in New Issue
Block a user