1
0
Kaynağa Gözat

[fixed] hopefully fixed issue with the emp files conjured into existence when lusticon added killvars at the end of the file. Reported by AnimusGaming

anjuna krokus 6 ay önce
ebeveyn
işleme
b1940c1fd4
2 değiştirilmiş dosya ile 44 ekleme ve 31 silme
  1. 27 17
      locations/emp_functions.qsrc
  2. 17 14
      locations/emp_job_array.qsrc

+ 27 - 17
locations/emp_functions.qsrc

@@ -573,7 +573,7 @@ if $ARGS[0] = 'emp_chk_clk':
 				!! booking passed
 				emp_rota_fail = 0
 			end
-			j_idx +=1
+			j_idx += 1
 		if j_idx <= j_finish and emp_rota_fail = 0: jump 'jmp_job_chk'
 		d_idx += 1
 	if d_idx <= d_end and emp_rota_fail = 0: jump 'jmp_daily_chk'
@@ -597,33 +597,43 @@ if $ARGS[0] = 'emp_terminate':
 	else
 		msg 'Job termination failed. Please ensure you set to 4 - Terminated or 5 - Fired'
 	end
+	killvar 'j_idx'
+	killvar 'j_finish'
+	killvar 'd_idx'
+	killvar 'd_end'
 end
 
 if $ARGS[0] = 'loop_configure':
-	if j_day= 0 or j_day = 1 or j_day = 2:
+	if j_day => 0 and j_day <= 2:
 		d_idx = 1
 	else
-		d_idx= 6
+		d_idx = 6
 	end
+
 	if j_day <= 1:
 		d_end = 5
 	else
-		d_end= 7
+		d_end = 7
 	end
 end
 
-killvar 'i_day'
-killvar 'i_hour'
-killvar 'j_id'
-killvar 'j_idx'
-killvar 'j_day'
-killvar 'j_finish'
-killvar 'd_idx'
-killvar 'd_end'
-killvar 'evt_idx'
-killvar 'set_hour'
-killvar 'mod_max_day'
-killvar 'mod_max_hour'
-killvar 'header_switch'
+! Will need to figure out what we can do to clean this up
+!{
+if $ARGS[0] ! 'loop_configure':
+	killvar 'i_day'
+	killvar 'i_hour'
+	killvar 'j_id'
+	killvar 'j_idx'
+	killvar 'j_day'
+	killvar 'j_finish'
+	killvar 'd_idx'
+	killvar 'd_end'
+	killvar 'evt_idx'
+	killvar 'set_hour'
+	killvar 'mod_max_day'
+	killvar 'mod_max_hour'
+	killvar 'header_switch'
+end
+}
 
 --- emp_functions ---------------------------------

+ 17 - 14
locations/emp_job_array.qsrc

@@ -1,7 +1,7 @@
 # emp_job_array
 
 !! Jobs array
-!! < 4 hours is classed as ad-hoc work 
+!! < 4 hours is classed as ad-hoc work
 !! => 4 hours is contract roles
 !! Events are non-permanent employment of varying rates/times and set in the future.
 !!
@@ -15,31 +15,31 @@
 if $ARGS[0] = 'emp_tourist_guide':
 	!! Transitory variables to initialise job start - REQ
 	j_id = 1
-	
+
 	!! j_day defines work days: 1 - Mon-Sun, 2 Mon-Fr, 3 Weekend.  - REQ
 	j_day = 2
 
 	!! Role ID - Array index and used as job identifier.
 	emp_job_id[j_id] = 1
-	
+
 	!! Job Role	- REQ
-	$emp_job_title[j_id] = 'Tourist Guide' 
-	
+	$emp_job_title[j_id] = 'Tourist Guide'
+
 	!! Job start time - a day has 48 slots from base 0 - REQ
 	emp_job_start[j_id] = 16
-	
+
 	!! Job finish time - REQ
 	emp_job_end[j_id] = 32
-	
+
 	!! Job pay rate- REQ
 	emp_job_wages[j_id] = 1000
-	
+
 	!! Job employment location- REQ
 	$emp_job_loc[j_id] = 'Pavlosk Park'
-	
+
 	!! Job notes - to remind the player of the job details
 	$emp_job_notes[j_id] = 'Summer job with flexible days - start between 08:00 and 09:00'
-		
+
 	if emp_job_status[j_id] < 1:
 		!! Job status 1 Employed, 2 Started with favor, 3 Started with merit, 4 Terminated/suspended, 5 Fired permanently - REQ. <= 10 reserved for core mechanics, 10 + for custom quest markers
 		emp_job_status[j_id] = 0
@@ -48,7 +48,7 @@ if $ARGS[0] = 'emp_tourist_guide':
 		!! Job ranking system for promotions and career progression. - Opt
 		emp_job_rank[j_id] = 1
 	end
-	
+
 end
 
 if $ARGS[0] = 'emp_pav_maid':
@@ -60,7 +60,7 @@ if $ARGS[0] = 'emp_pav_maid':
 	emp_job_end[j_id] = 40
 	emp_job_wages[j_id] = 375
 	$emp_job_loc[j_id] = 'Pavlosk Park'
-	$emp_job_notes[j_id] = 'Be at the Pavlosk Hotel reception between 16:00-17:00 to start your shift.'		
+	$emp_job_notes[j_id] = 'Be at the Pavlosk Hotel reception between 16:00-17:00 to start your shift.'
 	if emp_job_status[j_id] < 1:
 		emp_job_status[j_id] = 0
 	end
@@ -88,7 +88,7 @@ if $ARGS[0] = 'emp_pussy_kats':
 	emp_job_wages[j_id] = 205
 	$emp_job_loc[j_id] = 'Pussy Cats'
 	$emp_job_notes[j_id] = 'Shop assistant at Pussy Cat''s in the City Center Mall. You''ve missed <<young_shop_miss>> day(s).'
-		
+
 	if emp_job_status[j_id] < 1:
 		emp_job_status[j_id] = 0
 	end
@@ -109,7 +109,7 @@ if $ARGS[0] = 'emp_titran':
 	emp_job_wages[j_id] = 1500
 	$emp_job_loc[j_id] = 'Titran-Express Engineering'
 	$emp_job_notes[j_id] = 'You work as a secretary at Titran Express. You need to come to work by 09:00 during the week Monday-Friday. Salary is automatically transferred on the 25th of each month.'
-		
+
 	if emp_job_status[j_id] < 1:
 		emp_job_status[j_id] = 0
 	end
@@ -121,7 +121,10 @@ if $ARGS[0] = 'emp_titran':
 	end
 end
 
+! Will need to figure out what we can do to clean this up
+!{
 killvar 'j_id'
 killvar 'j_day'
+}
 
 --- emp_job_array ---------------------------------