EntityUid? actionId;
// I guess we just allow duplicate actions?
// Allow duplicate actions and just have a single list buy for the buy-once ones.
- if (!_mind.TryGetMind(buyer, out var mind, out _))
+ if (listing.ApplyToMob || !_mind.TryGetMind(buyer, out var mind, out _))
actionId = _actions.AddAction(buyer, listing.ProductAction);
else
actionId = _actionContainer.AddAction(mind, listing.ProductAction);
other.OriginalCost,
other.RestockTime,
other.DiscountDownTo,
- other.DisableRefund
+ other.DisableRefund,
+ other.ApplyToMob
)
{
IReadOnlyDictionary<ProtoId<CurrencyPrototype>, FixedPoint2> originalCost,
TimeSpan restockTime,
Dictionary<ProtoId<CurrencyPrototype>, FixedPoint2> dataDiscountDownTo,
- bool disableRefund
+ bool disableRefund,
+ bool applyToMob
)
{
Name = name;
RestockTime = restockTime;
DiscountDownTo = new Dictionary<ProtoId<CurrencyPrototype>, FixedPoint2>(dataDiscountDownTo);
DisableRefund = disableRefund;
+ ApplyToMob = applyToMob;
}
[ViewVariables]
[DataField]
public bool DisableRefund = false;
+ /// <summary>
+ /// Whether or not to apply the store listing to the player mob rather than the player mind.
+ /// </summary>
+ [DataField]
+ public bool ApplyToMob = false;
+
public bool Equals(ListingData? listing)
{
if (listing == null)
ProductEntity != listing.ProductEntity ||
ProductAction != listing.ProductAction ||
ProductEvent?.GetType() != listing.ProductEvent?.GetType() ||
- RestockTime != listing.RestockTime)
+ RestockTime != listing.RestockTime ||
+ DisableRefund != listing.DisableRefund ||
+ ApplyToMob != listing.ApplyToMob)
return false;
if (Icon != null && !Icon.Equals(listing.Icon))
listingData.OriginalCost,
listingData.RestockTime,
listingData.DiscountDownTo,
- listingData.DisableRefund
+ listingData.DisableRefund,
+ listingData.ApplyToMob
)
{
}
--- /dev/null
+changeling-arm-blade-name = Retractable Arm Blade
+changeling-arm-blade-desc = Transform your arm into a terrifying flesh blade. Can be toggled.
store-currency-display-stolen-essence = Stolen Essence
store-currency-display-silicon-memory = Memory
store-currency-display-wizcoin = Wiz€oin™
+store-currency-display-dna = DNA
store-preset-name-uplink = Uplink
store-preset-name-spellbook = Spellbook
+store-preset-name-changeling = DNA Store
icon: { sprite : Interface/Actions/changeling.rsi, state: "transform" }
- type: InstantAction
event: !type:ChangelingTransformActionEvent
+
+- type: entity
+ parent: ActionIntrinsicStore
+ id: ActionChangelingStore
+ name: DNA Store
+ description: Opens the ability store.
--- /dev/null
+# Abilities
+
+- type: listing
+ id: ChangelingArmBlade
+ name: changeling-arm-blade-name
+ description: changeling-arm-blade-desc
+ productAction: ActionRetractableItemArmBlade
+ applyToMob: true
+ cost:
+ ChangelingDNA: 25
+ categories:
+ - ChangelingAbilities
+ conditions:
+ - !type:ListingLimitedStockCondition
+ stock: 1
- type: entity
- parent: MobHuman
+ parent: [ MobHuman, StorePresetChangeling ]
id: MobLing
name: Urist McLing
suffix: Non-Antag
- type: ChangelingTransform
- type: ActionGrant
actions:
- - ActionRetractableItemArmBlade # Temporary addition, will inevitably be a purchasable in the bio-store
+ - ActionChangelingStore
+ - type: Store
+ balance:
+ ChangelingDNA: 50
+ - type: UserInterface
+ interfaces:
+ enum.StoreUiKey.Key:
+ type: StoreBoundUserInterface
+ requireInputValidation: false
- type: ChangelingTransform
- type: ActionGrant
actions:
- - ActionRetractableItemArmBlade # Temporary addition, will inevitably be a purchasable in the bio-store
+ - ActionChangelingStore
+ # TODO: Make it so the changeling gamerule changeling can inherit from the changeling store preset somehow
+ - type: Store
+ name: store-preset-name-changeling
+ categories:
+ - ChangelingAbilities
+ currencyWhitelist:
+ - ChangelingDNA
+ balance:
+ ChangelingDNA: 50
+ - type: UserInterface
+ interfaces:
+ enum.StoreUiKey.Key:
+ type: StoreBoundUserInterface
+ requireInputValidation: false
mindRoles:
- MindRoleChangeling
- type: AntagObjectives
id: PAIAbilities
name: store-category-abilities
+#changeling
+#todo: add actual categories when changeling design/abilities are fleshed out
+- type: storeCategory
+ id: ChangelingAbilities
+ name: store-category-abilities
+
- type: storeCategory
id: DiscountedItems
name: store-discounted-items
displayName: store-currency-display-wizcoin
canWithdraw: false
+- type: currency
+ id: ChangelingDNA
+ displayName: store-currency-display-dna
+ canWithdraw: false
+
#debug
- type: currency
id: DebugDollar
- SpellbookEvents #Summon Weapons, Summon Ghosts
currencyWhitelist:
- WizCoin
+
+- type: entity
+ id: StorePresetChangeling
+ abstract: true
+ components:
+ - type: Store
+ name: store-preset-name-changeling
+ categories:
+ - ChangelingAbilities
+ currencyWhitelist:
+ - ChangelingDNA