コード例 #1
0
ファイル: transcription.py プロジェクト: lupinetine/scribesim
            def correct_and_sell():
                self.transcribe_area.error_count = ut.transcript_div(
                    self.transcribe_area, (f"Errors Found: "
                                           f"{self.book['Errors']}"))
                self.transcribe_area.current_price = ut.transcript_div(
                    self.transcribe_area,
                    f"Current Top Price: {current_price}")
                if self.book['Errors'] > 0:
                    if self.player['Stamina'] > 0:
                        self.transcribe_area.correct = ut.create_button(
                            self.transcribe_area, 'Correct Transcript',
                            correct_transcript)
                        c = self.transcribe_area.correct
                        c.book = self.book
                        c.player = self.player
                        c.header = self.header
                else:
                    self.transcribe_area.sell = ut.create_button(
                        self.transcribe_area, 'Find Buyer (1 hour)',
                        find_buyer)
                    self.transcribe_area.price = ut.create_button(
                        self.transcribe_area, 'Sell Price', sell_work)
                    s = self.transcribe_area.sell
                    s.book = self.book
                    s.player = self.player
                    s.header = self.header
                    s.transcribe_area = self.transcribe_area
                    s.price = self.transcribe_area.price

                    p = self.transcribe_area.price
                    p.book = self.book
                    p.desc = self.desc
                    p.player = self.player
                    p.header = self.header
                pass
コード例 #2
0
 def shop_button(div, text, function, stock, hours):
     b = ut.create_button(div, text, function)
     b.info = ut.new_para(b, 'text-xs ')
     b.info.text = (f'{hours[0]}:00 to {hours[1]}:00')
     b.desk = self.desk
     b.header = self.header
     b.player = self.player
     b.display = self.display
     b.stocks = stock
     b.hours = hours
     return b
コード例 #3
0
ファイル: care.py プロジェクト: lupinetine/scribesim
def display_food(div):
    div.delete()
    for i in player['Stocks']['Food']:
        div.i = ut.create_button(
            div,
            f'Eat {i["Name"]}',
            eat_food,
            ut.food_menu
        )
        div.i.info = ut.new_para(div.i, 'text-xs ')
        div.i.info.text = (f'Restores {i["Restore"]} Stamina')
        div.i.dict = i
        div.i.div = div
コード例 #4
0
ファイル: transcription.py プロジェクト: lupinetine/scribesim
        def allocate_supply_info():
            self.transcribe_area.supplies_needed = ut.transcript_div(
                self.transcribe_area, ('Supplies needed: '
                                       f'{supply_list()}'))

            self.transcribe_area.can_allocate = ut.transcript_div(
                self.transcribe_area, f'{can_allocate()}')

            if self.enough_supplies is True:
                self.transcribe_area.allocate_supplies = ut.create_button(
                    self.transcribe_area, "Allocate Supplies",
                    allocate_supplies)
                a = self.transcribe_area.allocate_supplies
                a.player = self.player
                a.sheets = self.sheets
                a.ink = self.ink
                a.desk = self.desk
                a.book = self.book
            pass
コード例 #5
0
ファイル: transcription.py プロジェクト: lupinetine/scribesim
        def transcript_progress():
            self.transcribe_area.words_transcribed = ut.transcript_div(
                self.transcribe_area, ('Estimated Time to Complete: '
                                       f'{time_estimate()} minutes'))
            self.transcribe_area.time_picker = ut.transcript_div(
                self.transcribe_area, 'Write for how many minutes?  ')
            self.transcribe_area.time_picker.input = ut.input_number(
                self.transcribe_area.time_picker, self.time_estimate,
                validate_input)

            self.transcribe_area.time_picker.transcribe = ut.create_button(
                self.transcribe_area,
                f'Write for {self.time_estimate} minutes', write_transcript)
            t = self.transcribe_area.time_picker.transcribe
            t.time = self.time_estimate
            t.player = self.player
            t.header = self.header
            t.desk = self.desk
            t.book = self.book
            t.estimate = self.time_estimate
            self.transcribe_area.time_picker.input.transcribe = t
            pass