Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed Jun 18, 2024
2 parents 3322606 + 4366fe5 commit bd83a98
Show file tree
Hide file tree
Showing 123 changed files with 3,273 additions and 2,774 deletions.
7 changes: 6 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
#define BODYTYPE_ALIEN (1<<3)
///The limb is from a golem
#define BODYTYPE_GOLEM (1<<4)
//The limb is a peg limb
#define BODYTYPE_PEG (1<<5)

// Bodyshape defines for how things can be worn, i.e., what "shape" the mob sprite is
///The limb fits the human mold. This is not meant to be literal, if the sprite "fits" on a human, it is "humanoid", regardless of origin.
Expand All @@ -95,7 +97,7 @@
///The limb is snouted.
#define BODYSHAPE_SNOUTED (1<<3)

#define BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE (BODYTYPE_ROBOTIC | BODYTYPE_LARVA_PLACEHOLDER | BODYTYPE_GOLEM)
#define BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE (BODYTYPE_ROBOTIC | BODYTYPE_LARVA_PLACEHOLDER | BODYTYPE_GOLEM | BODYTYPE_PEG)
#define BODYTYPE_CAN_BE_BIOSCRAMBLED(bodytype) (!(bodytype & BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE))

// Defines for Species IDs. Used to refer to the name of a species, for things like bodypart names or species preferences.
Expand Down Expand Up @@ -135,6 +137,8 @@
#define BODYPART_ID_LARVA "larva"
#define BODYPART_ID_PSYKER "psyker"
#define BODYPART_ID_MEAT "meat"
#define BODYPART_ID_PEG "peg"


//See: datum/species/var/digitigrade_customization
///The species does not have digitigrade legs in generation.
Expand Down Expand Up @@ -631,6 +635,7 @@
// Otherwise they are completely arbitrary
#define MONKEY_HEIGHT_DWARF 2
#define MONKEY_HEIGHT_MEDIUM 4
#define MONKEY_HEIGHT_TALL HUMAN_HEIGHT_DWARF
#define HUMAN_HEIGHT_DWARF 6
#define HUMAN_HEIGHT_SHORTEST 8
#define HUMAN_HEIGHT_SHORT 10
Expand Down
9 changes: 8 additions & 1 deletion code/__DEFINES/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
//! Techweb names for new point types. Can be used to define specific point values for specific types of research (science, security, engineering, etc.)
#define TECHWEB_POINT_TYPE_GENERIC "General Research"

//! Amount of points required to unlock nodes of corresponding tiers
#define TECHWEB_TIER_1_POINTS 40
#define TECHWEB_TIER_2_POINTS 80
#define TECHWEB_TIER_3_POINTS 120
#define TECHWEB_TIER_4_POINTS 160
#define TECHWEB_TIER_5_POINTS 200

//! Amount of points gained per second by a single R&D server, see: [research][code/controllers/subsystem/research.dm]
#define TECHWEB_SINGLE_SERVER_INCOME 52.3
#define TECHWEB_SINGLE_SERVER_INCOME 1

//! Swab cell line types
#define CELL_LINE_TABLE_SLUDGE "cell_line_sludge_table"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/research/slimes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
#define SLIME_TYPE_SEPIA "sepia"
#define SLIME_TYPE_SILVER "silver"
#define SLIME_TYPE_YELLOW "yellow"

// The alpha value of transperent slime types
#define SLIME_TRANSPARENCY_ALPHA 180
2 changes: 2 additions & 0 deletions code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define IS_ORGANIC_LIMB(limb) (limb.bodytype & BODYTYPE_ORGANIC)
/// Helper to figure out if a limb is robotic
#define IS_ROBOTIC_LIMB(limb) (limb.bodytype & BODYTYPE_ROBOTIC)
/// Helper to figure out if a limb is a peg limb
#define IS_PEG_LIMB(limb) (limb.bodytype & BODYTYPE_PEG)

