Skip to content

Commit

Permalink
Merge pull request #82 from MistakeNot4892/poldev
Browse files Browse the repository at this point in the history
Updating from Neb dev.
  • Loading branch information
Atermonera authored Jan 26, 2025
2 parents e2fd9d2 + f67eabd commit fc42a64
Show file tree
Hide file tree
Showing 2,254 changed files with 26,717 additions and 77,002 deletions.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: Issue report
about: Create a report about a bug or other issue
title: ''
labels: ''
assignees: ''

---

<!--
Anything inside tags like these is a comment and will not be displayed in the final issue.
Be careful not to write inside them!
Every field other than 'specific information for locating' is required.
If you do not fill out the 'specific information' field, please delete the header.
/!\ Omitting or not answering a required field will result in your issue being closed. /!\
Repeated violation of this rule, or joke or spam issues, will result in punishment.
PUT YOUR ANSWERS ON THE BLANK LINES BELOW THE HEADERS
(The lines with four #'s)
Don't edit them or delete them - it's part of the formatting
-->

#### Description of issue



#### Difference between expected and actual behavior



#### Steps to reproduce



#### Specific information for locating
<!-- e.g. an object name, paste specific message outputs... -->



#### Length of time in which bug has been known to occur
<!--
Be specific if you approximately know the time it's been occurring
for—this can speed up finding the source. If you're not sure
about it, tell us too!
-->



#### Client version, Server revision & Game ID
<!-- Found with the "Show server revision" verb in the OOC tab in game. -->



#### Issue bingo
<!-- Check these by writing an x inside the [ ] (like this: [x])-->
<!-- Don't forget to remove the space between the brackets, or it won't work! -->
- [ ] Issue could be reproduced at least once
- [ ] Issue could be reproduced by different players
- [ ] Issue could be reproduced in multiple rounds
- [ ] Issue happened in a recent (less than 7 days ago) round
- [ ] [Couldn't find an existing issue about this](https://github.com/NebulaSS13/Nebula/issues)
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# ignore misc BYOND files
Thumbs.db
*.log
*.int
*.rsc
Expand All @@ -21,6 +20,11 @@ atupdate
config/*
sql/test_db

# misc OS garbage
Thumbs.db
Thumbs.db:encryptable
.DS_Store

# vscode
.vscode/*
*.code-workspace
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ This is a quick and dirty set of agreed-upon standards for contributions to the
- If there's a personal dislike of the PR, post about it for discussion. Maybe have an 'on hold for discussion' label. Try to reach a consensus/compromise. Failing a compromise, a majority maintainer vote will decide.
- First person to review approves the PR, second person to review can merge it. If 24 hours pass with no objections, first person can merge the PR themselves.
- PRs can have a 24 hour grace period applied by maintainers if it seems important for discussion and responses to be involved. Don't merge for the grace period if applied (reviews are fine).

### Footguns
A footgun is a pattern, function, assumption etc. that stands a strong chance to shoot you in the foot. They are documented here for ease of reference by new contributors.

#### List footguns
- Adding lists to lists will actually perform a merge, rather than inserting the list as a new record. If you want to insert a list into a list, you need to either:
- double-wrap it, ex. `my_list += list(list("some_new_data" = 25))`
- set the index directly, ex. `my_list[my_list.len] = list("some_new_data" = 25)`
- Using variables and macros as associative list keys have some notable behavior.
- If declaring an associative list using a macro as a key, in a case where the macro does not exist (due to misspelling, etc.), that macro name will be treated as a string value for the associative list. You can guard against this by wrapping the macro in parens, ex. `list( (MY_MACRO_NAME) = "some_value" )`, which will fail to compile instead in cases where the macro doesn't exist.
- If a variable is used as the associative key, it *must* be wrapped in parens, or it will be used as a string key.
12 changes: 12 additions & 0 deletions code/___compile_options.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// If REFTRACK_IN_CI is defined, the reftracker will run in CI.
#define REFTRACK_IN_CI
#if defined(REFTRACK_IN_CI) && defined(UNIT_TEST) && !defined(SPACEMAN_DMM)
#define REFTRACKING_ENABLED
#define GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK
#endif

// parity with previous behavior where TESTING enabled reftracking
#ifdef TESTING
#define REFTRACKING_ENABLED
#endif
32 changes: 14 additions & 18 deletions code/__defines/ZAS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,25 @@
}

#ifdef MULTIZAS

var/global/list/csrfz_check = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST, NORTHUP, EASTUP, WESTUP, SOUTHUP, NORTHDOWN, EASTDOWN, WESTDOWN, SOUTHDOWN)
var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST, UP, DOWN)
#define ZAS_CSRFZ_CHECK global.cornerdirsz
#define ZAS_GZN_CHECK global.cardinalz

#define ATMOS_CANPASS_TURF(ret, A, B) \
if (A.blocks_air & AIR_BLOCKED || B.blocks_air & AIR_BLOCKED) { \
ret = BLOCKED; \
} \
else if (B.z != A.z) { \
if (B.z < A.z) { \
ret = (A.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else { \
ret = (B.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (B.z < A.z) { \
ret = (A.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (A.blocks_air & ZONE_BLOCKED || B.blocks_air & ZONE_BLOCKED) { \
ret = (A.z == B.z) ? ZONE_BLOCKED : AIR_BLOCKED; \
else if(B.z > A.z) { \
ret = (B.z_flags & ZM_ALLOW_ATMOS) ? ZONE_BLOCKED : BLOCKED; \
} \
else if (A.contents.len) { \
else if ((A.blocks_air & ZONE_BLOCKED) || (B.blocks_air & ZONE_BLOCKED)) { \
ret = ZONE_BLOCKED; \
} \
else if (length(A.contents)) { \
ret = 0;\
for (var/thing in A) { \
var/atom/movable/AM = thing; \
for (var/atom/movable/AM as anything in A) { \
ATMOS_CANPASS_MOVABLE(ret, AM, B); \
if (ret == BLOCKED) { \
break;\
Expand All @@ -88,8 +84,8 @@ var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST, UP, DOWN)
}
#else

var/global/list/csrfz_check = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST)
#define ZAS_CSRFZ_CHECK global.cornerdirs
#define ZAS_GZN_CHECK global.cardinal

#define ATMOS_CANPASS_TURF(ret, A, B) \
if (A.blocks_air & AIR_BLOCKED || B.blocks_air & AIR_BLOCKED) { \
Expand All @@ -98,7 +94,7 @@ var/global/list/gzn_check = list(NORTH, SOUTH, EAST, WEST)
else if (A.blocks_air & ZONE_BLOCKED || B.blocks_air & ZONE_BLOCKED) { \
ret = ZONE_BLOCKED; \
} \
else if (A.contents.len) { \
else if (length(A.contents)) { \
ret = 0;\
for (var/thing in A) { \
var/atom/movable/AM = thing; \
Expand Down
3 changes: 0 additions & 3 deletions code/__defines/_compile_options.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/__defines/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ What is the naming convention for planes or layers?
#define ABOVE_LIGHTING_PLANE 4 // laser beams, etc. that shouldn't be affected by darkness
#define ABOVE_LIGHTING_LAYER 1
#define BEAM_PROJECTILE_LAYER 2
#define SUPERMATTER_WALL_LAYER 3
#define SUBSPACE_WALL_LAYER 3
#define OBFUSCATION_LAYER 4

#define FULLSCREEN_PLANE 5 // for fullscreen overlays that do not cover the hud.
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define STANCE_ATTACKING /decl/mob_controller_stance/attacking
#define STANCE_TIRED /decl/mob_controller_stance/tired
#define STANCE_CONTAINED /decl/mob_controller_stance/contained
#define STANCE_BUSY /decl/mob_controller_stance/busy

//basically 'do nothing'
#define STANCE_COMMANDED_STOP /decl/mob_controller_stance/commanded/stop
//follows a target
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The latter will result in a linter warning and will not work correctly.
#define ITEM_FLAG_NOCUFFS BITFLAG(11) // Gloves that have this flag prevent cuffs being applied
#define ITEM_FLAG_CAN_HIDE_IN_SHOES BITFLAG(12) // Items that can be hidden in shoes that permit it
#define ITEM_FLAG_PADDED BITFLAG(13) // When set on gloves, will act like pulling punches in unarmed combat.
#define ITEM_FLAG_CAN_TAPE BITFLAG(14) // Whether the item can be be taped onto something using tape
#define ITEM_FLAG_CAN_TAPE BITFLAG(14) // Whether the item can be taped onto something using tape
#define ITEM_FLAG_IS_WEAPON BITFLAG(15) // Item is considered a weapon. Currently only used for force-based worth calculation.

// Flags for pass_flags (/atom/var/pass_flags)
Expand Down
42 changes: 1 addition & 41 deletions code/__defines/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define CHOOSE_GAMEMODE_RETRY 2 // The gamemode could not be chosen; we will use the next most popular option voted in, or the default.
#define CHOOSE_GAMEMODE_REVOTE 3 // The gamemode could not be chosen; we need to have a revote.
#define CHOOSE_GAMEMODE_RESTART 4 // The gamemode could not be chosen; we will restart the server.
#define CHOOSE_GAMEMODE_SILENT_REDO 5 // The gamemode could not be chosen; we request to have the the proc rerun on the next tick.
#define CHOOSE_GAMEMODE_SILENT_REDO 5 // The gamemode could not be chosen; we request to have the proc rerun on the next tick.

//End game state, to manage round end.
#define END_GAME_NOT_OVER 1
Expand Down Expand Up @@ -33,46 +33,6 @@
#define DEFAULT_TELECRYSTAL_AMOUNT 130
#define IMPLANT_TELECRYSTAL_AMOUNT(x) (round(x * 0.49)) // If this cost is ever greater than half of DEFAULT_TELECRYSTAL_AMOUNT then it is possible to buy more TC than you spend

/////////////////
////WIZARD //////
/////////////////

/* WIZARD SPELL FLAGS */
#define GHOSTCAST BITFLAG(0) //can a ghost cast it?
#define NEEDSCLOTHES BITFLAG(1) //does it need the wizard garb to cast? Nonwizard spells should not have this
#define NEEDSHUMAN BITFLAG(2) //does it require the caster to be human?
#define Z2NOCAST BITFLAG(3) //if this is added, the spell can't be cast at centcomm
#define NO_SOMATIC BITFLAG(4) //spell will go off if the person is incapacitated or stunned
#define IGNOREPREV BITFLAG(5) //if set, each new target does not overlap with the previous one
//The following flags only affect different types of spell, and therefore overlap
//Targeted spells
#define INCLUDEUSER BITFLAG(6) //does the spell include the caster in its target selection?
#define SELECTABLE BITFLAG(7) //can you select each target for the spell?
#define NOFACTION BITFLAG(8) //Don't do the same as our faction
#define NONONFACTION BITFLAG(9) //Don't do people other than our faction
//AOE spells
#define IGNOREDENSE BITFLAG(10) //are dense turfs ignored in selection?
#define IGNORESPACE BITFLAG(11) //are space turfs ignored in selection?
//End split flags
#define CONSTRUCT_CHECK BITFLAG(12) //used by construct spells - checks for nullrods
#define NO_BUTTON BITFLAG(13) //spell won't show up in the HUD with this

//invocation
#define SpI_SHOUT "shout"
#define SpI_WHISPER "whisper"
#define SpI_EMOTE "emote"
#define SpI_NONE "none"

//upgrading
#define Sp_SPEED "speed"
#define Sp_POWER "power"
#define Sp_TOTAL "total"

//casting costs
#define Sp_RECHARGE "recharge"
#define Sp_CHARGES "charges"
#define Sp_HOLDVAR "holdervar"

//Voting-related
#define VOTE_PROCESS_ABORT 1
#define VOTE_PROCESS_COMPLETE 2
Expand Down
1 change: 0 additions & 1 deletion code/__defines/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#define UI_ICON_NUTRITION "icon_nutrition"
#define UI_ICON_HYDRATION "icon_hydration"
#define UI_ICON_FIRE_INTENT "icon_fire_intent"
#define UI_ICON_INTENT "icon_intent"
#define UI_ICON_UP_HINT "icon_uphint"
#define UI_ICON_STATUS "icon_status"
#define UI_ICON_STATUS_FIRE "icon_status_fire"
Expand Down
11 changes: 11 additions & 0 deletions code/__defines/intent.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Intent bitflags for use in check_intent()
#define I_FLAG_HELP BITFLAG(0)
#define I_FLAG_DISARM BITFLAG(1)
#define I_FLAG_GRAB BITFLAG(2)
#define I_FLAG_HARM BITFLAG(3)
#define I_FLAG_ALL (I_FLAG_HELP|I_FLAG_DISARM|I_FLAG_GRAB|I_FLAG_HARM)

//NOTE: INTENT_HOTKEY_* defines are not actual intents!
//they are here to support hotkeys
#define INTENT_HOTKEY_LEFT "left"
#define INTENT_HOTKEY_RIGHT "right"
19 changes: 10 additions & 9 deletions code/__defines/inventory_sizes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
20 - things that take up an entire turf, like wall girders or door assemblies
*/

#define ITEM_SIZE_TINY 1
#define ITEM_SIZE_SMALL 2
#define ITEM_SIZE_NORMAL 3
#define ITEM_SIZE_LARGE 4
#define ITEM_SIZE_HUGE 5
#define ITEM_SIZE_GARGANTUAN 6
#define ITEM_SIZE_STRUCTURE 20
#define ITEM_SIZE_TINY 1
#define ITEM_SIZE_SMALL 2
#define ITEM_SIZE_NORMAL 3
#define ITEM_SIZE_LARGE 4
#define ITEM_SIZE_HUGE 5
#define ITEM_SIZE_GARGANTUAN 6
#define ITEM_SIZE_STRUCTURE 20
#define ITEM_SIZE_LARGE_STRUCTURE 30

#define ITEM_SIZE_MIN ITEM_SIZE_TINY
#define ITEM_SIZE_MAX ITEM_SIZE_STRUCTURE
#define ITEM_SIZE_MIN ITEM_SIZE_TINY
#define ITEM_SIZE_MAX ITEM_SIZE_LARGE_STRUCTURE

#define BASE_STORAGE_COST(w_class) (2**(w_class-1)) //1,2,4,8,16,...

Expand Down
15 changes: 15 additions & 0 deletions code/__defines/item_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Identifiers for various categories of item effects.
#define IE_CAT_DAMAGE "weff_damage"
#define IE_CAT_STRIKE "weff_strike"
#define IE_CAT_PARRY "weff_parry"
#define IE_CAT_USED "weff_used"
#define IE_CAT_WIELDED "weff_wield"
#define IE_CAT_VISUAL "weff_visual"
#define IE_CAT_LISTENER "weff_listener"
#define IE_CAT_EXAMINE "weff_visible"
#define IE_CAT_RANGED "weff_ranged"
#define IE_CAT_PROCESS "weff_process"

// Identifiers for parameters for item effects.
#define IE_PAR_USES "uses"
#define IE_PAR_MAX_USES "max_uses"
16 changes: 0 additions & 16 deletions code/__defines/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
#define STAGE_THREE 5
#define STAGE_FOUR 7
#define STAGE_FIVE 9
#define STAGE_SUPER 11

// NanoUI flags
#define STATUS_INTERACTIVE 2 // GREEN Visability
Expand Down Expand Up @@ -103,21 +102,6 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
#define ATMOS_DEFAULT_VOLUME_MIXER 500 // L.
#define ATMOS_DEFAULT_VOLUME_PIPE 70 // L.

// These are used by supermatter and supermatter monitor program, mostly for UI updating purposes. Higher should always be worse!
#define SUPERMATTER_ERROR -1 // Unknown status, shouldn't happen but just in case.
#define SUPERMATTER_INACTIVE 0 // No or minimal energy
#define SUPERMATTER_NORMAL 1 // Normal operation
#define SUPERMATTER_NOTIFY 2 // Ambient temp > 80% of CRITICAL_TEMPERATURE
#define SUPERMATTER_WARNING 3 // Ambient temp > CRITICAL_TEMPERATURE OR integrity damaged
#define SUPERMATTER_DANGER 4 // Integrity < 50%
#define SUPERMATTER_EMERGENCY 5 // Integrity < 25%
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.

#define SUPERMATTER_DATA_EER "Relative EER"
#define SUPERMATTER_DATA_TEMPERATURE "Temperature"
#define SUPERMATTER_DATA_PRESSURE "Pressure"
#define SUPERMATTER_DATA_EPR "Chamber EPR"

// Scrubber modes
#define SCRUBBER_SIPHON "siphon"
#define SCRUBBER_SCRUB "scrub"
Expand Down
13 changes: 8 additions & 5 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,6 @@
/// Returns the hex value of a number given a value assumed to be a base-ten value, padded to a supplied minimum length.
#define num2hex_padded(num, len) num2text(num, len, 16)

//NOTE: INTENT_HOTKEY_* defines are not actual intents!
//they are here to support hotkeys
#define INTENT_HOTKEY_LEFT "left"
#define INTENT_HOTKEY_RIGHT "right"

//Turf/area values for 'this space is outside' checks
#define OUTSIDE_AREA null
#define OUTSIDE_NO FALSE
Expand Down Expand Up @@ -375,3 +370,11 @@
#define RADIAL_LABELS_NONE 0
#define RADIAL_LABELS_OFFSET 1
#define RADIAL_LABELS_CENTERED 2

#define CRAYON_DRAW_RUNE "rune"
#define CRAYON_DRAW_GRAFFITI "graffiti"
#define CRAYON_DRAW_LETTER "letter"
#define CRAYON_DRAW_ARROW "arrow"

// Default UI style applied to client prefs.
#define DEFAULT_UI_STYLE /decl/ui_style/midnight
7 changes: 1 addition & 6 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
#define GETPULSE_TOOL 1 // More accurate. (med scanner, sleeper, etc.)
#define PULSE_MAX_BPM 250 // Highest, readable BPM by machines and humans.

//intent flags
#define I_HELP "help"
#define I_DISARM "disarm"
#define I_GRAB "grab"
#define I_HURT "harm"

//These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom.
#define HUMAN 1
#define MONKEY 2
Expand Down Expand Up @@ -233,6 +227,7 @@
#define DATA_INGREDIENT_FLAGS /decl/reagent_data_field/ingredient_flags
#define DATA_MASK_COLOR /decl/reagent_data_field/mask_color
#define DATA_MASK_NAME /decl/reagent_data_field/mask_name
#define DATA_EXTRA_COLOR /decl/reagent_data_field/extra_color

// Milk and chees data flags
#define DATA_MILK_DONOR /decl/reagent_data_field/milk_donor
Expand Down
Loading

0 comments on commit fc42a64

Please sign in to comment.