mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
planet_prison: enable flashlight by default
Forcing a player to buy a flashlight is a bad idea. This patch removes possiblity of flashlight buying as he'll have it by default.
This commit is contained in:
parent
b1336833de
commit
1b42918315
@ -231,14 +231,12 @@ local function redraw_gui(p)
|
|||||||
p.gui.left.add(button)
|
p.gui.left.add(button)
|
||||||
end
|
end
|
||||||
|
|
||||||
if perks.flashlight then
|
button = {
|
||||||
button = {
|
type = "button",
|
||||||
type = "button",
|
name = "flashlight_toggle",
|
||||||
name = "flashlight_toggle",
|
caption = "Toggle flashlight"
|
||||||
caption = "Toggle flashlight"
|
}
|
||||||
}
|
p.gui.left.add(button)
|
||||||
p.gui.left.add(button)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function print_merchant_position(player)
|
local function print_merchant_position(player)
|
||||||
@ -313,8 +311,7 @@ local function init_player(p)
|
|||||||
p.force = game.create_force(p.name)
|
p.force = game.create_force(p.name)
|
||||||
p.force.set_friend("neutral", true)
|
p.force.set_friend("neutral", true)
|
||||||
global.this.perks[p.name] = {
|
global.this.perks[p.name] = {
|
||||||
flashlight = false,
|
flashlight_enable = true,
|
||||||
flashlight_enabled = false,
|
|
||||||
minimap = false,
|
minimap = false,
|
||||||
chat_global = true,
|
chat_global = true,
|
||||||
}
|
}
|
||||||
@ -718,12 +715,7 @@ local function on_market_item_purchased(e)
|
|||||||
local o = m.get_market_items()[e.offer_index].offer
|
local o = m.get_market_items()[e.offer_index].offer
|
||||||
local perks = global.this.perks[p.name]
|
local perks = global.this.perks[p.name]
|
||||||
|
|
||||||
if o.effect_description == "Construct a flashlight" then
|
if o.effect_description == "Construct a GPS receiver" then
|
||||||
perks.flashlight = true
|
|
||||||
perks.flashlight_enable = true
|
|
||||||
p.character.enable_flashlight()
|
|
||||||
redraw_gui(p)
|
|
||||||
elseif o.effect_description == "Construct a GPS receiver" then
|
|
||||||
perks.minimap = true
|
perks.minimap = true
|
||||||
p.minimap_enabled = true
|
p.minimap_enabled = true
|
||||||
end
|
end
|
||||||
|
@ -153,34 +153,6 @@ public.technologies = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public.merchant_offer = {
|
public.merchant_offer = {
|
||||||
{
|
|
||||||
price = {
|
|
||||||
{
|
|
||||||
type = "item",
|
|
||||||
name = "iron-plate",
|
|
||||||
amount = 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "item",
|
|
||||||
name = "copper-cable",
|
|
||||||
amount = 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "item",
|
|
||||||
name = "electronic-circuit",
|
|
||||||
amount = 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "item",
|
|
||||||
name = "small-lamp",
|
|
||||||
amount = 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
offer = {
|
|
||||||
type = "nothing",
|
|
||||||
effect_description = "Construct a flashlight",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
price = {
|
price = {
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user