Procházet zdrojové kódy

[changed/fixed] Changed the npcrnamefile into a funcion, and fixed the npcgenerator not setting names correctly

anjuna krokus před 2 měsíci
rodič
revize
d2ebbae029

+ 1 - 1
locations/flash.qsrc

@@ -153,7 +153,7 @@ end
 ! $ARGS[0] = 'type' (bra)
 ! $ARGS[1] = 'location'
 !  ARGS[2] = time
-!  ARGS[3] = option1
+!  ARGS[3] = option
 if $ARGS[0] = 'bra':
 	if Exhibitionist_lvl < 1 or pcs_inhib < 40: gs 'flash', 'exhibitionism', 1
 

+ 1 - 2
locations/havana_crossfit_funcs.qsrc

@@ -117,8 +117,7 @@ if $ARGS[0] = 'box_records':
 			box_wod_record[$crossfit_wod] = new_record_wod_time
 			!! record holder changes only in 1/3rd of the cases from previous holder, or if sveta is record holder
 			if rand(0, 2) = 0 OR $box_wod_record_holder[$crossfit_wod] = '' OR $box_wod_record_holder[$crossfit_wod] = $pcs_nickname:
-				gs 'npcrnamefile', 'rusFemale'
-				$box_wod_record_holder[$crossfit_wod] = $npctempgn[1]
+				$box_wod_record_holder[$crossfit_wod] = func('npcrnamefile', 'rusFemale')
 			end
 		end
 		crossfit_record_it += 1

+ 10 - 9
locations/npcgeneratec.qsrc

@@ -52,7 +52,7 @@ if $ARGS[0] = '':
 		end
 	end
 
-	dont_know_npc_name = ARGS[4]
+	npcgeneratecVars['anonymous'] = ARGS[4]
 
 	!! For example
 	!! gs 'npcgeneratec', 0, 'stranger', rand(18,45), 3, 1
@@ -181,7 +181,7 @@ if $ARGS[0] = 'set_details':
 	!! Fill details about their sex such as cock and breast size
 	if npcgeneratecVars['gender'] = 0:
 		! {Male}
-		gs 'npcrnamefile', 'rusMale'
+		$npcgeneratecVars['firstname'] = func('npcrnamefile', 'rusMale')
 		gs 'npcgeneratec', 'gen_dick', $ARGS[1]
 		npc_gender[$ARGS[1]] = 0
 		npcgeneratecVars['av_height'] = 175
@@ -193,7 +193,7 @@ if $ARGS[0] = 'set_details':
 		npc_bust[$ARGS[1]] = 0
 	elseif npcgeneratecVars['gender'] = 1:
 		! {Female}
-		gs 'npcrnamefile', 'rusFemale'
+		$npcgeneratecVars['firstname'] = func('npcrnamefile', 'rusFemale')
 		npc_gender[$ARGS[1]] = 1
 		npcgeneratecVars['av_height'] = 165
 		npc_height[$ARGS[1]] = npcgeneratecVars['av_height'] + rand(-15, 15)
@@ -208,7 +208,7 @@ if $ARGS[0] = 'set_details':
 		if rand(0, 9) = 0: npc_bust[$ARGS[1]] += rand(0, 15)
 	elseif npcgeneratecVars['gender'] = 2:
 		! {HermFemale}
-		gs 'npcrnamefile', 'rusFemale'
+		$npcgeneratecVars['firstname'] = func('npcrnamefile', 'rusFemale')
 		gs 'npcgeneratec', 'gen_dick', $ARGS[1]
 		npc_gender[$ARGS[1]] = 1
 		npcgeneratecVars['av_height'] = 165
@@ -222,7 +222,7 @@ if $ARGS[0] = 'set_details':
 		npc_bust[$ARGS[1]] = rand(0, 15) + rand(0, 15) + rand(0, 15)
 	else
 		! {HermMale}
-		gs 'npcrnamefile', 'rusMale'
+		$npcgeneratecVars['firstname'] = func('npcrnamefile', 'rusMale')
 		gs 'npcgeneratec', 'gen_dick', $ARGS[1]
 		npc_gender[$ARGS[1]] = 0
 		npcgeneratecVars['av_height'] = 175
