Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into turbine_crimes
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Jan 22, 2025
2 parents e578e68 + 6ff9ff6 commit b679d22
Show file tree
Hide file tree
Showing 300 changed files with 38,789 additions and 16,089 deletions.
2 changes: 1 addition & 1 deletion +secret
6 changes: 3 additions & 3 deletions .github/workflows/automaton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
sudo apt-get update
- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
uses: ZeWaka/cache-apt-pkgs-action@latest
with:
packages: libssl-dev:i386 libgcc-s1:i386
version: 1.0
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
sudo apt-get update
- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
uses: ZeWaka/cache-apt-pkgs-action@latest
with:
packages: libssl-dev:i386 libgcc-s1:i386
version: 1.0
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
sudo apt-get update
- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
uses: ZeWaka/cache-apt-pkgs-action@latest
with:
packages: libssl-dev:i386 libgcc-s1:i386
version: 1.0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/beepsky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ jobs:
name: Lint with OpenDream
runs-on: ubuntu-22.04
steps:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 9.0.100
- uses: actions/checkout@v4
- uses: robinraju/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions _std/__build.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ o+` `-` ``..-:yooos-..----------..`

//#define UNIT_TESTS
//#define UNIT_TESTS_RUN_TILL_COMPLETION // Bypass 10 Second Limit
//#define UNIT_TEST_TYPES /datum/unit_test/explosion_test, /datum/unit_test/deletion_regressions // Only run tests of these types - comma separated list of types

#ifdef CI_RUNTIME_CHECKING
#define CHECK_MORE_RUNTIMES 1
Expand Down
3 changes: 2 additions & 1 deletion _std/defines/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#define MAP_POD_WARS_NANOTRASEN (1<<2)
#define MAP_POD_WARS_SYNDICATE (1<<3)
#define MAP_INFO (1<<4) //! Map that just shows station rooms
#define MAP_HTR_TEAM (1<<20)
#define MAP_ALERTS (1<<5) //! Station General Alerts
#define MAP_HTR_TEAM (1<<20)

// Area groups, which will be treated as one atom/movable by the renderer, allowing for efficient recolouring across minimaps.
#define GROUP_NSV_RELIANT "nsv_reliant"
Expand Down
1 change: 1 addition & 0 deletions _std/defines/roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define ROLE_SALVAGER "salvager"
#define ROLE_ANTAGONIST_CRITTER "antagonist_critter"
#define ROLE_MISC "misc"
#define ROLE_BASKETBALL_WIZARD "bball_wizard"

// special antagonist roles
#define ROLE_MACHO_MAN "macho_man"
Expand Down
14 changes: 5 additions & 9 deletions _std/defines/turf.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
//todo : port some more shit over to turf flags
/// simulated floor slippage
#define MOB_SLIP 1
#define MOB_SLIP (1<<0)
/// simulated floor steppage
#define MOB_STEP 2
/// lol idk this kind of sucks, but i guess i can avoid some type checks in atmos processing
#define IS_TYPE_SIMULATED 4
/// can atmos use this tile as a space sample?
#define CAN_BE_SPACE_SAMPLE 8
#define MOB_STEP (1<<1)
/// turf is pushy. for manta
#define MANTA_PUSH 16
#define MANTA_PUSH (1<<2)
/// fluid move gear suffers no penalty on these turfs
#define FLUID_MOVE 32
#define FLUID_MOVE (1<<3)
/// space move gear suffers no penalty on these turfs
#define SPACE_MOVE 64
#define SPACE_MOVE (1<<4)

/// Allows connections for disposal pipes
#define DISJOINT_TURF_CONNECTION_DISPOSAL (1<<0)
Expand Down
2 changes: 1 addition & 1 deletion _std/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#define PROCESSING_MAX_IN_USE PROCESSING_32TH

