Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Fixed pathfinding component and added to tech node #263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bucovineanu
Copy link
Collaborator

Hopefully this works as it is

About The Pull Request

Makes the pathfinding component printable, changes it to have an option for what entity to pathfind for and an option for disabling diagonal movement (maybe unnecessary? TESTING IS HELL WITH THE LIVER RUNTIME). Changes the get_path_to proc for the extra functionality.

Why It's Good For The Game

Pathfinding is very useful for circuit mechs and the like, so it should definitely be worked in.

Changelog

🆑
add: Added a pathfinding circuit component. Enjoy!
/:cl:

@Bucovineanu Bucovineanu requested review from EtraIV and AcapitalA June 6, 2022 14:26
@Bucovineanu Bucovineanu self-assigned this Jun 6, 2022
@Bomk16
Copy link

Bomk16 commented Jun 6, 2022

Making mech circuits great again

@Bucovineanu Bucovineanu added Feature Gooood shit Fix labels Jun 6, 2022
code/modules/wiremod/components/action/pathfind.dm Outdated Show resolved Hide resolved
code/__HELPERS/path.dm Outdated Show resolved Hide resolved
code/__HELPERS/path.dm Outdated Show resolved Hide resolved
@Bucovineanu Bucovineanu added DO NOT MERGE either someone fucked up or you shouldn't merge this. TEST MERGE and removed TEST MERGE labels Jun 12, 2022
var/udv = TRUE
if(use_diag_val == 0) // I wish it didn't have to be this way
udv = FALSE
path = get_path_to(entity ||= src, destination, max_range, id=path_id, use_diags = udv)
Copy link
Contributor

@EtraIV EtraIV Jun 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I commented on this before but path = get_path_to(entity || src, destination, max_range, id=path_id, use_diags = udv) would be more correct (didn't properly know what || did, but now I saw "The entire expression takes the value of the last argument to be evaluated.", My bad).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DO NOT MERGE either someone fucked up or you shouldn't merge this. Feature Gooood shit Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants