mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-04 00:15:45 +02:00
comfy score - reset function
This commit is contained in:
parent
8917facd2f
commit
822972a8e1
@ -29,16 +29,29 @@ function Public.get_table()
|
|||||||
return this
|
return this
|
||||||
end
|
end
|
||||||
|
|
||||||
function Public.init_player_table(player)
|
function Public.reset_tbl()
|
||||||
|
this.score_table['player'] = {
|
||||||
|
players = {}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function Public.init_player_table(player, reset)
|
||||||
if not player then
|
if not player then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not this.score_table[player.force.name] then
|
if reset then
|
||||||
this.score_table[player.force.name] = {}
|
this.score_table[player.force.name].players[player.name] = {
|
||||||
|
built_entities = 0,
|
||||||
|
deaths = 0,
|
||||||
|
killscore = 0,
|
||||||
|
mined_entities = 0
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if not this.score_table[player.force.name].players then
|
if not this.score_table[player.force.name].players then
|
||||||
this.score_table[player.force.name].players = {}
|
this.score_table[player.force.name].players = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
if not this.score_table[player.force.name].players[player.name] then
|
if not this.score_table[player.force.name].players[player.name] then
|
||||||
this.score_table[player.force.name].players[player.name] = {
|
this.score_table[player.force.name].players[player.name] = {
|
||||||
built_entities = 0,
|
built_entities = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user