// Flags for the bodypart_flags var on /obj/item/bodypart
/// Bodypart cannot be dismembered or amputated
Expand Down
6 changes: 4 additions & 2 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_AGENDER "agender"
/// Species with this trait have a blood clan mechanic
#define TRAIT_BLOOD_CLANS "blood_clans"
/// Species with this trait have markings (this SUCKS, remove this later in favor of bodypart overlays)
#define TRAIT_HAS_MARKINGS "has_markings"
/// Species with this trait use skin tones for coloration
#define TRAIT_USES_SKINTONES "uses_skintones"
/// Species with this trait use mutant colors for coloration
Expand Down Expand Up @@ -366,6 +364,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_GAMERGOD "gamer-god"
#define TRAIT_GIANT "giant"
#define TRAIT_DWARF "dwarf"
/// Makes you way too tall. Like just too much, dude, it's kind of creepy. Humanoid only.
#define TRAIT_TOO_TALL "too_tall"
/// makes your footsteps completely silent
#define TRAIT_SILENT_FOOTSTEPS "silent_footsteps"
/// hnnnnnnnggggg..... you're pretty good....
Expand Down Expand Up @@ -1153,5 +1153,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

/// This item cannot be selected for or used by a theft objective (Spies, Traitors, etc.)
#define TRAIT_ITEM_OBJECTIVE_BLOCKED "item_objective_blocked"
/// This trait lets you attach limbs to any player without surgery.
#define TRAIT_EASY_ATTACH "easy_attach"

// END TRAIT DEFINES
2 changes: 2 additions & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ DEFINE_BITFIELD(bodytype, list(
"BODYTYPE_LARVA_PLACEHOLDER" = BODYTYPE_LARVA_PLACEHOLDER,
"BODYTYPE_ALIEN" = BODYTYPE_ALIEN,
"BODYTYPE_GOLEM" = BODYTYPE_GOLEM,
"BODYTYPE_PEG" = BODYTYPE_PEG,
))

DEFINE_BITFIELD(acceptable_bodytype, list(
Expand All @@ -398,6 +399,7 @@ DEFINE_BITFIELD(acceptable_bodytype, list(
"BODYTYPE_LARVA_PLACEHOLDER" = BODYTYPE_LARVA_PLACEHOLDER,
"BODYTYPE_ALIEN" = BODYTYPE_ALIEN,
"BODYTYPE_GOLEM" = BODYTYPE_GOLEM,
"BODYTYPE_PEG" = BODYTYPE_PEG,
))

DEFINE_BITFIELD(bodyshape, list(
Expand Down
5 changes: 4 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_HARDLY_WOUNDED" = TRAIT_HARDLY_WOUNDED,
"TRAIT_HAS_BEEN_KIDNAPPED" = TRAIT_HAS_BEEN_KIDNAPPED,
"TRAIT_HAS_CRANIAL_FISSURE" = TRAIT_HAS_CRANIAL_FISSURE,
"TRAIT_HAS_MARKINGS" = TRAIT_HAS_MARKINGS,
"TRAIT_HATED_BY_DOGS" = TRAIT_HATED_BY_DOGS,
"TRAIT_HEAD_INJURY_BLOCKED" = TRAIT_HEAD_INJURY_BLOCKED,
"TRAIT_HEALS_FROM_CARP_RIFTS" = TRAIT_HEALS_FROM_CARP_RIFTS,
Expand Down Expand Up @@ -465,6 +464,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_THINKING_IN_CHARACTER" = TRAIT_THINKING_IN_CHARACTER,
"TRAIT_THROWINGARM" = TRAIT_THROWINGARM,
"TRAIT_TIME_STOP_IMMUNE" = TRAIT_TIME_STOP_IMMUNE,
"TRAIT_TOO_TALL" = TRAIT_TOO_TALL,
"TRAIT_TOWER_OF_BABEL" = TRAIT_TOWER_OF_BABEL,
"TRAIT_TOXIMMUNE" = TRAIT_TOXIMMUNE,
"TRAIT_TOXINLOVER" = TRAIT_TOXINLOVER,
Expand Down Expand Up @@ -548,6 +548,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS,
),
/obj/item/bodypart = list(
"TRAIT_EASY_ATTACH" = TRAIT_EASY_ATTACH,
),
/obj/item/card/id = list(
"TRAIT_JOB_FIRST_ID_CARD" = TRAIT_JOB_FIRST_ID_CARD,
"TRAIT_MAGNETIC_ID_CARD" = TRAIT_MAGNETIC_ID_CARD,
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_GUNFLIP" = TRAIT_GUNFLIP,
"TRAIT_HANDS_BLOCKED" = TRAIT_HANDS_BLOCKED,
"TRAIT_HARDLY_WOUNDED" = TRAIT_HARDLY_WOUNDED,
"TRAIT_HAS_MARKINGS" = TRAIT_HAS_MARKINGS,
"TRAIT_HEAVY_SLEEPER" = TRAIT_HEAVY_SLEEPER,
"TRAIT_HIDE_EXTERNAL_ORGANS" = TRAIT_HIDE_EXTERNAL_ORGANS,
"TRAIT_HOLY" = TRAIT_HOLY,
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/sprite_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SUBSYSTEM_DEF(accessories) // just 'accessories' for brevity
var/list/socks_list //! stores /datum/sprite_accessory/socks indexed by name

//Lizard Bits (all datum lists indexed by name)
var/list/body_markings_list
var/list/lizard_markings_list
var/list/snouts_list
var/list/horns_list
var/list/frills_list
Expand Down Expand Up @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(accessories) // just 'accessories' for brevity

socks_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/socks)[DEFAULT_SPRITE_LIST]

body_markings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings)[DEFAULT_SPRITE_LIST]
lizard_markings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/lizard_markings)[DEFAULT_SPRITE_LIST]
tails_list_human = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, add_blank = TRUE)[DEFAULT_SPRITE_LIST]
tails_list_lizard = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, add_blank = TRUE)[DEFAULT_SPRITE_LIST]
tails_list_monkey = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, add_blank = TRUE)[DEFAULT_SPRITE_LIST]
Expand Down
14 changes: 7 additions & 7 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,13 @@ SUBSYSTEM_DEF(ticker)

to_chat(world, span_boldannounce("Rebooting World in [DisplayTimeText(delay)]. [reason]"))

var/statspage = CONFIG_GET(string/roundstatsurl)
var/gamelogloc = CONFIG_GET(string/gamelogurl)
if(statspage)
to_chat(world, span_info("Round statistics and logs can be viewed <a href=\"[statspage][GLOB.round_id]\">at this website!</a>"))
else if(gamelogloc)
to_chat(world, span_info("Round logs can be located <a href=\"[gamelogloc]\">at this website!</a>"))

var/start_wait = world.time
UNTIL(round_end_sound_sent || (world.time - start_wait) > (delay * 2)) //don't wait forever
sleep(delay - (world.time - start_wait))
Expand All @@ -707,13 +714,6 @@ SUBSYSTEM_DEF(ticker)
if(end_string)
end_state = end_string

var/statspage = CONFIG_GET(string/roundstatsurl)
var/gamelogloc = CONFIG_GET(string/gamelogurl)
if(statspage)
to_chat(world, span_info("Round statistics and logs can be viewed <a href=\"[statspage][GLOB.round_id]\">at this website!</a>"))
else if(gamelogloc)
to_chat(world, span_info("Round logs can be located <a href=\"[gamelogloc]\">at this website!</a>"))

log_game(span_boldannounce("Rebooting World. [reason]"))

world.Reboot()
Expand Down
31 changes: 31 additions & 0 deletions code/datums/bodypart_overlays/markings_bodypart_overlay.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/// For body markings applied on the species, which need some extra code
/datum/bodypart_overlay/simple/body_marking
layers = EXTERNAL_ADJACENT
/// Listen to the gendercode, if the limb is bimorphic
var/use_gender = FALSE
/// Which dna feature key to draw from
var/dna_feature_key
/// Which bodyparts do we apply ourselves to?
var/list/applies_to = list(/obj/item/bodypart/head, /obj/item/bodypart/chest, /obj/item/bodypart/arm/left, /obj/item/bodypart/arm/right, \
/obj/item/bodypart/leg/left, /obj/item/bodypart/leg/right)

