Files
factorio-scenario-ExpCluster/control.lua
2017-04-07 15:50:21 +01:00

1 line
23 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
entityRemoved={}entityCache={}guis={frames={},buttons={}}defaults={itemRotated={},ranks={{name='Owner',shortHand='Owner',tag='[Owner]',power=0,colour={r=170,g=0,b=0}},{name='Community Manager',shortHand='CM',tag='[Com Mngr]',power=1,colour={r=150,g=68,b=161}},{name='Developer',shortHand='Dev',tag='[Dev]',power=1,colour={r=179,g=125,b=46}},{name='Admin',shortHand='Admin',tag='[Admin]',power=2,colour={r=170,g=41,b=170}},{name='Mod',shortHand='Mod',tag='[Mod]',power=3,colour={r=233,g=63,b=233}},{name='Donner',shortHand='P2W',tag='[P2W]',power=4,colour={r=233,g=63,b=233}},{name='Member',shortHand='Mem',tag='[Member]',power=5,colour={r=24,g=172,b=188}},{name='Regular',shortHand='Reg',tag='[Regukar]',power=5,colour={r=24,g=172,b=188}},{name='Guest',shortHand='',tag='[Guest]',power=6,colour={r=255,g=159,b=27}},{name='Jail',shortHand='Owner',tag='[Owner]',power=7,colour={r=170,g=0,b=0}}},autoRanks={badgamernl='Owner',arty714='Community Manager',Cooldude2606='Developer',eissturm='Admin',PropangasEddy='Admin'}}warningAllowed=nil;timeForRegular=180;CHUNK_SIZE=32;function loadVar(a)if a==nil then local b=nil;if game.players[1].gui.left.hidden then b=game.players[1].gui.left.hidden.caption else b=game.players[1].gui.left.add{type='frame',name='hidden',caption=table.tostring(defaults)}.caption;game.players[1].gui.left.hidden.style.visible=false end;gTable=loadstring('return '..b)()else gTable=a end;itemRotated=gTable.itemRotated;ranks=gTable.ranks;autoRanks=gTable.autoRanks end;function saveVar()gTable.itemRotated=itemRotated;gTable.ranks=ranks;gTable.autoRanks=autoRanks;game.players[1].gui.left.hidden.caption=table.tostring(gTable)end;local function c(d,e)if d.find_entities_filtered{area=e,type="decorative"}then for f,g in pairs(d.find_entities_filtered{area=e,type="decorative"})do if g.name~="red-bottleneck"and g.name~="yellow-bottleneck"and g.name~="green-bottleneck"then g.destroy()end end end end;local function h(d,i,j,k,l)c(d,{{i,j},{i+k,j+l}})end;local function m()local d=game.surfaces["nauvis"]for n in d.get_chunks()do h(d,n.x*CHUNK_SIZE,n.y*CHUNK_SIZE,CHUNK_SIZE-1,CHUNK_SIZE-1)end;callRank("Decoratives have been removed")end;script.on_event(defines.events.on_chunk_generated,function(o)c(o.surface,o.area)end)function getRank(p)if p then for f,q in pairs(ranks)do if p.tag==q.tag then return q end end;return stringToRank('Guest')end end;function stringToRank(string)if type(string)=='string'then for f,q in pairs(ranks)do if q.name==string then return q end end end end;function callRank(r,q)if q==nil then q=stringToRank('Mod')else q=stringToRank(q)end;for f,p in pairs(game.players)do rankPower=getRank(p).power;if rankPower<=q.power then p.print('['..q.shortHand..']: '..r)end end end;function autoRank(p)currentRank=getRank(p)if autoRanks[p.name]then if currentRank.power>stringToRank(autoRanks[p.name]).power then p.tag=stringToRank(autoRanks[p.name]).tag end elseif ticktominutes(p.online_time)>=timeForRegular then p.tag=stringToRank('Regular').tag end;if getRank(p).power<=3 and not p.admin then callRank(p.name..' needs to be promoted.')end end;function ticktohour(s)local t=tostring(math.floor(s/(216000*game.speed)))return t end;function ticktominutes(s)local u=math.floor(s/(3600*game.speed))return u end;function callRank(r)for f,p in pairs(game.connected_players)do if p.admin then p.print(r)end end end;function autoMessage()game.print('There are '..#game.connected_players..' players online')game.print('This map has been on for '..ticktohour(game.tick)..' Hours and '..ticktominutes(game.tick)-60*ticktohour(game.tick)..' Minutes')game.print('Please join us on:')game.print('Discord: https://discord.gg/RPCxzgt')game.print('Forum: explosivegaming.nl')game.print('Steam: http://steamcommunity.com/groups/tntexplosivegaming')game.print('To see these links again goto: Readme > Server Info')end;function table.val_to_str(v)if"string"==type(v)then v=string.gsub(v,"\n","\\n")if string.match(string.gsub(v,"[^'\"]",""),'^"+$')then return"'"..v.."'"end;return'"'..string.gsub(v,'"','\\"')..'"'else return"table"==type(v)and table.tostring(v)or tostring(v)end end;function table.key_to_str(w)if"string"==type(w)and string.match(w,"^[_%player][_%player%d]*$")then return w else return"["..table.val_to_str(w).."]"end end;function table.tostring(x)local y,z={},{}for w,v in ipairs(x)do table.insert(y,table.val_to_str(v))z[w]=true end;for w,v in pairs(x)do if not z[w]then table.insert(y,table.key_to_str(w).."="..table.val_to_str(v))end end;return"{"..table.concat(y,",").."}"end;function addFrame(A,q,B,C,D)guis.frames[A]={{require=q,caption=C,tooltip=D}}addButton('close',function(p,E)E.parent.parent.parent.destroy()end)addButton('btn_'..A,function(p,E)if p.gui.center[A]then p.gui.center[A].destroy()else drawFrame(p,A,B)end end)end;function addTab(A,F,G,H)guis.frames[A][F]={F,G,H}addButton(F,function(p,E)openTab(p,E.parent.parent.parent.name,E.parent.parent.parent.tab,E.name)end)end;function addButton(I,J)guis.buttons[I]={I,J}end;function drawButton(A,I,C,G)A.add{name=I,type="button",caption=C,tooltip=G}end;function openTab(p,K,L,F)local M=p.gui.center[K].tabBarScroll.tabBar;for f,a in pairs(guis.frames[K])do if f~=1 then if a[1]==F then M[a[1]].style.font_color={r=255,g=255,b=255,player=255}clearElement(L)a[3](p,L)else M[a[1]].style.font_color={r=100,g=100,b=100,player=255}end end end end;function drawFrame(p,K,F)if getRank(p).power<=guis.frames[K][1].require then if p.gui.center[K]then p.gui.center[K].destroy()end;local A=p.gui.center.add{name=K,type='frame',caption=K,direction='vertical'}local N=A.add{type="scroll-pane",name="tabBarScroll",vertical_scroll_policy="never",horizontal_scroll_policy="always"}local M=N.add{type='flow',direction='horizontal',name='tabBar'}local L=A.add{type="scroll-pane",name="tab",vertical_scroll_policy="auto",horizontal_scroll_policy="never"}for f,a in pairs(guis.frames[K])do if f~=1 then drawButton(M,a[1],a[1],a[2])end end;openTab(p,K,L,F)drawButton(M,'close','Close','Close this window')L.style.minimal_height=300;L.style.maximal_height=300;L.style.minimal_width=500;L.style.maximal_width=500;N.style.minimal_height=60;N.style.maximal_height=60;N.style.minimal_width=500;N.style.maximal_width=500 end end;function toggleVisable(A)if A then if A.style.visible==nil then A.style.visible=false else A.style.visible=not A.style.visible end end end;function clearElement(O)if O~=nil then for P,E in pairs(O.children_names)do O[E].destroy()end end end;script.on_event(defines.events.on_player_created,function(o)local p=game.players[o.player_index]p.insert{name="iron-plate",count=8}p.insert{name="pistol",count=1}p.insert{name="firearm-magazine",count=10}p.insert{name="burner-mining-drill",count=1}p.insert{name="stone-furnace",count=1}p.force.chart(p.surface,{{p.position.x-200,p.position.y-200},{p.position.x+200,p.position.y+200}})end)script.on_event(defines.events.on_player_respawned,function(o)local p=game.players[o.player_index]drawPlayerList()p.insert{name="pistol",count=1}p.insert{name="firearm-magazine",count=10}end)script.on_event(defines.events.on_player_joined_game,function(o)loadVar()local p=game.players[o.player_index]autoRank(p)p.print({"","Welcome"})if p.gui.left.PlayerList~=nil then p.gui.left.PlayerList.destroy()end;if p.gui.center.README~=nil then p.gui.center.README.destroy()end;if p.gui.top.PlayerList~=nil then p.gui.top.PlayerList.destroy()end;drawPlayerList()drawToolbar(p)local Q=encode(game.players,"players",{"name","admin","online_time","connected","index"})game.write_file("players.json",Q,false,0)if not p.admin and ticktominutes(p.online_time)<1 then drawFrame(p,'Readme','Rules')end end)script.on_event(defines.events.on_player_left_game,function(o)local p=game.players[o.player_index]drawPlayerList()end)script.on_event(defines.events.on_gui_click,function(o)local p=game.players[o.player_index]for f,R in pairs(guis.buttons)do if R[1]==o.element.name then if R[2]then R[2](p,o.element)else game.print('Invaid Button'..R[1])end;break end end end)script.on_event(defines.events.on_gui_text_changed,function(o)local p=game.players[o.player_index]if o.element.parent.parent.filterTable then local A=o.element;local S={}local T=false;if A.parent.parent.parent.name=='Admin'then T=true;S[#S+1]='online'end;if A.parent.parent.filterTable.status_input and not T then local U=A.parent.parent.filterTable.status_input.text;if U=='yes'or U=='online'or U=='true'or U=='y'then S[#S+1]='online'elseif U~=''then S[#S+1]='offline'end end;if A.parent.parent.filterTable.hours_input then local V=A.parent.parent.filterTable.hours_input.text;if tonumber(V)and tonumber(V)>0 then S[#S+1]=tonumber(V)end end;if A.parent.parent.filterTable.name_input then local W=A.parent.parent.filterTable.name_input.text;if W then S[#S+1]=W end end;if A.parent.parent.playerTable then A.parent.parent.playerTable.destroy()end;drawPlayerTable(p,A.parent.parent,T,S)end end)script.on_event(defines.events.on_marked_for_deconstruction,function(o)local X=game.players[o.player_index]if not X.admin and ticktominutes(X.online_time)<timeForRegular then if o.entity.type~="tree"and o.entity.type~="simple-entity"then o.entity.cancel_deconstruction("player")X.print("You are not allowed to do this yet, play for player bit longer. Try again in about: "..math.floor(timeForRegular-ticktominutes(X.online_time)).." minutes")callRank(X.name.." tryed to deconstruced something")end elseif o.entity.type=="tree"or o.entity.type=="simple-entity"then o.entity.destroy()end end)script.on_event(defines.events.on_built_entity,function(o)local X=game.players[o.player_index]local timeForRegular=120;if not X.admin and ticktominutes(X.online_time)<timeForRegular then if o.created_entity.type=="tile-ghost"then o.created_entity.destroy()X.print("You are not allowed to do this yet, play for player bit longer. Try: "..math.floor(timeForRegular-ticktominutes(X.online_time)).." minutes")callRank(X.name.." tryed to place concrete/stone with robots")end end end)script.on_event(defines.events.on_rocket_launched,function(o)local Y=o.rocket.force;if o.rocket.get_item_count("satellite")==0 then if#game.players<=1 then game.show_message_dialog{text={"gui-rocket-silo.rocket-launched-without-satellite"}}else for Z,p in pairs(Y.players)do p.print({"gui-rocket-silo.rocket-launched-without-satellite"})end end;return end;if not global.satellite_sent then global.satellite_sent={}end;if global.satellite_sent[Y.name]then global.satellite_sent[Y.name]=global.satellite_sent[Y.name]+1 else game.set_game_state{game_finished=true,player_won=true,can_continue=true}global.satellite_sent[Y.name]=1 end;for Z,p in pairs(Y.players)do if p.gui.left.rocket_score then p.gui.left.rocket_score.rocket_count.caption=tostring(global.satellite_sent[Y.name])else local A=p.gui.left.add{name="rocket_score",type="frame",direction="horizontal",caption={"score"}}A.add{name="rocket_count_label",type="label",caption={"",{"rockets-sent"},":"}}A.add{name="rocket_count",type="label",caption=tostring(global.satellite_sent[Y.name])}end end end)script.on_event(defines.events.on_tick,function(o)if game.tick/(3600*game.speed)%15==0 then autoMessage()end end)function encode(table,_,a0)local a1;local a2;local a3;for P,a4 in pairs(table)do a3=nil;for P,a5 in pairs(a0)do if type(a4[a5])=="string"then if a3~=nil then a3=a3 ..",\""..a5 .."\": \""..a4[a5].."\""else a3="\""..a5 .."\": \""..a4[a5].."\""end elseif type(a4[a5])=="number"then if a3~=nil then a3=a3 ..",\""..a5 .."\": "..tostring(a4[a5])else a3="\""..a5 .."\": "..tostring(a4[a5])end elseif type(a4[a5])=="boolean"then if a3~=nil then a3=a3 ..",\""..a5 .."\": "..tostring(a4[a5])else a3="\""..a5 .."\": "..tostring(a4[a5])end end end;if a3~=nil and a2~=nil then a2=a2 ..", {"..a3 .."}"else a2="{"..a3 .."}"end end;a1="{".."\"".._.."\": ["..a2 .."]}"return a1 end;addButton("btn_toolbar_playerList",function(p)toggleVisable(p.gui.left.PlayerList)end)addButton("btn_toolbar_rocket_score",function(p)toggleVisable(p.gui.left.rocket_score)end)function drawToolbar(p)local A=p.gui.top;clearElement(A)drawButton(A,"btn_toolbar_playerList","Playerlist","Adds player player list to your game.")drawButton(A,"btn_toolbar_rocket_score","Rocket score","Show the satellite launched counter if player satellite has launched.")for f,a6 in pairs(guis.frames)do if getRank(p).power<=a6[1].require then drawButton(A,"btn_"..f,a6[1].caption,a6[1].tooltip)end end end;function drawPlayerList()for P,p in pairs(game.connected_players)do if p.gui.left.PlayerList==nil then p.gui.left.add{type="frame",name="PlayerList",direction="vertical"}.add{type="scroll-pane",name="PlayerListScroll",direction="vertical",vertical_scroll_policy="always",horizontal_scroll_policy="never"}end;Plist=p.gui.left.PlayerList.PlayerListScroll;clearElement(Plist)Plist.style.maximal_height=200;for P,p in pairs(game.connected_players)do if p.character then if p.tag=='[Jail]'or p.character.active==false then p.character.active=false;p.tag='[Jail]'end end;playerRank=getRank(p)if playerRank.power<=3 then Plist.add{type="label",name=p.name,style="caption_label_style",caption={"",ticktohour(p.online_time)," H - ",p.name,' - '..playerRank.shortHand}}Plist[p.name].style.font_color=playerRank.colour;p.tag=playerRank.tag end end;for P,p in pairs(game.connected_players)do playerRank=getRank(p)if playerRank.power>3 then Plist.add{type="label",name=p.name,style="caption_label_style",caption={"",ticktohour(p.online_time)," H - ",p.name,' - '..playerRank.shortHand}}Plist[p.name].style.font_color=playerRank.colour;p.tag=playerRank.tag end end end end;addButton('goto',function(p,A)local a7=game.players[A.parent.name]p.teleport(game.surfaces[a7.surface.name].find_non_colliding_position("player",a7.position,32,1))end)addButton('bring',function(p,A)local a7=game.players[A.parent.name]a7.teleport(game.surfaces[p.surface.name].find_non_colliding_position("player",p.position,32,1))end)addButton('jail',function(p,A)local a7=game.players[A.parent.name]if a7.character then if a7.character.active then a7.character.active=false;a7.tag='[Jail]'drawPlayerList()else a7.character.active=true;a7.tag='[Guest]'drawPlayerList()end end end)addButton('kill',function(p,A)local a7=game.players[A.parent.name]if a7.character then a7.character.die()end end)function drawPlayerTable(p,A,T,S)A.add{name='playerTable',type="table",colspan=5}A.playerTable.style.minimal_width=500;A.playerTable.style.maximal_width=500;A.playerTable.style.horizontal_spacing=10;A.playerTable.add{name="id",type="label",caption="Id "}A.playerTable.add{name="name",type="label",caption="Name "}if not T then A.playerTable.add{name="status",type="label",caption="Status "}end;A.playerTable.add{name="online_time",type="label",caption="Online Time "}A.playerTable.add{name="rank",type="label",caption="Rank "}if T then A.playerTable.add{name="commands",type="label",caption="Commands"}end;for P,a7 in pairs(game.players)do local a8=true;for f,a9 in pairs(S)do if a9=='admin'then if a7.admin==false then a8=false;break end elseif a9=='online'then if a7.connected==false then a8=false;break end elseif a9=='offline'then if a7.connected==true then a8=false;break end elseif type(a9)=='number'then if a9>ticktominutes(a7.online_time)then a8=false;break end elseif type(a9)=='string'then if a7.name:lower():find(a9:lower())==nil then a8=false;break end end end;if a8==true and p.name~=a7.name then if A.playerTable[a7.name]==nil then A.playerTable.add{name=P.."id",type="label",caption=P}A.playerTable.add{name=a7.name..'_name',type="label",caption=a7.name}if not T then if a7.connected==true then A.playerTable.add{name=a7.name.."Status",type="label",caption="ONLINE"}else A.playerTable.add{name=a7.name.."Status",type="label",caption="OFFLINE"}end end;A.playerTable.add{name=a7.name.."Online_Time",type="label",caption=ticktohour(a7.online_time)..'H '..ticktominutes(a7.online_time)-60*ticktohour(a7.online_time)..'M'}A.playerTable.add{name=a7.name.."Rank",type="label",caption=a7.tag}if T then A.playerTable.add{name=a7.name,type="flow"}drawButton(A.playerTable[a7.name],'goto','Tp','Goto to the players location')drawButton(A.playerTable[a7.name],'bring','Br','Bring player player to your location')if a7.tag=='[Owner]'or a7.tag=='[Developer]'or a7.tag=='[Com Mngr]'then else drawButton(A.playerTable[a7.name],'jail','Ja','Jail/Unjail player player')drawButton(A.playerTable[a7.name],'kill','Ki','Kill this player')end end end end end end;addFrame('Readme',6,'Rules','Readme','Rules, Server info, How to chat, Playerlist, Adminlist.')addTab('Readme','Rules','The rules of the server',function(p,A)local aa={"Hacking/cheating, exploiting and abusing bugs is not allowed.","Do not disrespect any player in the server (This includes staff).","Do not spam, this includes stuff such as chat spam, item spam, chest spam etc.","Do not laydown concrete with bots without permission.","Do not use active provider chests without permission.","Do not remove/move major parts of the factory without permission.","Do not walk in player random direction for no reason(to save map size).","Do not remove stuff just because you don't like it, tell people first.","Do not make train roundabouts.","Trains are Left Hand Drive (LHD) only.","Do not complain about lag, low fps and low ups or other things like that.","Do not ask for rank.","Use common sense and what an admin says goes."}for P,ab in pairs(aa)do A.add{name=P,type="label",caption={"",P,". ",ab}}end end)addTab('Readme','Server Info','Info about the server',function(p,A)A.add{name=1,type="label",caption={"","Discord voice and chat server:"}}A.add{name=2,type='textfield',text='https://discord.gg/RPCxzgt'}.style.minimal_width=400;A.add{name=3,type="label",caption={"","Our forum:"}}A.add{name=4,type='textfield',text='https://explosivegaming.nl'}.style.minimal_width=400;A.add{name=5,type="label",caption={"","Steam:"}}A.add{name=6,type='textfield',text='http://steamcommunity.com/groups/tntexplosivegaming'}.style.minimal_width=400 end)addTab('Readme','How to chat','Just in case you dont know how to chat',function(p,A)local ac={"Chatting for new players can be difficult because its different than other games!","Its very simple, the button you need to press is the “GRAVE/TILDE key”","its located under the “ESC key”. If you would like to change the key go to your","controls tab in options. The key you need to change is “Toggle Lua console”","its located in the second column 2nd from bottom."}for P,ad in pairs(ac)do A.add{name=P,type="label",caption={"",ad}}end end)addTab('Readme','Admins','List of all the people who can ban you :P',function(p,A)local ae={"This list contains all the people that are admin in this world. Do you want to become","an admin dont ask for it! an admin will see what you've made and the time you put","in the server."}for P,ad in pairs(ae)do A.add{name=P,type="label",caption={"",ad}}end;drawPlayerTable(p,A,false,{'admin'})end)addTab('Readme','Players','List of all the people who have been on the server',function(p,A)local af={"These are the players who have supported us in the making of this factory. Without","you the player we wouldn't have been as far as we are now."}for P,ad in pairs(af)do A.add{name=P,type="label",caption={"",ad}}end;A.add{name='filterTable',type='table',colspan=3}A.filterTable.add{name='name_label',type='label',caption='Name'}A.filterTable.add{name='status_label',type='label',caption='Online?'}A.filterTable.add{name='hours_label',type='label',caption='Online Time (minutes)'}A.filterTable.add{name='name_input',type='textfield'}A.filterTable.add{name='status_input',type='textfield'}A.filterTable.add{name='hours_input',type='textfield'}drawPlayerTable(p,A,false,{})end)addFrame('Admin',2,'Modifiers','Admin',"All admin fuctions are here")addButton('btn_toolbar_automessage',function()autoMessage()end)addButton('revive_dead_entitys',function(p,A)for ag,g in pairs(game.surfaces[1].find_entities_filtered({type="entity-ghost"}))do g.revive()end end)addButton('revive_dead_entitys_range',function(p,A)if tonumber(A.parent.range.text)then local ah=tonumber(A.parent.range.text)for ag,g in pairs(game.surfaces[1].find_entities_filtered({area={{p.position.x-ah,p.position.y-ah},{p.position.x+ah,p.position.y+ah}},type="entity-ghost"}))do g.revive()end end end)addButton('remove_biters',function(p,A)for ag,g in pairs(game.surfaces[1].find_entities_filtered({force='enemy'}))do g.destroy()end end)addButton('tp_all',function(p,A)for P,a7 in pairs(game.connected_players)do local ai=game.surfaces[p.surface.name].find_non_colliding_position("player",p.position,32,1)if a7~=p then a7.teleport(ai)end end end)addButton('toggle_cheat',function(p,A)p.cheat_mode=not p.cheat_mode end)addButton('add_dev_items',function(p,A)p.insert{name="deconstruction-planner",count=1}p.insert{name="blueprint-book",count=1}p.insert{name="blueprint",count=20}end)addButton("btn_Modifier_apply",function(p,A)local aj={"manual_mining_speed_modifier","manual_crafting_speed_modifier","character_running_speed_modifier","worker_robots_speed_modifier","worker_robots_storage_bonus","character_build_distance_bonus","character_item_drop_distance_bonus","character_reach_distance_bonus","character_resource_reach_distance_bonus","character_item_pickup_distance_bonus","character_loot_pickup_distance_bonus"}for P,ak in pairs(aj)do local al=tonumber(A.parent.parent.modifierTable[ak.."_input"].text:match("[%d]+[.%d+]"))if al~=nil then if al>=0 and al<50 and al~=p.force[ak]then p.force[ak]=al;p.print(ak.." changed to number: "..tostring(al))elseif al==p.force[ak]then p.print(ak.." Did not change")else p.print(ak.." needs to be player higher number or it contains an letter")end end end end)addTab('Admin','Commands','Random useful commands',function(p,A)drawButton(A,'btn_toolbar_automessage','Auto Message','Send the auto message to all online players')drawButton(A,'add_dev_items','Get Blueprints','Get all the blueprints')drawButton(A,'revive_dead_entitys','Revive All Entitys','Brings all dead machines back to life')drawButton(A,'revive_dead_entitys_range','Revive Entitys','Brings all dead machines back to life in player range')A.add{type='textfield',name='range',text='Range'}drawButton(A,'remove_biters','Kill Biters','Removes all biters in map')drawButton(A,'tp_all','TP All Here','Brings all players to you')drawButton(A,'toggle_cheat','Toggle Cheat Mode','Toggle your cheat mode')end)addTab('Admin','Modifiers','Edit in game modifiers',function(p,A)local aj={"manual_mining_speed_modifier","manual_crafting_speed_modifier","character_running_speed_modifier","worker_robots_speed_modifier","worker_robots_storage_bonus","character_build_distance_bonus","character_item_drop_distance_bonus","character_reach_distance_bonus","character_resource_reach_distance_bonus","character_item_pickup_distance_bonus","character_loot_pickup_distance_bonus"}A.add{type="flow",name="flowNavigation",direction="horizontal"}A.add{name="modifierTable",type="table",colspan=3}A.modifierTable.add{name="name",type="label",caption="name"}A.modifierTable.add{name="input",type="label",caption="input"}A.modifierTable.add{name="current",type="label",caption="current"}for P,ak in pairs(aj)do A.modifierTable.add{name=ak,type="label",caption=ak}A.modifierTable.add{name=ak.."_input",type="textfield",caption="inputTextField"}A.modifierTable.add{name=ak.."_current",type="label",caption=tostring(p.force[ak])}end;drawButton(A.flowNavigation,"btn_Modifier_apply","Apply","Apply the new values to the game")end)addTab('Admin','Player List','Send player message to all players',function(p,A)A.add{name='filterTable',type='table',colspan=2}A.filterTable.add{name='name_label',type='label',caption='Name'}A.filterTable.add{name='hours_label',type='label',caption='Online Time (minutes)'}A.filterTable.add{name='name_input',type='textfield'}A.filterTable.add{name='hours_input',type='textfield'}drawPlayerTable(p,A,true,{'online'})end)