Skip to content

Commit

Permalink
Add option to not add item to player ship
Browse files Browse the repository at this point in the history
  • Loading branch information
gmoromisato committed Apr 23, 2016
1 parent a776baf commit 4daa8c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TransCore/RPGCode.xml
Expand Up @@ -34,17 +34,19 @@
)
))

(setq rpgBuyItem (lambda (theObj theItem thePrice theCurrency)
(setq rpgBuyItem (lambda (theObj theItem thePrice theCurrency options)
(block Nil
; Add to player ship
(objAddItem gPlayerShip theItem)
(if (not (@ options 'noAddItem))
(objAddItem gPlayerShip theItem)
)

; Charge the player
(objCharge gPlayerShip theCurrency thePrice)
(plyRecordBuyItem gPlayer theItem theCurrency thePrice)

; Add to station balance
(objCredit gSource theCurrency thePrice)
(objCredit theObj theCurrency thePrice)

; If the player bought items at a black market station then
; increase xp
Expand Down

0 comments on commit 4daa8c0

Please sign in to comment.