Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def trading_screen(**kwargs):
- global city_index
- global arms_license
- global furs_license
- global oil_license
- global wine_license
- global tradecheck
- j = city_index
- ui.hbox(yanchor=-0.28)
- ui.vbox()
- ui.textbutton("Buy beer at %.2f " % bprices[0][j] , clicked=delta_beer)
- ui.textbutton("Buy cloth at %.1f " % bprices[1][j] , clicked=delta_cloth)
- ui.textbutton("Buy fish at %.2f " % bprices[2][j] , clicked=delta_fish)
- ui.textbutton("Buy grain at %.2f " % bprices[3][j] , clicked=delta_grain)
- ui.textbutton("Buy hemp at %.2f " % bprices[4][j] , clicked=delta_hemp)
- ui.textbutton("Buy wool at %.2f " % bprices[5][j] , clicked=delta_wool)
- ui.textbutton("Buy iron goods at %.1f " % bprices[6][j] , clicked=delta_goods)
- ui.textbutton("Buy ore at %.2f " % bprices[7][j] , clicked=delta_ore)
- ui.textbutton("Buy salt at %.2f " % bprices[8][j] , clicked=delta_salt)
- if arms_license:
- ui.textbutton("Buy arms at %.1f " % bprices[9][j] , clicked=delta_arms)
- if furs_license:
- ui.textbutton("Buy furs at %.1f " % bprices[10][j] , clicked=delta_furs)
- if oil_license:
- ui.textbutton("Buy oil at %.1f " % bprices[11][j], clicked=delta_oil)
- if wine_license:
- ui.textbutton("Buy wine at %.1f " % bprices[12][j] , clicked=delta_wine)
- ui.close() #closes the buy vbox.
- ui.vbox() #inventory
- ui.textbutton("%s" % qbeer)
- ui.textbutton("%s" % qcloth)
- ui.textbutton("%s" % qfish)
- ui.textbutton("%s" % qgrain)
- ui.textbutton("%s" % qhemp)
- ui.textbutton("%s" % qwool)
- ui.textbutton("%s" % qgoods)
- ui.textbutton("%s" % qore)
- ui.textbutton("%s" % qsalt)
- if arms_license:
- ui.textbutton("%s" % qarms)
- if furs_license:
- ui.textbutton("%s" % qfurs)
- if oil_license:
- ui.textbutton("%s" % qoil)
- if wine_license:
- ui.textbutton("%s" % qwine)
- ui.close() #closes the inventory list
- ui.vbox() #Sell buttons
- ui.textbutton("Sell beer at %.2f " % sprices[0][j] , clicked=n_delta_beer)
- ui.textbutton("Sell cloth at %.1f " % sprices[1][j] , clicked=n_delta_cloth)
- ui.textbutton("Sell fish at %.2f " % sprices[2][j] , clicked=n_delta_fish)
- ui.textbutton("Sell grain at %.2f " % sprices[3][j] , clicked=n_delta_grain)
- ui.textbutton("Sell hemp at %.2f " % sprices[4][j] , clicked=n_delta_hemp)
- ui.textbutton("Sell wool at %.2f " % sprices[5][j] , clicked=n_delta_wool)
- ui.textbutton("Sell iron goods at %.1f " % sprices[6][j] , clicked=n_delta_goods)
- ui.textbutton("Sell ore at %.2f " % sprices[7][j] , clicked=n_delta_ore)
- ui.textbutton("Sell salt at %.2f " % sprices[8][j] , clicked=n_delta_salt)
- if arms_license:
- ui.textbutton("Sell arms at %.1f " % sprices[9][j] , clicked=n_delta_arms)
- if furs_license:
- ui.textbutton("Sell furs at %.1f " % sprices[10][j] , clicked=n_delta_furs)
- if oil_license:
- ui.textbutton("Sell oil at %.1f " % sprices[11][j], clicked=n_delta_oil)
- if wine_license:
- ui.textbutton("Sell wine at %.1f " % sprices[12][j] , clicked=n_delta_wine)
- ui.close() #Closes selling column.
- ui.vbox() #denominations and inventory
- ui.text("Quantity is %s" % delta)
- ui.textbutton("Quantity = 1", clicked=select_delta1)
- ui.textbutton("Quantity = 5", clicked=select_delta5)
- ui.textbutton("Quantity = 10", clicked=select_delta10)
- ui.textbutton("Quantity = 25", clicked=select_delta25)
- ui.textbutton("Return", clicked=tradechk)
- ui.close() #closes the denom list
- ui.close() #closes the grid.
- renpy.define_screen("trading", trading_screen, modal='True', tag='main')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement