mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-07 13:31:40 +02:00
tweaks
This commit is contained in:
parent
7156a5a4ca
commit
264caefddd
@ -4,6 +4,16 @@ local market = {}
|
||||
local random = math.random
|
||||
local floor = math.floor
|
||||
|
||||
local blacklist = {
|
||||
['cargo-wagon'] = true,
|
||||
['locomotive'] = true,
|
||||
['artillery-wagon'] = true,
|
||||
['fluid-wagon'] = true,
|
||||
['land-mine'] = true,
|
||||
['car'] = true,
|
||||
['tank'] = true
|
||||
}
|
||||
|
||||
market.weapons = {
|
||||
['pistol'] = {value = 10, rarity = 1},
|
||||
['submachine-gun'] = {value = 50, rarity = 2},
|
||||
@ -232,15 +242,6 @@ function Public.get_random_item(rarity, sell, buy)
|
||||
|
||||
local items_return = {}
|
||||
|
||||
local blacklist = {
|
||||
['cargo-wagon'] = true,
|
||||
['locomotive'] = true,
|
||||
['artillery-wagon'] = true,
|
||||
['fluid-wagon'] = true,
|
||||
['land-mine'] = true,
|
||||
['car'] = true
|
||||
}
|
||||
|
||||
for i = 1, random(5, 10), 1 do
|
||||
local item = items[i]
|
||||
if not item then
|
||||
@ -280,14 +281,6 @@ function Public.mountain_market(surface, position, rarity, buy)
|
||||
end
|
||||
local mrk = surface.create_entity({name = 'market', position = position, force = 'neutral'})
|
||||
|
||||
local blacklist = {
|
||||
['cargo-wagon'] = true,
|
||||
['locomotive'] = true,
|
||||
['artillery-wagon'] = true,
|
||||
['fluid-wagon'] = true,
|
||||
['land-mine'] = true
|
||||
}
|
||||
|
||||
for i = 1, random(5, 10), 1 do
|
||||
local item = items[i]
|
||||
if not item then
|
||||
|
@ -73,24 +73,9 @@ function Public.add_player_to_permission_group(player, group, forced)
|
||||
end
|
||||
|
||||
if forced then
|
||||
local locomotive_group = game.permissions.get_group('locomotive')
|
||||
if not locomotive_group then
|
||||
locomotive_group = game.permissions.create_group('locomotive')
|
||||
locomotive_group.set_allows_action(defines.input_action.cancel_craft, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.edit_permission_group, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.import_permissions_string, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.delete_permission_group, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.add_permission_group, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.admin_action, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.drop_item, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.place_equipment, false)
|
||||
locomotive_group.set_allows_action(defines.input_action.take_equipment, false)
|
||||
-- locomotive_group.set_allows_action(defines.input_action.disconnect_rolling_stock, false)
|
||||
-- locomotive_group.set_allows_action(defines.input_action.connect_rolling_stock, false)
|
||||
end
|
||||
|
||||
locomotive_group = game.permissions.get_group('locomotive')
|
||||
locomotive_group.add_player(player)
|
||||
local default_group = game.permissions.get_group('Default')
|
||||
default_group.add_player(player)
|
||||
return
|
||||
end
|
||||
|
||||
local playtime = player.online_time
|
||||
@ -203,7 +188,7 @@ local function property_boost(data)
|
||||
end
|
||||
end
|
||||
else
|
||||
Public.add_player_to_permission_group(player, 'default')
|
||||
Public.add_player_to_permission_group(player, 'default', true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user