Skip to content

Commit

Permalink
Merge pull request #51 from honkpocket/le-bug
Browse files Browse the repository at this point in the history
Insectoid base species
  • Loading branch information
Ephemeralis authored Sep 15, 2024
2 parents 745b7e9 + a7f380e commit fc27dfb
Show file tree
Hide file tree
Showing 22 changed files with 236 additions and 14 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/~doppler_defines/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
#define isprimitivedemihuman(A) (is_species(A, /datum/species/human/felinid/primitive))
//Customization bases
#define isfeline(A) (isfelinid(A) || HAS_TRAIT(A, TRAIT_FELINE))
#define isinsectoid(A) (is_species(A, /datum/species/insectoid))
//Species with green blood
#define hasgreenblood(A) (isinsectoid(A) || HAS_TRAIT(A, TRAIT_GREEN_BLOOD))
2 changes: 1 addition & 1 deletion code/__DEFINES/~doppler_defines/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

#define SPECIES_ANTHROMORPH "anthromorph"
#define SPECIES_AQUATIC "aquatic"

#define SPECIES_INSECTOID "insectoid"
3 changes: 3 additions & 0 deletions code/__DEFINES/~doppler_defines/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@

// felinid traits
#define TRAIT_FELINE "feline_aspect"

// Green blood traits
#define TRAIT_GREEN_BLOOD "green_blood"
14 changes: 12 additions & 2 deletions code/datums/wounds/bones.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@
span_danger("You spit out a string of blood from the blow to your chest!"),
vision_distance = COMBAT_MESSAGE_RANGE,
)
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION BEGIN - Green blood color
if(hasgreenblood(victim))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/green(victim.loc, victim.dir)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION END
victim.bleed(blood_bled)
if(20 to INFINITY)
victim.visible_message(
Expand All @@ -168,7 +173,12 @@
vision_distance = COMBAT_MESSAGE_RANGE,
)
victim.bleed(blood_bled)
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION BEGIN - Green blood color
if(hasgreenblood(victim))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/green(victim.loc, victim.dir)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION END
victim.add_splatter_floor(get_step(victim.loc, victim.dir))

/datum/wound/blunt/bone/modify_desc_before_span(desc)
Expand Down
14 changes: 12 additions & 2 deletions code/datums/wounds/pierce.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@
span_danger("You spit out a string of blood from the blow to your [limb.plaintext_zone]!"),
vision_distance = COMBAT_MESSAGE_RANGE,
)
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION BEGIN - Green blood color
if(hasgreenblood(victim))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/green(victim.loc, victim.dir)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION END
victim.bleed(blood_bled)
if(20 to INFINITY)
victim.visible_message(
Expand All @@ -63,7 +68,12 @@
vision_distance = COMBAT_MESSAGE_RANGE,
)
victim.bleed(blood_bled)
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION BEGIN - Green blood color
if(hasgreenblood(victim))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/green(victim.loc, victim.dir)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
// DOPPLER EDIT ADDITION END
victim.add_splatter_floor(get_step(victim.loc, victim.dir))

/datum/wound/pierce/bleed/get_bleed_rate_of_change()
Expand Down
16 changes: 14 additions & 2 deletions code/game/objects/effects/decals/cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,13 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
if(istype(bumped_atom, /obj/structure/window))
land_on_window(bumped_atom)
else
var/obj/effect/decal/cleanable/blood/splatter/over_window/final_splatter = new(prev_loc)
// DOPPLER EDIT CHANGE BEGIN - ORIGINAL: var/obj/effect/decal/cleanable/blood/splatter/over_window/final_splatter = new(prev_loc)
var/obj/effect/decal/cleanable/final_splatter
if(istype(src, /obj/effect/decal/cleanable/blood/hitsplatter/green))
final_splatter = new /obj/effect/decal/cleanable/blood/green/splatter/over_window(prev_loc)
else
final_splatter = new /obj/effect/decal/cleanable/blood/splatter/over_window(prev_loc)
// DOPPLER EDIT CHANGE END
final_splatter.pixel_x = (dir == EAST ? 32 : (dir == WEST ? -32 : 0))
final_splatter.pixel_y = (dir == NORTH ? 32 : (dir == SOUTH ? -32 : 0))
else // This will only happen if prev_loc is not even a turf, which is highly unlikely.
Expand All @@ -449,7 +455,13 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
/obj/effect/decal/cleanable/blood/hitsplatter/proc/land_on_window(obj/structure/window/the_window)
if(!the_window.fulltile)
return
var/obj/effect/decal/cleanable/blood/splatter/over_window/final_splatter = new
// DOPPLER EDIT CHANGE BEGIN - ORIGINAL: var/obj/effect/decal/cleanable/blood/splatter/over_window/final_splatter = new
var/obj/effect/decal/cleanable/final_splatter
if(istype(src, /obj/effect/decal/cleanable/blood/hitsplatter/green))
final_splatter = new /obj/effect/decal/cleanable/blood/green/splatter/over_window(prev_loc)
else
final_splatter = new /obj/effect/decal/cleanable/blood/splatter/over_window(prev_loc)
// DOPPLER EDIT CHANGE END
final_splatter.forceMove(the_window)
the_window.vis_contents += final_splatter
the_window.bloodied = TRUE
Expand Down
16 changes: 13 additions & 3 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@

