mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Fixes Vox-tail Bug
When a new Vox spawns in, your tail won't suddenly break (become a different colour). Abstracts icobase/deform/tail from the species definitions a bit so individual mobs can have a different icobase/deform/tail than other mobs of the same species.
This commit is contained in:
@@ -1515,6 +1515,10 @@
|
||||
if(oldspecies.default_genes.len)
|
||||
oldspecies.handle_dna(src,1) // Remove any genes that belong to the old species
|
||||
|
||||
icobase = species.icobase
|
||||
deform = species.deform
|
||||
tail = species.tail
|
||||
|
||||
if(vessel)
|
||||
vessel = null
|
||||
make_blood()
|
||||
|
||||
@@ -72,3 +72,6 @@ var/global/default_martial_art = new/datum/martial_art
|
||||
var/fire_sprite = "Standing"
|
||||
|
||||
var/datum/body_accessory/body_accessory = null
|
||||
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
|
||||
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
|
||||
@@ -364,29 +364,29 @@
|
||||
if(H.species.name == "Vox") //Making sure we don't break Armalis.
|
||||
switch(H.s_tone)
|
||||
if(6) //Azure Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_voxazu.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_voxazu.dmi'
|
||||
tail = "voxtail_azu"
|
||||
H.icobase = 'icons/mob/human_races/vox/r_voxazu.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_voxazu.dmi'
|
||||
H.tail = "voxtail_azu"
|
||||
if(5) //Emerald Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_voxemrl.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_voxemrl.dmi'
|
||||
tail = "voxtail_emrl"
|
||||
H.icobase = 'icons/mob/human_races/vox/r_voxemrl.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_voxemrl.dmi'
|
||||
H.tail = "voxtail_emrl"
|
||||
if(4) //Grey Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_voxgry.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_voxgry.dmi'
|
||||
tail = "voxtail_gry"
|
||||
H.icobase = 'icons/mob/human_races/vox/r_voxgry.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_voxgry.dmi'
|
||||
H.tail = "voxtail_gry"
|
||||
if(3) //Brown Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_voxbrn.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_voxbrn.dmi'
|
||||
tail = "voxtail_brn"
|
||||
H.icobase = 'icons/mob/human_races/vox/r_voxbrn.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_voxbrn.dmi'
|
||||
H.tail = "voxtail_brn"
|
||||
if(2) //Dark Green Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_voxdgrn.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_voxdgrn.dmi'
|
||||
tail = "voxtail_dgrn"
|
||||
H.icobase = 'icons/mob/human_races/vox/r_voxdgrn.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_voxdgrn.dmi'
|
||||
H.tail = "voxtail_dgrn"
|
||||
else //Default Green Vox.
|
||||
icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_vox.dmi'
|
||||
tail = "voxtail" //Ensures they get an appropriately coloured tail depending on the skin-tone.
|
||||
H.icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
||||
H.deform = 'icons/mob/human_races/vox/r_def_vox.dmi'
|
||||
H.tail = "voxtail" //Ensures they get an appropriately coloured tail depending on the skin-tone.
|
||||
|
||||
H.update_dna()
|
||||
|
||||
@@ -822,7 +822,7 @@
|
||||
|
||||
if(H.nutrition > NUTRITION_LEVEL_WELL_FED)
|
||||
H.nutrition = NUTRITION_LEVEL_WELL_FED
|
||||
|
||||
|
||||
if(light_amount > 0)
|
||||
H.clear_alert("nolight")
|
||||
else
|
||||
|
||||
@@ -298,9 +298,9 @@ var/global/list/damage_icon_parts = list()
|
||||
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
|
||||
|
||||
//Handle husk overlay.
|
||||
if(husk && ("overlay_husk" in icon_states(species.icobase)))
|
||||
if(husk && ("overlay_husk" in icon_states(icobase)))
|
||||
var/icon/mask = new(base_icon)
|
||||
var/icon/husk_over = new(species.icobase,"overlay_husk")
|
||||
var/icon/husk_over = new(icobase,"overlay_husk")
|
||||
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
|
||||
husk_over.Blend(mask, ICON_ADD)
|
||||
base_icon.Blend(husk_over, ICON_OVERLAY)
|
||||
@@ -1197,9 +1197,9 @@ var/global/list/damage_icon_parts = list()
|
||||
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
|
||||
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
|
||||
|
||||
else if(species.tail && species.bodyflags & HAS_TAIL) //no tailless tajaran
|
||||
else if(tail && species.bodyflags & HAS_TAIL) //no tailless tajaran
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
@@ -1266,8 +1266,8 @@ var/global/list/damage_icon_parts = list()
|
||||
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
|
||||
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
|
||||
|
||||
else if(species.tail && species.bodyflags & HAS_TAIL)
|
||||
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]w_s")
|
||||
else if(tail && species.bodyflags & HAS_TAIL)
|
||||
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]w_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
|
||||
@@ -242,10 +242,10 @@
|
||||
H.species = current_species
|
||||
H.s_tone = s_tone
|
||||
H.species.updatespeciescolor(H)
|
||||
|
||||
icobase = H.species.icobase
|
||||
icobase = H.icobase ? H.icobase : H.species.icobase
|
||||
if(H.species.bodyflags & HAS_TAIL)
|
||||
coloured_tail = H.species.tail
|
||||
coloured_tail = H.tail ? H.tail : H.species.tail
|
||||
|
||||
qdel(H)
|
||||
else
|
||||
icobase = current_species.icobase
|
||||
|
||||
Reference in New Issue
Block a user