-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ri): split EntityType into Item, Structure, and Unit 💠(#90)
* refactor(ri): split EntityType into Item, Structure, and Unit * fix(ri): 0 being falsey fucks me at least once a day 🤮
- Loading branch information
Showing
24 changed files
with
193 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
packages/ri/client/src/layers/Network/components/EntityType.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export { definePositionComponent } from "./Position"; | ||
export { defineEntityTypeComponent } from "./EntityType"; | ||
export { defineMovableComponent } from "./Movable"; | ||
export { defineOwnedByComponent } from "./OwnedBy"; | ||
export { defineUntraversableComponent } from "./Untraversable"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { createNetworkLayer } from "./createNetworkLayer"; | ||
export type { NetworkLayer } from "./types"; | ||
export { EntityTypes, TerrainTypes } from "./types"; | ||
export { UnitTypes, ItemTypes, StructureTypes, TerrainTypes } from "./types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/ri/contracts/src/components/StructureTypeComponent.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity >=0.8.0; | ||
import "std-contracts/components/Uint32Component.sol"; | ||
|
||
uint256 constant ID = uint256(keccak256("ember.component.structureType")); | ||
|
||
contract StructureTypeComponent is Uint32Component { | ||
constructor(address world) Uint32Component(world, ID) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity >=0.8.0; | ||
import "std-contracts/components/Uint32Component.sol"; | ||
|
||
uint256 constant ID = uint256(keccak256("ember.component.unitType")); | ||
|
||
contract UnitTypeComponent is Uint32Component { | ||
constructor(address world) Uint32Component(world, ID) {} | ||
} |
Oops, something went wrong.