Skip to content

Commit

Permalink
[IDB Ignore] Ports like 10 or 12 of my PRs from TG, also makes Silver…
Browse files Browse the repository at this point in the history
…scale blood Silver (MrMelbert#482)
  • Loading branch information
MrMelbert authored May 15, 2024
1 parent c4a2241 commit 54659eb
Show file tree
Hide file tree
Showing 124 changed files with 1,467 additions and 901 deletions.
1 change: 1 addition & 0 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# Format is version: map
# Example:
# 500.1337: runtimestation
515.1626: runtimestation
17 changes: 0 additions & 17 deletions .github/workflows/has_515_compatibility.yml

This file was deleted.

2 changes: 2 additions & 0 deletions code/__DEFINES/_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,5 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define EMOTE_VISIBLE (1<<1)
/// Is it an emote that should be shown regardless of blindness/deafness
#define EMOTE_IMPORTANT (1<<2)
/// Emote only prints to runechat, not to the chat window
#define EMOTE_RUNECHAT (1<<3)
2 changes: 0 additions & 2 deletions code/__DEFINES/alerts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@
#define ALERT_HACKING_APC "hackingapc"

/** MODsuit/Mech related */
#define ALERT_MODSUIT_CHARGE "mod_charge"
#define ALERT_MECH_DAMAGE "mech_damage"

/** Food related */
#define ALERT_NUTRITION "nutrition"
#define ALERT_DISGUST "disgust"

/** Environment related */
Expand Down
7 changes: 3 additions & 4 deletions code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
///from base of atom/get_examine_name(): (/mob, list/overrides)
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
//Positions for overrides list
#define EXAMINE_POSITION_ARTICLE (1<<0)
#define EXAMINE_POSITION_BEFORE (1<<1)
//End positions
#define COMPONENT_EXNAME_CHANGED (1<<0)
#define EXAMINE_POSITION_ARTICLE 1
#define EXAMINE_POSITION_BEFORE 2
#define EXAMINE_POSITION_NAME 3
///from base of atom/examine(): (/mob, list/examine_text, can_see_inside)
#define COMSIG_ATOM_REAGENT_EXAMINE "atom_reagent_examine"
/// Stop the generic reagent examine text
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack"
///from base of obj/item/afterattack_secondary(): (atom/target, obj/item/weapon, proximity_flag, click_parameters)
#define COMSIG_MOB_ITEM_AFTERATTACK_SECONDARY "mob_item_afterattack_secondary"
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_MOB_ITEM_ATTACK_QDELETED "mob_item_attack_qdeleted"
///from base of mob/RangedAttack(): (atom/A, modifiers)
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged"
///from base of mob/ranged_secondary_attack(): (atom/target, modifiers)
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@
#define COMPONENT_AFTERATTACK_PROCESSED_ITEM (1<<0)
///from base of obj/item/afterattack_secondary(): (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_ITEM_AFTERATTACK_SECONDARY "item_afterattack_secondary"
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params)
#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted"
///from base of obj/item/embedded(): (atom/target, obj/item/bodypart/part)
#define COMSIG_ITEM_EMBEDDED "item_embedded"
///from base of datum/component/embedded/safeRemove(): (mob/living/carbon/victim)
Expand Down
8 changes: 1 addition & 7 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@
#define ui_language_menu "EAST-4:6,SOUTH:21"
#define ui_navigate_menu "EAST-4:22,SOUTH:5"

//Upper-middle right (alerts)
#define ui_alert1 "EAST-1:28,CENTER+5:27"
#define ui_alert2 "EAST-1:28,CENTER+4:25"
#define ui_alert3 "EAST-1:28,CENTER+3:23"
#define ui_alert4 "EAST-1:28,CENTER+2:21"
#define ui_alert5 "EAST-1:28,CENTER+1:19"

//Upper left (action buttons)
#define ui_action_palette "WEST+0:23,NORTH-1:5"
#define ui_action_palette_offset(north_offset) ("WEST+0:23,NORTH-[1+north_offset]:5")
Expand All @@ -97,6 +90,7 @@
#define ui_health "EAST-1:28,CENTER-1:19"
#define ui_internal "EAST-1:28,CENTER+1:21"
#define ui_mood "EAST-1:28,CENTER:21"
#define ui_hunger "EAST-1:2,CENTER:21"
#define ui_spacesuit "EAST-1:28,CENTER-4:14"
#define ui_stamina "EAST-1:28,CENTER-3:14"

