Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into bullet
Browse files Browse the repository at this point in the history
  • Loading branch information
Riverz1 committed Feb 3, 2025
2 parents d5bf1c2 + bb86b3c commit 0d04bb8
Show file tree
Hide file tree
Showing 646 changed files with 19,682 additions and 15,099 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Code and Map Linting
env:
TEST: LINTING
NODE_VERSION: 12
NODE_VERSION: 20
run: |
bash test/run-test.sh
bash scripts/build_tgui.sh
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ Thumbs.db
data/
cache/
cfg/
.vscode
**/MapFXDrawer/*.png
test_merge.txt
54 changes: 54 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
// ESLint settings:
"eslint.workingDirectories": ["tgui/"],
"eslint.nodePath": "tgui/.yarn/sdks",
"prettier.configPath": "tgui/.prettierrc.yml",
"prettier.prettierPath": "tgui/.yarn/sdks/prettier/index.cjs",
"typescript.tsdk": "tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true,
"tgui/public/**/*": true
},
"eslint.format.enable": true,
"eslint.rules.customizations": [
// We really want to fail the CI builds on styling errors,
// but it's better to show them as yellow squigglies in IDE
// and thus differentiate from the red typescript ones which
// are actually hard errors.
{ "rule": "*", "severity": "warn" }
],

"[javascript]": {
"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": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[scss]": {
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},

"editor.formatOnSave": true,
"gitlens.advanced.blame.customArguments": [
"--ignore-revs-file",
"${workspaceRoot}/.git-blame-ignore-revs"
],
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "dreammaker",
"dme": "taucetistation.dme",
"problemMatcher": [
"$dreammaker"
],
"group": "build",
"label": "dm: build - taucetistation.dme"
},
{
"type": "shell",
"command": "tgui/bin/tgui-build",
"windows": {
"command": ".\\tgui\\bin\\tgui.bat"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: build"
},
{
"type": "shell",
"command": "tgui/bin/tgui-dev-server",
"windows": {
"command": ".\\tgui\\bin\\tgui-dev-server.bat"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: run dev server"
}
,
]
}
16 changes: 8 additions & 8 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ var/global/list/admin_cooldowns_list = list(
#define ADMIN_RANK_SANDBOX "Sandbox Admin"
#define ADMIN_RANK_REMOVED "Removed"

#define ADMIN_QUE(user) "(<a href='?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
#define ADMIN_FLW(target) "(<a href='?_src_=holder;adminplayerobservefollow=\ref[target]'>FLW</a>)"
#define ADMIN_JMP(target) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)"
#define ADMIN_VV(target) "(<a href='?_src_=vars;Vars=\ref[target]'>VV</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
#define ADMIN_QUE(user) "(<a href='byond://?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
#define ADMIN_FLW(target) "(<a href='byond://?_src_=holder;adminplayerobservefollow=\ref[target]'>FLW</a>)"
#define ADMIN_JMP(target) "(<a href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)"
#define ADMIN_VV(target) "(<a href='byond://?_src_=vars;Vars=\ref[target]'>VV</a>)"
#define ADMIN_PP(user) "(<a href='byond://?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
#define ADMIN_SM(user) "(<a href='byond://?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
#define ADMIN_TP(user) "(<a href='byond://?_src_=holder;traitor=\ref[user]'>TP</a>)"
#define ADMIN_KICK(user) "(<a href='byond://?_src_=holder;boot2=\ref[user]'>KICK</a>)"
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
#define ADMIN_PPJMPFLW(user) "[ADMIN_PP(user)] [ADMIN_FLW(user)] [ADMIN_JMP(user)]"
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/bridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define BRIDGE_ROUNDSTAT "roundstat" //shuttle/server starting/round starting
#define BRIDGE_SERVICE "service" //private debug msgs
#define BRIDGE_ANNOUNCE "announce" //general announces for players
#define BRIDGE_SAMOSBOR "samosbor" //online milestones notifications

//admin
#define BRIDGE_ADMINCOM "admincom" //admin faxes and command console
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/economy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
#define INSURANCE_NONE "None"
#define INSURANCE_STANDARD "Standard"
#define INSURANCE_PREMIUM "Premium"

#define STARTING_MONEY_MULTIPLYER 3
#define STARTING_MONEY_VARIANCE 5 //in percents
#define STARTING_MONEY_MINIMUM 50
24 changes: 13 additions & 11 deletions code/__DEFINES/human_layers.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
//Human Overlays Indexes/////////
#define TOTAL_LAYERS 29
#define FIRE_LOWER_LAYER 29
#define BODY_LAYER 28
#define EXTERNAL_APPEARANCE 27
#define MUTATIONS_LAYER 26
#define DAMAGE_LAYER 25
#define SURGERY_LAYER 24 //bs12 specific.
#define BANDAGE_LAYER 23
#define UNIFORM_LAYER 22
#define ID_LAYER 21
#define SHOES_LAYER 20
#define TOTAL_LAYERS 31
#define WING_UNDERLIMBS_LAYER 31
#define FIRE_LOWER_LAYER 30
#define BODY_LAYER 29
#define EXTERNAL_APPEARANCE 28
#define MUTATIONS_LAYER 27
#define DAMAGE_LAYER 26
#define SURGERY_LAYER 25 //bs12 specific.
#define BANDAGE_LAYER 24
#define UNIFORM_LAYER 23
#define ID_LAYER 22
#define SHOES_LAYER 21
#define WING_LAYER 20
#define TAIL_LAYER 19 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLOVES_LAYER 18
#define R_EAR_LAYER 17
Expand Down
19 changes: 13 additions & 6 deletions code/__DEFINES/math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,19 @@

#define CLAMP01(x) (clamp(x, 0, 1))

#define SIGN(x) (x < 0 ? -1 : 1)
#if DM_VERSION < 516
/// Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive
#define SIGN(x) ( ((x) > 0) - ((x) < 0) )

// Performs a linear interpolation between a and b.
// Note that amount=0 returns a, amount=1 returns b, and
// amount=0.5 returns the mean of a and b.
#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a )
#else
#define SIGN(x) sign(x)

#define LERP(a, b, amount) lerp(a, b, amount)
#endif

#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )

Expand Down Expand Up @@ -75,11 +87,6 @@

#define IS_MULTIPLE(x, y) ((x) % (y) == 0)

// Performs a linear interpolation between a and b.
// Note that amount=0 returns a, amount=1 returns b, and
// amount=0.5 returns the mean of a and b.
#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a )

// Returns the nth root of x.
#define ROOT(n, x) ((x) ** (1 / (n)))

Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@

#define BYOND_JOIN_LINK "byond://[BYOND_SERVER_ADDRESS]"
#define BYOND_SERVER_ADDRESS config.server ? "[config.server]" : "[world.address]:[world.port]"
#define BRIDGE_JOIN_LINKS "Присоединиться: [BYOND_JOIN_LINK]"

#define DELAY2GLIDESIZE(delay) (world.icon_size / max(CEIL(delay / world.tick_lag), 1))

Expand Down Expand Up @@ -416,3 +417,7 @@
#define SMOOTH_ADAPTERS_WALLS_FOR_WALLS list( \
/obj/machinery/door/airlock = "wall", \
)