//to add a splatter of blood or other mob liquid.
/mob/living/proc/add_splatter_floor(turf/T, small_drip)
if(get_blood_id() != /datum/reagent/blood)
if(get_blood_id() != /datum/reagent/blood && !hasgreenblood(src)) // DOPPLER EDIT CHANGE START - ORIGINAL: if(get_blood_id() != /datum/reagent/blood)
return
if(!T)
T = get_turf(src)
Expand All @@ -382,14 +382,24 @@
temp_blood_DNA = GET_ATOM_BLOOD_DNA(drop) //we transfer the dna from the drip to the splatter
qdel(drop)//the drip is replaced by a bigger splatter
else
drop = new(T, get_static_viruses())
// DOPPLER EDIT CHANGE START - ORIGINAL: drop = new(T, get_static_viruses())
if(hasgreenblood(src))
drop = new /obj/effect/decal/cleanable/blood/drip/green(T, get_static_viruses())
else
drop = new(T, get_static_viruses())
// DOPPLER EDIT END
drop.transfer_mob_blood_dna(src)
return

// Find a blood decal or create a new one.
var/obj/effect/decal/cleanable/blood/B = locate() in T
if(!B)
B = new /obj/effect/decal/cleanable/blood/splatter(T, get_static_viruses())
// DOPPLER EDIT CHANGE START - ORIGINAL: B = new /obj/effect/decal/cleanable/blood/splatter(T, get_static_viruses())
if(hasgreenblood(src))
B = new /obj/effect/decal/cleanable/blood/green/splatter(T, get_static_viruses())
else
B = new /obj/effect/decal/cleanable/blood/splatter(T, get_static_viruses())
// DOPPLER EDIT END
if(QDELETED(B)) //Give it up
return
B.bloodiness = min((B.bloodiness + BLOOD_AMOUNT_PER_DECAL), BLOOD_POOL_MAX)
Expand Down
8 changes: 7 additions & 1 deletion code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,13 @@
/mob/living/carbon/proc/spray_blood(splatter_direction, splatter_strength = 3)
if(!isturf(loc))
return
var/obj/effect/decal/cleanable/blood/hitsplatter/our_splatter = new(loc)
// DOPPLER EDIT CHANGE BEGIN - ORIGINAL: var/obj/effect/decal/cleanable/blood/hitsplatter/our_splatter = new(loc)
var/obj/effect/decal/cleanable/blood/hitsplatter/our_splatter
if(hasgreenblood(src))
our_splatter = new /obj/effect/decal/cleanable/blood/hitsplatter/green(loc)
else
our_splatter = new /obj/effect/decal/cleanable/blood/hitsplatter(loc)
// DOPPLER EDIT CHANGE END
our_splatter.add_blood_DNA(GET_ATOM_BLOOD_DNA(src))
our_splatter.blood_dna_info = get_blood_dna_list()
var/turf/targ = get_ranged_target_turf(src, splatter_direction, splatter_strength)
Expand Down
7 changes: 6 additions & 1 deletion code/modules/mob/living/carbon/carbon_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@
var/mutable_appearance/wound_overlay
for(var/obj/item/bodypart/iter_part as anything in bodyparts)
if(iter_part.bleed_overlay_icon)
wound_overlay ||= mutable_appearance('icons/mob/effects/bleed_overlays.dmi', "blank", -WOUND_LAYER, appearance_flags = KEEP_TOGETHER)
// DOPPLER EDIT ADDITION BEGIN - Green blood color
if(hasgreenblood(iter_part.owner))
wound_overlay ||= mutable_appearance('modular_doppler/modular_species/icons/bleed_overlays.dmi', "blank", -WOUND_LAYER, appearance_flags = KEEP_TOGETHER)
else
wound_overlay ||= mutable_appearance('icons/mob/effects/bleed_overlays.dmi', "blank", -WOUND_LAYER, appearance_flags = KEEP_TOGETHER)
// DOPPLER EDIT ADDITION END
wound_overlay.add_overlay(iter_part.bleed_overlay_icon)

