Skip to content

Commit

Permalink
Merge branch 'main' into noahyor/recipies
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 13, 2024
2 parents b6ecf38 + 905ddf5 commit 693b238
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 27 deletions.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to Brent Yorgey at [[email protected]](mailto:[email protected]), or
`byorgey` on the Libera.Chat IRC network. All complaints will be reviewed and
reported to Brent Yorgey at [[email protected]](mailto:[email protected]), or
`byorgey` on the Libera.Chat IRC network. All complaints will be reviewed and
investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
16 changes: 7 additions & 9 deletions COMMUNITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@ the community and connect with others.
Conduct](https://github.com/swarm-game/swarm/blob/main/CODE_OF_CONDUCT.md),
which specifically governs those contributing to the project on
GitHub, but by extension the whole community.
- The `#swarm` channel on the [Libera.Chat](https://libera.chat/) IRC
network is open to all. If you don't already have a preferred IRC
client, you can easily [connect via this web
client](https://web.libera.chat/?channels=#swarm). At the moment,
the channel is primarily used to discuss development, but you're
welcome to use it to discuss anything Swarm-related (*e.g.* asking
for help, showing off your cool programming exploits, *etc.*).
- The [Swarm Discord server](https://discord.gg/kp8MuSgkPw) is open to
all. At the moment, the server is primarily used to discuss
development, but you're welcome to use it to discuss anything
Swarm-related (*e.g.* asking for help, showing off your cool
programming exploits, *etc.*).
- Feel free to make use of the [Swarm
wiki](https://github.com/swarm-game/swarm/wiki) on Github as a place to
collaborate, discuss strategy, post cool robot programs, create
documentation, or whatever.
- We are open to other community-building tools and spaces, depending
on the desires of people in the community, especially as the
community grows. For example, GitHub and IRC might be fine while
community grows. For example, GitHub and Discord might be fine while
there are just a few people hacking on it, but eventually people are
going to want a place to post their cool screenshots, get help
debugging, and discuss strategies. In general, anyone should feel
free to take the initiative on such things. For example, someone
could start a Discord server, or a mailing list, or something else,
could start a Discourse forum, or a mailing list, or something else,
and we will add it here!
12 changes: 5 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ you are expected to uphold this code. Please report unacceptable behavior to

- Bug to report or feature to request? Try the
[GitHub issue tracker](https://github.com/swarm-game/swarm/swarm/issues).
- Questions? Join the
`#swarm` IRC channel on the [Libera.Chat
network](https://libera.chat/). If you're not familiar with IRC you
can easily [connect via this web client](https://web.libera.chat/).
- Questions? Join the [https://discord.gg/kp8MuSgkPw](Swarm
Discord server).

## How can I contribute?

Expand Down Expand Up @@ -143,8 +141,8 @@ Fruit"](https://github.com/swarm-game/swarm/issues?q=is%3Aissue+is%3Aopen+label%
in the issue tracker. These are bugs and features which should be
appropriate for someone just getting started to tackle. If you want
help understanding or getting started on a particular issue, feel free
to leave a comment on the issue, or ask in the `#swarm` IRC
channel on Libera.Chat.
to leave a comment on the issue, or ask in the [Swarm Discord
server](https://discord.gg/kp8MuSgkPw).

### Development Workflow

Expand Down Expand Up @@ -206,7 +204,7 @@ to build docs into `cabal.project.local`.
### Conventions

We follow a few conventions to help keep everyone on the same page.
Please open a pull request or ask on IRC if you have any questions or
Please open a pull request or ask on Discord if you have any questions or
suggestions.

More conventions will be added as we think of and/or come up with
Expand Down
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ printKeybindings :: Bool -> KeybindingPrint -> IO ()
printKeybindings initialize p = do
kb <- showKeybindings p
T.putStrLn kb
(iniExists, ini) <- getSwarmConfigIniFile
(iniExists, ini) <- getSwarmConfigIniFile initialize
when initialize $ do
kbi <- showKeybindings IniPrint
T.writeFile ini kbi
Expand Down
2 changes: 1 addition & 1 deletion data/about.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Copyright 2021-2023, Brent Yorgey and other Swarm contributors
For a full list of contributors, see https://github.com/swarm-game/swarm/graphs/contributors.

Join the community!
IRC: #swarm on libera.chat
Discord: https://discord.gg/kp8MuSgkPw
Wiki: https://github.com/swarm-game/swarm/wiki

Interested in contributing to Swarm? All are welcome! See
Expand Down
4 changes: 2 additions & 2 deletions src/swarm-scenario/Swarm/Constant.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import Data.Text (Text)
-- By convention, all URL constants include trailing slashes
-- when applicable.

swarmWebIRC :: Text
swarmWebIRC = "https://web.libera.chat/?channels=#swarm"
swarmDiscord :: Text
swarmDiscord = "https://discord.gg/kp8MuSgkPw"

-- | The URL for the Swarm repository.
swarmRepoUrl :: Text
Expand Down
8 changes: 5 additions & 3 deletions src/swarm-scenario/Swarm/Game/ResourceLoading.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ getDataFileNameSafe asset name = do
then return fp
else throwError $ AssetNotLoaded (Data asset) fp $ DoesNotExist File

getSwarmConfigIniFile :: IO (Bool, FilePath)
getSwarmConfigIniFile = do
ini <- (</> "config.ini") <$> getXdgDirectory XdgConfig "swarm"
getSwarmConfigIniFile :: Bool -> IO (Bool, FilePath)
getSwarmConfigIniFile createDirs = do
swarmConfig <- getXdgDirectory XdgConfig "swarm"
when createDirs (createDirectoryIfMissing True swarmConfig)
let ini = swarmConfig </> "config.ini"
iniExists <- doesFileExist ini
return (iniExists, ini)

Expand Down
2 changes: 1 addition & 1 deletion src/swarm-tui/Swarm/TUI/Model/KeyBindings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ loadKeybindingConfig ::
(Has (Throw SystemFailure) sig m, Has (Lift IO) sig m) =>
m [(SwarmEvent, BindingState)]
loadKeybindingConfig = do
(iniExists, ini) <- sendIO getSwarmConfigIniFile
(iniExists, ini) <- sendIO $ getSwarmConfigIniFile False
if not iniExists
then return []
else do
Expand Down
2 changes: 1 addition & 1 deletion src/swarm-tui/Swarm/TUI/View.hs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ helpWidget theSeed mport keyState =
vBox
[ heading boldAttr "Have questions? Want some tips? Check out:"
, txt " - The Swarm wiki, " <+> hyperlink wikiUrl (txt wikiUrl)
, txt " - The #swarm IRC channel on " <+> hyperlink swarmWebIRC (txt swarmWebIRC)
, txt " - The Swarm Discord server at " <+> hyperlink swarmDiscord (txt swarmDiscord)
]
info =
vBox
Expand Down

0 comments on commit 693b238

Please sign in to comment.