@@ -234,15 +234,16 @@ if $ARGS[0] = 'set_details':
 		npc_bust[$ARGS[1]] = rand(0, 10)
 	end
 
+	$npcgeneratecVars['nickname'] = func('npcrnamefile', 'get_nickname', $npcgeneratecVars['firstname'])
+	$npcgeneratecVars['lastname'] = func('npcrnamefile', 'rusSur')
 	!! Hair colour
 	npc_haircol[$ARGS[1]] = rand(0, 3)
 
-	gs 'npcrnamefile', 'rusSur'
-	$npc_firstname[$ARGS[1]] = $nnpcgeneratecVars['firstname']
+	$npc_firstname[$ARGS[1]] = $npcgeneratecVars['firstname']
 	$npc_nickname[$ARGS[1]] = $npcgeneratecVars['nickname']
 	$npc_lastname[$ARGS[1]] = $npcgeneratecVars['lastname']
-	if dont_know_npc_name = 0 or $npcgeneratecVars['name'] = '':
-		$npc_usedname[$ARGS[1]] = $nnpcgeneratecVars['firstname']
+	if npcgeneratecVars['anonymous'] = 0 or $npcgeneratecVars['name'] = '':
+		$npc_usedname[$ARGS[1]] = $npcgeneratecVars['firstname']
 	else
 		$npc_usedname[$ARGS[1]] = $npcgeneratecVars['name']
 	end

+ 18 - 20
locations/npcrnamefile.qsrc

@@ -1,5 +1,18 @@
 # npcrnamefile
 
+if $ARGS[0] = 'get_nickname':
+	if $ARGS[1] = 'rusMale':
+		$result = func('npcrnamefile', 'get_nickname', func('npcrnamefile', 'rusMale'))
+	elseif $ARGS[1] = 'rusFemale':
+		$result = func('npcrnamefile', 'get_nickname', func('npcrnamefile', 'rusFemale'))
+!	elseif $ARGS[1] = 'Svetlana':
+!		$result = 'Sveta'
+	else
+		$result = $ARGS[1]
+	end
+end
+
+
 
 ! {male russian}
 if $args[0] = 'rusMale':
@@ -323,17 +336,11 @@ if $args[0] = 'rusMale':
 	$rntempgen[] = 'Zinoviy'
 
 
-	! {Add new entries above this. If they have a nickname, call it $rndtempgennk[arrsize('$rntempgen')] just below the entry.}
+	! {Add new entries above this.}
 	irngi = rand(0, arrsize('$rntempgen') - 1)
-	$ngcTempVars['firstname'] = $rntempgen[irngi]
-	if $rntempgennk[irngi] = '':
-		$ngcTempVars['nickname']  = $rntempgen[irngi]
-	else
-		$ngcTempVars['nickname'] = $rntempgennk[irngi]
-	end
+	$result = $rntempgen[irngi]
 	killvar 'irngi'
 	killvar '$rntempgen'
-	killvar '$rntempgennk'
 end
 
 ! {female russian}
@@ -549,17 +556,11 @@ if $args[0] = 'rusFemale':
 	$rntempgen[] = 'Zoya'
 
 
-	! {Add new entries above this. If they have a nickname, call it $rndtempgennk[arrsize('$rntempgen')] just below the entry}
+	! {Add new entries above this.}
 	irngi = rand(0, arrsize('$rntempgen') - 1)
-	$ngcTempVars['firstname'] = $rntempgen[irngi]
-	if $rntempgennk[irngi] = '':
-		$ngcTempVars['nickname']  = $rntempgen[irngi]
-	else
-		$ngcTempVars['nickname'] = $rntempgennk[irngi]
-	end
+	$result = $rntempgen[irngi]
 	killvar 'irngi'
 	killvar '$rntempgen'
-	killvar '$rntempgennk'
 end
 
 
@@ -2452,13 +2453,10 @@ if $args[0] = 'rusSur':
 
 	! {Add new entries above this.}
 	irngi = rand(0, arrsize('$rntempgen') - 1)
-	$ngcTempVars['lastname'] = $rntempgen[irngi]
+	$result = $rntempgen[irngi]
 	killvar 'irngi'
 	killvar '$rntempgen'
-	killvar '$rntempgennk'
-
 end
 
 
 --- npcrnamefile ---------------------------------
-