Skip to content

Commit

Permalink
Revert "Merge upstream" (#253)
Browse files Browse the repository at this point in the history
Reverts #247
  • Loading branch information
Furrior authored May 6, 2024
1 parent aeff0ec commit b83dbc9
Show file tree
Hide file tree
Showing 210 changed files with 1,738 additions and 2,475 deletions.
2 changes: 1 addition & 1 deletion .github/max_required_byond_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# (Requiring clients update to connect to the game server is not something we like to spring on them with no notice,
# especially for beta builds where the pager/updater won't let them update without additional configuration.)

515
514
2 changes: 1 addition & 1 deletion .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -Werror -ITG0001 -I"loop_checks"
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -WError -NWTG0001
- name: Run Tests
run: |
source $HOME/BYOND/byond/bin/byondsetup
Expand Down
4 changes: 0 additions & 4 deletions _maps/map_files/debug/runtimestation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,6 @@
/obj/effect/turf_decal/tile/blue{
dir = 8
},
/obj/item/disk/data/debug{
pixel_y = 9;
pixel_x = 7
},
/turf/open/floor/iron/white/corner,
/area/station/medical/medbay)
"cL" = (
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/admin_verb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor
#define ADMIN_CATEGORY_OBJECT "Object"
#define ADMIN_CATEGORY_MAPPING "Mapping"
#define ADMIN_CATEGORY_PROFILE "Profile"
#define ADMIN_CATEGORY_IPINTEL "Admin.IPIntel"
#define ADMIN_CATEGORY_IPINTEL "IPIntel"

// Visibility flags
#define ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG "Map-Debug"
4 changes: 1 addition & 3 deletions code/__DEFINES/construction/structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@
#define AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS 1
#define AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER 2

///The blast door is missing wires, first step of construction.
//blast door (de)construction states
#define BLASTDOOR_NEEDS_WIRES 0
///The blast door needs electronics, second step of construction.
#define BLASTDOOR_NEEDS_ELECTRONICS 1
///The blast door is fully constructed.
#define BLASTDOOR_FINISHED 2

//floodlights because apparently we use defines now
Expand Down
22 changes: 0 additions & 22 deletions code/__DEFINES/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,6 @@
///If the structure is only "used" i.e. it checks to see if it's nearby and allows crafting, but doesn't delete it
#define CRAFTING_STRUCTURE_USE 0

//stack recipe placement check types
/// Checks if there is an object of the result type in any of the cardinal directions
#define STACK_CHECK_CARDINALS (1<<0)
/// Checks if there is an object of the result type within one tile
#define STACK_CHECK_ADJACENT (1<<1)

//---- Defines for var/crafting_flags
///If this craft must be learned before it becomes available
#define CRAFT_MUST_BE_LEARNED (1<<0)
///Should only one object exist on the same turf?
#define CRAFT_ONE_PER_TURF (1<<1)
/// Setting this to true will effectively set check_direction to true.
#define CRAFT_IS_FULLTILE (1<<2)
/// If this craft should run the direction check, for use when building things like directional windows where you can have more than one per turf
#define CRAFT_CHECK_DIRECTION (1<<3)
/// If the craft requires a floor below
#define CRAFT_ON_SOLID_GROUND (1<<4)
/// If the craft checks that there are objects with density in the same turf when being built
#define CRAFT_CHECK_DENSITY (1<<5)
/// If the created atom will gain custom mat datums
#define CRAFT_APPLIES_MATS (1<<6)

//food/drink crafting defines
//When adding new defines, please make sure to also add them to the encompassing list
#define CAT_FOOD "Foods"
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@
#define COMPONENT_LIVING_BLOCK_PRE_MOB_BUMP (1<<0)
///From base of mob/living/MobBump() (mob/living)
#define COMSIG_LIVING_MOB_BUMP "living_mob_bump"
///From base of mob/living/MobBump() (mob/living)
#define COMSIG_LIVING_MOB_BUMPED "living_mob_bumped"
///From base of mob/living/Bump() (turf/closed)
#define COMSIG_LIVING_WALL_BUMP "living_wall_bump"
///From base of turf/closed/Exited() (turf/closed)
Expand Down
3 changes: 0 additions & 3 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,7 @@
/// Prevents click from happening.
#define COMPONENT_CANCEL_EQUIPMENT_CLICK (1<<0)

///from base of /obj/item/attack(): (mob/living, mob/living, params)
#define COMSIG_ITEM_ATTACK "item_attack"
///from base of /obj/item/attack(): (mob/living, mob/living, params)
#define COMSIG_ITEM_POST_ATTACK "item_post_attack" // called only if the attack was executed
///from base of obj/item/attack_self(): (/mob)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self"
//from base of obj/item/attack_self_secondary(): (/mob)
Expand Down
3 changes: 0 additions & 3 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,3 @@
#define VOTE_WINNER_METHOD_WEIGHTED_RANDOM "Weighted Random"
/// There is no winner for this vote.
#define VOTE_WINNER_METHOD_NONE "None"

/// Returned by [/datum/vote/proc/can_be_initiated] to denote the vote is valid and can be initiated.
#define VOTE_AVAILABLE "Vote Available"
1 change: 0 additions & 1 deletion code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define STATION_TRAIT_BIGGER_PODS "station_trait_bigger_pods"
#define STATION_TRAIT_BIRTHDAY "station_trait_birthday"
#define STATION_TRAIT_BOTS_GLITCHED "station_trait_bot_glitch"
#define STATION_TRAIT_BRIGHT_DAY "station_trait_bright_day"
#define STATION_TRAIT_CARP_INFESTATION "station_trait_carp_infestation"
#define STATION_TRAIT_CYBERNETIC_REVOLUTION "station_trait_cybernetic_revolution"
#define STATION_TRAIT_EMPTY_MAINT "station_trait_empty_maint"
Expand Down
18 changes: 6 additions & 12 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
**/
/proc/list_clear_nulls(list/list_to_clear)
return (list_to_clear.RemoveAll(null) > 0)


/**
* Removes any empty weakrefs from the list
Expand Down Expand Up @@ -473,23 +473,17 @@
* You should only pass integers in.
*/
/proc/pick_weight(list/list_to_pick)
if(length(list_to_pick) == 0)
return null

var/total = 0
for(var/item in list_to_pick)
var/item
for(item in list_to_pick)
if(!list_to_pick[item])
list_to_pick[item] = 0
total += list_to_pick[item]

total = rand(1, total)
for(var/item in list_to_pick)
var/item_weight = list_to_pick[item]
if(item_weight == 0)
continue

total -= item_weight
if(total <= 0)
for(item in list_to_pick)
total -= list_to_pick[item]
if(total <= 0 && list_to_pick[item])
return item

return null
Expand Down
50 changes: 50 additions & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@
/////Initial Building/////
//////////////////////////

/proc/init_sprite_accessories()
//hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list)
//facial hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list)
//underwear
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
//undershirt
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
//socks
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
//bodypart accessories (blizzard intensifies)
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human, add_blank = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard, add_blank = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, GLOB.tails_list_monkey, add_blank = FALSE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tail_spines, GLOB.tail_spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list)

