Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Market.js
Show All 15 Lines | Market.prototype.Schema = | ||||
"</element>"; | "</element>"; | ||||
Market.prototype.Init = function() | Market.prototype.Init = function() | ||||
{ | { | ||||
this.traders = new Set(); // list of traders with a route on this market | this.traders = new Set(); // list of traders with a route on this market | ||||
this.tradeType = new Set(this.template.TradeType.split(/\s+/)); | this.tradeType = new Set(this.template.TradeType.split(/\s+/)); | ||||
}; | }; | ||||
Market.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
warn("Market.Update: not implemented"); | |||||
}; | |||||
Market.prototype.AddTrader = function(ent) | Market.prototype.AddTrader = function(ent) | ||||
{ | { | ||||
this.traders.add(ent); | this.traders.add(ent); | ||||
}; | }; | ||||
Market.prototype.RemoveTrader = function(ent) | Market.prototype.RemoveTrader = function(ent) | ||||
{ | { | ||||
this.traders.delete(ent); | this.traders.delete(ent); | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator