Created
January 4, 2021 21:09
-
-
Save ktemkin/6d1ea9781fcdcb3db8f3dbd2c0feb59f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Get the basic systems we'll want to work with. | |
player = Game.GetPlayer() | |
scriptables = Game.GetScriptableSystemsContainer() | |
transaction = Game.GetTransactionSystem() | |
equipment = scriptables:Get(CName.new("EquipmentSystem")) | |
-- Get data for the player. | |
player_data = equipment:GetPlayerData(player) | |
-- Hack: we need the second internal entry with the same name; so we'll create our own entry pointing to the new function. | |
-- This feels _great_, doesn't it? | |
player_data['GetNovaStuff'] = player_data['GetItemInEquipSlot;gamedataEquipmentAreaInt32'] | |
-- Try to grab the arm cyberware. | |
item_id = player_data:GetNovaStuff("ArmsCW", 0) | |
-- Remove it. | |
transaction:RemoveItem(player, item_id, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment