Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/goonstation/goonstation i…
Browse files Browse the repository at this point in the history
…nto hallmonitor
  • Loading branch information
klushy225 committed Oct 11, 2024
2 parents c1d5e12 + bb47e41 commit 01c8d19
Show file tree
Hide file tree
Showing 1,250 changed files with 74,234 additions and 116,148 deletions.
2 changes: 1 addition & 1 deletion +secret
1 change: 1 addition & 0 deletions .github/HACKMD_BOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ Remember that these are live edits. If you're editing a link, be fast, or copy-p
- [Goonstation Spriting Guidelines](/@goonstation/sprites)
- [Goonstation Audio Guidelines](/@goonstation/audio)
- [Goonstation Mapping Guidelines](/@goonstation/maps)
- [Goonstation TGUI Guide](/@goonstation/tgui)
### Misc guides
- [Help Messages](/@goonstation/helpmsgs)
4 changes: 2 additions & 2 deletions .github/workflows/beepsky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: "yarn"
cache-dependency-path: ./tgui/yarn.lock

Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: "yarn"
cache-dependency-path: ./tgui/yarn.lock

Expand Down
42 changes: 27 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
{
"eslint.nodePath": "./tgui/.yarn/sdks",
"eslint.workingDirectories": [
"./tgui"
],
"eslint.workingDirectories": ["./tgui"],
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs",
"typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"tgui/.yarn": true,
"tgui/.pnp.*": true
"**/.yarn": true,
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"scm.showHistoryGraph": false,
"[javascript]": {
"editor.rulers": [
120
]
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.rulers": [
120
]
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[scss]": {
"editor.rulers": [
120
]
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[dm]": {
"editor.rulers": [
Expand All @@ -37,6 +46,9 @@
"gitlens.advanced.blame.customArguments": [
"-w"
],
"workbench.editorAssociations": {
"*.dmi": "dmiEditor.dmiEditor"
},
"diffEditor.codeLens": true,
"errorLens.enabledDiagnosticLevels": [
"error",
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[<img src=".github/assets/setup.png" alt="Setup" width="150" align="left">](https://hackmd.io/@goonstation/docs/%2F%40goonstation%2Fdev)

Want to get the code up and running to test changes? This guide is the place to go.
Want to get the code up and running to test changes or play around? This guide is the place to go.
<br>***Be sure to follow it exactly!*** If you need help, visit the #imcoder channel on our Discord.

## COMMUNITY
Expand All @@ -18,10 +18,10 @@ Discord is the place to talk to fellow players, admins, and devs in realtime. Th
The forums are where we get most of our player feedback/suggestions and talk about things in a more longform format. This is also the place to appeal any bans or give admin feedback.

[<img src=".github/assets/wiki.png" alt="Goonhub" width="150" align="left">](https://wiki.ss13.co)
Our wiki is the place to go for any information you seek on the various constructions, items, game modes, and more in-game. There's also guides for various jobs on station!
Our wiki is the place to go for any information you seek on the various constructions, items, game modes, and really just anything in-game. There's also guides for the various jobs you can play!

[<img src=".github/assets/goonhub.png" alt="Goonhub" width="150" align="left">](https://goonhub.com)
Goonhub is the premier place for locating statistics, data about rounds, detailed game maps, and all other links pertaining to Goonstation!
Goonhub is the premier place for locating statistics, data about rounds (like funny last words), detailed game maps, and all other links pertaining to Goonstation!

## CONTRIBUTING

Expand All @@ -48,4 +48,6 @@ To contribute maps to the game, please follow our mapping guidelines! It details

All Goonstation contributions are licensed under [Creative Commons BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/3.0/). See LICENSE for more details.

Contributions made under the `tgui` folder are licensed under [MIT](https://choosealicense.com/licenses/mit/) unless otherwise specified.

**Important:** This means that code from Goonstation cannot be ported to codebases such as /tg/station. If you wish to port a specific feature, you must get the developer(s) to sublicense it to you under a license like AGPLv3. This also applies in the opposite direction for features ported from other codebases.
2 changes: 2 additions & 0 deletions _std/__build.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ o+` `-` ``..-:yooos-..----------..`
//#define QUICK_MOB_DELETION // Enables deleting mobs with build mode right click on obj place mode
//#define SHUT_UP_ABOUT_MY_PAY // disables PDA messages from the wagesystem
//#define FUCK_OFF_WITH_THE_MAIL // Disables random crew mail system
//#define GHOSTDRONES_ON_STRIKE // prevents ghostdrone factory objs from doing stuff

//#define Z_LOG_ENABLE 1 // Enable additional world.log logging

Expand Down Expand Up @@ -193,6 +194,7 @@ o+` `-` ``..-:yooos-..----------..`
#define QUICK_MOB_DELETION
#define SHUT_UP_ABOUT_MY_PAY
#define FUCK_OFF_WITH_THE_MAIL
#define GHOSTDRONES_ON_STRIKE
#endif

#ifdef IM_REALLY_IN_A_FUCKING_HURRY_HERE
Expand Down
1 change: 1 addition & 0 deletions _std/__std.dme
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "defines\atom.dm"
#include "defines\bioeffect.dm"
#include "defines\blocking.dm"
#include "defines\burning.dm"
#include "defines\camera_coverage.dm"
#include "defines\chemicompiler.dm"
#include "defines\chemistry.dm"
Expand Down
2 changes: 2 additions & 0 deletions _std/color.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#define rgb2hsl(r, g, b) rgb2num(rgb(r, g, b), COLORSPACE_HSL)

#define hex_to_hsl_list(hex) rgb2num(hex, COLORSPACE_HSL)

#define rgb2hsv(r, g, b) rgb2num(rgb(r, g, b), COLORSPACE_HSV)

#define hex_to_rgb_list(hex) rgb2num(hex)
Expand Down
9 changes: 9 additions & 0 deletions _std/defines/_units.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

#define TICKS *world.tick_lag

// Not QUITE a SI unit, but used frequently nonetheless
#define LITERS *1

#define LITER LITERS

// SI UNIT DEFINES

//ex: var/time = 10 SECONDS
Expand All @@ -12,12 +17,16 @@
#define HOURS *(60 MINUTES)
#define DAYS *(24 HOURS)
#define WEEKS *(7 DAYS)
#define MONTHS *(30 DAYS) //uhhhhh sure
#define YEARS *(365 DAYS) //leap years aren't real

#define SECOND SECONDS
#define MINUTE MINUTES
#define HOUR HOURS
#define DAY DAYS
#define WEEK WEEKS
#define MONTH MONTHS
#define YEAR YEARS

#define WATTS *1
#define METERS *1
Expand Down
2 changes: 2 additions & 0 deletions _std/defines/actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
#define ACTIONSTATE_INFINITE 64

#define SHOWOFF_COOLDOWN 2 SECONDS

#define ACTION_CONTROLLER_INTERVAL 0.5 SECONDS
8 changes: 8 additions & 0 deletions _std/defines/burning.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Burning /obj/item

/// Leaves nothing behind when burned
#define BURN_REMAINS_NONE 0
/// Leaves an ash pile behind when burned
#define BURN_REMAINS_ASH 1
/// Leaves a molten mess behind when burned
#define BURN_REMAINS_MELT 2
2 changes: 2 additions & 0 deletions _std/defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@
#define THRESHOLD_OVER 1
#define THRESHOLD_INIT THRESHOLD_UNDER

/// This contains a list with organ strings that not instantly kill someone when lost.
var/global/list/non_vital_organ_strings = list("left_lung", "right_lung", "left_kidney", "stomach", "right_kidney", "liver", "intestines", "spleen", "pancreas", "appendix")
6 changes: 3 additions & 3 deletions _std/defines/sound.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Reserved Area Ambience sound channels
#define SOUNDCHANNEL_LOOPING 123
#define SOUNDCHANNEL_FX_1 124
#define SOUNDCHANNEL_FX_2 125
#define SOUNDCHANNEL_LOOPING 990
#define SOUNDCHANNEL_FX_1 991
#define SOUNDCHANNEL_FX_2 992
#define SOUNDCHANNEL_RADIO 1013
#define SOUNDCHANNEL_ADMIN_LOW 1014 // lower end of the range of admin channels
#define SOUNDCHANNEL_ADMIN_HIGH 1024 // upper end
Expand Down
2 changes: 2 additions & 0 deletions _std/defines/spacebee_extension.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
#define COMMAND_TARGETING_MAIN_SERVER 2
/// command is always ran on all servers at once
#define COMMAND_TARGETING_ALL_SERVERS 3
/// command is run on each of the 1-4 live servers
#define COMMAND_TARGETING_LIVE_SERVERS 4
5 changes: 4 additions & 1 deletion _std/lists.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// REMOVE WITH 516
#define alist list

/* Note about this file:
* A portion of this code was written by Carnie over at /tg/, back in 2014.
* We are using the code under the terms of our license, as Carnie can't be
Expand Down Expand Up @@ -111,7 +114,7 @@

///Make a normal list an associative one
/proc/make_associative(list/flat_list)
RETURN_TYPE(/list)
RETURN_TYPE(/alist)
. = list()
for(var/thing in flat_list)
.[thing] = TRUE
Expand Down
19 changes: 17 additions & 2 deletions _std/macros/atmos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ proc/gas_text_color(gas_id)
var/pipe_state = NODE ? "intact" : "exposed"; \
var/pipe_cached = pipe_underlay_cache["[pipe_state]_[DIR]_[SIZE]"]; \
if (!pipe_cached) { \
pipe_underlay_cache["[pipe_state]_[DIR]_[SIZE]"] = icon('icons/obj/atmospherics/pipes/pipe_underlays.dmi', "[pipe_state]_[NODE ? null : SIZE]", DIR); \
pipe_cached = pipe_underlay_cache["[pipe_state]_[DIR]_[SIZE]"]; \
pipe_cached = icon('icons/obj/atmospherics/pipes/pipe_underlays.dmi', "[pipe_state]_[NODE ? null : SIZE]", DIR); \
pipe_underlay_cache["[pipe_state]_[DIR]_[SIZE]"] = pipe_cached; \
} \
var/image/pipe_image = mutable_appearance(pipe_cached); \
pipe_image.color = COLOUR ? COLOUR : "#B4B4B4"; \
Expand All @@ -357,6 +357,21 @@ proc/gas_text_color(gas_id)
src.AddOverlays(pipe_image, "[DIR]"); \
} while(0)

//Used solely for simple pipes. Possible states are "exposed" and "intact".
#define SET_SIMPLE_PIPE_UNDERLAY(NODE, DIR) do { \
var/pipe_state = NODE ? "intact" : "exposed"; \
var/pipe_cached = pipe_underlay_cache["[pipe_state]_[DIR]"]; \
if (!pipe_cached) { \
pipe_cached = icon('icons/obj/atmospherics/pipes/pipe.dmi', "ends_[pipe_state]", DIR); \
pipe_underlay_cache["simple_[pipe_state]_[DIR]"] = pipe_cached; \
} \
var/image/pipe_image = mutable_appearance(pipe_cached); \
pipe_image.color = src.color; \
pipe_image.layer = src.layer - 0.001; \
pipe_image.appearance_flags |= RESET_TRANSFORM | RESET_COLOR | KEEP_APART; \
src.AddOverlays(pipe_image, "[DIR]"); \
} while(0)

#define issimplepipe(X) istype(X, /obj/machinery/atmospherics/pipe/simple)

//check if we should hide our pipe ends
Expand Down
5 changes: 5 additions & 0 deletions _std/macros/list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
} \
} \

/// Add an item to the list if not already present, if the list is null it will initialize it
#define LAZYLISTOR(L, I) if(!L) { L = list(); } L |= I;


#define REMOVE_FROM_UNSORTED(L, INDEX) \
{ \
L[INDEX] = L[length(L)]; \
Expand All @@ -35,3 +39,4 @@

/// Accesses an associative list, returns null if nothing is found
#define LAZYLISTACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null

1 change: 1 addition & 0 deletions _std/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var/list/planet_parallax_render_source_groups = list()
return A.area_parallax_render_source_group

#define ADD_PARALLAX_RENDER_SOURCE_TO_GROUP(z_level_or_area, render_source_type, animation_time) get_parallax_render_source_group(z_level_or_area)?.add_parallax_render_source(render_source_type, animation_time)
#define ADD_PARALLAX_RENDER_SOURCES_FROM_GROUP(z_level_or_area, render_group, animation_time) get_parallax_render_source_group(z_level_or_area)?.copy_parallax_render_sources_from_group(render_group, animation_time)
#define REMOVE_PARALLAX_RENDER_SOURCE_FROM_GROUP(z_level_or_area, render_source_type, animation_time) get_parallax_render_source_group(z_level_or_area)?.remove_parallax_render_source(render_source_type, animation_time)
#define REMOVE_ALL_PARALLAX_RENDER_SOURCES_FROM_GROUP(z_level_or_area) get_parallax_render_source_group(z_level_or_area)?.remove_parallax_render_source(get_parallax_render_source_group(z_level_or_area).parallax_render_source_types_and_sources)
#define RESTORE_PARALLAX_RENDER_SOURCE_GROUP_TO_DEFAULT(z_level_or_area) get_parallax_render_source_group(z_level_or_area)?.restore_parallax_render_sources_to_default()
Expand Down
4 changes: 2 additions & 2 deletions _std/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
while(unwind_node.previous_node)
var/dir_goal = get_dir(iter_turf, unwind_node.previous_node.tile)

for(var/i = 1 to unwind_node.jumps)
for(var/i in 1 to unwind_node.jumps)
var/turf/next_turf = get_step(iter_turf,dir_goal)
if(cardinal_only && !is_cardinal(dir_goal))
var/candidate_dir = dir_goal & (prob(50) ? (NORTH | SOUTH) : (EAST | WEST))
Expand Down Expand Up @@ -340,7 +340,7 @@
var/list/reached_target_goals = null
if(mintargetdist)
for(var/turf/T as anything in ends)
if(GET_DIST(current_turf, T) <= mintargetdist && !istype(current_turf,/turf/simulated/wall) && !is_blocked_turf(current_turf))
if(GET_DIST(current_turf, T) <= mintargetdist && !istype(current_turf, /turf/simulated/wall) && !is_blocked_turf(current_turf))
LAZYLISTADD(reached_target_goals, ends[T])
ends -= T
else if(current_turf in ends)
Expand Down
2 changes: 1 addition & 1 deletion _std/plane.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ client

src.setup_special_screens()

SPAWN(5 SECONDS)
SPAWN(3 SECONDS)
apply_depth_filter()
..()

Expand Down
17 changes: 10 additions & 7 deletions _std/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
#define UI_CLOSE -1

/// Maximum number of windows that can be suspended/reused
#define TGUI_WINDOW_SOFT_LIMIT 4
#define TGUI_WINDOW_SOFT_LIMIT 5
/// Maximum number of open windows
#define TGUI_WINDOW_HARD_LIMIT 8
#define TGUI_WINDOW_HARD_LIMIT 9

/// Maximum ping timeout allowed to detect zombie windows
#define TGUI_PING_TIMEOUT 4 SECONDS
#define TGUI_PING_TIMEOUT (4 SECONDS)
/// Used for rate-limiting to prevent DoS by excessively refreshing a TGUI window
#define TGUI_REFRESH_FULL_UPDATE_COOLDOWN (0.75 SECONDS) // |GOONSTATION-CHANGE| from 1

/// Window does not exist
#define TGUI_WINDOW_CLOSED 0
Expand All @@ -28,8 +30,9 @@
#define TGUI_WINDOW_INDEX(window_id) text2num(copytext(window_id, 13))

/// Creates a message packet for sending via output()
// This is {"type":type,"payload":payload}, but pre-encoded. This is much faster
// than doing it the normal way.
// To ensure this is correct, this is unit tested in tgui_create_message.
#define TGUI_CREATE_MESSAGE(type, payload) ( \
url_encode(json_encode(list( \
"type" = type, \
"payload" = payload, \
))))
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
)
6 changes: 3 additions & 3 deletions assets/maps/prefabs/planet/prefab_planet_shack_gold.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
/obj/item/stamped_bullion,
/obj/item/stamped_bullion,
/obj/item/stamped_bullion,
/turf/unsimulated/floor/concrete,
/turf/unsimulated/outdoors/concrete,
/area/noGenerate)
"D" = (
/obj/machinery/door/unpowered/wood/pyro{
pixel_y = -9
},
/turf/unsimulated/floor/concrete,
/turf/unsimulated/outdoors/concrete,
/area/noGenerate)
"J" = (
/turf/unsimulated/floor/concrete,
/turf/unsimulated/outdoors/concrete,
/area/noGenerate)

(1,1,1) = {"
Expand Down
Loading

0 comments on commit 01c8d19

Please sign in to comment.