Skip to content

Commit

Permalink
Merge upstream 11.12.24 (#864)
Browse files Browse the repository at this point in the history
## About The Pull Request
мерге моё любимое
  • Loading branch information
larentoun authored Dec 11, 2024
2 parents 9974e2f + 7c46a30 commit 0bf60f9
Show file tree
Hide file tree
Showing 114 changed files with 1,605 additions and 560 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,4 @@ jobs:
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: compare_screenshots
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
},
/obj/structure/rack,
/obj/item/wrench,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large/twenty_force,
/obj/machinery/light/small/built/directional/south,
/turf/open/floor/plating/icemoon,
/area/ruin/powered/shuttle)
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/SpaceRuins/russian_derelict.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5893,8 +5893,8 @@
/turf/open/floor/plating,
/area/ruin/space/ks13/science/ordnance)
"Nk" = (
/obj/effect/spawner/random/maintenance,
/obj/structure/lattice,
/obj/effect/spawner/random/maintenance/no_decals,
/turf/template_noop,
/area/space/nearstation)
"Nl" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/SpaceRuins/shuttlerelic.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/obj/structure/chair/old{
dir = 1
},
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large/twenty_force,
/turf/open/floor/oldshuttle,
/area/ruin/space/has_grav/powered)
"o" = (
Expand Down
6 changes: 3 additions & 3 deletions _maps/map_files/Birdshot/birdshot.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -33933,7 +33933,7 @@
/obj/effect/turf_decal/tile/dark_red/opposingcorners,
/obj/machinery/airalarm/directional/north,
/obj/structure/rack,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large,
/obj/item/wirecutters,
/obj/item/wrench,
/turf/open/floor/iron,
Expand Down Expand Up @@ -43772,7 +43772,7 @@
/area/station/science/ordnance/burnchamber)
"oZL" = (
/obj/structure/table,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large,
/obj/item/stack/cable_coil,
/obj/machinery/light/small/directional/south,
/turf/open/floor/iron,
Expand Down Expand Up @@ -47524,7 +47524,7 @@
/obj/machinery/door/airlock/maintenance{
name = "Atmospherics Maintenance"
},
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/obj/effect/mapping_helpers/airlock/access/any/engineering/general,
/turf/open/floor/plating,
/area/station/maintenance/department/engine/atmos)
"qmz" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/NebulaStation/NebulaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -85750,7 +85750,7 @@
/area/space/nearstation)
"mLK" = (
/obj/structure/rack,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large,
/obj/item/wirecutters,
/obj/item/wrench,
/obj/effect/turf_decal/siding/thinplating_new/dark{
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files/wawastation/wawastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -65378,7 +65378,7 @@
/turf/open/floor/circuit/green/telecomms/mainframe,
/area/station/tcommsat/server)
"wZU" = (
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large/old,
/turf/open/misc/asteroid,
/area/station/asteroid)
"xad" = (
Expand Down Expand Up @@ -68227,7 +68227,7 @@
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/mapping_helpers/broken_floor,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large,
/turf/open/floor/plating,
/area/station/maintenance/department/medical/central)
"ybh" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/modular_generic/ice_l_storage.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"M" = (
/obj/effect/turf_decal/bot/right,
/obj/structure/closet/crate/large,
/obj/item/crowbar/large/heavy,
/obj/item/crowbar/large/twenty_force,
/turf/open/floor/plating,
/area/template_noop)
"N" = (
Expand Down
44 changes: 18 additions & 26 deletions _maps/virtual_domains/island_brawl.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,6 @@
},
/turf/open/floor/plating,
/area/virtual_domain)
"kI" = (
/obj/effect/turf_decal/sand,
/turf/closed/wall/mineral/wood,
/area/virtual_domain)
"kJ" = (
/obj/machinery/shower/directional/south,
/obj/effect/turf_decal/siding/wood{
Expand Down Expand Up @@ -3177,10 +3173,6 @@
},
/turf/open/floor/iron/white/textured_large,
/area/virtual_domain)
"NZ" = (
/obj/effect/turf_decal/sand,
/turf/closed/wall/mineral/wood,
/area/virtual_domain/fullbright)
"Of" = (
/obj/item/reagent_containers/cup/soda_cans/space_mountain_wind{
pixel_x = -17;
Expand Down Expand Up @@ -7866,9 +7858,9 @@ bX
ev
ka
ka
NZ
NZ
eK
Bq
Bq
Bq
JN
JN
ka
Expand Down Expand Up @@ -7948,7 +7940,7 @@ bX
Yo
sz
ka
NZ
Bq
YI
LD
JN
Expand Down Expand Up @@ -8030,9 +8022,9 @@ Yo
Yo
sz
ka
NZ
kI
eK
Bq
Bq
Bq
JN
JN
ka
Expand Down Expand Up @@ -8112,7 +8104,7 @@ Yo
ka
ka
ka
NZ
Bq
Qk
Uf
JN
Expand Down Expand Up @@ -8194,9 +8186,9 @@ ka
th
ka
eK
kI
kI
eK
Bq
Bq
Bq
JN
JN
ka
Expand Down Expand Up @@ -8276,7 +8268,7 @@ ka
ka
ka
ka
NZ
Bq
ZB
sa
JN
Expand Down Expand Up @@ -8358,9 +8350,9 @@ ka
ka
ka
ka
eK
eK
eK
Bq
Bq
Bq
JN
JN
ka
Expand Down Expand Up @@ -11225,8 +11217,8 @@ cO
oa
th
ka
NZ
NZ
eK
eK
eK
ka
ka
Expand Down Expand Up @@ -11307,7 +11299,7 @@ cO
wb
MT
ka
NZ
eK
EA
xe
ka
Expand Down
11 changes: 11 additions & 0 deletions code/__DEFINES/fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@
///The coefficient for maximum weight/size divergence relative to the averages.
#define MAX_FISH_DEVIATION_COEFF 2.5

/**
* Base multiplier of the difference between current size and weight and their maximum value
* used to calculate how much fish grow each time they're fed, alongside with the current hunger,
* and the current size and weight, meaning bigger fish naturally tend to grow way slowier
*/
#define FISH_GROWTH_MULT 0.38
/// Growth peaks at 45% hunger but very rapidly wanes past that.
#define FISH_GROWTH_PEAK 0.45
/// Used as part of the divisor to slow down growth of bigger fish
#define FISH_SIZE_WEIGHT_GROWTH_MALUS 0.5

///The volume of the grind results is multiplied by the fish' weight and divided by this.
#define FISH_GRIND_RESULTS_WEIGHT_DIVISOR 500
///The number of fillets is multiplied by the fish' size and divided by this.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
// Hair masks
#define HAIR_MASK_HIDE_ABOVE_45_DEG_MEDIUM "hide_above_45deg_medium"
#define HAIR_MASK_HIDE_ABOVE_45_DEG_LOW "hide_above_45deg_low"
#define HAIR_MASK_HIDE_WINTERHOOD "hide_winterhood"

// Height defines
// - They are numbers so you can compare height values (x height < y height)
Expand Down
25 changes: 17 additions & 8 deletions code/__DEFINES/pipe_construction.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
//Construction Categories
#define PIPE_STRAIGHT 0 //2 directions: N/S, E/W
#define PIPE_BENDABLE 1 //6 directions: N/S, E/W, N/E, N/W, S/E, S/W
#define PIPE_TRINARY 2 //4 directions: N/E/S, E/S/W, S/W/N, W/N/E
#define PIPE_TRIN_M 3 //8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N
#define PIPE_UNARY 4 //4 directions: N, S, E, W
#define PIPE_ONEDIR 5 //1 direction: N/S/E/W
#define PIPE_UNARY_FLIPPABLE 6 //8 directions: N/S/E/W/N-flipped/S-flipped/E-flipped/W-flipped
#define PIPE_ONEDIR_FLIPPABLE 7 //2 direction: N/S/E/W, N-flipped/S-flipped/E-flipped/W-flipped

///2 directions: N/S, E/W
#define PIPE_STRAIGHT 0
///6 directions: N/S, E/W, N/E, N/W, S/E, S/W
#define PIPE_BENDABLE 1
///4 directions: N/E/S, E/S/W, S/W/N, W/N/E
#define PIPE_TRINARY 2
///8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N
#define PIPE_TRIN_M 3
///4 directions: N, S, E, W
#define PIPE_UNARY 4
///1 direction: N/S/E/W
#define PIPE_ONEDIR 5
///8 directions: N/S/E/W/N-flipped/S-flipped/E-flipped/W-flipped
#define PIPE_UNARY_FLIPPABLE 6
///2 direction: N/S/E/W, N-flipped/S-flipped/E-flipped/W-flipped
#define PIPE_ONEDIR_FLIPPABLE 7

//Disposal pipe relative connection directions
#define DISP_DIR_BASE 0
Expand Down
71 changes: 68 additions & 3 deletions code/__DEFINES/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,19 @@
#define rustg_git_revparse(rev) RUSTG_CALL(RUST_G, "rg_git_revparse")(rev)

/**
* Returns the date of the given revision in the format YYYY-MM-DD.
* Returns null if the revision is invalid.
* Returns the date of the given revision using the provided format.
* Defaults to returning %F which is YYYY-MM-DD.
*/
#define rustg_git_commit_date(rev) RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev)
/proc/rustg_git_commit_date(rev, format = "%F")
return RUSTG_CALL(RUST_G, "rg_git_commit_date")(rev, format)

/**
* Returns the formatted datetime string of HEAD using the provided format.
* Defaults to returning %F which is YYYY-MM-DD.
* This is different to rustg_git_commit_date because it only needs the logs directory.
*/
/proc/rustg_git_commit_date_head(format = "%F")
return RUSTG_CALL(RUST_G, "rg_git_commit_date_head")(format)

#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_PUT "put"
Expand All @@ -187,6 +196,20 @@

#define rustg_noise_get_at_coordinates(seed, x, y) RUSTG_CALL(RUST_G, "noise_get_at_coordinates")(seed, x, y)

/**
* Generates a 2D poisson disk distribution ('blue noise'), which is relatively uniform.
*
* params:
* `seed`: str
* `width`: int, width of the noisemap (see world.maxx)
* `length`: int, height of the noisemap (see world.maxy)
* `radius`: int, distance between points on the noisemap
*
* returns:
* a width*length length string of 1s and 0s representing a 2D poisson sample collapsed into a 1D string
*/
#define rustg_noise_poisson_map(seed, width, length, radius) RUSTG_CALL(RUST_G, "noise_poisson_map")(seed, width, length, radius)

/*
* Takes in a string and json_encode()"d lists to produce a sanitized string.
* This function operates on whitelists, there is currently no way to blacklist.
Expand Down Expand Up @@ -238,3 +261,45 @@
#define url_decode(text) rustg_url_decode(text)
#endif

/// Provided a static RSC file path or a raw text file path, returns the duration of the file in deciseconds as a float.
/proc/rustg_sound_length(file_path)
var/static/list/sound_cache
if(isnull(sound_cache))
sound_cache = list()

. = 0

if(!istext(file_path))
if(!isfile(file_path))
CRASH("rustg_sound_length error: Passed non-text object")

if(length("[file_path]")) // Runtime generated RSC references stringify into 0-length strings.
file_path = "[file_path]"
else
CRASH("rustg_sound_length does not support non-static file refs.")

var/cached_length = sound_cache[file_path]
if(!isnull(cached_length))
return cached_length

var/ret = RUSTG_CALL(RUST_G, "sound_len")(file_path)
var/as_num = text2num(ret)
if(isnull(ret))
. = 0
CRASH("rustg_sound_length error: [ret]")

sound_cache[file_path] = as_num
return as_num


#define RUSTG_SOUNDLEN_SUCCESSES "successes"
#define RUSTG_SOUNDLEN_ERRORS "errors"
/**
* Returns a nested key-value list containing "successes" and "errors"
* The format is as follows:
* list(
* RUSTG_SOUNDLEN_SUCCESES = list("sounds/test.ogg" = 25.34),
* RUSTG_SOUNDLEN_ERRORS = list("sound/bad.png" = "SoundLen: Unable to decode file."),
*)
*/
#define rustg_sound_length_list(file_paths) json_decode(RUSTG_CALL(RUST_G, "sound_len_list")(json_encode(file_paths)))
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
#define INIT_ORDER_OUTPUTS 35
#define INIT_ORDER_RESTAURANT 34
#define INIT_ORDER_TTS 33
#define INIT_ORDER_FLUIDS 32 // Needs to be above atoms, as some atoms may want to start fluids/gases on init
#define INIT_ORDER_ATOMS 30
#define INIT_ORDER_LANGUAGE 25
#define INIT_ORDER_MACHINES 20
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
* (This may be changed later but I chose to do it this way to avoid messing up interactions which require combat mode)
*/
#define TRAIT_COMBAT_MODE_SKIP_INTERACTION "combat_mode_skip_interaction"
// bars change of combat mode
#define TRAIT_COMBAT_MODE_LOCK "combat_mode_lock"

///A "fake" effect that should not be subject to normal effect removal methods (like the effect remover component)
#define TRAIT_ILLUSORY_EFFECT "illusory_effect"
Expand Down
3 changes: 3 additions & 0 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,
else
return null

///Returns a single dir rotated by x degrees clockwise, adhering to the cardinal directions.
#define turn_cardinal(dir, rotation) ( angle2dir_cardinal ( dir2angle(dir) + rotation ) )

//Returns the angle in english
/proc/angle2text(degree)
return dir2text(angle2dir(degree))
Expand Down
Loading

0 comments on commit 0bf60f9

Please sign in to comment.