Selaa lähdekoodia

Changed the way the prostitution content block is handled.

netuttki 7 kuukautta sitten
vanhempi
säilyke
8b832172db

+ 3 - 3
locations/gas_station_gp_117.qsrc

@@ -29,7 +29,7 @@ if $ARGS[0] = 'outside':
 	if car > 0 and cardrive = 29: gs 'gas_station_gp_117', 'gas'
 	*nl
 
-	if prostitute['blocked'] = 0 and prostitute['gas_station'] = 1:
+	if prostitute['wl_block'] = 0 and prostitute['full_block'] = 0 and prostitute['gas_station'] = 1 and prostitute['active'] = 1:
 		if prostitute['earnings_day'] > 0: 
 			'You have earned <<prostitute[''earnings_day'']>> <b>₽</b> today.'+iif(prostitute['payment_method'] = 0, ' Your share is <<prostitute[''earnings_day''] * prostitute[''share_player''] / 100>> <b>₽</b>'+iif(prostitute['debt_amount'] > 0, ', but your pimp will keep <<prostitute[''earnings_day''] * prostitute[''debt_payment_percent''] / 100>> <b>₽</b> to pay down your debt.', '.'), '')
 		end
@@ -50,7 +50,7 @@ if $ARGS[0] = 'outside':
 	act 'Go inside the gas station': minut += 1 & gt 'gas_station_gp_117', 'shop'
 	act 'Go to the public restroom': minut += 1 & gt 'gas_station_gp_117', 'restroom'
 
-	if prostitute['blocked'] = 0 and prostitute['gas_station'] = 1 and prostitute['work_clothes']: act 'Go to work': gt 'gas_station_gp_117', 'work'
+	if prostitute['wl_block'] = 0 and prostitute['full_block'] = 0 and prostitute['gas_station'] = 1 and prostitute['work_clothes']: act 'Go to work': gt 'gas_station_gp_117', 'work'
 	act 'Wait': gs 'obj_din', 'wait'
 	killvar 'dressed_as_a_prostitute'
 end
@@ -474,4 +474,4 @@ if $ARGS[0] = 'bus_end':
 end
 
 
---- gas_station_gp_117 ---------------------------------
+--- gas_station_gp_117 ---------------------------------

+ 1 - 1
locations/pav_residential.qsrc

@@ -264,7 +264,7 @@ elseif npc_QW['A113'] = 1 and daybelisex ! daystart and hour >= 9 and hour <= 23
 end
 
 !-- Random prostitution solicitation check ------------------------ 
-if prostitute['blocked'] = 0: gs 'prostitution_functions', 'check_solicitation_event'
+gs 'prostitution_functions', 'check_solicitation_event'
 
 gs 'booty_call', 'home_links'
 

+ 23 - 7
locations/prostitution_functions.qsrc

@@ -3,9 +3,10 @@
 !! ---- Variables -------------------------------------------------------------------------------------------------------
 !!
 !! prostitute['payment_method']: 1 - Sveta works for herself; 0 - Sveta works for someone else who will take a cut
-!! prostitute['blocked']: 1 - WLife is loaded which blocks some of the locations: Pavlovsk will rely on the WLife mod 
+!! prostitute['wl_block']: 1 - WLife is loaded which blocks some of the locations: Pavlovsk will rely on the WLife mod 
 !!							  and the Gas Station will be completely blocked
-!!						  0 - WLife is not loaded, everything works as normal.	
+!!						  0 - WLife is not loaded, or WLife released the lock, everything works as normal.	
+!! prostitute['full_block']: 1 - Some mod or some other event completely blocked the prostitution content.
 !! prostitute[<<$location>>]: 1 - Sveta can work at the location.
 !!                            0 - Sveta can''t work at the location
 !!     current locations: Pavlovsk - ''pavlovsk'', Gadukino - ''gadukino'', 
@@ -32,13 +33,27 @@ $solicitation_locations[5] = 'pav_complex'
 $solicitation_locations[6] = 'pav_park'
 $solicitation_locations[7] = 'pushkin'
 
+!! Blocks the content that would clash with the Whore Life mod.
+if $ARGS[0] = 'wl_block':
+	prostitute['wl_block'] = ARGS[1]
+	if prostitute['wl_block']:
+		gs 'prostitution_functions', 'set_pavlovsk_hours', 6, 23	
+	else
+		gs 'prostitution_functions', 'set_pavlovsk_hours', 14, 2	
+	end
+end
+
+!! Completely blocks the content - it is just here in case some mod needs to block off prostitution.
+if $ARGS[1] = 'block':
+	prostitute['full_block'] = ARGS[1]
+end
 
 if $ARGS[0] = 'check_for_wlife':
     if mod_list > 0:
         mod_i=1
         :mod_exec
         if $mod_name[mod_i] = 'wlife':
