# emp_functions !! Employmnent and Event Systems !! 2023-02-12 !! Author: Hooded Silence !! !! v.01 - Initial code base !! v.02 - Event generator partially integrated !! v.03 - Job management system integrated !! v.04 - Start of event generation code integration !! v.05 - Date suffix modification !! --------------------- UI Interface for Journal if $ARGS[0] = 'gen_schedule': *clr & cla if theme['is_dark'] = 1: $header_theme = '#91B0B4' $body_theme = '#303030' $body_theme_alt = '#474747' $font_theme = '#000000' else $header_theme = '#e27c00' $body_theme = '#E0DED4' $body_theme_alt = '#D58B32' $font_theme = '#FFFFFF' end if function_sw = 1: '
Job Title: ' + $emp_job_title[j_id] + '
' $msg_body += 'Location: ' + $emp_job_loc[j_id] + '
' $msg_body += 'Notes: ' + $emp_job_notes[j_id]+ '
' $msg_body += 'Wages: ' + func('agentned', 'format_price_string', emp_job_wages[j_id]) + '₽
' msg '<<$msg_body>>' end !! --------------------- Event Generator !! Author - Hooded Silence !! Date created - 26 Aug 22 !! Event Generator - filler content only for one off events or recurring work from NPCs !! !! v. 01 - Initial code base !! v. 02 - UI improvements and feature feedback !! V. 03 - Initial integration into mainline code if $ARGS[0] = 'evt_init' : !! Placeholder, pending integration gt $loc, $loc_arg end if $ARGS[0] = 'disp_evt': if ARGS[1] = 1: gs 'emp_functions','evt_day_suffix' 'I have this job for you do you want to acccept it?' *nl 'Event Scheduled for: ' + transient_evt_day + $evt_suffix + ', '+ $monthName[transient_evt_month] +' '+ '20' + transient_evt_year 'Job: ' + $evt_job[transient_evt_type] 'Pay: ' + func('agentned', 'format_price_string', transient_evt_wages) 'Time: ' + transient_evt_hour + ':' + iif(transient_evt_minutes >= 0 and transient_evt_minutes <= 4, '00', '30') 'Duration: ' + transient_evt_duration + iif(transient_evt_duration = 1, ' hour', ' hours') 'Location: ' + $transient_journal 'Job Details: ' + $transient_desc act 'Accept the job' : gs 'emp_functions', 'cat_evt' act 'Decline the job': gs 'emp_functions', 'del_evt', 1 gt 'emp_functions', 'evt_init' end end !! create table for all jobs: if ARGS[1] = 2: if arrsize('evt_event') > 0: killvar '$evtbody' job_idx = 0 *nl :jmp_list_create if evt_silent[job_idx] = 1: gs 'emp_functions','evt_day_suffix',evt_day[job_idx] $evtbody += '