Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iron #373

Merged
merged 31 commits into from
Jun 14, 2022
Merged

Iron #373

Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c94c499
Add iron
xsebek Jun 8, 2022
d231ab8
Make iron gear
xsebek Jun 8, 2022
95752fc
Make iron or wooden motors and gears
xsebek Jun 8, 2022
99ce4d2
Add metal drill recipes
xsebek Jun 8, 2022
32f1ac0
Handle multiple capability providers
xsebek Jun 8, 2022
06b9f28
Fix entity attributes (thanks @byorgey)
xsebek Jun 10, 2022
5650d51
Fix iron plate description
xsebek Jun 10, 2022
7cee36f
Add compass device
xsebek Jun 10, 2022
dd03922
Disallow cardinal diretion values without compass
xsebek Jun 10, 2022
be8eb73
Refactor checking required devices
xsebek Jun 10, 2022
a8de1d5
Make down a relative direction
xsebek Jun 10, 2022
d0ba08a
Improve drilling direction error message
xsebek Jun 10, 2022
e5a4571
Inline moves in benchmark
xsebek Jun 10, 2022
5b54dcc
Check direction on use
xsebek Jun 10, 2022
fe1f851
Revert "Disallow cardinal diretion values without compass"
xsebek Jun 10, 2022
f527b18
Parse Recipe With EntityMap
xsebek Jun 11, 2022
14114dd
Add custom recipes to scenarios
xsebek Jun 11, 2022
806fa32
Use custom recipes in scenarios
xsebek Jun 11, 2022
9bf5b17
Fix doctest setup
xsebek Jun 11, 2022
2f5f5f6
Restyled by fourmolu
restyled-commits Jun 11, 2022
79eddbc
Fix wording (thanks @byorgey)
xsebek Jun 12, 2022
7a5e4cf
Explain ignoreOK
xsebek Jun 12, 2022
6c01e62
Differentiate exception for CGod and others
xsebek Jun 12, 2022
c29558c
Use common code for incapable exception
xsebek Jun 12, 2022
dcbd614
Rename fromE
xsebek Jun 12, 2022
e916322
Improve and test incapable exception
xsebek Jun 12, 2022
9e24293
Fix creative robots not getting devices
xsebek Jun 12, 2022
a8c83be
Restyled by fourmolu
restyled-commits Jun 12, 2022
6365428
Add standard devices
xsebek Jun 14, 2022
8ab3ef7
Explain blasphemy better
xsebek Jun 14, 2022
950256a
Merge branch 'main' into iron
mergify[bot] Jun 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Swarm/Game/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,19 @@ stepCESK cesk = case cesk of
-- Now some straightforward cases. These all immediately turn
-- into values.
In TUnit _ s k -> return $ Out VUnit s k
In (TDir d) _ s k -> return $ Out (VDir d) s k
In (TInt n) _ s k -> return $ Out (VInt n) s k
In (TString str) _ s k -> return $ Out (VString str) s k
In (TBool b) _ s k -> return $ Out (VBool b) s k
-- Direction is simple too unless it is absolute (e.g. north)
-- and needs orient capability (provided by a compass).
-- This may be redundant just because of base escaping
-- capability checking (see #231).
In (TDir d) _ s k -> do
orient <- hasCapability COrient
if isCardinal d && not orient
then return $ Up (Incapable (S.singleton COrient) (TDir d)) s []
else return $ Out (VDir d) s k
byorgey marked this conversation as resolved.
Show resolved Hide resolved

-- There should not be any antiquoted variables left at this point.
In (TAntiString v) _ s k ->
return $ Up (Fatal (T.append "Antiquoted variable found at runtime: $str:" v)) s k
Expand Down