mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 00:49:06 +01:00
Random spawn mobs now have random cultures, hair, and skin tone. (#18120)
* Random spawn mobs now have random cultures, hair, and skin tone. * fixes + trioxin --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -26,11 +26,11 @@
|
||||
pda_choice = 2
|
||||
age = rand(getMinAge(),getMaxAge())
|
||||
if(length(culture_restriction))
|
||||
H.culture = GET_SINGLETON(pick(culture_restriction))
|
||||
H.set_culture(GET_SINGLETON(pick(culture_restriction)))
|
||||
if(length(origin_restriction))
|
||||
for(var/O in origin_restriction)
|
||||
if(O in culture_restriction)
|
||||
H.origin = GET_SINGLETON(O)
|
||||
H.set_origin(GET_SINGLETON(O))
|
||||
break
|
||||
if(!H.origin)
|
||||
crash_with("Invalid origin restrictions [english_list(origin_restriction)] for culture restrictions [english_list(culture_restriction)]!")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
if(!species)
|
||||
if(new_species)
|
||||
set_species(new_species,1)
|
||||
set_species(new_species, 1)
|
||||
else
|
||||
set_species()
|
||||
|
||||
@@ -1481,10 +1481,21 @@
|
||||
if(typing_indicator)
|
||||
adjust_typing_indicator_offsets(typing_indicator)
|
||||
|
||||
fill_out_culture_data()
|
||||
|
||||
if(change_hair)
|
||||
species.set_default_hair(src)
|
||||
h_style = random_hair_style(gender, species.type)
|
||||
|
||||
if(prob(10))
|
||||
f_style = random_facial_hair_style(gender, species.type)
|
||||
|
||||
if(length(species.character_color_presets) && !default_colour)
|
||||
var/preset_name = pick(species.character_color_presets)
|
||||
var/preset_colour = species.character_color_presets[preset_name]
|
||||
r_skin = GetRedPart(preset_colour)
|
||||
g_skin = GetGreenPart(preset_colour)
|
||||
b_skin = GetBluePart(preset_colour)
|
||||
change_skin_tone(35 - rand(30, 220))
|
||||
|
||||
fill_random_culture_data()
|
||||
|
||||
species.set_default_tail(src)
|
||||
|
||||
@@ -1505,12 +1516,23 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/fill_out_culture_data()
|
||||
culture = GET_SINGLETON(species.possible_cultures[1])
|
||||
origin = GET_SINGLETON(culture.possible_origins[1])
|
||||
set_culture(GET_SINGLETON(species.possible_cultures[1]))
|
||||
set_origin(GET_SINGLETON(culture.possible_origins[1]))
|
||||
accent = pick(origin.possible_accents)
|
||||
citizenship = origin.possible_citizenships[1]
|
||||
religion = origin.possible_religions[1]
|
||||
|
||||
/mob/living/carbon/human/proc/fill_random_culture_data()
|
||||
var/new_culture_type = pick(species.possible_cultures)
|
||||
var/culture_singleton = GET_SINGLETON(new_culture_type)
|
||||
set_culture(culture_singleton)
|
||||
var/new_origin = pick(culture.possible_origins)
|
||||
var/origin_singleton = GET_SINGLETON(new_origin)
|
||||
set_origin(origin_singleton)
|
||||
accent = pick(origin.possible_accents)
|
||||
citizenship = pick(origin.possible_citizenships)
|
||||
religion = pick(origin.possible_religions)
|
||||
|
||||
/mob/living/carbon/human/proc/bloody_doodle()
|
||||
set category = "IC"
|
||||
set name = "Write in blood"
|
||||
|
||||
@@ -321,8 +321,8 @@
|
||||
G.set_species(golem_type)
|
||||
G.name = G.species.get_random_name()
|
||||
G.real_name = G.name
|
||||
G.culture = GET_SINGLETON(/singleton/origin_item/culture/golem)
|
||||
G.origin = GET_SINGLETON(/singleton/origin_item/origin/golem)
|
||||
G.set_culture(GET_SINGLETON(/singleton/origin_item/culture/golem))
|
||||
G.set_origin(GET_SINGLETON(/singleton/origin_item/origin/golem))
|
||||
G.accent = G.origin.possible_accents[1]
|
||||
G.citizenship = G.origin.possible_citizenships[1]
|
||||
G.religion = G.origin.possible_religions[1]
|
||||
|
||||
Reference in New Issue
Block a user