diff options
Diffstat (limited to 'scenes/stockticker/stonks.gd')
-rw-r--r-- | scenes/stockticker/stonks.gd | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scenes/stockticker/stonks.gd b/scenes/stockticker/stonks.gd index 96ea000..d921282 100644 --- a/scenes/stockticker/stonks.gd +++ b/scenes/stockticker/stonks.gd @@ -1,6 +1,7 @@ extends Node2D -signal transaction(amount: float) +signal buy(amount) +signal sell(amount) const MAX_PRICES = 15 @@ -19,7 +20,7 @@ var darksouls_text: Label var price_history = [] var base_pos_mult = 0.5 # no size limit -var base_neg_mult = 0.5 # probably keep this below 1 +var base_neg_mult = 100.5 # probably keep this below 1 var hype_mult = 1.0 var hype_decr = 0.1 @@ -160,7 +161,7 @@ func _on_buy_button_button_up() -> void: shares += 1 shares_label.text = "Shares\nHeld:%d" % shares hype_mult += hype_inc - transaction.emit(-prev_price) + buy.emit(prev_price) func _on_sell_button_button_up() -> void: @@ -168,4 +169,4 @@ func _on_sell_button_button_up() -> void: shares -= 1 shares_label.text = "Shares\nHeld:%d" % shares panic_mult += panic_inc - transaction.emit(prev_price) + sell.emit(prev_price) |