#define MACHINES_CONVEYORS 1 // Conveyor belts
#define MACHINES_ATMOSALERTS 2 // /obj/machinery/computer/atmosphere/alerts
#define MACHINES_GENERAL_ALERT 2 // /obj/machinery/computer/general_alert
#define MACHINES_COMMSCONSOLES 3 // /obj/machinery/computer/communications
#define MACHINES_POWER 4 // /obj/machinery/power, perhaps worth splitting further
#define MACHINES_PIPES 5 // /obj/machinery/pipes
Expand Down
28 changes: 14 additions & 14 deletions _std/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing".
*
* Arguments:
* * caller: The movable atom that's trying to find the path
* * caller_am: The movable atom that's trying to find the path
* * ends: What we're trying to path to. It doesn't matter if this is a turf or some other atom, we're gonna just path to the turf it's on anyway
* * max_distance: The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)
* * mintargetdistance: Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.
Expand All @@ -43,16 +43,16 @@
* * required_goals: How many goals to find to succeed. Null for all.
* * do_doorcheck: Whether or not to check if doors are blocked (welded, out of power, locked, etc...)
*
* Returns: List of turfs from the caller to the end or a list of lists of the former if multiple ends are specified.
* Returns: List of turfs from the caller_am to the end or a list of lists of the former if multiple ends are specified.
* If no paths were found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing.
*/
/proc/get_path_to(caller, ends, max_distance = 30, max_seen = null, mintargetdist, id=null, simulated_only=TRUE, turf/exclude=null, skip_first=FALSE, cardinal_only=TRUE, required_goals=null, do_doorcheck=FALSE)
/proc/get_path_to(caller_am, ends, max_distance = 30, max_seen = null, mintargetdist, id=null, simulated_only=TRUE, turf/exclude=null, skip_first=FALSE, cardinal_only=TRUE, required_goals=null, do_doorcheck=FALSE)
if(isnull(ends))
return
var/single_end = !islist(ends)
if(single_end)
ends = list(ends)
if(!caller || !length(ends))
if(!caller_am || !length(ends))
return

var/list/options = list(
Expand All @@ -65,13 +65,13 @@
POP_CARDINAL_ONLY=cardinal_only,
POP_DOOR_CHECK=do_doorcheck,
)
if(istype(caller, /obj/machinery/bot) && isnull(id)) // Stonepillar: remove this when amy finishes mob-ifying /obj/machinery/bot
var/obj/machinery/bot/bot = caller
if(istype(caller_am, /obj/machinery/bot) && isnull(id)) // Stonepillar: remove this when amy finishes mob-ifying /obj/machinery/bot
var/obj/machinery/bot/bot = caller_am
options[POP_ID] = bot.botcard
if(istype(caller, /obj/machinery/vehicle))
if(istype(caller_am, /obj/machinery/vehicle))
options[POP_IGNORE_CACHE] = TRUE

var/datum/pathfind/pathfind_datum = new(caller, ends, options)
var/datum/pathfind/pathfind_datum = new(caller_am, ends, options)
if(!isnull(required_goals))
pathfind_datum.n_target_goals = required_goals
pathfind_datum.search()
Expand Down Expand Up @@ -104,7 +104,7 @@
* Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum.
* If you really want to optimize things, optimize this, cuz this gets called a lot.
*/
#define CAN_STEP(cur_turf, next) (next && jpsTurfPassable(next, cur_turf, caller, options) && !(simulated_only && !istype(next, /turf/simulated)) && (next != avoid))
#define CAN_STEP(cur_turf, next) (next && jpsTurfPassable(next, cur_turf, caller_am, options) && !(simulated_only && !istype(next, /turf/simulated)) && (next != avoid))
/// Another helper macro for JPS, for telling when a node has forced neighbors that need expanding
#define STEP_NOT_HERE_BUT_THERE(cur_turf, dirA, dirB) ((!CAN_STEP(cur_turf, get_step(cur_turf, dirA)) && CAN_STEP(cur_turf, get_step(cur_turf, dirB))))

Expand Down Expand Up @@ -164,7 +164,7 @@
/// The datum used to handle the JPS pathfinding, completely self-contained
/datum/pathfind
/// The thing that we're actually trying to path for
var/atom/movable/caller
var/atom/movable/caller_am
/// The turf where we started at
var/turf/start
/// The number of goals we need to find to succeed
Expand Down Expand Up @@ -197,9 +197,9 @@
/// Raw associative list of options passed from get_path_to.
var/list/options

/datum/pathfind/New(atom/movable/caller, list/atom/goals, list/options)
/datum/pathfind/New(atom/movable/caller_am, list/atom/goals, list/options)
..()
src.caller = caller
src.caller_am = caller_am
ends = list()
n_target_goals = length(goals)
for(var/goal in goals)
Expand Down Expand Up @@ -229,7 +229,7 @@
* return null, which [/proc/get_path_to] translates to an empty list (notable for simple bots, who need empty lists)
*/
/datum/pathfind/proc/search()
start = get_turf(caller)
start = get_turf(caller_am)
if(!start || !length(ends))
stack_trace("Invalid A* start or destination")
return
Expand Down Expand Up @@ -258,7 +258,7 @@
if (src.max_seen && (src.total_seen > src.max_seen))
// boutput(world, "ending search early due to total_seen limit")
return
if(!caller)
if(!caller_am)
return
current_processed_node = open.pop() //get the lower f_value turf in the open list
if(max_distance && (current_processed_node.number_tiles > max_distance))//if too many steps, don't process that path
Expand Down
Loading

0 comments on commit b679d22

Please sign in to comment.