From 9a24580e7e4454b36afc54f76155276f0175fd16 Mon Sep 17 00:00:00 2001 From: Credence Date: Fri, 27 Sep 2024 21:48:29 +0100 Subject: [PATCH] contract: function rename --- contracts/src/models/buildings.cairo | 2 +- contracts/src/models/config.cairo | 1 - contracts/src/systems/buildings/contracts.cairo | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/contracts/src/models/buildings.cairo b/contracts/src/models/buildings.cairo index 8e5e2d994..6a0fd5d22 100644 --- a/contracts/src/models/buildings.cairo +++ b/contracts/src/models/buildings.cairo @@ -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 diff --git a/contracts/src/models/config.cairo b/contracts/src/models/config.cairo index 7038cdb5f..0d0effe82 100644 --- a/contracts/src/models/config.cairo +++ b/contracts/src/models/config.cairo @@ -349,7 +349,6 @@ pub struct BankConfig { pub struct BuildingGeneralConfig { #[key] config_id: ID, - // cost scale percent base_cost_percent_increase: u16, } diff --git a/contracts/src/systems/buildings/contracts.cairo b/contracts/src/systems/buildings/contracts.cairo index feb4280c2..61c0515c4 100644 --- a/contracts/src/systems/buildings/contracts.cairo +++ b/contracts/src/systems/buildings/contracts.cairo @@ -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);