Another Merchant gameplay attempt (#1308)
* setup UI * setup debug data * graph control setup * reputation trade component * unlocking logic * smoe real reputation costing * remove sponsors part, add trading specific UI nodes * port to default pricing system * buy cooldown * fuck off trading cabinets * real good cooldown UI * Cool unlock sound * reputation earning * cool purchare sound * coin & sprite work * delete old guidebooks * cool purcharing VFX * better ui * victoria gardens * Update migration.yml * Update migration.yml * cooldown removed * contracts * Update migration.yml * remove CP14Material * materials appraise * food appraise * auto economy pricing system * alchemy reagents appraise * coins resprite * alchemy appraise 2 * modular weapon appraise * selling platform * Update PricingSystem.cs * Update CP14TradingPlatformSystem.cs * merchants returns + map update * Update CP14StationEconomySystem.Price.cs
This commit is contained in:
@@ -112,6 +112,24 @@ public abstract class SharedCP14MagicEnergySystem : EntitySystem
|
||||
UpdateMagicAlert((ent, ent.Comp));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set energy to 0
|
||||
/// </summary>
|
||||
public void ClearEnergy(Entity<CP14MagicEnergyContainerComponent?> ent)
|
||||
{
|
||||
if (!Resolve(ent, ref ent.Comp, false))
|
||||
return;
|
||||
|
||||
var oldEnergy = ent.Comp.Energy;
|
||||
|
||||
ent.Comp.Energy = 0;
|
||||
|
||||
if (oldEnergy != 0)
|
||||
RaiseLocalEvent(ent, new CP14MagicEnergyLevelChangeEvent(oldEnergy, 0, ent.Comp.MaxEnergy));
|
||||
|
||||
UpdateMagicAlert((ent, ent.Comp));
|
||||
}
|
||||
|
||||
public void TransferEnergy(Entity<CP14MagicEnergyContainerComponent?> sender,
|
||||
Entity<CP14MagicEnergyContainerComponent?> receiver,
|
||||
FixedPoint2 energy,
|
||||
|
||||
Reference in New Issue
Block a user