1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-26 22:56:43 +02:00

Mtn v3 - BW

This commit is contained in:
Gerkiz 2022-11-24 15:00:59 +01:00
parent 58e1b82346
commit 5be6600a6f
4 changed files with 32 additions and 10 deletions

View File

@ -6,6 +6,7 @@ map_info_text=[color=red]READ THIS!\nIf there are any code bugs or desyncs. Plea
[breached_wall]
collapse_start=[color=blue]Mapkeeper:[/color]\nWarning, Collapse has begun!
spidertron_unlocked=[color=blue]Mapkeeper:[/color]\nAttention! Spidertron has been unlocked at the main market!
spidertron_unlocked_bw=[color=blue]Mapkeeper:[/color]\nAttention! Spidertron has been unlocked at the main market for a generous price!
wall_breached=[color=blue]Mapkeeper:[/color]\nSurvivor! Well done. You have completed zone __1__!
first_to_reach=[color=blue]Mapkeeper:[/color]\n__1__ was the first to reach zone __2__.
artillery_warning=[color=blue]Mapkeeper:[/color]\nWarning, Artillery have been spotted north!

View File

@ -86,9 +86,9 @@ local this = {
['splitter'] = {value = 16, rarity = 1},
['fast-splitter'] = {value = 48, rarity = 4},
['express-splitter'] = {value = 128, rarity = 7},
['loader'] = {value = 256, rarity = 2},
['fast-loader'] = {value = 512, rarity = 5},
['express-loader'] = {value = 768, rarity = 8},
['loader'] = {value = 100, rarity = 2},
['fast-loader'] = {value = 189, rarity = 5},
['express-loader'] = {value = 298, rarity = 8},
['burner-inserter'] = {value = 4, rarity = 1},
['inserter'] = {value = 8, rarity = 1},
['long-handed-inserter'] = {value = 12, rarity = 2},

View File

@ -51,9 +51,14 @@ local collapse_message =
local spidertron_unlocked =
Token.register(
function()
local message = ({'breached_wall.spidertron_unlocked'})
Alert.alert_all_players(30, message, nil, 'achievement/tech-maniac', 0.1)
function(event)
if event then
local message = ({'breached_wall.spidertron_unlocked'})
if event.bw then
message = ({'breached_wall.spidertron_unlocked_bw'})
end
Alert.alert_all_players(30, message, nil, 'achievement/tech-maniac', 0.1)
end
end
)
@ -241,19 +246,29 @@ local function distance(player)
biters.amount = 0
placed_trains_in_zone.randomized = false
Public.enemy_weapon_damage()
if Public.get('breached_wall') == Public.get('spidertron_unlocked_at_zone') then
local spidertron_unlocked_enabled = Public.get('spidertron_unlocked_enabled')
if Public.get('breached_wall') >= Public.get('spidertron_unlocked_at_zone') and not spidertron_unlocked_enabled then
Public.set('spidertron_unlocked_enabled', true)
local main_market_items = Public.get('main_market_items')
if not main_market_items['spidertron'] then
local rng = random(70000, 120000)
local bw = Public.get('bw')
local spider_tooltip = 'BiterStunner 9000'
local rng
if bw then
rng = random(30000, 80000)
spider_tooltip = spider_tooltip .. ' (Exclusive sale!)'
else
rng = random(70000, 120000)
end
main_market_items['spidertron'] = {
stack = 1,
value = 'coin',
price = rng,
tooltip = 'BiterStunner 9000',
tooltip = spider_tooltip,
upgrade = false,
static = true
}
Task.set_timeout_in_ticks(150, spidertron_unlocked)
Task.set_timeout_in_ticks(150, spidertron_unlocked, {bw = bw})
end
end

View File

@ -115,6 +115,7 @@ function Public.reset_main_table()
highest_pos = nil
}
this.force_chunk = false
this.bw = false
this.allow_decon = true
this.allow_decon_main_surface = true
this.flamethrower_damage = {}
@ -217,6 +218,7 @@ function Public.reset_main_table()
distance_from = 2
}
this.spidertron_unlocked_at_zone = 11
this.spidertron_unlocked_enabled = false
-- this.void_or_tile = 'lab-dark-2'
this.void_or_tile = 'out-of-map'
this.validate_spider = {}
@ -262,6 +264,10 @@ function Public.reset_main_table()
end
end
function Public.enable_bw(state)
this.bw = state or false
end
function Public.get(key)
if key then
return this[key]