Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ferals #1139

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
/// Used for determining which wounds are applicable to this species.
#define HAS_FLESH 29 /// if we have flesh (can suffer slash/piercing/burn wounds, requires they don't have NOBLOOD)
#define HAS_BONE 30 /// if we have bones (can suffer bone wounds)
#define FERAL 31 /// doesnt display clothes or most external organs, uses simple_icon for species sprites

//organ slots
#define ORGAN_SLOT_BRAIN "brain"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SPECIES_ARACHNID "arachnid"
#define SPECIES_TESHARI "teshari"
#define SPECIES_VOX "vox"
#define SPECIES_FERAL "feral"
#define SPECIES_XENOCHIMERA "xenochimera"
#define SPECIES_INSECT "insect"
#define SPECIES_UINSECT "undead_insect"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/arousal/genitals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
return

/mob/living/carbon/human/proc/update_genitals()
if(QDELETED(src))
if(QDELETED(src) || IsFeral()) // SPLURT EDIT - FERALS
return
var/static/list/relevant_layers = list("[GENITALS_BEHIND_LAYER]" = "BEHIND", "[GENITALS_FRONT_LAYER]" = "FRONT")
var/static/list/layers_num
Expand Down
12 changes: 12 additions & 0 deletions code/modules/mob/living/carbon/carbon_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@
return
if(!other.lying && lying) //they're up, we're down.
return FALSE

// SPLURT EDIT - FERALS
/mob/living/carbon/update_resting(update_mobility = TRUE)
. = ..()
if(!update_mobility && IsFeral())//Update mobility will do it for us otherwise.
update_body()

/mob/living/carbon/update_mobility()
. = ..()
if(IsFeral())
update_body()
// SPLURT EDIT END
54 changes: 29 additions & 25 deletions code/modules/mob/living/carbon/carbon_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@
observers = null
break

var/icon_file = I.lefthand_file
if(get_held_index_of_item(I) % 2 == 0)
icon_file = I.righthand_file
if(!IsFeral()) // SPLURT EDIT - FERALS
var/icon_file = I.lefthand_file
if(get_held_index_of_item(I) % 2 == 0)
icon_file = I.righthand_file

hands += I.build_worn_icon(default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)
hands += I.build_worn_icon(default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)

overlays_standing[HANDS_LAYER] = hands
apply_overlay(HANDS_LAYER)
Expand Down Expand Up @@ -109,7 +110,8 @@
inv.update_icon()

if(wear_neck)
if(!(head && (head.flags_inv & HIDENECK)))
//if(!(head && (head.flags_inv & HIDENECK)))
if(!(head && (head.flags_inv & HIDENECK)) && !IsFeral()) // SPLURT EDIT - FERALS
var/chosen_icon = 'icons/mob/clothing/neck.dmi'
if(dna.species.icon_neck)
chosen_icon = dna.species.icon_neck
Expand All @@ -126,10 +128,11 @@
inv?.update_icon()

if(back)
var/chosen_icon = 'icons/mob/clothing/back.dmi'
if(dna.species.icon_back)
chosen_icon = dna.species.icon_back
overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = chosen_icon, override_state = back.icon_state)
if(!IsFeral()) // SPLURT EDIT - FERALS
var/chosen_icon = 'icons/mob/clothing/back.dmi'
if(dna.species.icon_back)
chosen_icon = dna.species.icon_back
overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = chosen_icon, override_state = back.icon_state)
update_hud_back(back)

apply_overlay(BACK_LAYER)
Expand Down Expand Up @@ -219,22 +222,23 @@
var/obj/item/bodypart/BP = X
BP.update_limb()

//LOAD ICONS
if(limb_icon_cache[icon_render_key])
load_limb_from_cache()
return