/// Get the accessory list from SSaccessories. Used in species.dm to get the right sprite
/datum/bodypart_overlay/simple/body_marking/proc/get_accessory(name)
CRASH("get_accessories() not overriden on [type] !")

/datum/bodypart_overlay/simple/body_marking/get_image(layer, obj/item/bodypart/limb)
var/gender_string = (use_gender && limb.is_dimorphic) ? (limb.gender == MALE ? MALE : FEMALE + "_") : "" //we only got male and female sprites
return image(icon, gender_string + icon_state + "_" + limb.body_zone, layer = layer)

/datum/bodypart_overlay/simple/body_marking/moth
dna_feature_key = "moth_markings"

/datum/bodypart_overlay/simple/body_marking/moth/get_accessory(name)
return SSaccessories.moth_markings_list[name]

/datum/bodypart_overlay/simple/body_marking/lizard
dna_feature_key = "lizard_markings"
applies_to = list(/obj/item/bodypart/chest)

/datum/bodypart_overlay/simple/body_marking/lizard/get_accessory(name)
return SSaccessories.lizard_markings_list[name]
18 changes: 7 additions & 11 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
L[DNA_MUTANT_COLOR_BLOCK] = sanitize_hexcolor(features["mcolor"], include_crunch = FALSE)
if(features["ethcolor"])
L[DNA_ETHEREAL_COLOR_BLOCK] = sanitize_hexcolor(features["ethcolor"], include_crunch = FALSE)
if(features["body_markings"])
L[DNA_LIZARD_MARKINGS_BLOCK] = construct_block(SSaccessories.body_markings_list.Find(features["body_markings"]), length(SSaccessories.body_markings_list))
if(features["lizard_markings"])
L[DNA_LIZARD_MARKINGS_BLOCK] = construct_block(SSaccessories.lizard_markings_list.Find(features["lizard_markings"]), length(SSaccessories.lizard_markings_list))
if(features["tail_cat"])
L[DNA_TAIL_BLOCK] = construct_block(SSaccessories.tails_list_human.Find(features["tail_cat"]), length(SSaccessories.tails_list_human))
if(features["tail_lizard"])
Expand Down Expand Up @@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
if(DNA_ETHEREAL_COLOR_BLOCK)
set_uni_feature_block(blocknumber, sanitize_hexcolor(features["ethcolor"], include_crunch = FALSE))
if(DNA_LIZARD_MARKINGS_BLOCK)
set_uni_feature_block(blocknumber, construct_block(SSaccessories.body_markings_list.Find(features["body_markings"]), length(SSaccessories.body_markings_list)))
set_uni_feature_block(blocknumber, construct_block(SSaccessories.lizard_markings_list.Find(features["lizard_markings"]), length(SSaccessories.lizard_markings_list)))
if(DNA_TAIL_BLOCK)
set_uni_feature_block(blocknumber, construct_block(SSaccessories.tails_list_human.Find(features["tail_cat"]), length(SSaccessories.tails_list_human)))
if(DNA_LIZARD_TAIL_BLOCK)
Expand Down Expand Up @@ -423,7 +423,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
/datum/dna/proc/update_instability(alert=TRUE)
stability = 100
for(var/datum/mutation/human/M in mutations)
if(M.class == MUT_EXTRA)
if(M.class == MUT_EXTRA || M.instability < 0)
stability -= M.instability * GET_MUTATION_STABILIZER(M)
if(holder)
var/message
Expand Down Expand Up @@ -649,8 +649,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
dna.features["mcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_MUTANT_COLOR_BLOCK))
if(dna.features["ethcolor"])
dna.features["ethcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_ETHEREAL_COLOR_BLOCK))
if(dna.features["body_markings"])
dna.features["body_markings"] = SSaccessories.body_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_MARKINGS_BLOCK), length(SSaccessories.body_markings_list))]
if(dna.features["lizard_markings"])
dna.features["lizard_markings"] = SSaccessories.lizard_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_MARKINGS_BLOCK), length(SSaccessories.lizard_markings_list))]
if(dna.features["snout"])
dna.features["snout"] = SSaccessories.snouts_list[deconstruct_block(get_uni_feature_block(features, DNA_SNOUT_BLOCK), length(SSaccessories.snouts_list))]
if(dna.features["horns"])
Expand Down Expand Up @@ -686,14 +686,10 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
external_organ.mutate_feature(features, src)

