feat: rename game to ModBison and currency to Buffalo Chips
checkpoint / checkpoint (push) Successful in 5m56s

This commit is contained in:
2026-09-17 18:29:48 +00:00
parent e05e18c384
commit aa5f945287
9 changed files with 44 additions and 44 deletions
+3 -3
View File
@@ -87,11 +87,11 @@ class PayoutService:
"""Create a new payout request after reserving funds from available creator balance.""" """Create a new payout request after reserving funds from available creator balance."""
if amount < MIN_PAYOUT_AMOUNT: if amount < MIN_PAYOUT_AMOUNT:
raise InvalidPayoutAmountError( raise InvalidPayoutAmountError(
f"Minimum payout amount is {MIN_PAYOUT_AMOUNT} Credits" f"Minimum payout amount is {MIN_PAYOUT_AMOUNT} Buffalo Chips"
) )
if amount > MAX_PAYOUT_AMOUNT: if amount > MAX_PAYOUT_AMOUNT:
raise InvalidPayoutAmountError( raise InvalidPayoutAmountError(
f"Maximum payout amount is {MAX_PAYOUT_AMOUNT} Credits" f"Maximum payout amount is {MAX_PAYOUT_AMOUNT} Buffalo Chips"
) )
requester = requested_by if requested_by is not None else creator_id requester = requested_by if requested_by is not None else creator_id
@@ -100,7 +100,7 @@ class PayoutService:
cb = await PurchaseService.get_or_create_creator_balance(db, creator_id, for_update=True) cb = await PurchaseService.get_or_create_creator_balance(db, creator_id, for_update=True)
if cb.available < amount: if cb.available < amount:
raise InsufficientCreatorBalanceError( raise InsufficientCreatorBalanceError(
f"Insufficient available balance: {cb.available} CR available, {amount} CR requested" f"Insufficient available balance: {cb.available} Buffalo Chips available, {amount} Buffalo Chips requested"
) )
# Reserve funds: move from available to pending # Reserve funds: move from available to pending
+1 -1
View File
@@ -6,7 +6,7 @@ config_version=5
[application] [application]
config/name="AGP-Game" config/name="ModBison"
run/main_scene="res://scenes/main_menu.tscn" run/main_scene="res://scenes/main_menu.tscn"
config/features=PackedStringArray("4.6.2") config/features=PackedStringArray("4.6.2")
agp/api_base_url="http://127.0.0.1:8000" agp/api_base_url="http://127.0.0.1:8000"
+2 -2
View File
@@ -25,7 +25,7 @@ size_flags_horizontal = 4
[node name="TitleLabel" type="Label" parent="CenterContainer/VBoxContainer"] [node name="TitleLabel" type="Label" parent="CenterContainer/VBoxContainer"]
layout_mode = 1 layout_mode = 1
text = "AGP Game" text = "ModBison"
horizontal_alignment = 1 horizontal_alignment = 1
theme_override_font_sizes/font_size = 72 theme_override_font_sizes/font_size = 72
@@ -152,7 +152,7 @@ disabled = true
[node name="WalletButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="WalletButton" type="Button" parent="CenterContainer/VBoxContainer"]
custom_minimum_size = Vector2(340, 38) custom_minimum_size = Vector2(340, 38)
layout_mode = 1 layout_mode = 1
text = "💰 Wallet & Currency" text = "💰 Wallet (Buffalo Chips)"
size_flags_horizontal = 4 size_flags_horizontal = 4
disabled = true disabled = true
+5 -5
View File
@@ -44,7 +44,7 @@ horizontal_alignment = 1
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
theme_override_colors/font_color = Color(1, 0.84, 0, 1) theme_override_colors/font_color = Color(1, 0.84, 0, 1)
text = "Wallet: 0 CR" text = "Wallet: 0 Buffalo Chips"
[node name="RefreshButton" type="Button" parent="VBox/HeaderHBox"] [node name="RefreshButton" type="Button" parent="VBox/HeaderHBox"]
custom_minimum_size = Vector2(100, 36) custom_minimum_size = Vector2(100, 36)
@@ -66,14 +66,14 @@ custom_minimum_size = Vector2(140, 36)
layout_mode = 2 layout_mode = 2
[node name="MinPriceEdit" type="LineEdit" parent="VBox/FilterBar"] [node name="MinPriceEdit" type="LineEdit" parent="VBox/FilterBar"]
custom_minimum_size = Vector2(90, 36) custom_minimum_size = Vector2(110, 36)
layout_mode = 2 layout_mode = 2
placeholder_text = "Min CR" placeholder_text = "Min Chips"
[node name="MaxPriceEdit" type="LineEdit" parent="VBox/FilterBar"] [node name="MaxPriceEdit" type="LineEdit" parent="VBox/FilterBar"]
custom_minimum_size = Vector2(90, 36) custom_minimum_size = Vector2(110, 36)
layout_mode = 2 layout_mode = 2
placeholder_text = "Max CR" placeholder_text = "Max Chips"
[node name="SearchBtn" type="Button" parent="VBox/FilterBar"] [node name="SearchBtn" type="Button" parent="VBox/FilterBar"]
custom_minimum_size = Vector2(90, 36) custom_minimum_size = Vector2(90, 36)
+5 -5
View File
@@ -86,7 +86,7 @@ placeholder_text = "Description..."
[node name="PriceInput" type="LineEdit" parent="VBox/TabContainer/Selling/VBox/CreateListingBox"] [node name="PriceInput" type="LineEdit" parent="VBox/TabContainer/Selling/VBox/CreateListingBox"]
custom_minimum_size = Vector2(90, 36) custom_minimum_size = Vector2(90, 36)
layout_mode = 2 layout_mode = 2
placeholder_text = "Price (CR)" placeholder_text = "Price (Buffalo Chips)"
[node name="CreateBtn" type="Button" parent="VBox/TabContainer/Selling/VBox/CreateListingBox"] [node name="CreateBtn" type="Button" parent="VBox/TabContainer/Selling/VBox/CreateListingBox"]
custom_minimum_size = Vector2(110, 36) custom_minimum_size = Vector2(110, 36)
@@ -141,7 +141,7 @@ text = "Available to Payout:"
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
theme_override_colors/font_color = Color(0.2, 0.9, 0.2, 1) theme_override_colors/font_color = Color(0.2, 0.9, 0.2, 1)
text = "0 CR" text = "0 Buffalo Chips"
[node name="PendTitle" type="Label" parent="VBox/TabContainer/Payouts/VBox/BalanceCard/Margin/HBox"] [node name="PendTitle" type="Label" parent="VBox/TabContainer/Payouts/VBox/BalanceCard/Margin/HBox"]
layout_mode = 2 layout_mode = 2
@@ -151,7 +151,7 @@ text = "In Escrow:"
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
theme_override_colors/font_color = Color(1, 0.8, 0.2, 1) theme_override_colors/font_color = Color(1, 0.8, 0.2, 1)
text = "0 CR" text = "0 Buffalo Chips"
[node name="LifeTitle" type="Label" parent="VBox/TabContainer/Payouts/VBox/BalanceCard/Margin/HBox"] [node name="LifeTitle" type="Label" parent="VBox/TabContainer/Payouts/VBox/BalanceCard/Margin/HBox"]
layout_mode = 2 layout_mode = 2
@@ -161,7 +161,7 @@ text = "Lifetime Earned:"
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
theme_override_colors/font_color = Color(0.4, 0.7, 1, 1) theme_override_colors/font_color = Color(0.4, 0.7, 1, 1)
text = "0 CR" text = "0 Buffalo Chips"
[node name="RequestBox" type="HBoxContainer" parent="VBox/TabContainer/Payouts/VBox"] [node name="RequestBox" type="HBoxContainer" parent="VBox/TabContainer/Payouts/VBox"]
layout_mode = 2 layout_mode = 2
@@ -170,7 +170,7 @@ theme_override_constants/separation = 8
[node name="AmountInput" type="LineEdit" parent="VBox/TabContainer/Payouts/VBox/RequestBox"] [node name="AmountInput" type="LineEdit" parent="VBox/TabContainer/Payouts/VBox/RequestBox"]
custom_minimum_size = Vector2(130, 36) custom_minimum_size = Vector2(130, 36)
layout_mode = 2 layout_mode = 2
placeholder_text = "Amount (min 100)" placeholder_text = "Buffalo Chips (min 100)"
[node name="DestInput" type="LineEdit" parent="VBox/TabContainer/Payouts/VBox/RequestBox"] [node name="DestInput" type="LineEdit" parent="VBox/TabContainer/Payouts/VBox/RequestBox"]
custom_minimum_size = Vector2(220, 36) custom_minimum_size = Vector2(220, 36)
+7 -7
View File
@@ -37,7 +37,7 @@ text = "< Back"
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
theme_override_font_sizes/font_size = 24 theme_override_font_sizes/font_size = 24
text = "Wallet & Credits" text = "Wallet & Buffalo Chips"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="RefreshButton" type="Button" parent="VBox/HeaderHBox"] [node name="RefreshButton" type="Button" parent="VBox/HeaderHBox"]
@@ -66,12 +66,12 @@ theme_override_constants/separation = 20
[node name="BalTitle" type="Label" parent="VBox/BalanceCard/Margin/HBox"] [node name="BalTitle" type="Label" parent="VBox/BalanceCard/Margin/HBox"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 18 theme_override_font_sizes/font_size = 18
text = "Available Balance:" text = "Available Buffalo Chips:"
[node name="BalanceLabel" type="Label" parent="VBox/BalanceCard/Margin/HBox"] [node name="BalanceLabel" type="Label" parent="VBox/BalanceCard/Margin/HBox"]
layout_mode = 2 layout_mode = 2
theme_override_font_sizes/font_size = 22 theme_override_font_sizes/font_size = 22
text = "0 CR" text = "0 Buffalo Chips"
[node name="Spacer" type="Control" parent="VBox/BalanceCard/Margin/HBox"] [node name="Spacer" type="Control" parent="VBox/BalanceCard/Margin/HBox"]
layout_mode = 2 layout_mode = 2
@@ -83,19 +83,19 @@ theme_override_constants/separation = 8
[node name="Buy100Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"] [node name="Buy100Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"]
layout_mode = 2 layout_mode = 2
text = "+100 CR ($0.99)" text = "+100 Buffalo Chips ($0.99)"
[node name="Buy500Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"] [node name="Buy500Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"]
layout_mode = 2 layout_mode = 2
text = "+500 CR ($4.99)" text = "+500 Buffalo Chips ($4.99)"
[node name="Buy1000Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"] [node name="Buy1000Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"]
layout_mode = 2 layout_mode = 2
text = "+1,000 CR ($9.99)" text = "+1,000 Buffalo Chips ($9.99)"
[node name="Buy5000Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"] [node name="Buy5000Btn" type="Button" parent="VBox/BalanceCard/Margin/HBox/PacksHBox"]
layout_mode = 2 layout_mode = 2
text = "+5,000 CR ($44.99)" text = "+5,000 Buffalo Chips ($44.99)"
[node name="LedgerSection" type="VBoxContainer" parent="VBox"] [node name="LedgerSection" type="VBoxContainer" parent="VBox"]
layout_mode = 2 layout_mode = 2
+3 -3
View File
@@ -96,7 +96,7 @@ func refresh_balance() -> void:
if res.ok and res.data is Dictionary: if res.ok and res.data is Dictionary:
var balance: int = int(res.data.get("balance", 0)) var balance: int = int(res.data.get("balance", 0))
if balance_label: if balance_label:
balance_label.text = "Wallet: %d CR" % balance balance_label.text = "Wallet: %d Buffalo Chips" % balance
func search_listings() -> void: func search_listings() -> void:
@@ -201,7 +201,7 @@ func _create_listing_card(listing: Dictionary) -> Control:
var price: int = int(listing.get("price", 0)) var price: int = int(listing.get("price", 0))
var price_lbl := Label.new() var price_lbl := Label.new()
price_lbl.text = "%d CR" % price price_lbl.text = "%d Buffalo Chips" % price
price_lbl.add_theme_font_size_override("font_size", 16) price_lbl.add_theme_font_size_override("font_size", 16)
price_lbl.add_theme_color_override("font_color", Color(1.0, 0.8, 0.2)) price_lbl.add_theme_color_override("font_color", Color(1.0, 0.8, 0.2))
price_lbl.size_flags_horizontal = Control.SIZE_EXPAND_FILL price_lbl.size_flags_horizontal = Control.SIZE_EXPAND_FILL
@@ -223,7 +223,7 @@ func _on_buy_clicked(listing_id: int, item_name: String, price: int) -> void:
show_status("Please login to purchase items", true) show_status("Please login to purchase items", true)
return return
show_status("Purchasing '%s' for %d CR..." % [item_name, price]) show_status("Purchasing '%s' for %d Buffalo Chips..." % [item_name, price])
var res: Dictionary = await EconomyApiClient.purchase_listing(api, listing_id) var res: Dictionary = await EconomyApiClient.purchase_listing(api, listing_id)
if res.ok: if res.ok:
show_status("Successfully purchased '%s'! Item added to inventory." % item_name) show_status("Successfully purchased '%s'! Item added to inventory." % item_name)
+10 -10
View File
@@ -131,7 +131,7 @@ func _on_create_listing_pressed() -> void:
var desc: String = item_desc_input.text.strip_edges() if item_desc_input else "" var desc: String = item_desc_input.text.strip_edges() if item_desc_input else ""
var price_text: String = price_input.text.strip_edges() if price_input else "" var price_text: String = price_input.text.strip_edges() if price_input else ""
if not price_text.is_valid_int() or price_text.to_int() <= 0: if not price_text.is_valid_int() or price_text.to_int() <= 0:
show_status("Valid positive price in Credits is required", true) show_status("Valid positive price in Buffalo Chips is required", true)
return return
var price: int = price_text.to_int() var price: int = price_text.to_int()
@@ -147,7 +147,7 @@ func _on_create_listing_pressed() -> void:
# 2. Create Listing # 2. Create Listing
var list_res: Dictionary = await EconomyApiClient.create_listing(api, item_id, price) var list_res: Dictionary = await EconomyApiClient.create_listing(api, item_id, price)
if list_res.ok: if list_res.ok:
show_status("Successfully listed '%s' for %d Credits!" % [item_name, price]) show_status("Successfully listed '%s' for %d Buffalo Chips!" % [item_name, price])
if item_name_input: item_name_input.text = "" if item_name_input: item_name_input.text = ""
if item_desc_input: item_desc_input.text = "" if item_desc_input: item_desc_input.text = ""
if price_input: price_input.text = "" if price_input: price_input.text = ""
@@ -193,7 +193,7 @@ func render_my_listings(listings: Array) -> void:
hbox.add_child(type_lbl) hbox.add_child(type_lbl)
var price_lbl := Label.new() var price_lbl := Label.new()
price_lbl.text = "%d CR" % int(l.get("price", 0)) price_lbl.text = "%d Buffalo Chips" % int(l.get("price", 0))
price_lbl.custom_minimum_size = Vector2(80, 0) price_lbl.custom_minimum_size = Vector2(80, 0)
price_lbl.add_theme_color_override("font_color", Color(1.0, 0.8, 0.2)) price_lbl.add_theme_color_override("font_color", Color(1.0, 0.8, 0.2))
hbox.add_child(price_lbl) hbox.add_child(price_lbl)
@@ -239,9 +239,9 @@ func refresh_creator_balance() -> void:
var pend: int = int(res.data.get("pending", 0)) var pend: int = int(res.data.get("pending", 0))
var life: int = int(res.data.get("lifetime_earned", 0)) var life: int = int(res.data.get("lifetime_earned", 0))
if available_lbl: available_lbl.text = "%d CR" % avail if available_lbl: available_lbl.text = "%d Buffalo Chips" % avail
if pending_lbl: pending_lbl.text = "%d CR" % pend if pending_lbl: pending_lbl.text = "%d Buffalo Chips" % pend
if lifetime_lbl: lifetime_lbl.text = "%d CR" % life if lifetime_lbl: lifetime_lbl.text = "%d Buffalo Chips" % life
func refresh_payouts() -> void: func refresh_payouts() -> void:
@@ -261,15 +261,15 @@ func _on_request_payout_pressed() -> void:
var amt_str: String = payout_amount_input.text.strip_edges() if payout_amount_input else "" var amt_str: String = payout_amount_input.text.strip_edges() if payout_amount_input else ""
if not amt_str.is_valid_int() or amt_str.to_int() < 100: if not amt_str.is_valid_int() or amt_str.to_int() < 100:
show_status("Minimum payout amount is 100 Credits", true) show_status("Minimum payout amount is 100 Buffalo Chips", true)
return return
var amount: int = amt_str.to_int() var amount: int = amt_str.to_int()
var dest: String = payout_dest_input.text.strip_edges() if payout_dest_input else "" var dest: String = payout_dest_input.text.strip_edges() if payout_dest_input else ""
show_status("Submitting payout request for %d CR..." % amount) show_status("Submitting payout request for %d Buffalo Chips..." % amount)
var res: Dictionary = await EconomyApiClient.request_payout(api, amount, dest) var res: Dictionary = await EconomyApiClient.request_payout(api, amount, dest)
if res.ok: if res.ok:
show_status("Payout request for %d CR submitted successfully!" % amount) show_status("Payout request for %d Buffalo Chips submitted successfully!" % amount)
if payout_amount_input: payout_amount_input.text = "" if payout_amount_input: payout_amount_input.text = ""
if payout_dest_input: payout_dest_input.text = "" if payout_dest_input: payout_dest_input.text = ""
refresh_creator_balance() refresh_creator_balance()
@@ -311,7 +311,7 @@ func render_payouts(payouts: Array) -> void:
hbox.add_child(date_lbl) hbox.add_child(date_lbl)
var amt_lbl := Label.new() var amt_lbl := Label.new()
amt_lbl.text = "%d CR" % int(p.get("amount", 0)) amt_lbl.text = "%d Buffalo Chips" % int(p.get("amount", 0))
amt_lbl.custom_minimum_size = Vector2(90, 0) amt_lbl.custom_minimum_size = Vector2(90, 0)
amt_lbl.add_theme_font_size_override("font_size", 14) amt_lbl.add_theme_font_size_override("font_size", 14)
hbox.add_child(amt_lbl) hbox.add_child(amt_lbl)
+8 -8
View File
@@ -95,7 +95,7 @@ func refresh_wallet() -> void:
if res.ok and res.data is Dictionary: if res.ok and res.data is Dictionary:
var balance: int = int(res.data.get("balance", 0)) var balance: int = int(res.data.get("balance", 0))
if balance_label: if balance_label:
balance_label.text = "%d CR" % balance balance_label.text = "%d Buffalo Chips" % balance
else: else:
show_status("Failed to fetch wallet: " + res.detail, true) show_status("Failed to fetch wallet: " + res.detail, true)
@@ -118,15 +118,15 @@ func refresh_transactions() -> void:
func _buy_pack(credits: int) -> void: func _buy_pack(credits: int) -> void:
var api = _get_api() var api = _get_api()
if not api or not api.has_token(): if not api or not api.has_token():
show_status("Please login to purchase Credits", true) show_status("Please login to purchase Buffalo Chips", true)
return return
show_status("Processing purchase of %d Credits..." % credits) show_status("Processing purchase of %d Buffalo Chips..." % credits)
var res: Dictionary = await EconomyApiClient.purchase_credits(api, credits) var res: Dictionary = await EconomyApiClient.purchase_credits(api, credits)
if res.ok and res.data is Dictionary: if res.ok and res.data is Dictionary:
var new_bal: int = int(res.data.get("new_balance", 0)) var new_bal: int = int(res.data.get("new_balance", 0))
if balance_label: if balance_label:
balance_label.text = "%d CR" % new_bal balance_label.text = "%d Buffalo Chips" % new_bal
show_status("Successfully purchased %d Credits! Balance: %d CR" % [credits, new_bal]) show_status("Successfully purchased %d Buffalo Chips! Balance: %d Buffalo Chips" % [credits, new_bal])
refresh_transactions() refresh_transactions()
else: else:
show_status("Purchase failed: " + res.detail, true) show_status("Purchase failed: " + res.detail, true)
@@ -171,16 +171,16 @@ func render_transactions(tx_list: Array) -> void:
var amount: int = int(tx.get("amount", 0)) var amount: int = int(tx.get("amount", 0))
var amt_lbl := Label.new() var amt_lbl := Label.new()
if amount > 0: if amount > 0:
amt_lbl.text = "+%d CR" % amount amt_lbl.text = "+%d Buffalo Chips" % amount
amt_lbl.add_theme_color_override("font_color", Color(0.2, 0.9, 0.2)) amt_lbl.add_theme_color_override("font_color", Color(0.2, 0.9, 0.2))
else: else:
amt_lbl.text = "%d CR" % amount amt_lbl.text = "%d Buffalo Chips" % amount
amt_lbl.add_theme_color_override("font_color", Color(0.9, 0.3, 0.3)) amt_lbl.add_theme_color_override("font_color", Color(0.9, 0.3, 0.3))
amt_lbl.custom_minimum_size = Vector2(100, 0) amt_lbl.custom_minimum_size = Vector2(100, 0)
hbox.add_child(amt_lbl) hbox.add_child(amt_lbl)
var bal_lbl := Label.new() var bal_lbl := Label.new()
bal_lbl.text = "Bal: %s CR" % str(tx.get("balance_after", 0)) bal_lbl.text = "Bal: %s Buffalo Chips" % str(tx.get("balance_after", 0))
bal_lbl.custom_minimum_size = Vector2(100, 0) bal_lbl.custom_minimum_size = Vector2(100, 0)
bal_lbl.add_theme_color_override("font_color", Color(0.8, 0.8, 0.8)) bal_lbl.add_theme_color_override("font_color", Color(0.8, 0.8, 0.8))
hbox.add_child(bal_lbl) hbox.add_child(bal_lbl)