Skip to content

Commit

Permalink
fix typi
Browse files Browse the repository at this point in the history
  • Loading branch information
zsluedem committed Feb 19, 2024
1 parent e43b086 commit c720603
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/default_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo actions : $ACTIONS_ADDRESS
echo "---------------------------------------------------------------------------"

# enable system -> component authorizations
COMPONENTS=("Barn" "OuterCity" "Warehouse", "CityBuilding")
COMPONENTS=("Barn" "OuterCity" "Warehouse" "CityBuilding")

for component in ${COMPONENTS[@]}; do
sozo auth writer $component $ACTIONS_ADDRESS --world $WORLD_ADDRESS --rpc-url $RPC_URL
Expand Down
3 changes: 2 additions & 1 deletion src/actions.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod kingdom_lord_controller {
use kingdom_lord::components::barn::{barn_component, Barn};
use kingdom_lord::components::barn::barn_component::BarnInternalImpl;
use kingdom_lord::components::warehouse::{warehouse_component, Warehouse};
use kingdom_lord::components::outer_city::{outer_city_component};
use kingdom_lord::components::outer_city::{outer_city_component, OuterCity};
use kingdom_lord::components::outer_city::outer_city_component::{OuterCityInternalImpl};
use kingdom_lord::components::city_hall::{city_hall_component, UnderUpgrading};
use kingdom_lord::helpers::tuple::{TupleFour, TupleSix};
Expand Down Expand Up @@ -79,6 +79,7 @@ mod kingdom_lord_controller {
max_storage: MAX_STORAGE
},
Barn { player, food: 0_u64.into(), max_storage: MAX_STORAGE },
OuterCity { player, last_mined_block: block },
// wood building
new_city_building(player, block, GROWTH_RATE, 1_u64.into(), 0_u64),
new_city_building(player, block, GROWTH_RATE, 0_u64.into(), 1_u64),
Expand Down
2 changes: 1 addition & 1 deletion src/components/outer_city.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait OuterCityTrait<TState> {
#[derive(Model, Copy, Drop, Serde)]
struct OuterCity {
#[key]
address: ContractAddress,
player: ContractAddress,
last_mined_block: u64
}

Expand Down
3 changes: 2 additions & 1 deletion src/tests/test_spawn.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use starknet::class_hash::Felt252TryIntoClassHash;
fn test_spawn() {
// deploy world with models
let context = setup_world();

let caller = starknet::contract_address_const::<0x1>();
set_caller_address(caller);
context.kingdom_lord.spawn();
let (wood,brick,steel,food) = context.kingdom_lord.get_resource();

Expand Down

0 comments on commit c720603

Please sign in to comment.