Skip to content

Commit

Permalink
feat: kill mail (#138)
Browse files Browse the repository at this point in the history
* feat: kill mail

Support for storing kill mails on chain.

Resolves https://ccpgames.atlassian.net/browse/EF-5113.

* updating pnpm lock file

---------

Co-authored-by: CCP Legolas <[email protected]>
  • Loading branch information
ccp-error and 0xxlegolas authored Sep 3, 2024
1 parent 9a3d935 commit da8ee41
Show file tree
Hide file tree
Showing 14 changed files with 5,211 additions and 1,650 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.sol]
indent_style = space
indent_size = 2

[*.ts]
indent_style = space
indent_size = 2
19 changes: 19 additions & 0 deletions mud-contracts/world/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default mudConfig({
enums: {
State: ["NULL", "UNANCHORED", "ANCHORED", "ONLINE", "DESTROYED"],
SmartAssemblyType: ["SMART_STORAGE_UNIT", "SMART_TURRET", "SMART_GATE"],
KillMailLossType: ["SHIP", "POD"],
},
userTypes: {
ResourceId: { filePath: "@latticexyz/store/src/ResourceId.sol", internalType: "bytes32" },
Expand Down Expand Up @@ -474,5 +475,23 @@ export default mudConfig({
},
tableIdArgument: true,
},

/************************
* KillMail module *
************************/

KillMailTable: {
keySchema: {
killMailId: "uint256",
},
valueSchema: {
killer: "address",
victim: "address",
lossType: "KillMailLossType",
solarSystemId: "uint256",
killTimestamp: "uint256",
},
tableIdArgument: true,
},
},
});
5 changes: 5 additions & 0 deletions mud-contracts/world/src/codegen/common.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ enum SmartAssemblyType {
SMART_TURRET,
SMART_GATE
}

enum KillMailLossType {
SHIP,
POD
}
1 change: 1 addition & 0 deletions mud-contracts/world/src/codegen/index.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ import { Owners } from "./tables/Owners.sol";
import { ERC721Registry } from "./tables/ERC721Registry.sol";
import { TokenApproval } from "./tables/TokenApproval.sol";
import { OperatorApproval } from "./tables/OperatorApproval.sol";
import { KillMailTable, KillMailTableData } from "./tables/KillMailTable.sol";
Loading

0 comments on commit da8ee41

Please sign in to comment.