Expand Down
11 changes: 5 additions & 6 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@
#define SANITY_LEVEL_UNSTABLE 4
#define SANITY_LEVEL_CRAZY 5
#define SANITY_LEVEL_INSANE 6
/// Equal to the highest sanity level
#define SANITY_LEVEL_MAX SANITY_LEVEL_INSANE

//Nutrition levels for humans
#define NUTRITION_LEVEL_FAT 600
Expand Down Expand Up @@ -491,9 +493,6 @@
#define ROBOTIC_BRUTE_EXAMINE_TEXT "denting"
#define ROBOTIC_BURN_EXAMINE_TEXT "charring"

// If a mob has a higher threshold than this, the icon shown will be increased to the big fire icon.
#define MOB_BIG_FIRE_STACK_THRESHOLD 3

#define GRAB_PIXEL_SHIFT_PASSIVE 6
#define GRAB_PIXEL_SHIFT_AGGRESSIVE 12
#define GRAB_PIXEL_SHIFT_NECK 16
Expand Down Expand Up @@ -761,8 +760,8 @@ GLOBAL_LIST_INIT(human_heights_to_offsets, list(
#define WOUND_LAYER 3
/// Blood cult ascended halo layer, because there's currently no better solution for adding/removing
#define HALO_LAYER 2
/// Fire layer when you're on fire
#define FIRE_LAYER 1
/// The highest most layer for mob overlays. Unused
#define HIGHEST_LAYER 1

#define UPPER_BODY "upper body"
#define LOWER_BODY "lower body"
Expand Down Expand Up @@ -803,7 +802,7 @@ GLOBAL_LIST_INIT(layers_to_offset, list(
// BODY_BEHIND_LAYER (external organs like wings)
// BODY_FRONT_LAYER (external organs like wings)
// DAMAGE_LAYER (full body)
// FIRE_LAYER (full body)
// HIGHEST_LAYER (full body)
// UNIFORM_LAYER (full body)
// WOUND_LAYER (full body)
))
Expand Down
7 changes: 6 additions & 1 deletion code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,10 @@



//Used in visible_message_flags, audible_message_flags and runechat_flags
// Used in visible_message_flags, audible_message_flags and runechat_flags
/// Automatically applies emote related spans/fonts/formatting to the message
#define EMOTE_MESSAGE (1<<0)
/// By default, self_message will respect the visual / audible component of the message.
/// Meaning that if the message is visual, and sourced from a blind mob, they will not see it.
/// This flag skips that behavior, and will always show the self message to the mob.
#define ALWAYS_SHOW_SELF_MESSAGE (1<<1)
6 changes: 6 additions & 0 deletions code/__DEFINES/sprite_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
#define FACIAL_HAIR_COLOR "facial_hair_color"
/// Color of the sprite accessory will match the owner's (left) eye color
#define EYE_COLOR "eye_color"

// ~color source defines for species hair overrides
/// Uses the species's mutant color for the hair color
#define USE_MUTANT_COLOR "use_mutant_color"
/// Uses the species's fixed mutant color for the hair color
#define USE_FIXED_MUTANT_COLOR "use_fixed_mutant_color"
3 changes: 2 additions & 1 deletion code/__DEFINES/stat_tracking.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
#define EXPORT_STATS_TO_FILE_LATER(filename, costs, counts, proc) \
do { \
var/static/last_export = 0; \
if (world.time - last_export > 1.1 SECONDS) { \
/* Need to always run if we haven't yet, since this code can be placed ANYWHERE */ \
if (world.time - last_export > 1.1 SECONDS || (last_export == 0)) { \
last_export = world.time; \
/* spawn() is used here because this is often used to track init times, where timers act oddly. */ \
/* I was making timers and even after init times were complete, the timers didn't run :shrug: */ \
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
/// If the incapacitated status effect will ignore a mob being agressively grabbed
#define IGNORE_GRAB (1<<2)

/// Maxamounts of fire stacks a mob can get
#define MAX_FIRE_STACKS 20
/// If a mob has a higher threshold than this, the icon shown will be increased to the big fire icon.
#define MOB_BIG_FIRE_STACK_THRESHOLD 3

// Grouped effect sources, see also code/__DEFINES/traits.dm

#define STASIS_MACHINE_EFFECT "stasis_machine"
Expand Down
5 changes: 3 additions & 2 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_TUMOR_SUPPRESSED "brain_tumor_suppressed"
/// Prevents hallucinations from the hallucination brain trauma (RDS)
#define TRAIT_RDS_SUPPRESSED "rds_suppressed"
/// mobs that have this trait cannot be extinguished
#define TRAIT_PERMANENTLY_ONFIRE "permanently_onfire"
/// Mobs that have this trait cannot be extinguished
#define TRAIT_NO_EXTINGUISH "no_extinguish"
/// Indicates if the mob is currently speaking with sign language
#define TRAIT_SIGN_LANG "sign_language"
/// This mob is able to use sign language over the radio.
Expand Down Expand Up @@ -732,6 +732,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_POSTERBOY "poster_boy"
#define TRAIT_THROWINGARM "throwing_arm"
#define TRAIT_SETTLER "settler"
#define TRAIT_STRONG_STOMACH "strong_stomach"

/// This mob always lands on their feet when they fall, for better or for worse.
#define TRAIT_CATLIKE_GRACE "catlike_grace"
Expand Down
143 changes: 80 additions & 63 deletions code/__HELPERS/type_processing.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,60 @@
/proc/make_types_fancy(list/types)
if (ispath(types))
types = list(types)
. = list()
for(var/type in types)
var/typename = "[type]"
// Longest paths comes first
var/static/list/TYPES_SHORTCUTS = list(
/obj/effect/decal/cleanable = "CLEANABLE",
var/static/list/types_to_replacement
var/static/list/replacement_to_text
if(!types_to_replacement)
// Longer paths come after shorter ones, try and keep the structure
var/list/work_from = list(
/datum = "DATUM",
/area = "AREA",
/atom/movable = "MOVABLE",
/obj = "OBJ",
/turf = "TURF",
/turf/closed = "CLOSED",
/turf/open = "OPEN",

/mob = "MOB",
/mob/living = "LIVING",
/mob/living/carbon = "CARBON",
/mob/living/carbon/human = "HUMANOID",
/mob/living/simple_animal = "SIMPLE",
/mob/living/basic = "BASIC",
/mob/living/silicon = "SILICON",
/mob/living/silicon/robot = "CYBORG",

/obj/item = "ITEM",
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
/obj/item/mecha_parts/mecha_equipment/weapon = "MECHA_WEAPON",
/obj/item/organ = "ORGAN",
/obj/item/mod/control = "MODSUIT",
/obj/item/mod/module = "MODSUIT_MOD",
/obj/item/gun = "GUN",
/obj/item/gun/magic = "GUN_MAGIC",
/obj/item/gun/energy = "GUN_ENERGY",
/obj/item/gun/energy/laser = "GUN_LASER",
/obj/item/gun/ballistic = "GUN_BALLISTIC",
/obj/item/gun/ballistic/automatic = "GUN_AUTOMATIC",
/obj/item/gun/ballistic/revolver = "GUN_REVOLVER",
/obj/item/gun/ballistic/rifle = "GUN_RIFLE",
/obj/item/gun/ballistic/shotgun = "GUN_SHOTGUN",
/obj/item/stack/sheet = "SHEET",
/obj/item/stack/sheet/mineral = "MINERAL_SHEET",
/obj/item/stack/ore = "ORE",
/obj/item/ai_module = "AI_LAW_MODULE",
/obj/item/circuitboard = "CIRCUITBOARD",
/obj/item/circuitboard/machine = "MACHINE_BOARD",
/obj/item/circuitboard/computer = "COMPUTER_BOARD",
/obj/item/reagent_containers = "REAGENT_CONTAINERS",
/obj/item/reagent_containers/pill = "PILL",
/obj/item/reagent_containers/pill/patch = "MEDPATCH",
/obj/item/reagent_containers/hypospray/medipen = "MEDIPEN",
/obj/item/reagent_containers/cup/glass = "DRINK",
/obj/item/food = "FOOD",
/obj/item/bodypart = "BODYPART",
/obj/effect/decal/cleanable = "CLEANABLE",
/obj/item/radio/headset = "HEADSET",
/obj/item/clothing = "CLOTHING",
/obj/item/clothing/accessory = "ACCESSORY",
/obj/item/clothing/mask/gas = "GASMASK",
/obj/item/clothing/mask = "MASK",
Expand All @@ -21,75 +67,46 @@
/obj/item/clothing/head/helmet = "HELMET",
/obj/item/clothing/head = "HEAD",
/obj/item/clothing/neck = "NECK",
/obj/item/clothing = "CLOTHING",
/obj/item/storage/backpack = "BACKPACK",
/obj/item/storage/belt = "BELT",
/obj/item/book/manual = "MANUAL",
/obj/item/storage/pill_bottle = "PILL_BOTTLE",
/obj/item/reagent_containers/pill/patch = "MEDPATCH",
/obj/item/reagent_containers/pill = "PILL",
/obj/item/reagent_containers/hypospray/medipen = "MEDIPEN",
/obj/item/reagent_containers/cup/glass = "DRINK",
/obj/item/food = "FOOD",
/obj/item/reagent_containers = "REAGENT_CONTAINERS",
/obj/machinery/atmospherics = "ATMOS_MECH",
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
/obj/item/mecha_parts/mecha_equipment/weapon = "MECHA_WEAPON",
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
/obj/item/organ = "ORGAN",
/obj/item/mod/control = "MODSUIT",
/obj/item/mod/module = "MODSUIT_MOD",
/obj/item/gun/ballistic/automatic = "GUN_AUTOMATIC",
/obj/item/gun/ballistic/revolver = "GUN_REVOLVER",
/obj/item/gun/ballistic/rifle = "GUN_RIFLE",
/obj/item/gun/ballistic/shotgun = "GUN_SHOTGUN",
/obj/item/gun/ballistic = "GUN_BALLISTIC",
/obj/item/gun/energy/laser = "GUN_LASER",
/obj/item/gun/energy = "GUN_ENERGY",
/obj/item/gun/magic = "GUN_MAGIC",
/obj/item/gun = "GUN",
/obj/item/stack/sheet/mineral = "MINERAL_SHEET",
/obj/item/stack/sheet = "SHEET",
/obj/item/stack/ore = "ORE",
/obj/item/ai_module = "AI_LAW_MODULE",
/obj/item/circuitboard/machine = "MACHINE_BOARD",
/obj/item/circuitboard/computer = "COMPUTER_BOARD",
/obj/item/circuitboard = "CIRCUITBOARD",
/obj/item = "ITEM",
/obj/structure/closet/crate/secure = "LOCKED_CRATE",
/obj/item/book/manual = "MANUAL",

/obj/structure = "STRUCTURE",
/obj/structure/closet = "CLOSET",
/obj/structure/closet/crate = "CRATE",
/obj/structure/closet/crate/secure = "LOCKED_CRATE",
/obj/structure/closet/secure_closet = "LOCKED_CLOSET",
/obj/structure/closet = "CLOSET",
/obj/structure = "STRUCTURE",
/obj/machinery/door/airlock = "AIRLOCK",

/obj/machinery = "MACHINERY",
/obj/machinery/atmospherics = "ATMOS_MECH",
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
/obj/machinery/door = "DOOR",
/obj/machinery/door/airlock = "AIRLOCK",
/obj/machinery/rnd/production = "RND_FABRICATOR",
/obj/machinery/computer/camera_advanced/shuttle_docker = "DOCKING_COMPUTER",
/obj/machinery/computer = "COMPUTER",
/obj/machinery/vending/wardrobe = "JOBDROBE",
/obj/machinery/computer/camera_advanced/shuttle_docker = "DOCKING_COMPUTER",
/obj/machinery/vending = "VENDING",
/obj/machinery = "MACHINERY",
/obj/machinery/vending/wardrobe = "JOBDROBE",
/obj/effect = "EFFECT",
/obj/projectile = "PROJECTILE",
/obj = "O",
/datum = "D",
/turf/open = "OPEN",
/turf/closed = "CLOSED",
/turf = "T",
/mob/living/carbon/human = "HUMANOID",
/mob/living/carbon = "CARBON",
/mob/living/simple_animal = "SIMPLE",
/mob/living/basic = "BASIC",
/mob/living/silicon/robot = "CYBORG",
/mob/living/silicon = "SILICON",
/mob/living = "LIVING",
/mob = "M",
)
for (var/tn in TYPES_SHORTCUTS)
if(copytext(typename, 1, length("[tn]/") + 1) == "[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
typename = TYPES_SHORTCUTS[tn] + copytext(typename, length("[tn]/"))
break
.[typename] = type
// ignore_root_path so we can draw the root normally
types_to_replacement = zebra_typecacheof(work_from, ignore_root_path = TRUE)
replacement_to_text = list()
for(var/key in work_from)
replacement_to_text[work_from[key]] = "[key]"


. = list()
for(var/type in types)
var/replace_with = types_to_replacement[type]
if(!replace_with)
.["[type]"] = type
continue
var/cut_out = replacement_to_text[replace_with]
// + 1 to account for /
.[replace_with + copytext("[type]", length(cut_out) + 1)] = type

/proc/get_fancy_list_of_atom_types()
var/static/list/pre_generated_list
Expand Down
4 changes: 2 additions & 2 deletions code/__byond_version_compat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 515
#define MIN_COMPILER_BUILD 1609
#define MIN_COMPILER_BUILD 1626
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 515.1609 or higher
#error You need version 515.1626 or higher
#endif

// Keep savefile compatibilty at minimum supported level
Expand Down
Loading

0 comments on commit 54659eb

Please sign in to comment.