123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- # nichUtil
- !! Used variables-
- !! Prefix- nich
- !! nichWork- 0= does not work for nicholas and never has, 1= currently works for nicholas, 2= quit job in good faith and could get hired again, 3= quit job in bad faith or got thrown out and nicholas is blocked
- !! nichPerformance- ranging from 0 (fired) to 100 (best)
- !! nichHired- the day Sveta was hired
- !! nichVacationFrom- the first free day if Sveta gets some time off
- !! nichVactionTil- the last free day if Sveta gets some time off (=nichVacationFrom if she has one free day)
- !! nichLastWorkDay- the last day Sveta was in the appartment... needed because otherwise the player could avoid work performance checks by just not showing up here
- !! nichMissedWorkdays- the number of days Sveta has missed work... hopefully she has a good excuse
- !! nichEvaluationLast- the day Sveta had her last evaluation (may be today)
- !! nichEvaluationLastReq- the last day Sveta was required to get an evaluation (may be today)
- !! nichLastInspepection- the day Sveta last inspected the appartment (if it is today she has a list of chores she still has to do)
- !! nichMaidLaundry-
- !! nichMaidDishes-
- !! nichMaidGroceries-
- !! nichMaidHallway-
- !! nichMaidLivingDust
- !! nichMaidLivingFloor
- !! nichMaidLivingItems
- !! nichMaidLivingWindows
- !! nichOutfitState- 0=not wearing an appropriate outfit, 1=wearing an appropriate outfit
- if $ARGS[0] = '' or $ARGS[0] = 'start':
- 'This page should never appear. Please report this bug including a description of how you got here.'
- end
- if $ARGS[0] = 'startWorkday':
- nichMissedWorkdays = daystart - nichLastWorkDay - 1
-
- if nickHired + 1 = daystart:
- !! this is the first workday ever
- nichMissedWorkdays = 0
- elseif nichVactionTil + 1 = daystart:
- !! this is the first day Sveta has to work after a vacation... maybe work piled up?
- nichMissedWorkdays = nichMissedWorkdays - nichVactionTil + nichVacationFrom -1
- elseif nichVactionTil >= daystart and nichVacationFrom <= daystart:
- !! Sveta does not have to work today
- nichMissedWorkdays = nichVacationFrom - nichLastWorkDay - 1
- end
-
- if nichMissedWorkdays > 0:
- !!Sveta has missed a workday... very bad
- nichPerformance -= 40 * nichMissedWorkdays
- if nichPerformance <= 0:
- 'You see a note hanging at the door to your room.'
- '"<<$pcs_nichname>>, you missed work. This is unacceptable. Take your stuff and leave. You are fired. -Nicholas"'
- 'You see all your belongings standing in front of the door prepared for your departure.'
- gt 'nichUtil', 'fired'
- else
- 'You see a note hanging at the door to your room.'
- '"<<$pcs_nichname>>, you missed work. This is unacceptable. I expect this not to happen again. -Nicholas"'
- end
- elseif daystart > nichEvaluationLastReq and nichEvaluationLast < nichEvaluationLastReq:
- !! Sveta has missed her last evaluation
- nichPerformance -= 20
- if nichPerformance <= 0:
- 'You see a note hanging at the door to your room.'
- '"<<$pcs_nichname>>, you missed your last evaluation. This is unacceptable. Take your stuff and leave. You are fired. -Nicholas"'
- 'You see all your belongings standing in front of the door prepared for your departure.'
- gt 'nichUtil', 'fired'
- else
- 'You see a note hanging at the door to your room.'
- '"<<$pcs_nichname>>, you missed your last evaluation. This is unacceptable. I expect this not to happen again. -Nicholas"'
- end
- end
-
- nichLastWorkDay = daystart
- nichEvaluationLastReq = daystart
-
-
- !! update the vars for all the chores
- nichMaidHallway += 1
-
- end
- !! get rid of all variables concerning Nicholas except for nichWork
- if $ARGS[0] = 'clearVars':
- killvar 'nichPerformance'
- killvar 'nickHired'
- killvar 'nichVacationFrom'
- killvar 'nichVactionTil'
- killvar 'nichLastWorkDay'
- killvar 'nichMissedWorkdays'
- killvar 'nichEvaluationLast'
- killvar 'nichEvaluationLastReq'
- killvar 'nichMaidLaundry'
- killvar 'nichMaidDishes'
- killvar 'nichMaidGroceries'
- killvar 'nichMaidHallway'
- killvar 'nichMaidLivingDust'
- killvar 'nichMaidLivingFloor'
- killvar 'nichMaidLivingItems'
- killvar 'nichMaidLivingWindows'
- killvar 'nichLastInspepection'
- killvar 'nichOutfitState'
- end
- if $ARGS[0] = 'fired':
- 'It takes you a few moments to process what just happened:'
- 'You have just been fired. And kind of lost your home, too.'
-
- nichWork = 2
-
- gs 'nichUtil', 'clearVars'
-
- act 'Take your belongings and leave':gt 'down'
- end
- !! initializes variables when hired, might mess everything up if called at any other time
- if $ARGS[0] = 'hired':
- nichWork = 1
- nichPerformance = 20
- nickHired = daystart
- nichVacationFrom = daystart
- nichVactionTil = daystart
- nichLastWorkDay = daystart
- nichEvaluationLast = daystart
- nichEvaluationLastReq = daystart
- nichMaidLaundry = 0
- nichMaidDishes = 0
- nichMaidGroceries = 0
- nichMaidHallway = 0
- nichMaidLivingDust = 0
- nichMaidLivingFloor = 0
- nichMaidLivingItems = 0
- nichMaidLivingWindows = 0
- nichLastInspepection = -1
- end
- !! convert the old vars to the new system
- if $ARGS[0] = 'convert':
- if tanwork = 1:
- gs 'nichUtil', 'hired'
- nichPerformance = tan_work_rep * 5
- end
- killvar 'MaidWorkDay'
- killvar 'MaidWork'
- killvar 'TanHallClean'
- killvar 'TanRoomClean'
- killvar 'TanBathClean'
- killvar 'TanMasterClean'
- killvar 'TanLivingClean'
- killvar 'TanMaidRoomClean'
- killvar 'TanKitchenClean'
- killvar 'TanMadeBreakfast'
- killvar 'tanwork'
- killvar 'tan_work_rep'
- killvar 'tan_work_evaluation'
- end
- if $ARGS[0] = 'checkOutfit':
- if $clothingworntype = 'uniform':
- nichOutfitState = 1
- else
- nichOutfitState = 0
- end
- end
- --- nichUtil ---------------------------------
|