Trial a new resource model in cnc
This commit is contained in:
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Deliver(Actor self, Actor proc)
|
||||
{
|
||||
proc.Owner.PlayerActor.traits.Get<PlayerResources>().GiveOre(contents.Sum(kv => kv.Key.ValuePerUnit * kv.Value));
|
||||
proc.traits.Get<IAcceptOre>().GiveOre(contents.Sum(kv => kv.Key.ValuePerUnit * kv.Value));
|
||||
contents.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,11 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
this.self = self;
|
||||
}
|
||||
|
||||
public void GiveOre(int amount)
|
||||
{
|
||||
// TODO: Unbreak this
|
||||
}
|
||||
public int2 DeliverOffset { get { return new int2(1, 2); } }
|
||||
public void OnDock(Actor harv, DeliverResources dockOrder)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||
* This file is part of OpenRA.
|
||||
@@ -25,6 +25,7 @@ namespace OpenRA.Mods.RA
|
||||
public interface IAcceptOre
|
||||
{
|
||||
void OnDock(Actor harv, DeliverResources dockOrder);
|
||||
void GiveOre(int amount);
|
||||
int2 DeliverOffset { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user