-            prostitute['blocked'] = 1
+			if prostitute['payment_method'] = 0: prostitute['wl_block'] = 1
         end
         if mod_list > mod_i:
             mod_i+=1
@@ -54,7 +69,8 @@ if $ARGS[0] = 'update_prostitution_locations':
 end
 
 if $ARGS[0] = 'set_pavlovsk_prostitute':
-    if (fame['pav_prostitute'] > 250 or fame['pav_slut'] > 250) and prostitute['blocked'] = 0:
+!!  if fame['pav_prostitute'] > 100 or fame['pav_slut'] > 150 and prostitute['wl_block'] = 0 and prostitute['full_block'] = 0:
+    if (fame['pav_prostitute'] > 250 or fame['pav_slut'] > 250) and prostitute['wl_block'] = 0 and prostitute['full_block'] = 0:
         prostitute['pavlovsk'] = 1
 		prostitute['active'] = 1
         prostitute['payment_method'] = 1
@@ -64,7 +80,7 @@ if $ARGS[0] = 'set_pavlovsk_prostitute':
 end
 
 if $ARGS[0] = 'set_gadukion_prostitute':
-	if gadriver_gang = 2 and (mirapimp = 0 or mirapimp = 2): 
+	if gadriver_gang = 2 and (mirapimp = 0 or mirapimp = 2) and prostitute['full_block'] = 0: 
 		prostitute['gadukino'] = 1
 		prostitute['active'] = 1
 		prostitute['payment_method'] = 1
@@ -248,10 +264,10 @@ end
 !!-----------------------------------------------------------------------------------------------------------------------
 !!---------- Checking for events ----------------------------------------------------------------------------------------
 !!-----------------------------------------------------------------------------------------------------------------------
-  
+
 if $ARGS[0] = 'check_solicitation_event':
 	gs 'prostitution_functions', 'work_clothes'
-	if prostitute['blocked'] = 0 and func('prostitution_functions', 'prostitute_work_hours') and func('prostitution_functions','is_solicitation_location'):
+	if prostitute['wl_block'] = 0 and prostitute['full_block'] = 0 and func('prostitution_functions', 'prostitute_work_hours') and func('prostitution_functions','is_solicitation_location'):
 		if prostitute['pavlovsk'] = 1 and prostitute['pav_time_hour'] ! hour and rand(-20, 70) < minut: 
 			gs 'prostitution_pavlovsk', 'chance'
 		end

+ 2 - 2
locations/road.qsrc

@@ -136,7 +136,7 @@ if $ARGS[0] = '':
 					gs 'prostitution_functions', 'change_to_work', 'car'
 					killvar '$loc_desc' 
 				end
-		elseif prostitute['road'] = 1 and (prostitute['blocked'] = 0 or (prostitute['blocked'] = 1 and prostitute['payment'] = 1)):
+		elseif prostitute['road'] = 1 and ((prostitute['wl_block'] = 0 and prostitute['full_block'] = 0) or (prostitute['wl_block'] = 1 and prostitute['payment_method'] = 1)):
 			if car > 0 and cardrive = 22 and ncarroad = nroad:'You parked <a href="exec:gs ''carF'', ''start''">your <<$car>></a> in a quieter spot on the side road to Gadukin.'
 			gs 'prostitution_functions', 'work_clothes'
 			if  prostitute['work_clothes'] = 0 and prostitute['outfit_is_set']: 
@@ -190,7 +190,7 @@ if $ARGS[0] = '':
 			'You can see <a href="exec:gt ''NikoSlut'', ''Yurik Out''">' + iif(YurikEv['Name'] = 'Yurik', 'Yurik', 'a big burly man') + '</a>, clearly drunk, stumbling along the highway with a beer bottle in his hand.'
 		end		
 	end
-	if prostitute['road'] = 1 and nroad ! 10 and nroad ! 20 and (prostitute['blocked'] = 0 or (prostitute['blocked'] = 1 and prostitute['payment'] = 1)):
+	if prostitute['road'] = 1 and nroad ! 10 and nroad ! 20 and ((prostitute['wl_block'] = 0 and prostitute['full_block']) or (prostitute['wl_block'] = 1 and prostitute['payment_method'] = 1)):
 		gs 'prostitution_functions', 'work_clothes'
 		if  prostitute['work_clothes'] = 0 and prostitute['outfit_is_set']: 
 			$loc_desc = 'You change into some more appropriate clothing in your car, then walk down the road a little to catch the attention of passing cars.'

+ 4 - 0
locations/saveupdater.qsrc

@@ -2304,6 +2304,10 @@ if temp_current_save_version < 00090003:
 	killvar 'gp_cumVol'
 	killvar 'sp_cumVol'
 	killvar 'nd_cumVol'
+
+	!! Prostitution blocking variable changes
+	prostitute['wl_block'] = prostitute['blocked']
+	prostitute['full_block'] = 0
 end