//GENERATE NEW LIMBS
var/static/list/leg_day = typecacheof(list(/obj/item/bodypart/r_leg, /obj/item/bodypart/l_leg))
var/list/new_limbs = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(is_taur && leg_day[BP.type])
continue
new_limbs += BP.get_limb_icon()
if(new_limbs.len)
overlays_standing[BODYPARTS_LAYER] = new_limbs
limb_icon_cache[icon_render_key] = new_limbs
if(!IsFeral()) // SPLURT EDIT - FERALS
//LOAD ICONS
if(limb_icon_cache[icon_render_key])
load_limb_from_cache()
return

//GENERATE NEW LIMBS
var/static/list/leg_day = typecacheof(list(/obj/item/bodypart/r_leg, /obj/item/bodypart/l_leg))
var/list/new_limbs = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(is_taur && leg_day[BP.type])
continue
new_limbs += BP.get_limb_icon()
if(new_limbs.len)
overlays_standing[BODYPARTS_LAYER] = new_limbs
limb_icon_cache[icon_render_key] = new_limbs

apply_overlay(BODYPARTS_LAYER)
update_damage_overlays()
Expand Down
92 changes: 77 additions & 15 deletions code/modules/mob/living/carbon/human/human_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ There are several things that need to be remembered:
remove_overlay(BODY_LAYER)
dna.species.handle_body(src, block_recursive_calls)
..()
if(update_genitals)
//if(update_genitals)
if(update_genitals && !IsFeral()) // SPLURT EDIT - FERALS
update_genitals()

/mob/living/carbon/human/update_fire()
Expand Down Expand Up @@ -145,6 +146,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown)
client.screen += w_uniform
update_observer_view(w_uniform,1)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END

if(wear_suit && (wear_suit.flags_inv & HIDEJUMPSUIT))
return
Expand Down Expand Up @@ -349,6 +354,10 @@ There are several things that need to be remembered:
if(client && hud_used && hud_used.hud_shown)
client.screen += wear_id
update_observer_view(wear_id)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END

//TODO: add an icon file for ID slot stuff, so it's less snowflakey
id_overlay = wear_id.build_worn_icon(default_layer = ID_LAYER, default_icon_file = 'icons/mob/mob.dmi', override_state = wear_id.item_state)
Expand All @@ -367,7 +376,8 @@ There are several things that need to be remembered:
var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_GLOVES) + 1]
inv.update_icon()

if(!gloves && bloody_hands)
//if(!gloves && bloody_hands)
if(!gloves && bloody_hands && !IsFeral()) // SPLURT EDIT - FERALS
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER, color = blood_DNA_to_color(), blend_mode = blood_DNA_to_blend())
if(get_num_arms(FALSE) < 2)
if(has_left_hand(FALSE))
Expand All @@ -378,7 +388,8 @@ There are several things that need to be remembered:
overlays_standing[GLOVES_LAYER] = bloody_overlay

var/mutable_appearance/gloves_overlay = overlays_standing[GLOVES_LAYER]
if(gloves)
//if(gloves)
if(!IsFeral() && gloves) // SPLURT EDIT - FERALS
gloves.screen_loc = ui_gloves
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
Expand Down Expand Up @@ -447,17 +458,18 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open ...
client.screen += glasses //Either way, add the item to the HUD
update_observer_view(glasses,1)
if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES)))
var/icon_chosen = 'icons/mob/clothing/eyes.dmi'
if(dna.species.icon_eyes)
icon_chosen = dna.species.icon_eyes
overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(default_layer = GLASSES_LAYER, default_icon_file = icon_chosen, override_state = glasses.icon_state)
var/mutable_appearance/glasses_overlay = overlays_standing[GLASSES_LAYER]
if(glasses_overlay)
if(OFFSET_GLASSES in dna.species.offset_features)
glasses_overlay.pixel_x += dna.species.offset_features[OFFSET_GLASSES][1]
glasses_overlay.pixel_y += dna.species.offset_features[OFFSET_GLASSES][2]
overlays_standing[GLASSES_LAYER] = glasses_overlay
if(!IsFeral()) // SPLURT EDIT - FERALS
if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES)))
var/icon_chosen = 'icons/mob/clothing/eyes.dmi'
if(dna.species.icon_eyes)
icon_chosen = dna.species.icon_eyes
overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(default_layer = GLASSES_LAYER, default_icon_file = icon_chosen, override_state = glasses.icon_state)
var/mutable_appearance/glasses_overlay = overlays_standing[GLASSES_LAYER]
if(glasses_overlay)
if(OFFSET_GLASSES in dna.species.offset_features)
glasses_overlay.pixel_x += dna.species.offset_features[OFFSET_GLASSES][1]
glasses_overlay.pixel_y += dna.species.offset_features[OFFSET_GLASSES][2]
overlays_standing[GLASSES_LAYER] = glasses_overlay
apply_overlay(GLASSES_LAYER)

