|
@@ -1,7 +1,10 @@
|
|
|
+# 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)
|
|
|
+!! nickHired- 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
|
|
@@ -20,7 +23,10 @@ end
|
|
|
if $ARGS[0] = 'startWorkday':
|
|
|
nichMissedWorkdays = daystart - nichLastWorkDay - 1
|
|
|
|
|
|
- if nichVactionTil + 1 = daystart:
|
|
|
+ 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:
|
|
@@ -35,7 +41,7 @@ if $ARGS[0] = 'startWorkday':
|
|
|
'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'
|
|
|
+ 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"'
|
|
@@ -47,7 +53,7 @@ if $ARGS[0] = 'startWorkday':
|
|
|
'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'
|
|
|
+ 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"'
|
|
@@ -61,6 +67,7 @@ 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'
|
|
@@ -78,7 +85,44 @@ if $ARGS[0] = 'fired':
|
|
|
|
|
|
nichWork = 2
|
|
|
|
|
|
- gs 'nichUtil' 'clearVars'
|
|
|
+ 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
|
|
|
+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'
|
|
|
+end
|
|
|
+--- nichUtil ---------------------------------
|