#define QUOTA_NEUTRAL 0
#define QUOTA_WANTED 1
#define QUOTA_UNWANTED 2
8 changes: 4 additions & 4 deletions code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// A link given to ghost alice to follow bob
#define FOLLOW_LINK(alice, bob) "<a href=?src=\ref[alice];track=\ref[bob]>(F)</a>"
#define TURF_LINK(alice, turfy) "<a href=?src=\ref[alice];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(T)</a>"
#define FOLLOW_OR_TURF_LINK(alice, bob, turfy) "<a href=?src=\ref[alice];track=\ref[bob];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(F)</a>"
#define FOLLOW_LINK(alice, bob) "<a href=byond://?src=\ref[alice];track=\ref[bob]>(F)</a>"
#define TURF_LINK(alice, turfy) "<a href=byond://?src=\ref[alice];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(T)</a>"
#define FOLLOW_OR_TURF_LINK(alice, bob, turfy) "<a href=byond://?src=\ref[alice];track=\ref[bob];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(F)</a>"

// Link for alice to help bob
#define HELP_LINK(alice, bob) "<a href=?src=\ref[alice];help_other=\ref[bob]>Click here to help [bob].</a>"
#define HELP_LINK(alice, bob) "<a href=byond://?src=\ref[alice];help_other=\ref[bob]>Click here to help [bob].</a>"
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@
#define TRAIT_WILLPOWER_IMPLANT "willpower_implant"
#define TRAIT_CAN_LEAP "can_leap"
#define TRAIT_AUTOFIRE_SHOOTS "autofire_shoots"
#define TRAIT_AIRBAG_PROTECTION "airbag_protection"
#define TRAIT_DYSLALIA "dyslalia"

/*
* Used for movables that need to be updated, via COMSIG_ENTER_AREA and COMSIG_EXIT_AREA, when transitioning areas.
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
|New player notify
|Player '[M.ckey]' joined to the game as [M.mind.name][player_assigned_role] [ADMIN_FLW(M)] [ADMIN_PP(M)] [ADMIN_VV(M)]
|Byond profile: <a href='[player_byond_profile]'>open</a>
|Guard report: <a href='?_src_=holder;guard=\ref[M]'>show</a>"})
|Guard report: <a href='byond://?_src_=holder;guard=\ref[M]'>show</a>"})

message_admins(adminmsg, emphasize = TRUE)

Expand Down
5 changes: 5 additions & 0 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@

init_washing_items_list()

global.body_wing_accessory_by_name = list()
for(var/A as anything in subtypesof(/datum/sprite_accessory/wing))
var/datum/sprite_accessory/wing/B = new A
global.body_wing_accessory_by_name[B.name] = B

/proc/init_washing_items_list()
var/list/path_list = list(/obj/item/clothing/mask,
/obj/item/clothing/head,
Expand Down
6 changes: 6 additions & 0 deletions code/__HELPERS/time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
/proc/worldtime2text(time = world.time)
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"

/proc/worldtime_hours(time = world.time)
return round(time / 36000) + 12

/proc/worldtime_minutes(time = world.time)
return time / 600 % 60

/proc/time_stamp(format = "hh:mm:ss", wtime = world.timeofday)
return time2text(wtime, format)

Expand Down
9 changes: 3 additions & 6 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ Turf and target are seperate in case you want to teleport some distance from a t

return destination

/proc/sign(x)
return x!=0?x/abs(x):0

/proc/getline(atom/M,atom/N)//Ultra-Fast Bresenham Line-Drawing Algorithm
var/px=M.x //starting x
var/py=M.y
Expand All @@ -140,8 +137,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/dy=N.y-py
var/dxabs=abs(dx)//Absolute value of x distance
var/dyabs=abs(dy)
var/sdx=sign(dx) //Sign of x distance (+ or -)
var/sdy=sign(dy)
var/sdx=SIGN(dx) //Sign of x distance (+ or -)
var/sdy=SIGN(dy)
var/x=dxabs>>1 //Counters for steps taken, setting to distance/2
var/y=dyabs>>1 //Bit-shifting makes me l33t. It also makes getline() unnessecarrily fast.
var/j //Generic integer for counting
Expand Down Expand Up @@ -439,7 +436,7 @@ Turf and target are seperate in case you want to teleport some distance from a t

if(key)
if(include_link && C)
. += "<a href='?priv_msg=\ref[C][reply ? ";ahelp_reply=[reply]" : ""][mentor_pm ? ";mentor_pm=1" : ""]'>"
. += "<a href='byond://?priv_msg=\ref[C][reply ? ";ahelp_reply=[reply]" : ""][mentor_pm ? ";mentor_pm=1" : ""]'>"

if(C && C.holder && C.holder.fakekey && !include_name)
. += "Administrator"
Expand Down
22 changes: 15 additions & 7 deletions code/__HELPERS/vector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,31 @@ return_location()
/datum/plot_vector
var/turf/source
var/turf/target
var/cardinal_dir // in case we don't have a specific target
var/angle = 0 // direction of travel in degrees
var/loc_x = 0 // in pixels from the left edge of the map
var/loc_y = 0 // in pixels from the bottom edge of the map
var/loc_z = 0 // loc z is in world space coordinates (i.e. z level) - we don't care about measuring pixels for this
var/offset_x = 0 // distance to increment each step
var/offset_y = 0

/datum/plot_vector/proc/setup(turf/S, turf/T, xo = 0, yo = 0, angle_offset=0)
/datum/plot_vector/proc/setup(turf/S, turf/T, xo = 0, yo = 0, angle_offset=0, dir)
source = S
target = T
cardinal_dir = dir

if(!istype(source))
source = get_turf(source)
if(!istype(target))

if(!istype(source))
return

if(!target && cardinal_dir)
target = get_step(source, cardinal_dir)
else if(!istype(target))
target = get_turf(target)

if(!istype(source) || !istype(target))
if(!istype(target))
return

// convert coordinates to pixel space (default is 32px/turf, 8160px across for a size 255 map)
Expand Down Expand Up @@ -89,14 +97,14 @@ return_location()
// calculate the offset per increment step
if(abs(angle) in list(0, 45, 90, 135, 180)) // check if the angle is a cardinal
if(abs(angle) in list(0, 45, 135, 180)) // if so we can skip the trigonometry and set these to absolutes as
offset_x = sign(dx) // they will always be a full step in one or more directions
offset_x = SIGN(dx) // they will always be a full step in one or more directions
if(abs(angle) in list(45, 90, 135))
offset_y = sign(dy)
offset_y = SIGN(dy)
else if(abs(dy) > abs(dx))
offset_x = COT(abs(angle)) // otherwise set the offsets
offset_y = sign(dy)
offset_y = SIGN(dy)
else
offset_x = sign(dx)
offset_x = SIGN(dx)
offset_y = tan(angle)
if(dx < 0)
offset_y = -offset_y
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var/global/list/all_languages[0]
var/global/list/language_keys[0] //table of say codes for all languages
var/global/list/whitelisted_species = list(HUMAN)
var/global/list/all_zombie_species_names = list(ZOMBIE, ZOMBIE_TAJARAN, ZOMBIE_SKRELL, ZOMBIE_UNATHI)
var/global/list/body_wing_accessory_by_name

var/global/list/clients = list() //list of all clients
var/global/list/admins = list() //list of all clients whom are admins
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var/global/bridge_secret = null
var/disable_player_mice = 0
var/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech

var/deathtime_required = 18000 //30 minutes
var/deathtime_required = 6000 //10 minutes

var/usealienwhitelist = 0
var/use_alien_job_restriction = 0
Expand Down
Loading

0 comments on commit 0d04bb8

Please sign in to comment.