Reduces possible cargo express pod spam. (#52414)

This commit is contained in:
skoglol
2020-07-25 06:43:48 -03:00
committed by GitHub
parent fdf45d7a55
commit c90f7ea4c6
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@
//INDEXES
#define COOLDOWN_BORG_SELF_REPAIR "borg_self_repair"
#define COOLDOWN_EXPRESSPOD_CONSOLE "expresspod_console"
//TIMER COOLDOWN MACROS
+6 -1
View File
@@ -1,4 +1,4 @@
#define MAX_EMAG_ROCKETS 8
#define MAX_EMAG_ROCKETS 5
#define BEACON_COST 500
#define SP_LINKED 1
#define SP_READY 2
@@ -149,6 +149,9 @@
if("add")//Generate Supply Order first
if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_EXPRESSPOD_CONSOLE))
say("Railgun recalibrating. Stand by.")
return
var/id = text2path(params["id"])
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
if(!istype(pack))
@@ -189,6 +192,7 @@
if(empty_turfs && empty_turfs.len)
LZ = pick(empty_turfs)
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
TIMER_COOLDOWN_START(src, COOLDOWN_EXPRESSPOD_CONSOLE, 5 SECONDS)
D.adjust_money(-SO.pack.cost)
new /obj/effect/pod_landingzone(LZ, podType, SO)
. = TRUE
@@ -202,6 +206,7 @@
LAZYADD(empty_turfs, T)
CHECK_TICK
if(empty_turfs && empty_turfs.len)
TIMER_COOLDOWN_START(src, COOLDOWN_EXPRESSPOD_CONSOLE, 10 SECONDS)
D.adjust_money(-(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)))
SO.generateRequisition(get_turf(src))