Bladeren bron

[added] option to filter by gender for group_rel_change

Sicaa 4 jaren geleden
bovenliggende
commit
f9eb7c2671
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      locations/gschool_socialchg.qsrc

+ 5 - 1
locations/gschool_socialchg.qsrc

@@ -1646,6 +1646,7 @@ if $ARGS[0] = 'gopnik miss':
 	act 'Go to class': school_period = 0 & gt 'gschool_lessons', 'schedule'
 end
 
+!! gs 'gschool_socialchg', 'group_rel_change', '<social group>', <amount> [, '<gender (optional)>']
 if $ARGS[0] = 'group_rel_change':
 	if $ARGS[1] = 'cool kids': ntemp = 1
 	if $ARGS[1] = 'jocks': ntemp = 2
@@ -1653,16 +1654,19 @@ if $ARGS[0] = 'group_rel_change':
 	if $ARGS[1] = 'gopniks': ntemp = 4
 	if $ARGS[1] = 'outcasts': ntemp = 5
 	if $ARGS[1] = 'teachers': ntemp = 6
+	if $ARGS[3] = 'male' or $ARGS[3] = 'boy': gtemp = 1
+	if $ARGS[3] = 'female' or $ARGS[3] = 'girl': gtemp = 2
 	temp = arrsize('npc_dna')
 	
 	:gs_socloop
-	if npc_grupTipe['A<<temp>>'] = ntemp:
+	if npc_grupTipe['A<<temp>>'] = ntemp and (gtemp = 0 or npc_gender['A<<temp>>'] = gtemp - 1):
 		npc_rel['A<<temp>>'] += ARGS[2]
 		npc_rel['A<<temp>>'] = min(npc_rel['A<<temp>>'],100)
 		npc_rel['A<<temp>>'] = max(npc_rel['A<<temp>>'],0)
 	end
 	temp -= 1
 	if temp > 1: jump 'gs_socloop'
+	killvar 'gtemp' & killvar 'ntemp'
 end
 
 --- gschool_socialchg ---------------------------------