Browse Source

[fixed] Generate icon for NPC encountered at Pavlosk disco.

Previous value was "xPICx" which would not give a picture.
This icon is used when Sveta receives a SMS from him.
Also correct a comment, about the sex of the NPC to generate.
Lady Alexa 1 year ago
parent
commit
1c9eaa8e6f
2 changed files with 11 additions and 5 deletions
  1. 9 3
      locations/npcgeneratec.qsrc
  2. 2 2
      locations/telefon.qsrc

+ 9 - 3
locations/npcgeneratec.qsrc

@@ -4,7 +4,7 @@
 !! You can also set their approx. home location
 !! All data produced is random so if you need a specific value you will have to overwrite it
 
-!! sets sex, 1 male, 2 female, 3 female herm, 4 male herm
+!! sets sex, 0 male, 1 female, 2 female herm, 3 male herm
 npctempgsex = ARGS[0]
 
 !! Name for npc, can just be rapist or shop assistant, etc
@@ -236,8 +236,14 @@ npc_love[$npclastgenerated] = 0
 npc_occupation[$npclastgenerated] = 0
 npc_outfit[$npclastgenerated] = 0
 
-! {Unspecified dad and <<$npc_nickname[''A29'']>>, and picture. We could have a stock group of pictures and have it pick based on certain attribute types, but...}
-$npc_pic[$npclastgenerated] = 'xPICx'
+! {Unspecified dad and <<$npc_nickname[''A29'']>>.
+if npctempgsex = 1 or npctempgsex = 2:
+   !! A female face
+   $npc_pic[$npclastgenerated] = 'icon_bf' + rand(31, 60) + '.png'
+else
+   !! A male face
+   $npc_pic[$npclastgenerated] = 'icon_bf' + rand(1, 30) + '.png'
+end
 
 !! STDs set to 0. For characters with a STD, you need to gs npcgenext rstd
 npc_herpes[$npclastgenerated] = 0

+ 2 - 2
locations/telefon.qsrc

@@ -1609,7 +1609,7 @@ if $ARGS[0] = 'Phone_sms':
 	<img src="images/system/phone/theme/<<$phonetheme_name[pcs_phonetheme]>>/<<iif(telefon[''UnreadSMS'']=0,''icon_sms.png'',''icon_sms_new.gif'')>>" height="80" width="80"><br>'
 	
 	$telefon['body'] += '<b><a href="exec:gs ''telefon'', ''send_sms''">Send new SMS</a></b><br>'
-	$telefon['body'] += '<TABLE cellspacing="0" width="80%"><TR><TH>icon</TH><TH>Name</TH><TH align="right">Received</TH><TH></TH></TR>'
+	$telefon['body'] += '<TABLE cellspacing="0" width="80%"><TR><TH>Icon</TH><TH>Name</TH><TH align="right">Received</TH><TH></TH></TR>'
 
 	!!iterating all Messages
 	!!reset and recalculate unread messages count, in case they get out of sync
@@ -1759,7 +1759,7 @@ $telefon['SMS'] = {
 	end
 
 	$result = '<TR>
-		<TD><><img height=100 src="<<$telefon[''ContactIcon'']>>"></TD>
+		<TD><img height=100 src="<<$telefon[''ContactIcon'']>>"></TD>
 		<TD><<$telefon[''SMSstyle1'']>><<$telefon[''ContactNickName'']>><<$telefon[''SMSstyle2'']>></TD>
 		<TD align="right"><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''show_sms'', <<telefon[''SMSid'']>>"><<$telefon[''SMSTime'']>></a><<$telefon[''SMSstyle2'']>></TD>
 		<TD><<$telefon[''SMSstyle1'']>><a href="exec:gs ''telefon'', ''delete_sms'', <<telefon[''SMSid'']>>">Delete</a><<$telefon[''SMSstyle2'']>></TD>