/mob/living/carbon/human/update_inv_ears()
Expand All @@ -477,6 +489,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open
client.screen += ears //add it to the client's screen
update_observer_view(ears,1)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
var/icon_chosen = 'modular_sand/icons/mob/clothing/ears.dmi'
if(dna.species.icon_ears)
icon_chosen = dna.species.icon_ears
Expand Down Expand Up @@ -539,6 +555,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END

var/alt_icon = S.mob_overlay_icon || 'icons/mob/clothing/feet.dmi'
if(dna.species.icon_feet)
Expand Down Expand Up @@ -569,6 +589,10 @@ There are several things that need to be remembered:
if(client && hud_used && hud_used.hud_shown)
client.screen += s_store
update_observer_view(s_store)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
var/t_state = s_store.item_state
if(!t_state)
t_state = s_store.icon_state
Expand All @@ -583,6 +607,10 @@ There are several things that need to be remembered:
s_store_overlay.pixel_x += dna.species.offset_features[OFFSET_S_STORE][1]
s_store_overlay.pixel_y += dna.species.offset_features[OFFSET_S_STORE][2]
overlays_standing[SUIT_STORE_LAYER] = s_store_overlay
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
apply_overlay(SUIT_STORE_LAYER)

/mob/living/carbon/human/update_inv_head(block_recursive_calls = FALSE)
Expand All @@ -603,6 +631,10 @@ There are several things that need to be remembered:
client.screen += head
update_observer_view(head,1)
remove_overlay(HEAD_LAYER)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
var/obj/item/clothing/head/H = head
var/alt_icon = H.mob_overlay_icon || 'icons/mob/clothing/head.dmi'
if(dna.species.icon_head)
Expand Down Expand Up @@ -640,6 +672,10 @@ There are several things that need to be remembered:
if(client && hud_used && hud_used.hud_shown)
client.screen += belt
update_observer_view(belt)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
var/icon_chosen = 'icons/mob/clothing/belt.dmi'
if(dna.species.icon_belt)
icon_chosen = dna.species.icon_belt
Expand All @@ -666,6 +702,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown)
client.screen += wear_suit
update_observer_view(wear_suit,1)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END

var/worn_icon = wear_suit.mob_overlay_icon || 'icons/mob/clothing/suit.dmi'
if(dna.species.icon_suit)
Expand Down Expand Up @@ -757,6 +797,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown)
client.screen += wear_mask
update_observer_view(wear_mask,1)
// SPLURT EDIT - FERALS
if(IsFeral())
return
// SPLURT EDIT END
var/obj/item/clothing/mask/M = wear_mask
remove_overlay(FACEMASK_LAYER)
var/alt_icon = M.mob_overlay_icon || 'icons/mob/clothing/mask.dmi'
Expand Down Expand Up @@ -937,6 +981,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
. = "[dna.species.mutant_bodyparts["limbs_id"]]"
. += "[dna.features["color_scheme"]]"

