bro this starts looking good
This commit is contained in:
@@ -52,21 +52,13 @@ var selected_seat: Seat
|
|||||||
func create_new_roster() -> void:
|
func create_new_roster() -> void:
|
||||||
print("Create new roster")
|
print("Create new roster")
|
||||||
current_chara_roster = []
|
current_chara_roster = []
|
||||||
var already_picked_charas: Array[String] = []
|
print(character_roster.size())
|
||||||
for i in range(max_roster_size):
|
var roster_for_this_round = character_roster.duplicate()
|
||||||
# Make sure we don't plan on more people than available
|
var max_number_of_people = min(max_roster_size, character_roster.size())
|
||||||
if already_picked_charas.size() >= character_roster.size():
|
for i in range(max_number_of_people):
|
||||||
break
|
|
||||||
|
|
||||||
# Pick unique characters for the roster
|
# Pick unique characters for the roster
|
||||||
var chara: CharacterResource
|
var random_index = randi_range(0, roster_for_this_round.size() - 1)
|
||||||
var is_chara_already_in_roster = true
|
var chara: CharacterResource = roster_for_this_round.pop_at(random_index)
|
||||||
while is_chara_already_in_roster:
|
|
||||||
chara = character_roster.pick_random()
|
|
||||||
for already_there in already_picked_charas:
|
|
||||||
if already_there != chara.name:
|
|
||||||
already_picked_charas.append(chara.name)
|
|
||||||
is_chara_already_in_roster = false
|
|
||||||
|
|
||||||
# Associate a single mask (for now) to the character
|
# Associate a single mask (for now) to the character
|
||||||
var mask: MaskResource = mask_roster.pick_random()
|
var mask: MaskResource = mask_roster.pick_random()
|
||||||
@@ -76,6 +68,7 @@ func create_new_roster() -> void:
|
|||||||
|
|
||||||
current_chara_roster.append(masked_chara)
|
current_chara_roster.append(masked_chara)
|
||||||
print("Added %s to roster" % chara.name)
|
print("Added %s to roster" % chara.name)
|
||||||
|
print(character_roster.size())
|
||||||
|
|
||||||
func review_next_guest():
|
func review_next_guest():
|
||||||
# See previous guest out
|
# See previous guest out
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ func compute_score(other_guests: Array[MaskedChara]) -> float:
|
|||||||
var trait_strength = 0.0
|
var trait_strength = 0.0
|
||||||
for stimuli in guest_trait.stimulis:
|
for stimuli in guest_trait.stimulis:
|
||||||
var strength = stimuli
|
var strength = stimuli
|
||||||
if stimuli == guest_mouth_mask.stimuli:
|
if guest_mouth_mask != null and stimuli == guest_mouth_mask.stimuli:
|
||||||
strength *= guest_mouth_mask.stimuli_multiplier
|
strength *= guest_mouth_mask.stimuli_multiplier
|
||||||
if stimuli == face_mask.stimuli:
|
if face_mask != null and stimuli == face_mask.stimuli:
|
||||||
strength *= face_mask.stimuli_multiplier
|
strength *= face_mask.stimuli_multiplier
|
||||||
trait_strength += strength
|
trait_strength += strength
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user