1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Add core cheats (#490)

* Add core cheats

* Optimize our cheating
This commit is contained in:
Matthew 2018-12-03 04:39:19 -05:00 committed by Valansch
parent 54ff31d233
commit 6ba6a82d8c

View File

@ -27,6 +27,48 @@ local function player_created(event)
if info ~= nil then
info.show_info({player = player})
end
if _CHEATS then
local force = player.force
local i = player.insert
i {name = 'power-armor-mk2', count = 1}
local p_armor = player.get_inventory(5)[1].grid
local p = p_armor.put
p({name = 'fusion-reactor-equipment'})
p({name = 'fusion-reactor-equipment'})
p({name = 'fusion-reactor-equipment'})
p({name = 'fusion-reactor-equipment'})
p({name = 'personal-roboport-mk2-equipment'})
p({name = 'personal-roboport-mk2-equipment'})
p({name = 'personal-laser-defense-equipment'})
p({name = 'personal-laser-defense-equipment'})
p({name = 'energy-shield-mk2-equipment'})
p({name = 'energy-shield-mk2-equipment'})
p({name = 'night-vision-equipment'})
p({name = 'battery-mk2-equipment'})
p({name = 'battery-mk2-equipment'})
p({name = 'battery-mk2-equipment'})
p({name = 'belt-immunity-equipment'})
p({name = 'solar-panel-equipment'})
i {name = 'steel-axe', count = 10}
i {name = 'submachine-gun', count = 1}
i {name = 'uranium-rounds-magazine', count = 1000}
i {name = 'construction-robot', count = 250}
i {name = 'electric-energy-interface', count = 50}
i {name = 'substation', count = 50}
i {name = 'roboport', count = 10}
i {name = 'infinity-chest', count = 10}
i {name = 'small-plane', count = 2}
i {name = 'coin', count = 20000}
i {name = 'rocket-part', count = 2}
i {name = 'computer', count = 2}
player.cheat_mode = true
force.manual_mining_speed_modifier = 10
force.character_running_speed_modifier = 5
force.character_health_bonus = 100000
end
end
Event.add(defines.events.on_player_created, player_created)