Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- territoryPointType = {
- strategic = 1,
- fuel = 2,
- munition = 3,
- victory = 4,
- }
- _territory_point_blueprints = {
- {blueprint = BP_GetEntityBlueprint("territory_point_mp"), type = territoryPointType.strategic},
- {blueprint = BP_GetEntityBlueprint("territory_fuel_point_mp"), type = territoryPointType.fuel},
- {blueprint = BP_GetEntityBlueprint("territory_munitions_point_mp"), type = territoryPointType.munition},
- {blueprint = BP_GetEntityBlueprint("victory_point"), type = territoryPointType.victory},
- }
- TerritoryPoints = {}
- _PopCapSystemConfig = {
- default_basepop = {
- [0] = 35,
- [1] = 40,
- },
- grant_per_point = {
- -- strategic
- [1] = {
- [0] = 6,
- [1] = 7,
- },
- -- fuel
- [2] = {
- [0] = 12,
- [1] = 16,
- },
- -- muni
- [3] = {
- [0] = 12,
- [1] = 16,
- },
- -- victory
- [4] = {
- [0] = 4,
- [1] = 5,
- },
- },
- }
- for i = 1, World_GetPlayerCount() do
- local player = World_GetPlayerAt(i)
- Player_SetPopCapOverride(player, _PopCapSystemConfig.default_basepop[Player_GetRace(player)])
- end
- for index = 0, World_GetNumEntities() -1 do
- local entity = World_GetEntity(index)
- if Entity_IsOfType(entity, "strategic_node") then
- local _blueprint = Entity_GetBlueprint(entity)
- local _type
- for key, item in ipairs(_territory_point_blueprints) do
- if _blueprint == item.blueprint then
- _type = item.type
- end
- end
- local _territory_point = {
- worldID = Entity_GetGameID(entity),
- blueprint = _blueprint,
- type = _type,
- owner = "world",
- granted = false,
- }
- table.insert(TerritoryPoints, _territory_point)
- end
- end
- Rule_Add(Monitor_TerritorySectors)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement