Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/HearthOfHestia/Nebula into p…
Browse files Browse the repository at this point in the history
…ort/plants
  • Loading branch information
noelle-lavenza committed May 29, 2022
2 parents 4f2fb4d + db57446 commit 1685289
Show file tree
Hide file tree
Showing 610 changed files with 16,334 additions and 9,033 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Generate Documentation

on:
push:
branches:
- dev
workflow_dispatch:

env:
SPACEMAN_DMM_VERSION: suite-1.7.2

jobs:
generate_documentation:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
concurrency: gen-docs
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
with:
path: $HOME/spaceman_dmm/$SPACEMAN_DMM_VERSION
key: ${{ runner.os }}-spacemandmm-${{ env.SPACEMAN_DMM_VERSION }}
- name: Install dmdoc
run: scripts/install-spaceman-dmm.sh dmdoc
- name: Generate documentation
run: |
~/dmdoc
touch dmdoc/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@da91e735be5cabb471a4b8afe367d10606da4683
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages-dmdoc
folder: dmdoc
force: false
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

env:
BYOND_MAJOR: "514"
BYOND_MINOR: "1572"
SPACEMAN_DMM_VERSION: suite-1.7.1
BYOND_MINOR: "1575"
SPACEMAN_DMM_VERSION: suite-1.7.2

jobs:
DreamChecker:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"ss13.byond"
"ss13.byond",
"anturk.dmi-editor"
]
}
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
// Lets you preview .dmi files in the editor
"workbench.editorAssociations": {
"*.dmi": "imagePreview.previewEditor"
},
"files.associations": {
"*.tmpl": "html"
},
Expand Down
3 changes: 3 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[langserver]
dreamchecker = true

[dmdoc]
use_typepath_names = true

[code_standards]
disallow_relative_type_definitions = true
disallow_relative_proc_definitions = true
Expand Down
25 changes: 18 additions & 7 deletions code/__defines/_tick.dm
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
#define TICK_LIMIT_RUNNING 80
#define TICK_LIMIT_TO_RUN 78
/// Percentage of tick to leave for master controller to run
#define MAPTICK_MC_MIN_RESERVE 70
#define MAPTICK_LAST_INTERNAL_TICK_USAGE (world.map_cpu)

/// Tick limit while running normally
#define TICK_BYOND_RESERVE 2
#define TICK_LIMIT_RUNNING (max(100 - TICK_BYOND_RESERVE - MAPTICK_LAST_INTERNAL_TICK_USAGE, MAPTICK_MC_MIN_RESERVE))
/// Tick limit used to resume things in stoplag
#define TICK_LIMIT_TO_RUN 70
/// Tick limit for MC while running
#define TICK_LIMIT_MC 70
#define TICK_LIMIT_MC_INIT_DEFAULT 98
/// Tick limit while initializing
#define TICK_LIMIT_MC_INIT_DEFAULT (100 - TICK_BYOND_RESERVE)

#define TICK_USAGE world.tick_usage //for general usage
#define TICK_USAGE_REAL world.tick_usage //to be used where the result isn't checked
/// for general usage of tick_usage
#define TICK_USAGE world.tick_usage

/// Returns true if tick_usage is above the limit
#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit )
#define CHECK_TICK if TICK_CHECK stoplag()
/// runs stoplag if tick_usage is above the limit
#define CHECK_TICK ( TICK_CHECK ? stoplag() : 0 )

//"fancy" math for calculating time in ms from tick_usage percentage and the length of ticks
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
//collapsed to percent_of_tick_used * tick_lag
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - starting_tickusage))
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE - starting_tickusage))

//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define IGNORE_MOB_SIZE BITFLAG(0)
#define AFFECTS_DEAD BITFLAG(1)

#define HANDLE_REACTIONS(_reagents) SSmaterials.active_holders[_reagents] = TRUE
#define HANDLE_REACTIONS(_reagents) if(!QDELETED(_reagents)) { SSmaterials.active_holders[_reagents] = TRUE; }
#define UNQUEUE_REACTIONS(_reagents) SSmaterials.active_holders -= _reagents

#define REAGENT_LIST(R) (R.reagents?.get_reagents() || "No reagent holder")
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/computers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

// Network mainframe roles
#define MF_ROLE_FILESERVER "FILE SERVER"
#define MF_ROLE_EMAIL_SERVER "EMAIL SERVER"
#define MF_ROLE_LOG_SERVER "LOG SERVER"
#define MF_ROLE_CREW_RECORDS "RECORDS SERVER"
#define MF_ROLE_SOFTWARE "SOFTWARE REPOSITORY"
#define MF_ROLE_ACCOUNT_SERVER "ACCOUNT SERVER"

// Program bitflags
#define PROGRAM_CONSOLE BITFLAG(0)
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#define ORGAN_PROSTHETIC BITFLAG(11) // The organ is prosthetic. Changes numerous behaviors, search BP_IS_PROSTHETIC for checks.
#define ORGAN_BRITTLE BITFLAG(12) // The organ takes additional blunt damage. If robotic, cannot be repaired through normal means.
#define ORGAN_CRYSTAL BITFLAG(13) // The organ does not suffer laser damage, but shatters on droplimb.
#define ORGAN_DISLOCATED BITFLAG(14)

// Organ flag defines.
#define ORGAN_FLAG_CAN_AMPUTATE BITFLAG(0) // The organ can be amputated.
Expand All @@ -58,6 +59,7 @@
#define ORGAN_FLAG_FINGERPRINT BITFLAG(4) // The organ has a fingerprint.
#define ORGAN_FLAG_HEALS_OVERKILL BITFLAG(5) // The organ heals from overkill damage.
#define ORGAN_FLAG_DEFORMED BITFLAG(6) // The organ is permanently disfigured.
#define ORGAN_FLAG_CAN_DISLOCATE BITFLAG(7) // The organ can be dislocated.

// Droplimb types.
#define DISMEMBER_METHOD_EDGE 0
Expand Down
4 changes: 2 additions & 2 deletions code/__defines/fluids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#define FLUID_PUSH_THRESHOLD 20 // Amount of flow needed to push items.

// Expects /turf for T.
#define ADD_ACTIVE_FLUID_SOURCE(T) SSfluids.water_sources[T] = TRUE
#define ADD_ACTIVE_FLUID_SOURCE(T) if(!T.changing_turf) { SSfluids.water_sources[T] = TRUE; }
#define REMOVE_ACTIVE_FLUID_SOURCE(T) SSfluids.water_sources -= T

// Expects /obj/effect/fluid for F.
#define ADD_ACTIVE_FLUID(F) SSfluids.active_fluids[F] = TRUE
#define ADD_ACTIVE_FLUID(F) if(!QDELETED(F)) { SSfluids.active_fluids[F] = TRUE; }
#define REMOVE_ACTIVE_FLUID(F) SSfluids.active_fluids -= F

// Expects turf for T,
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
#define FIRE_MAX_STACKS 25
#define FIRE_MAX_FIRESUIT_STACKS 20 // If the number of stacks goes above this firesuits won't protect you anymore. If not, you can walk around while on fire like a badass.

#define THROWFORCE_GIBS 10 // Throw speed for gibbed or dismembered organs.
#define THROWFORCE_GIBS 3 // Throw speed for gibbed or dismembered organs.
#define THROWFORCE_SPEED_DIVISOR 12 // The throwing speed value at which the throwforce multiplier is exactly 1.
#define THROWNOBJ_KNOCKBACK_SPEED 15 // The minumum speed of a w_class 2 thrown object that will cause living mobs it hits to be knocked back. Heavier objects can cause knockback at lower speeds.
#define THROWNOBJ_KNOCKBACK_DIVISOR 2 // Affects how much speed the mob is knocked back with.
Expand Down
5 changes: 0 additions & 5 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.

//Camera capture modes
#define CAPTURE_MODE_REGULAR 0 //Regular polaroid camera mode
#define CAPTURE_MODE_ALL 1 //Admin camera mode
#define CAPTURE_MODE_PARTIAL 3 //Simular to regular mode, but does not do dummy check

//objectives
#define CONFIG_OBJECTIVE_NONE 2
#define CONFIG_OBJECTIVE_VERB 1
Expand Down
1 change: 1 addition & 0 deletions code/__defines/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) if(item) {qdel(item); item = null}
#define QDEL_NULL_SCREEN(item) if(client) { client.screen -= item; }; QDEL_NULL(item)
#define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) }}; if(x) {x.Cut(); x = null } // Second x check to handle items that LAZYREMOVE on qdel.
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#define SPECIES_FLAG_NO_BLOCK BITFLAG(8) // Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB BITFLAG(9) // This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_LOW_GRAV_ADAPTED BITFLAG(10) // This species is used to lower than standard gravity, affecting stamina in high-grav
#define SPECIES_FLAG_CRYSTALLINE BITFLAG(11) // This species is made of crystalline material. Replaces var/is_crystalline.
#define SPECIES_FLAG_SYNTHETIC BITFLAG(12) // This species is synthetic/robotic and spawns with prosthetic limbs.

// Species spawn flags
#define SPECIES_IS_WHITELISTED BITFLAG(0) // Must be whitelisted to play.
Expand Down
39 changes: 27 additions & 12 deletions code/__defines/temperature.dm
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
#define ATOM_IS_TEMPERATURE_SENSITIVE(A) (A && !QDELETED(A) && !(A.atom_flags & ATOM_FLAG_NO_TEMP_CHANGE))
#define ATOM_IS_TEMPERATURE_SENSITIVE(A) (A && !(A.atom_flags & ATOM_FLAG_NO_TEMP_CHANGE))
#define ATOM_SHOULD_TEMPERATURE_ENQUEUE(A) (ATOM_IS_TEMPERATURE_SENSITIVE(A) && !QDELETED(A))
#define ATOM_TEMPERATURE_EQUILIBRIUM_THRESHOLD 5
#define ATOM_TEMPERATURE_EQUILIBRIUM_CONSTANT 0.25

#define ADJUST_ATOM_TEMPERATURE(_atom, _temp) \
if(!QDELETED(_atom)) { \
_atom.temperature = _temp; \
if(!QDELETED(_atom.reagents)) { \
HANDLE_REACTIONS(_atom.reagents); \
_atom.temperature = _temp; \
HANDLE_REACTIONS(_atom.reagents); \
QUEUE_TEMPERATURE_ATOMS(_atom);

#define QUEUE_TEMPERATURE_ATOMS(_atoms) \
if(islist(_atoms)) { \
for(var/thing in _atoms) { \
var/atom/A = thing; \
QUEUE_TEMPERATURE_ATOM(A); \
} \
QUEUE_TEMPERATURE_ATOMS(_atom);\
} else { \
QUEUE_TEMPERATURE_ATOM(_atoms); \
}

#define QUEUE_TEMPERATURE_ATOMS(_atoms) \
#define QUEUE_TEMPERATURE_ATOM(_atom) \
if(ATOM_SHOULD_TEMPERATURE_ENQUEUE(_atom)) { \
SStemperature.processing[_atom] = TRUE; \
}

#define UNQUEUE_TEMPERATURE_ATOMS(_atoms) \
if(islist(_atoms)) { \
for(var/thing in _atoms) { \
var/atom/A = thing; \
if(ATOM_IS_TEMPERATURE_SENSITIVE(A)) { \
SStemperature.processing[A] = TRUE; \
} \
UNQUEUE_TEMPERATURE_ATOM(A); \
} \
} else if(ATOM_IS_TEMPERATURE_SENSITIVE(_atoms)) { \
SStemperature.processing[_atoms] = TRUE; \
} else { \
UNQUEUE_TEMPERATURE_ATOM(_atoms); \
}

#define UNQUEUE_TEMPERATURE_ATOM(_atom) \
if(ATOM_IS_TEMPERATURE_SENSITIVE(_atom)) { \
SStemperature.processing -= _atom; \
}
8 changes: 8 additions & 0 deletions code/__defines/unit_tests.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#define UT_NORMAL 1 // Standard one atmosphere 20celsius
#define UT_VACUUM 2 // Vacume on simulated turfs
#define UT_NORMAL_COLD 3 // Cold but standard atmosphere.

#define FAILURE 0
#define SUCCESS 1
#define SKIP 2
2 changes: 1 addition & 1 deletion code/_global_vars/configuration.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Bomb cap!
var/global/max_explosion_range = 14
var/global/href_logfile = null
var/global/game_version = "Nebula13"
var/global/game_version = "Nebula"
var/global/changelog_hash = ""
var/global/join_motd = null

Expand Down
11 changes: 8 additions & 3 deletions code/_global_vars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ var/global/host = null //only here until check @ code\modules\ghosttrap\trap.dm:
var/global/datum/sun/sun = new
var/global/datum/universal_state/universe = new

var/global/list/vowels = list("a","e","i","o","u")
var/global/list/alphabet_no_vowels = list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z")
var/global/list/full_alphabet = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
/// Vowels.
var/global/list/vowels = list("a","e","i","o","u")
/// Alphabet a-z.
var/global/list/alphabet = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
/// Alphabet A-Z.
var/global/list/alphabet_capital = list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
/// Numbers 0-9.
var/global/list/numbers = list("0","1","2","3","4","5","6","7","8","9")

var/global/list/meteor_list = list()
4 changes: 2 additions & 2 deletions code/_helpers/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
/proc/cmp_program(var/datum/computer_file/program/A, var/datum/computer_file/program/B)
return cmp_text_asc(A.filedesc, B.filedesc)

/proc/cmp_emails_asc(var/datum/computer_file/data/email_account/A, var/datum/computer_file/data/email_account/B)
return cmp_text_asc(A.login,B.login)
/proc/cmp_accounts_asc(var/datum/computer_file/data/account/A, var/datum/computer_file/data/account/B)
return cmp_text_asc(A.login, B.login)

/proc/cmp_planelayer(atom/A, atom/B)
return (B.plane - A.plane) || (B.layer - A.layer)
Expand Down
Loading

0 comments on commit 1685289

Please sign in to comment.