Resource fixes!
[browser-rts.git] / src / tasks / tick.ts
index 8160e9ae03bf4446299e0726988db0d37acff826..e448713e53dca01231a85c26b3b757915e4d9b72 100644 (file)
@@ -12,10 +12,10 @@ export const tick = new Task<Tick>('tick', async (task, job) => {
 
        // +population*1.1 is where we take into account farms for bonus food production
        let sql = `update cities set 
-       gold = gold + population * 2, 
-       bushels = round(
+       credits = credits + population * 2, 
+       food = round(
                max(
-                       bushels - (
+                       food - (
                                (soldiers*0.5)+
                                (population*0.25)+
                                (attackers*0.75)+
@@ -29,7 +29,7 @@ export const tick = new Task<Tick>('tick', async (task, job) => {
        ),
        population = max(
                min(
-                       population + round(coalesce(bushels/bushels, 0) * population*0.08),
+                       population + round(coalesce(food/food, 0) * population*0.08),
                        farms * 70
                ),
                population
@@ -55,4 +55,4 @@ export const tick = new Task<Tick>('tick', async (task, job) => {
                }, { delay: 60000 * nextTickAt});
        }
 
-});
\ No newline at end of file
+});