mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Added species checks for robolimb use.
This commit is contained in:
@@ -1303,7 +1303,8 @@ datum/preferences
|
|||||||
b_type = new_b_type
|
b_type = new_b_type
|
||||||
|
|
||||||
if("hair")
|
if("hair")
|
||||||
if(species == "Human" || species == "Unathi" || species == "Tajara" || species == "Skrell")
|
var/datum/species/S = all_species[species]
|
||||||
|
if(S && (S.appearance_flags & HAS_HAIR_COLOR))
|
||||||
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
|
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
|
||||||
if(new_hair)
|
if(new_hair)
|
||||||
r_hair = hex2num(copytext(new_hair, 2, 4))
|
r_hair = hex2num(copytext(new_hair, 2, 4))
|
||||||
@@ -1383,7 +1384,8 @@ datum/preferences
|
|||||||
s_tone = 35 - max(min( round(new_s_tone), 220),1)
|
s_tone = 35 - max(min( round(new_s_tone), 220),1)
|
||||||
|
|
||||||
if("skin")
|
if("skin")
|
||||||
if(species == "Unathi" || species == "Tajara" || species == "Skrell")
|
var/datum/species/S = all_species[species]
|
||||||
|
if(S && (S.appearance_flags & HAS_SKIN_COLOR))
|
||||||
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
|
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
|
||||||
if(new_skin)
|
if(new_skin)
|
||||||
r_skin = hex2num(copytext(new_skin, 2, 4))
|
r_skin = hex2num(copytext(new_skin, 2, 4))
|
||||||
@@ -1465,7 +1467,16 @@ datum/preferences
|
|||||||
rlimb_data[second_limb] = null
|
rlimb_data[second_limb] = null
|
||||||
|
|
||||||
if("Prothesis")
|
if("Prothesis")
|
||||||
var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in chargen_robolimbs
|
var/tmp_species = species ? species : "Human"
|
||||||
|
var/list/usable_manufacturers = list()
|
||||||
|
for(var/company in chargen_robolimbs)
|
||||||
|
var/datum/robolimb/M = chargen_robolimbs[company]
|
||||||
|
if(tmp_species in M.species_cannot_use)
|
||||||
|
continue
|
||||||
|
usable_manufacturers[company] = M
|
||||||
|
if(!usable_manufacturers.len)
|
||||||
|
return
|
||||||
|
var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in usable_manufacturers
|
||||||
if(!choice)
|
if(!choice)
|
||||||
return
|
return
|
||||||
rlimb_data[limb] = choice
|
rlimb_data[limb] = choice
|
||||||
|
|||||||
@@ -897,6 +897,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
if(company)
|
if(company)
|
||||||
model = company
|
model = company
|
||||||
var/datum/robolimb/R = all_robolimbs[company]
|
var/datum/robolimb/R = all_robolimbs[company]
|
||||||
|
if(species && (species.name in R.species_cannot_use))
|
||||||
|
R = basic_robolimb
|
||||||
if(R)
|
if(R)
|
||||||
force_icon = R.icon
|
force_icon = R.icon
|
||||||
name = "[R.company] [initial(name)]"
|
name = "[R.company] [initial(name)]"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ var/global/datum/robolimb/basic_robolimb
|
|||||||
var/desc = "A generic unbranded robotic prosthesis." // Seen when examining a limb.
|
var/desc = "A generic unbranded robotic prosthesis." // Seen when examining a limb.
|
||||||
var/icon = 'icons/mob/human_races/robotic.dmi' // Icon base to draw from.
|
var/icon = 'icons/mob/human_races/robotic.dmi' // Icon base to draw from.
|
||||||
var/unavailable_at_chargen // If set, not available at chargen.
|
var/unavailable_at_chargen // If set, not available at chargen.
|
||||||
|
var/list/species_cannot_use = list("Resomi")
|
||||||
|
|
||||||
/datum/robolimb/bishop
|
/datum/robolimb/bishop
|
||||||
company = "Bishop Cybernetics"
|
company = "Bishop Cybernetics"
|
||||||
|
|||||||
Reference in New Issue
Block a user