/// Inits GLOB.species_list. Not using GLOBAL_LIST_INIT b/c it depends on GLOB.string_lists
/proc/init_species_list()
for(var/species_path in subtypesof(/datum/species))
var/datum/species/species = new species_path()
GLOB.species_list[species.id] = species_path
sort_list(GLOB.species_list, GLOBAL_PROC_REF(cmp_typepaths_asc))

/// Inits GLOB.surgeries
/proc/init_surgeries()
var/surgeries = list()
Expand All @@ -10,9 +48,21 @@
sort_list(surgeries, GLOBAL_PROC_REF(cmp_typepaths_asc))
return surgeries

/// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
/proc/init_hair_gradients()
for(var/path in subtypesof(/datum/sprite_accessory/gradient))
var/datum/sprite_accessory/gradient/gradient = new path()
if(gradient.gradient_category & GRADIENT_APPLIES_TO_HAIR)
GLOB.hair_gradients_list[gradient.name] = gradient
if(gradient.gradient_category & GRADIENT_APPLIES_TO_FACIAL_HAIR)
GLOB.facial_hair_gradients_list[gradient.name] = gradient

/// Legacy procs that really should be replaced with proper _INIT macros
/proc/make_datum_reference_lists()
// I tried to eliminate this proc but I couldn't untangle their init-order interdependencies -Dominion/Cyberboss
init_sprite_accessories()
init_species_list()
init_hair_gradients()
init_keybindings()
GLOB.emote_list = init_emote_list() // WHY DOES THIS NEED TO GO HERE? IT JUST INITS DATUMS
init_crafting_recipes()
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/hallucinations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ADMIN_VERB(debug_hallucination_weighted_list_per_type, R_DEBUG, "Show Hallucinat
last_type_weight = this_weight

// Sort by weight descending, where weight is the values (not the keys). We assoc_to_keys later to get JUST the text
sortTim(all_weights, GLOBAL_PROC_REF(cmp_numeric_dsc), associative = TRUE)
all_weights = sortTim(all_weights, GLOBAL_PROC_REF(cmp_numeric_dsc), associative = TRUE)

var/page_style = "<style>table, th, td {border: 1px solid black;border-collapse: collapse;}</style>"
var/page_contents = "[page_style]<table style=\"width:100%\">[header][jointext(assoc_to_keys(all_weights), "")]</table>"
Expand Down
82 changes: 63 additions & 19 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,93 @@
return COLOR_BLACK

/proc/random_underwear(gender)
if(length(SSaccessories.underwear_list) == 0)
CRASH("No underwear to choose from!")
if(!GLOB.underwear_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
switch(gender)
if(MALE)
return pick(SSaccessories.underwear_m)
return pick(GLOB.underwear_m)
if(FEMALE)
return pick(SSaccessories.underwear_f)
return pick(GLOB.underwear_f)
else
return pick(SSaccessories.underwear_list)
return pick(GLOB.underwear_list)

/proc/random_undershirt(gender)
if(length(SSaccessories.undershirt_list) == 0)
CRASH("No undershirts to choose from!")
if(!GLOB.undershirt_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
switch(gender)
if(MALE)
return pick(SSaccessories.undershirt_m)
return pick(GLOB.undershirt_m)
if(FEMALE)
return pick(SSaccessories.undershirt_f)
return pick(GLOB.undershirt_f)
else
return pick(SSaccessories.undershirt_list)
return pick(GLOB.undershirt_list)

/proc/random_socks()
if(length(SSaccessories.socks_list) == 0)
CRASH("No socks to choose from!")
return pick(SSaccessories.socks_list)
if(!GLOB.socks_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
return pick(GLOB.socks_list)

/proc/random_backpack()
return pick(GLOB.backpacklist)

/proc/random_hairstyle(gender)
switch(gender)
if(MALE)
return pick(SSaccessories.hairstyles_male_list)
return pick(GLOB.hairstyles_male_list)
if(FEMALE)
return pick(SSaccessories.hairstyles_female_list)
return pick(GLOB.hairstyles_female_list)
else
return pick(SSaccessories.hairstyles_list)
return pick(GLOB.hairstyles_list)

/proc/random_facial_hairstyle(gender)
switch(gender)
if(MALE)
return pick(SSaccessories.facial_hairstyles_male_list)
return pick(GLOB.facial_hairstyles_male_list)
if(FEMALE)
return pick(SSaccessories.facial_hairstyles_female_list)
return pick(GLOB.facial_hairstyles_female_list)
else
return pick(SSaccessories.facial_hairstyles_list)
return pick(GLOB.facial_hairstyles_list)

/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
if(gender == FEMALE)
. = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
else
. = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))

if(!findname(.))
break

/proc/random_unique_lizard_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(lizard_name(gender))

if(!findname(.))
break

/proc/random_unique_plasmaman_name(attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(plasmaman_name())

if(!findname(.))
break

/proc/random_unique_ethereal_name(attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(ethereal_name())

if(!findname(.))
break

/proc/random_unique_moth_name(attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(pick(GLOB.moth_first)) + " " + capitalize(pick(GLOB.moth_last))

if(!findname(.))
break

/proc/random_skin_tone()
return pick(GLOB.skin_tones)

GLOBAL_LIST_INIT(skin_tones, sort_list(list(
"albino",
Expand Down Expand Up @@ -114,6 +155,9 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
"mixed4" = "Macadamia",
))

/// An assoc list of species IDs to type paths
GLOBAL_LIST_EMPTY(species_list)

/proc/age2agedescription(age)
switch(age)
if(0 to 1)
Expand Down
Loading

0 comments on commit b83dbc9

Please sign in to comment.