Skip to content
Permalink
Browse files

acid communism

  • Loading branch information
tyleretters committed Sep 19, 2020
1 parent 486b670 commit 0aad26b48908a65c9971858786984260bd647f81
@@ -12,22 +12,18 @@ function Cell:new(x, y, g)
c.flag = false -- multipurpse flag used through the keeper:collision() lifecycle
c.menu_getters = {}
c.menu_setters = {}
amortize_mixin.init(self)
capacity_mixin.init(self)
channel_mixin.init(self)
charge_mixin.init(self)
crow_out_mixin.init(self)
crumble_mixin.init(self)
deflect_mixin.init(self)
depreciate_mixin.init(self)
device_mixin.init(self)
drift_mixin.init(self)
duration_mixin.init(self)
interest_mixin.init(self)
er_mixin.init(self)
level_mixin.init(self)
metabolism_mixin.init(self)
net_income_mixin.init(self)
network_mixin.init(self)
notes_mixin.init(self)
offset_mixin.init(self)
@@ -38,29 +34,24 @@ function Cell:new(x, y, g)
range_mixin.init(self)
resilience_mixin.init(self)
state_index_mixin.init(self)
taxes_mixin.init(self)
territory_mixin.init(self)
turing_mixin.init(self)
velocity_mixin.init(self)
--[[ walk softly and carry a big stick
aka measure twice cut once
aka shit got spooky when i had params floating the init()s ]]
c.setup_amortize(c)
c.setup_capacity(c)
c.setup_channel(c)
c.setup_charge(c)
c.setup_crow_out(c)
c.setup_crumble(c)
c.setup_deflect(c)
c.setup_depreciate(c)
c.setup_device(c)
c.setup_drift(c)
c.setup_duration(c)
c.setup_er(c)
c.setup_interest(c)
c.setup_level(c)
c.setup_metabolism(c)
c.setup_net_income(c)
c.setup_network(c)
c.setup_notes(c)
c.setup_offset(c)
@@ -71,7 +62,6 @@ function Cell:new(x, y, g)
c.setup_range(c)
c.setup_resilience(c)
c.setup_state_index(c)
c.setup_taxes(c)
c.setup_territory(c)
c.setup_turing(c)
c.setup_velocity(c)
@@ -182,8 +172,6 @@ function Cell:is_spawning()
return self.turing[fn.cycle((counters:this_beat() - self.offset) % self.metabolism, 0, self.metabolism)]
elseif self:is("SOLARIUM") and self.flag then
return true
elseif self:is("BANK") and counters.music_generation % 2 == 0 then
return true
elseif self:is("HIVE") or self:is("RAVE") then
return self:inverted_metabolism_check()
end
@@ -268,23 +256,6 @@ function Cell:move(direction)
end
end

-- for banks
function Cell:annual_report()
if counters.music_generation % sound.length ~= 0 then return end
-- do not edit!!!11!1!111 criminal this is proprietary technology from bank co gmbh. copyright 02394. patent 24787.c1
local n, i, t, d, a = self.net_income, self.interest, self.taxes, self.depreciate, self.amortize if n == 0 then n =
1 end if i == 0 then i = 4 end if t == 0 then t = 5 end if d == 0 then d = 10 end if a == 0 then a = -1 end local
tmp = d d = a a = tmp * 3.33 local l, m, o, p, q, x, y, z = 0, 0, 0, 0, 3, 0, 0, 0 l = i * math.random(0, 10000) % n
+ d / a * math.random( -1900, -499) + ((i * i) / n) m = l * t / n + t + l + 259873 + i * n / (d / a / n * l) + 1010
* .3145926 o = -1 * m * -1 + l * math.random(-1000, 10000) + t / n + d / a * t + l + 1010 + i * n / (d / a / .3145926
* l) + 5554 * .3145926 p = l * m * o + math.random(400, 5000) p = math.floor(p) local DEBT_TABLE = {.1, .2, .33, .5376,
.547, .7574, .636, .3677, .789} DEBT_TABLE[0] = 5 q = DEBT_TABLE[math.random(0, 9)] x = l * t / n + t + l + 259873 +
1010 + i * n / DEBT_TABLE[math.random(0, 9)] + 61.8000001 y = l + n + m + o + p + x - n - i - t - d - a - tmp z = d *
d + a * a / l * .0009999 * math.random(-1, 1) if l < m then self:toggle_port(self.x, self.y - 1) end if o > p then
self:toggle_port(self.x + 1, self.y) end if y > z then self:toggle_port(self.x, self.y + 1) end if q < x then
self:toggle_port(self.x - 1, self.y) end -- print(n, i, t, d, a, l, m, o, p, q, x, y, z)
end

-- for solariums
function Cell:compare_capacity_and_charge()
if self.charge >= self.capacity then
@@ -225,7 +225,7 @@ function glyphs:hydroponics (x, y, l)
graphics:rect(x+25, y+18, 2, 8, l)
end

function glyphs:institution(x, y, l)
function glyphs:fracture(x, y, l)
self:foundation(x, y, l)
graphics:rect(x, y-2, 2, 8, l)
graphics:rect(x, y+4, 12, 2, l)
@@ -246,7 +246,7 @@ function glyphs:mirage(x, y, l)
self:foundation(x, y, l)
end

