Skip to content

Commit

Permalink
contract: function rename
Browse files Browse the repository at this point in the history
  • Loading branch information
credence0x committed Sep 27, 2024
1 parent 527aac6 commit 9a24580
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/src/models/buildings.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ impl BuildingCustomImpl of BuildingCustomTrait {
destroyed_building_category
}

fn pay_fixed_cost(self: Building, building_quantity: BuildingQuantityv2, world: IWorldDispatcher) {
fn make_payment(self: Building, building_quantity: BuildingQuantityv2, world: IWorldDispatcher) {
let building_general_config: BuildingGeneralConfig = get!(world, WORLD_CONFIG_ID, BuildingGeneralConfig);
let building_config: BuildingConfig = BuildingConfigCustomImpl::get(
world, self.category, self.produced_resource_type
Expand Down
1 change: 0 additions & 1 deletion contracts/src/models/config.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ pub struct BankConfig {
pub struct BuildingGeneralConfig {
#[key]
config_id: ID,
// cost scale percent
base_cost_percent_increase: u16,
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/src/systems/buildings/contracts.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ mod building_systems {
world, entity_id, building_category, produce_resource_type, building_coord
);

// pay fixed cost of the building
building.pay_fixed_cost(building_quantity, world);
// pay one time cost of the building
building.make_payment(building_quantity, world);
}
fn pause_production(ref world: IWorldDispatcher, entity_id: ID, building_coord: Coord) {
BuildingCustomImpl::pause_production(world, entity_id, building_coord);
Expand Down

0 comments on commit 9a24580

Please sign in to comment.