/*
lpeapnni marked this conversation as resolved.
Show resolved Hide resolved
if(dna.check_mutation(HULK))
. += "-coloured-hulk"
else if(dna.species.use_skintones)
Expand All @@ -947,6 +992,22 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
. += "-coloured-[dna.features["mcolor"]]-[dna.features["mcolor2"]]-[dna.features["mcolor3"]]"
else
. += "-not_coloured"
*/
// SPLURT EDIT - FERALS
if(!IsFeral())
if(dna.check_mutation(HULK))
. += "-coloured-hulk"
else if(dna.species.use_skintones)
. += "-coloured-[skin_tone]"
else if(dna.species.fixed_mut_color)
. += "-coloured-[dna.species.fixed_mut_color]"
else if(dna.features["mcolor"])
. += "-coloured-[dna.features["mcolor"]]-[dna.features["mcolor2"]]-[dna.features["mcolor3"]]"
else
. += "-not_coloured"
else
. += "-not_coloured"
// SPLURT EDIT END

. += "-[dna.features["body_model"]]"

Expand Down Expand Up @@ -1022,7 +1083,8 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
add_overlay(HD.get_limb_icon())
update_damage_overlays()

if(HD && !(HAS_TRAIT(src, TRAIT_HUSK)))
//if(HD && !(HAS_TRAIT(src, TRAIT_HUSK)))
if(HD && !(HAS_TRAIT(src, TRAIT_HUSK)) && !IsFeral()) // SPLURT EDIT - FERALS
// lipstick
if(lip_style && (LIPS in dna.species.species_traits))
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/lips.dmi', "lips_[lip_style]", -BODY_LAYER)
Expand Down
26 changes: 25 additions & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species/proc/check_roundstart_eligible()
if(id in (CONFIG_GET(keyed_list/roundstart_races)))
return TRUE
// SPLURT EDIT BEGIN
if(roundstart == TRUE)
lpeapnni marked this conversation as resolved.
Show resolved Hide resolved
return TRUE
// SPLURT EDIT END
return FALSE

/**
Expand Down Expand Up @@ -825,9 +829,29 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)

var/list/standing = list()

// SPLURT EDIT - FERALS
if(H.IsFeral())
H.rotate_on_lying = rotate_on_lying
var/i_state
if(H.stat == DEAD)
i_state = "[id][icon_dead_suffix]"
else if(H.stat != DEAD && !CHECK_MOBILITY(H, MOBILITY_STAND))//Not dead but can't stand up or resting
i_state = "[id][icon_rest_suffix]"
else
i_state = id
var/mutable_appearance/F = mutable_appearance(simple_icon, i_state, BODYPARTS_LAYER)
if(isnull(simple_icon_width))//Their icon_width isn't set so get it now!
var/icon/I = icon(simple_icon)
simple_icon_width = I.Width()
if(simple_icon_width != 32)//We need to recenter!
F.pixel_x += -((simple_icon_width-32)/2)
standing += F
// SPLURT EDIT END

var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)

if(HD && !(HAS_TRAIT(H, TRAIT_HUSK)))
//if(HD && !(HAS_TRAIT(H, TRAIT_HUSK)))
if(HD && !(HAS_TRAIT(H, TRAIT_HUSK)) && !H.IsFeral()) // SPLURT EDIT - FERALS
// lipstick
if(H.lip_style && (LIPS in species_traits))
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/lips.dmi', "lips_[H.lip_style]", -BODY_LAYER)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/surgery/bodyparts/_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@
else if(animal_origin == MONKEY_BODYPART) //currently monkeys are the only non human mob to have damage overlays.
dmg_overlay_type = animal_origin

// SPLURT EDIT - FERALS
if(source?.IsFeral() || owner?.IsFeral())
dmg_overlay_type = null
// SPLURT EDIT END

if(is_robotic_limb())
dmg_overlay_type = "robotic"
if(is_robotic_limb(FALSE))
Expand Down
7 changes: 7 additions & 0 deletions modular_splurt/code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@

// Play the ripped poster sound
playsound(loc, 'sound/items/poster_ripped.ogg', 50, 1)

/// Quickly check if the FERAL flag is in this carbon's species traits
/mob/living/carbon/proc/IsFeral()
var/is_feral = FALSE
if(FERAL in dna?.species?.species_traits)
is_feral = TRUE
return is_feral
Loading
Loading