if(isnull(wound_overlay))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@
var/splatter_dir = dir
if(starting)
splatter_dir = get_dir(starting, target_turf)
if(isalien(living_target))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target_turf, splatter_dir)
if(isalien(living_target) || hasgreenblood(living_target)) // DOPPLER EDIT CHANGE - Green blood color - Original line: if(isalien(living_target))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/green(target_turf, splatter_dir) // DOPPLER EDIT CHANGE - Green blood color - Original line: new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target_turf, splatter_dir)
else
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_turf, splatter_dir)
if(prob(33))
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ ROUNDSTART_RACES plasmaman
ROUNDSTART_RACES slugcat
ROUNDSTART_RACES anthromorph
ROUNDSTART_RACES aquatic
ROUNDSTART_RACES insectoid

## Races that are better than humans in some ways, but worse in others
ROUNDSTART_RACES ethereal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/datum/sprite_accessory/lizard_markings/insectoid
icon = 'modular_doppler/modular_customization/accessories/icons/insectoid/insectoid_markings.dmi'
name = "Insectoid Pattern"
icon_state = "insect"
gender_specific = FALSE
Binary file not shown.
65 changes: 65 additions & 0 deletions modular_doppler/modular_species/code/bloodsplatter.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/// Green blood reagent
/datum/reagent/blood/green
data = list("viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null,"quirks"=null)
name = "Green Blood"
color = "#50c034" // rgb: 0, 200, 0
metabolization_rate = 12.5 * REAGENTS_METABOLISM //fast rate so it disappears fast.
taste_description = "iron"
taste_mult = 1.3
penetrates_skin = NONE
ph = 7.4
default_container = /obj/item/reagent_containers/blood

/// In this .dm we make a green bloodsplatter subtype
// Using the xenoblood icons
/obj/effect/decal/cleanable/blood/hitsplatter/green
icon = 'modular_doppler/modular_species/icons/blood.dmi'
icon_state = "xhitsplatter1"
random_icon_states = list("xhitsplatter1", "xhitsplatter2", "xhitsplatter3")
blood_state = BLOOD_STATE_XENO

/obj/effect/temp_visual/dir_setting/bloodsplatter/green
splatter_type = "xsplatter"

/obj/effect/decal/cleanable/blood/green
name = "green blood"
desc = "It's green... And it looks like... <i>blood?</i>"
icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
bloodiness = BLOOD_AMOUNT_PER_DECAL
blood_state = BLOOD_STATE_XENO
beauty = -250
clean_type = CLEAN_TYPE_BLOOD

/obj/effect/decal/cleanable/blood/green/splatter
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")

/obj/effect/decal/cleanable/blood/green/splatter/over_window
layer = ABOVE_WINDOW_LAYER
plane = GAME_PLANE
vis_flags = VIS_INHERIT_PLANE
alpha = 180

/obj/effect/decal/cleanable/blood/green/splatter/over_window/NeverShouldHaveComeHere(turf/here_turf)
return isgroundlessturf(here_turf)

/obj/effect/decal/cleanable/blood/drip/green
name = "drips of blood"
desc = "It's green."
icon = 'modular_doppler/modular_species/icons/blood.dmi'
icon_state = "xdrip5"
random_icon_states = list("xdrip1","xdrip2","xdrip3","xdrip4","xdrip5")
should_dry = FALSE //human only thing
blood_state = BLOOD_STATE_XENO
beauty = -150


//getTrail overwrite
/mob/living/carbon/human/getTrail()
if(!(hasgreenblood(src)))
return ..()
if(getBruteLoss() < 300)
return pick (list("xltrails_1", "xltrails2"))
else
return pick (list("xttrails_1", "xttrails2"))
Binary file not shown.
Binary file added modular_doppler/modular_species/icons/blood.dmi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/mob/living/carbon/human/species/insectoid
race = /datum/species/insectoid

/datum/species/insectoid
name = "\improper Insectoid"
plural_form = "Insectoid"
id = SPECIES_INSECTOID
inherent_traits = list(
TRAIT_MUTANT_COLORS,
)
body_markings = list(/datum/bodypart_overlay/simple/body_marking/lizard = "Insectoid Pattern")
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID
payday_modifier = 1.0
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
exotic_blood = /datum/reagent/blood/green
exotic_bloodtype = "I*"

digitigrade_customization = DIGITIGRADE_OPTIONAL
bodypart_overrides = list(
BODY_ZONE_HEAD = /obj/item/bodypart/head/insectoid,
BODY_ZONE_CHEST = /obj/item/bodypart/chest/insectoid,
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/insectoid,
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/insectoid,
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/insectoid,
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/insectoid,
)
digi_leg_overrides = list(
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/digitigrade/insectoid,
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/digitigrade/insectoid,
)


/datum/species/insectoid/get_species_description()
return "Nothing yet."

/datum/species/insectoid/get_species_lore()
return list(
"Nothing yet.",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/obj/item/bodypart/head/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
eyes_icon = 'modular_doppler/modular_species/species_types/insectoid/icons/eyes.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN
is_dimorphic = FALSE

/obj/item/bodypart/chest/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/arm/left/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/arm/right/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/leg/left/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/leg/left/digitigrade/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/leg/left/digitigrade/insectoid/update_limb(dropping_limb = FALSE, is_creating = FALSE)
. = ..()
if(limb_id == SPECIES_LIZARD)
limb_id = SPECIES_INSECTOID

/obj/item/bodypart/leg/right/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
limb_id = SPECIES_INSECTOID
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/leg/right/digitigrade/insectoid
icon_greyscale = 'modular_doppler/modular_species/species_types/insectoid/icons/bodyparts.dmi'
damage_overlay_color = COLOR_DARK_MODERATE_LIME_GREEN

/obj/item/bodypart/leg/right/digitigrade/insectoid/update_limb(dropping_limb = FALSE, is_creating = FALSE)
. = ..()
if(limb_id == SPECIES_LIZARD)
limb_id = SPECIES_INSECTOID
4 changes: 4 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6618,6 +6618,7 @@
#include "modular_doppler\modular_customization\accessories\code\insectoid_accessories\insect_fluff.dm"
#include "modular_doppler\modular_customization\accessories\code\insectoid_accessories\insect_tail.dm"
#include "modular_doppler\modular_customization\accessories\code\insectoid_accessories\insect_wings.dm"
#include "modular_doppler\modular_customization\accessories\code\insectoid_accessories\insectoid_body_markings.dm"
#include "modular_doppler\modular_customization\accessories\code\lizard_accessories\lizard_body_markings.dm"
#include "modular_doppler\modular_customization\accessories\code\lizard_accessories\lizard_ears.dm"
#include "modular_doppler\modular_customization\accessories\code\lizard_accessories\lizard_frills.dm"
Expand Down Expand Up @@ -6702,11 +6703,14 @@
#include "modular_doppler\modular_medical\wounds\wound_effects.dm"
#include "modular_doppler\modular_mob_spawn\code\mob_spawn.dm"
#include "modular_doppler\modular_sounds\code\sounds.dm"
#include "modular_doppler\modular_species\code\bloodsplatter.dm"
#include "modular_doppler\modular_species\overwrites\code\species.dm"
#include "modular_doppler\modular_species\species_types\anthromorph\anthromorph.dm"
#include "modular_doppler\modular_species\species_types\anthromorph\anthromorph_bodyparts.dm"
#include "modular_doppler\modular_species\species_types\aquatic\aquatic.dm"
#include "modular_doppler\modular_species\species_types\aquatic\aquatic_bodyparts.dm"
#include "modular_doppler\modular_species\species_types\insectoid\insectoid.dm"
#include "modular_doppler\modular_species\species_types\insectoid\insectoid_bodyparts.dm"
#include "modular_doppler\modular_species\species_types\monkey\monkeys.dm"
#include "modular_doppler\modular_species\species_types\primitive_demihuman\primitive_demihuman.dm"
#include "modular_doppler\modular_species\species_types\slugcats\slugcat.dm"
Expand Down

0 comments on commit fc27dfb

Please sign in to comment.