Likewise for PlayerResources
This commit is contained in:
@@ -21,7 +21,40 @@ namespace OpenRA.Traits
|
||||
|
||||
public object Create(ActorInitializer init) { return new PlayerResources(init.self, this); }
|
||||
}
|
||||
|
||||
|
||||
public class DebugResourceCashInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new DebugResourceCash(init.self); }
|
||||
}
|
||||
public class DebugResourceCash
|
||||
{
|
||||
readonly Actor self;
|
||||
public DebugResourceCash(Actor self){this.self = self;}
|
||||
[Sync] public int foo { get { return self.Trait<PlayerResources>().Cash; } }
|
||||
}
|
||||
|
||||
public class DebugResourceOreInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new DebugResourceOre(init.self); }
|
||||
}
|
||||
public class DebugResourceOre
|
||||
{
|
||||
readonly Actor self;
|
||||
public DebugResourceOre(Actor self){this.self = self;}
|
||||
[Sync] public int foo { get { return self.Trait<PlayerResources>().Ore; } }
|
||||
}
|
||||
|
||||
public class DebugResourceOreCapacityInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new DebugResourceOreCapacity(init.self); }
|
||||
}
|
||||
public class DebugResourceOreCapacity
|
||||
{
|
||||
readonly Actor self;
|
||||
public DebugResourceOreCapacity(Actor self){this.self = self;}
|
||||
[Sync] public int foo { get { return self.Trait<PlayerResources>().OreCapacity; } }
|
||||
}
|
||||
|
||||
public class PlayerResources : ITick
|
||||
{
|
||||
readonly Player Owner;
|
||||
|
||||
@@ -85,6 +85,9 @@ Player:
|
||||
PlayerColorPalette:
|
||||
BasePalette: terrain
|
||||
SurrenderOnDisconnect:
|
||||
DebugResourceCash:
|
||||
DebugResourceOre:
|
||||
DebugResourceOreCapacity:
|
||||
|
||||
World:
|
||||
OpenWidgetAtGameStart:
|
||||
|
||||
Reference in New Issue
Block a user