Skip to content

Commit

Permalink
chore: reset actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Jun 13, 2024
1 parent 93326be commit 8e4393b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,34 +173,6 @@
}
]
},
{
"type": "enum",
"name": "core::option::Option::<(core::integer::u32, dojo_examples::models::Vec2)>",
"variants": [
{
"name": "Some",
"type": "(core::integer::u32, dojo_examples::models::Vec2)"
},
{
"name": "None",
"type": "()"
}
]
},
{
"type": "struct",
"name": "dojo_examples::models::PlayerItem",
"members": [
{
"name": "item_id",
"type": "core::integer::u32"
},
{
"name": "quantity",
"type": "core::integer::u32"
}
]
},
{
"type": "interface",
"name": "dojo_examples::actions::IActions",
Expand Down Expand Up @@ -231,18 +203,6 @@
{
"name": "name",
"type": "core::byte_array::ByteArray"
},
{
"name": "option",
"type": "core::option::Option::<(core::integer::u32, dojo_examples::models::Vec2)>"
},
{
"name": "items",
"type": "core::array::Array::<dojo_examples::models::PlayerItem>"
},
{
"name": "items_items",
"type": "core::array::Array::<core::array::Array::<dojo_examples::models::PlayerItem>>"
}
],
"outputs": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kind = "DojoContract"
class_hash = "0x6910afc015688ae45ca113e39de97cf0727115bbdcf32b9bd9852d51e4e990c"
original_class_hash = "0x6910afc015688ae45ca113e39de97cf0727115bbdcf32b9bd9852d51e4e990c"
class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767"
original_class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767"
base_class_hash = "0x0"
abi = "manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json"
reads = []
Expand Down
6 changes: 3 additions & 3 deletions examples/spawn-and-move/src/actions.cairo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use dojo_examples::models::{Direction, Position, Vec2, PlayerItem};
use dojo_examples::models::{Direction, Position, Vec2};

#[dojo::interface]
trait IActions {
fn spawn();
fn move(direction: Direction);
fn set_player_config(name: ByteArray, option: Option<(u32, Vec2)>, items: Array<PlayerItem>, items_items: Array<Array<PlayerItem>>);
fn set_player_config(name: ByteArray);
}

#[dojo::interface]
Expand Down Expand Up @@ -86,7 +86,7 @@ mod actions {
emit!(world, (Moved { player, direction }));
}

fn set_player_config(world: IWorldDispatcher, name: ByteArray, option: Option<(u32, Vec2)>, items: Array<PlayerItem>, items_items: Array<Array<PlayerItem>>) {
fn set_player_config(world: IWorldDispatcher, name: ByteArray) {
let player = get_caller_address();

let items = array![
Expand Down

0 comments on commit 8e4393b

Please sign in to comment.