Replacement entities for the remaining houses other than Romans (to allow variations), and switching of resource pool to localPlayer, which should hopefully now mean player resources are maintained across a hosted game (haven't tested it yet).
This was SVN commit r2074.
This commit is contained in:
parent
3c99f0f2eb
commit
d60fc60a69
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="celt_ho_1" Parent="ho">
|
||||
<Entity Tag="celt_ho" Parent="ho">
|
||||
<Traits>
|
||||
<Id
|
||||
civ_code="celt"
|
||||
@ -11,5 +11,5 @@
|
||||
history="Celts generally lived in round stone or wattle and daub walled structures with thatched roof."
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/celt_ho_a.xml</Actor>
|
||||
<Actor>structures/celt_ho.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="celt_ho_2" Parent="celt_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/celt_ho_b.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="celt_ho_3" Parent="celt_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/celt_ho_c.xml</Actor>
|
||||
</Entity>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="hele_ho_1" Parent="ho">
|
||||
<Entity Tag="hele_ho" Parent="ho">
|
||||
<Traits>
|
||||
<Id
|
||||
civ_code="hele"
|
||||
@ -11,5 +11,5 @@
|
||||
history="Hellenic houses from the Classical Age were generally humble yet stylish. During the Hellenistic Age, however, luxurious palaces and estates became commonplace in the rich Hellenistic metropolises like Antioch, Alexandria and Seleucia."
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/hele_ho_a.xml</Actor>
|
||||
<Actor>structures/hele_ho.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="hele_ho_2" Parent="hele_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/hele_ho_b.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="hele_ho_3" Parent="hele_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/hele_ho_c.xml</Actor>
|
||||
</Entity>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="kart_ho_1" Parent="ho">
|
||||
<Entity Tag="kart_ho" Parent="ho">
|
||||
<Traits>
|
||||
<Id
|
||||
civ_code="kart"
|
||||
@ -11,5 +11,5 @@
|
||||
history="Housing was generally built of ‘adobe’ or sandstone then plastered with stucco. Flat roofs predominate, few windows, arched doorways in evidence, kind of a blend of Achaemenian and Mediterranean styles with some tiled roofs. In the biggest cities, especially Carthage and such as Utica, housing was in flat-roofed structures rising as high as 6 and 7 stories (two-storied would be sufficient)."
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/kart_ho_a.xml</Actor>
|
||||
<Actor>structures/kart_ho.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="kart_ho_2" Parent="kart_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/kart_ho_b.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="kart_ho_3" Parent="kart_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/kart_ho_c.xml</Actor>
|
||||
</Entity>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="pers_ho_1" Parent="ho">
|
||||
<Entity Tag="pers_ho" Parent="ho">
|
||||
<Traits>
|
||||
<Id
|
||||
civ_code="pers"
|
||||
@ -11,5 +11,5 @@
|
||||
history="Apart from the Great King and his close relatives, the satraps resided in splendid spacious residences, which included palaces, pavilions and gardens."
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/pers_ho_a.xml</Actor>
|
||||
<Actor>structures/pers_ho.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="pers_ho_2" Parent="pers_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/pers_ho_b.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="pers_ho_3" Parent="pers_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/pers_ho_c.xml</Actor>
|
||||
</Entity>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="rome_ho_1" Parent="ho">
|
||||
<Entity Tag="rome_ho" Parent="ho">
|
||||
<Traits>
|
||||
<Id
|
||||
civ_code="rome"
|
||||
@ -11,5 +11,5 @@
|
||||
history="The early Atrium initially included one big room with a fireplace in the middle. A garden by the house was later included under Hellenistic influence."
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/rome_ho_a.xml</Actor>
|
||||
<Actor>structures/rome_ho.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="rome_ho_2" Parent="rome_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/rome_ho_b.xml</Actor>
|
||||
</Entity>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
|
||||
<Entity Tag="rome_ho_3" Parent="rome_ho_1">
|
||||
<Traits>
|
||||
<Id
|
||||
/>
|
||||
</Traits>
|
||||
<Actor>structures/rome_ho_c.xml</Actor>
|
||||
</Entity>
|
@ -104,15 +104,15 @@ function setupSession()
|
||||
// For example, create the resource types.
|
||||
// Initialise Resource Pools by attaching them to the Player object.
|
||||
// (CPlayer code takes care of giving a copy to each player.)
|
||||
player = new Object(); // I shouldn't need to do this. Need to find the existing Player to add these to.
|
||||
player.resource = new Object();
|
||||
player.resource.food = 0;
|
||||
player.resource.wood = 0;
|
||||
player.resource.stone = 0;
|
||||
player.resource.ore = 0;
|
||||
player.resource.pop = new Object();
|
||||
player.resource.pop.curr = 0;
|
||||
player.resource.pop.housing = 0;
|
||||
// player = new Object(); // I shouldn't need to do this. Need to find the existing Player to add these to.
|
||||
localPlayer.resource = new Object();
|
||||
localPlayer.resource.food = 0;
|
||||
localPlayer.resource.wood = 0;
|
||||
localPlayer.resource.stone = 0;
|
||||
localPlayer.resource.ore = 0;
|
||||
localPlayer.resource.pop = new Object();
|
||||
localPlayer.resource.pop.curr = 0;
|
||||
localPlayer.resource.pop.housing = 0;
|
||||
|
||||
// Start refreshing the session controls.
|
||||
setInterval( getObjectInfo, 1, 1000 );
|
||||
|
@ -52,16 +52,16 @@ function GiveResources(resourceName, resourceQty)
|
||||
switch (resourceName)
|
||||
{
|
||||
case "Food":
|
||||
player.resource.food += resourceQty;
|
||||
localPlayer.resource.food += resourceQty;
|
||||
break;
|
||||
case "Wood":
|
||||
player.resource.wood += resourceQty;
|
||||
localPlayer.resource.wood += resourceQty;
|
||||
break;
|
||||
case "Stone":
|
||||
player.resource.stone += resourceQty;
|
||||
localPlayer.resource.stone += resourceQty;
|
||||
break;
|
||||
case "Ore":
|
||||
player.resource.ore += resourceQty;
|
||||
localPlayer.resource.ore += resourceQty;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -74,9 +74,9 @@ function GiveResources(resourceName, resourceQty)
|
||||
|
||||
function UpdateResourcePool()
|
||||
{
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_FOOD").caption = player.resource.food;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_WOOD").caption = player.resource.wood;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_STONE").caption = player.resource.stone;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_ORE").caption = player.resource.ore;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_POPULATION").caption = player.resource.pop.curr + "/" + player.resource.pop.housing;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_FOOD").caption = localPlayer.resource.food;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_WOOD").caption = localPlayer.resource.wood;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_STONE").caption = localPlayer.resource.stone;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_ORE").caption = localPlayer.resource.ore;
|
||||
getGUIObjectByName("SN_RESOURCE_COUNTER_POPULATION").caption = localPlayer.resource.pop.curr + "/" + localPlayer.resource.pop.housing;
|
||||
}
|
Loading…
Reference in New Issue
Block a user