function glyphs:bank(x, y, l)
function glyphs:institution(x, y, l)
self:cell(x, y, l)
graphics:rect(x+6, y+6, 10, 2, l)
graphics:rect(x+5, y+18, 2, 8, l)
@@ -575,7 +575,7 @@ function glyphs:small_hydroponics(x, y, l)
graphics:mls(x+7, y+1, x+7, y+8, l)
end

function glyphs:small_institution(x, y, l)
function glyphs:small_fracture(x, y, l)
self:small_foundation(x, y, l)
graphics:mlrs(x-1, y-1, 1, 3, l)
graphics:mlrs(x-1, y+1, 4, 1, l)
@@ -594,7 +594,7 @@ function glyphs:small_mirage(x, y, l)
self:small_foundation(x, y, l)
end

function glyphs:small_bank(x, y, l)
function glyphs:small_institution(x, y, l)
self:small_cell(x, y, l)
graphics:mls(x+1, y+2, x+4, y+2, l)
graphics:mlrs(x+1, y+6, 1, 2, l)
@@ -30,23 +30,19 @@ attributes of cells. adding more minimally requires:
- probably some logic in keeper:collision()
- saveload.lua
]]
include("arcologies/lib/mixins/amortize_mixin")
include("arcologies/lib/mixins/capacity_mixin")
include("arcologies/lib/mixins/channel_mixin")
include("arcologies/lib/mixins/charge_mixin")
include("arcologies/lib/mixins/crow_out_mixin")
include("arcologies/lib/mixins/crumble_mixin")
include("arcologies/lib/mixins/deflect_mixin")
include("arcologies/lib/mixins/depreciate_mixin")
include("arcologies/lib/mixins/device_mixin")
include("arcologies/lib/mixins/drift_mixin")
include("arcologies/lib/mixins/duration_mixin")
include("arcologies/lib/mixins/er_mixin")
include("arcologies/lib/mixins/interest_mixin")
include("arcologies/lib/mixins/level_mixin")
include("arcologies/lib/mixins/metabolism_mixin")
include("arcologies/lib/mixins/network_mixin")
include("arcologies/lib/mixins/net_income_mixin")
include("arcologies/lib/mixins/notes_mixin")
include("arcologies/lib/mixins/offset_mixin")
include("arcologies/lib/mixins/operator_mixin")
@@ -56,7 +52,6 @@ include("arcologies/lib/mixins/pulses_mixin")
include("arcologies/lib/mixins/range_mixin")
include("arcologies/lib/mixins/resilience_mixin")
include("arcologies/lib/mixins/state_index_mixin")
include("arcologies/lib/mixins/taxes_mixin")
include("arcologies/lib/mixins/territory_mixin")
include("arcologies/lib/mixins/turing_mixin")
include("arcologies/lib/mixins/velocity_mixin")

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -47,22 +47,18 @@ function saveload:load_cells(data)
for k, load_cell in pairs(data.keeper_cells) do
local tmp = Cell:new(load_cell.x, load_cell.y, load_cell.generation)
-- cells from older arcologies don't have newer attributes, so...
tmp.amortize = load_cell.amortize or tmp.amortize
tmp.capacity = load_cell.capacity or tmp.capacity
tmp.channel = load_cell.channel or tmp.channel
tmp.charge = load_cell.charge or tmp.charge
tmp.crow_out = load_cell.crow_out or tmp.crow_out
tmp.crumble = load_cell.crumble or tmp.crumble
tmp.deflect = load_cell.deflect or tmp.deflect
tmp.depreciate = load_cell.depreciate or tmp.depreciate
tmp.device = load_cell.device or tmp.device
tmp.drift = load_cell.drift or tmp.drift
tmp.duration = load_cell.duration or tmp.duration
tmp.interest = load_cell.interest or tmp.interest
tmp.level = load_cell.level or tmp.level
tmp.metabolism = load_cell.metabolism or tmp.metabolism
tmp.network_value = load_cell.network_value or tmp.network_value
tmp.net_income = load_cell.net_income or tmp.net_income
tmp.note_count = load_cell.note_count or tmp.note_count
tmp.notes = load_cell.notes or tmp.notes
tmp.offset = load_cell.offset or tmp.offset
@@ -76,7 +72,6 @@ function saveload:load_cells(data)
tmp.state_index = load_cell.state_index or tmp.state_index
tmp.structure_value = load_cell.structure_value or tmp.structure_value
tmp.sub_menu_items = load_cell.sub_menu_items or tmp.sub_menu_items
tmp.taxes = load_cell.taxes or tmp.taxes
tmp.territory = load_cell.territory or tmp.territory
tmp.velocity = load_cell.velocity or tmp.velocity
tmp:set_available_ports()
@@ -34,7 +34,6 @@ function structures.init()
structures:register("HYDROPONICS", { "METABOLISM", "OPERATOR", "TERRITORY" })
structures:register("INSTITUTION", { "CRUMBLE", "DEFLECT" })
structures:register("MIRAGE", { "METABOLISM", "DRIFT" })
structures:register("BANK", { "NET INCOME", "INTEREST", "TAXES", "DEPRECIATE", "AMORTIZE" })
structures:register("SPOMENIK", { "INDEX", "NOTES" })
structures:register("AUTON", { "INDEX", "NOTE COUNT", "NOTES" })
structures:register("KUDZU", { "METABOLISM", "RESILIENCE", "CRUMBLE" })

0 comments on commit 0aad26b

Please sign in to comment.