if(icon_update)
if(mutcolor_update)
update_body(is_creating = TRUE)
else
update_body()
update_body(is_creating = mutcolor_update)
if(mutations_overlay_update)
update_mutations_overlay()


/mob/proc/domutcheck()
return

Expand Down
20 changes: 20 additions & 0 deletions code/datums/mutations/_mutations.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@

/// Negatives that are virtually harmless and mostly just funny (language)
// Set to 0 because munchkinning via miscommunication = bad
#define NEGATIVE_STABILITY_MINI 0
/// Negatives that are slightly annoying (unused)
#define NEGATIVE_STABILITY_MINOR -20
/// Negatives that present an uncommon or weak, consistent hindrance to gameplay (cough, paranoia)
#define NEGATIVE_STABILITY_MODERATE -30
/// Negatives that present a major consistent hindrance to gameplay (deaf, mute, acid flesh)
#define NEGATIVE_STABILITY_MAJOR -40

/// Positives that provide basically no benefit (glowy)
#define POSITIVE_INSTABILITY_MINI 5
/// Positives that are niche in application or useful in rare circumstances (parlor tricks, geladikinesis, autotomy)
#define POSITIVE_INSTABILITY_MINOR 10
/// Positives that provide a new ability that's roughly par with station equipment (insulated, cryokinesis)
#define POSITIVE_INSTABILITY_MODERATE 25
/// Positives that are unique, very powerful, and noticeably change combat/gameplay (hulk, tk)
#define POSITIVE_INSTABILITY_MAJOR 35

/datum/mutation
var/name

Expand Down
4 changes: 2 additions & 2 deletions code/datums/mutations/adaptation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
quality = POSITIVE
difficulty = 16
text_gain_indication = "<span class='notice'>Your body feels warm!</span>"
instability = 25
instability = POSITIVE_INSTABILITY_MAJOR
conflicts = list(/datum/mutation/human/pressure_adaptation)

/datum/mutation/human/temperature_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
Expand All @@ -31,7 +31,7 @@
quality = POSITIVE
difficulty = 16
text_gain_indication = "<span class='notice'>Your body feels numb!</span>"
instability = 25
instability = POSITIVE_INSTABILITY_MAJOR
conflicts = list(/datum/mutation/human/temperature_adaptation)

/datum/mutation/human/pressure_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/mutations/antenna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
quality = POSITIVE
text_gain_indication = "<span class='notice'>You feel an antenna sprout from your forehead.</span>"
text_lose_indication = "<span class='notice'>Your antenna shrinks back down.</span>"
instability = 5
instability = POSITIVE_INSTABILITY_MINOR
difficulty = 8
var/datum/weakref/radio_weakref

Expand Down Expand Up @@ -47,7 +47,7 @@
text_gain_indication = "<span class='notice'>You hear distant voices at the corners of your mind.</span>"
text_lose_indication = "<span class='notice'>The distant voices fade.</span>"
power_path = /datum/action/cooldown/spell/pointed/mindread
instability = 40
instability = POSITIVE_INSTABILITY_MINOR
difficulty = 8
locked = TRUE

Expand Down
2 changes: 1 addition & 1 deletion code/datums/mutations/autotomy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "Allows a creature to voluntary discard a random appendage."
quality = POSITIVE
text_gain_indication = span_notice("Your joints feel loose.")
instability = 30
instability = POSITIVE_INSTABILITY_MINOR
power_path = /datum/action/cooldown/spell/self_amputation

energy_coeff = 1
Expand Down
Loading

0 comments on commit bd83a98

Please sign in to comment.