Skip to content

Commit

Permalink
Move schemes in folders by types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neloreck committed Sep 17, 2023
1 parent 1adfcbd commit 707b84a
Show file tree
Hide file tree
Showing 503 changed files with 637 additions and 608 deletions.
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ Not needed sections can be removed from final description. Commented strings can
-->

## Changes

<!-- Update items to match actual changes. -->

- Something is changed
- Something else is fixed

## Screenshots

<!-- Add screenshots if possible or remove the section. -->

## Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] tests are included
- [ ] documentation is changed or added

## Links / references

<!-- Add related links and references if possible or remove the section. -->
8 changes: 4 additions & 4 deletions src/engine/core/database/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import type {
LabX8DoorBinder,
SignalLightBinder,
} from "@/engine/core/objects/binders";
import type { CampManager } from "@/engine/core/objects/camp";
import type { SmartCover, SmartTerrain } from "@/engine/core/objects/server";
import type { AbstractPlayableSound } from "@/engine/core/objects/sounds/playable_sounds";
import type { StoryManager } from "@/engine/core/objects/sounds/stories";
import type { CampManager } from "@/engine/core/schemes/camper";
import type { PatrolManager } from "@/engine/core/schemes/patrol";
import type { ReachTaskPatrolManager } from "@/engine/core/schemes/reach_task";
import type { LightManager } from "@/engine/core/schemes/sr_light";
import type { LightManager } from "@/engine/core/schemes/restrictor/sr_light";
import type { PatrolManager } from "@/engine/core/schemes/stalker/patrol";
import type { ReachTaskPatrolManager } from "@/engine/core/schemes/stalker/reach_task";
import type { IExtensionsDescriptor } from "@/engine/core/utils/extensions";
import type { TConditionList } from "@/engine/core/utils/ini/ini_types";
import type { ERelation } from "@/engine/core/utils/relation";
Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/database/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ObjectRestrictionsManager } from "@/engine/core/objects/ai/restriction";
import { StalkerPatrolManager } from "@/engine/core/objects/ai/state/StalkerPatrolManager";
import { StalkerStateManager } from "@/engine/core/objects/ai/state/StalkerStateManager";
import { ISchemePostCombatIdleState } from "@/engine/core/schemes/combat_idle/ISchemePostCombatIdleState";
import { IActionSchemeHearState } from "@/engine/core/schemes/hear";
import { IActionSchemeHearState } from "@/engine/core/schemes/shared/hear";
import { ISchemePostCombatIdleState } from "@/engine/core/schemes/stalker/combat_idle/ISchemePostCombatIdleState";
import { TConditionList } from "@/engine/core/utils/ini";
import {
AnyObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { ETaskState } from "@/engine/core/managers/tasks";
import { AbstractPlayableSound } from "@/engine/core/objects/sounds/playable_sounds/AbstractPlayableSound";
import { ActorSound } from "@/engine/core/objects/sounds/playable_sounds/ActorSound";
import { ISchemeWoundedState } from "@/engine/core/schemes/wounded";
import { ISchemeWoundedState } from "@/engine/core/schemes/stalker/wounded";
import { GameTask } from "@/engine/lib/types";
import { resetFunctionMock } from "@/fixtures/utils/function_mock";
import { mockClientGameObject } from "@/fixtures/xray";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { action_base, LuabindClass, move } from "xray16";

import { registry } from "@/engine/core/database";
import { StalkerStateManager } from "@/engine/core/objects/ai/state/StalkerStateManager";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/smartcover";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/stalker/smartcover";
import { LuaLogger } from "@/engine/core/utils/logging";
import { EScheme, TName } from "@/engine/lib/types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LuabindClass, property_evaluator } from "xray16";
import { registry } from "@/engine/core/database";
import { StalkerStateManager } from "@/engine/core/objects/ai/state/StalkerStateManager";
import { EStalkerState } from "@/engine/core/objects/animation/types";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/smartcover";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/stalker/smartcover";
import { LuaLogger } from "@/engine/core/utils/logging";
import { EScheme, Optional, TName } from "@/engine/lib/types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LuabindClass, property_evaluator } from "xray16";

import { registry } from "@/engine/core/database";
import { StalkerStateManager } from "@/engine/core/objects/ai/state/StalkerStateManager";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/smartcover";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/stalker/smartcover";
import { LuaLogger } from "@/engine/core/utils/logging";
import { EScheme, Optional } from "@/engine/lib/types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LuabindClass, property_evaluator } from "xray16";
import { registry } from "@/engine/core/database";
import { StalkerStateManager } from "@/engine/core/objects/ai/state/StalkerStateManager";
import { EStalkerState } from "@/engine/core/objects/animation/types";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/smartcover";
import { ISchemeSmartCoverState } from "@/engine/core/schemes/stalker/smartcover";
import { LuaLogger } from "@/engine/core/utils/logging";
import { EScheme, Optional } from "@/engine/lib/types";

Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/objects/animation/animations/base.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IAnimationDescriptor } from "@/engine/core/objects/animation/types/animation_types";
import { EStalkerState } from "@/engine/core/objects/animation/types/state_types";
import { finishCorpseLooting } from "@/engine/core/schemes/corpse_detection/utils";
import { finishObjectHelpWounded } from "@/engine/core/schemes/help_wounded/utils";
import { finishCorpseLooting } from "@/engine/core/schemes/stalker/corpse_detection/utils";
import { finishObjectHelpWounded } from "@/engine/core/schemes/stalker/help_wounded/utils";
import { createSequence } from "@/engine/core/utils/animation";
import { getExtern } from "@/engine/core/utils/binding";
import { startPlayingGuitar, startPlayingHarmonica } from "@/engine/core/utils/camp";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registry } from "@/engine/core/database";
import { EStalkerState } from "@/engine/core/objects/animation/types";
import { IAnimpointActionDescriptor } from "@/engine/core/schemes/animpoint/types";
import { IAnimpointActionDescriptor } from "@/engine/core/schemes/stalker/animpoint/types";
import { LuaLogger } from "@/engine/core/utils/logging";
import { getObjectSmartTerrain } from "@/engine/core/utils/object/object_get";
import { food } from "@/engine/lib/constants/items/food";
Expand Down
6 changes: 3 additions & 3 deletions src/engine/core/objects/binders/HelicopterBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
} from "@/engine/core/database";
import { loadObjectLogic, saveObjectLogic } from "@/engine/core/database/logic";
import { GlobalSoundManager } from "@/engine/core/managers/sounds/GlobalSoundManager";
import { getHeliHealth } from "@/engine/core/schemes/heli_move/heli_utils";
import { HeliCombat } from "@/engine/core/schemes/heli_move/HeliCombat";
import { getHeliFirer, HeliFire } from "@/engine/core/schemes/heli_move/HeliFire";
import { getHeliHealth } from "@/engine/core/schemes/helicopter/heli_move/heli_utils";
import { HeliCombat } from "@/engine/core/schemes/helicopter/heli_move/HeliCombat";
import { getHeliFirer, HeliFire } from "@/engine/core/schemes/helicopter/heli_move/HeliFire";
import { readIniNumber, readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { emitSchemeEvent, initializeObjectSchemeLogic } from "@/engine/core/utils/scheme";
Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/objects/binders/creature/ActorBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { EGameEvent } from "@/engine/core/managers/events/events_types";
import { EventsManager } from "@/engine/core/managers/events/EventsManager";
import { SaveManager } from "@/engine/core/managers/save/SaveManager";
import { Actor } from "@/engine/core/objects/server/creature/Actor";
import { ISchemeDeimosState } from "@/engine/core/schemes/sr_deimos";
import { SchemeDeimos } from "@/engine/core/schemes/sr_deimos/SchemeDeimos";
import { ISchemeDeimosState } from "@/engine/core/schemes/restrictor/sr_deimos";
import { SchemeDeimos } from "@/engine/core/schemes/restrictor/sr_deimos/SchemeDeimos";
import { LuaLogger } from "@/engine/core/utils/logging";
import { setStableAlifeObjectsUpdate, setUnlimitedAlifeObjectsUpdate } from "@/engine/core/utils/object/object_alife";
import { logicsConfig } from "@/engine/lib/configs/LogicsConfig";
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/objects/binders/creature/MonsterBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { GlobalSoundManager } from "@/engine/core/managers/sounds/GlobalSoundMan
import { SmartTerrain } from "@/engine/core/objects/server/smart_terrain/SmartTerrain";
import { SquadReachTargetAction } from "@/engine/core/objects/server/squad/action";
import { Squad } from "@/engine/core/objects/server/squad/Squad";
import { SchemeHear } from "@/engine/core/schemes/hear/SchemeHear";
import { SchemeHear } from "@/engine/core/schemes/shared/hear/SchemeHear";
import { assert } from "@/engine/core/utils/assertion";
import { pickSectionFromCondList, TConditionList } from "@/engine/core/utils/ini";
import { ISmartTerrainJobDescriptor } from "@/engine/core/utils/job";
Expand Down
12 changes: 6 additions & 6 deletions src/engine/core/objects/binders/creature/StalkerBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ import { StalkerStateManager } from "@/engine/core/objects/ai/state";
import { StalkerPatrolManager } from "@/engine/core/objects/ai/state/StalkerPatrolManager";
import { EActionId } from "@/engine/core/objects/ai/types";
import { SmartTerrain } from "@/engine/core/objects/server/smart_terrain/SmartTerrain";
import { SchemeCombat } from "@/engine/core/schemes/combat/SchemeCombat";
import { PostCombatIdle } from "@/engine/core/schemes/combat_idle/PostCombatIdle";
import { SchemeHear } from "@/engine/core/schemes/hear/SchemeHear";
import { activateMeetWithObject, updateObjectInteractionAvailability } from "@/engine/core/schemes/meet/utils";
import { SchemeReachTask } from "@/engine/core/schemes/reach_task/SchemeReachTask";
import { ISchemeWoundedState } from "@/engine/core/schemes/wounded";
import { SchemeHear } from "@/engine/core/schemes/shared/hear/SchemeHear";
import { SchemeCombat } from "@/engine/core/schemes/stalker/combat/SchemeCombat";
import { PostCombatIdle } from "@/engine/core/schemes/stalker/combat_idle/PostCombatIdle";
import { activateMeetWithObject, updateObjectInteractionAvailability } from "@/engine/core/schemes/stalker/meet/utils";
import { SchemeReachTask } from "@/engine/core/schemes/stalker/reach_task/SchemeReachTask";
import { ISchemeWoundedState } from "@/engine/core/schemes/stalker/wounded";
import { assert } from "@/engine/core/utils/assertion";
import { pickSectionFromCondList, readIniString, TConditionList } from "@/engine/core/utils/ini";
import { ISmartTerrainJobDescriptor } from "@/engine/core/utils/job";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class PhysicObjectBinder extends object_binder {

if (!this.initialized) {
this.initialized = true;
initializeObjectSchemeLogic(this.object, this.state, this.loaded, ESchemeType.ITEM);
initializeObjectSchemeLogic(this.object, this.state, this.loaded, ESchemeType.OBJECT);
}

const spawnIni: Optional<IniFile> = this.object.spawn_ini();
Expand Down
6 changes: 3 additions & 3 deletions src/engine/core/objects/camp/CampManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { WEAPON_POSTFIX } from "@/engine/core/objects/animation/types";
import { CAMP_ACTIVITIES } from "@/engine/core/objects/camp/camp_logic";
import { EObjectCampActivity, EObjectCampRole, ICampObjectState } from "@/engine/core/objects/camp/camp_types";
import { StoryManager } from "@/engine/core/objects/sounds/stories";
import { IAnimpointActionDescriptor, ISchemeAnimpointState } from "@/engine/core/schemes/animpoint/types";
import { ISchemeMeetState } from "@/engine/core/schemes/meet";
import { MeetManager } from "@/engine/core/schemes/meet/MeetManager";
import { IAnimpointActionDescriptor, ISchemeAnimpointState } from "@/engine/core/schemes/stalker/animpoint/types";
import { ISchemeMeetState } from "@/engine/core/schemes/stalker/meet";
import { MeetManager } from "@/engine/core/schemes/stalker/meet/MeetManager";
import { abort } from "@/engine/core/utils/assertion";
import { parseStringsList, readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
Expand Down
1 change: 0 additions & 1 deletion src/engine/core/schemes/abuse/actions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/abuse/evaluators/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/engine/core/schemes/abuse/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/animpoint/actions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/animpoint/evaluators/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/animpoint/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/camper/actions/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/camper/evaluators/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/engine/core/schemes/camper/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat/evaluators/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat_camper/actions/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat_camper/evaluator/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat_camper/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat_idle/actions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat_idle/evaluators/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat_idle/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat_ignore/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/combat_zombied/actions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat_zombied/evaluators/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/combat_zombied/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/companion/actions/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/companion/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/corpse_detection/actions/index.ts

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/engine/core/schemes/corpse_detection/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/corpse_detection/utils/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/cover/actions/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/cover/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/danger/evaluators/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/danger/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/death/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/gather_items/evaluators/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/gather_items/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/hear/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/heli_move/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
registry,
SYSTEM_INI,
} from "@/engine/core/database";
import { getHeliHealth } from "@/engine/core/schemes/heli_move/heli_utils";
import { getHeliHealth } from "@/engine/core/schemes/helicopter/heli_move/heli_utils";
import { isGameLevelChanging } from "@/engine/core/utils/game";
import {
parseConditionsList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { CHelicopter, level, patrol } from "xray16";

import { getPortableStoreValue, registry, setPortableStoreValue } from "@/engine/core/database";
import { AbstractSchemeManager } from "@/engine/core/objects/ai/scheme";
import { getHeliFirer, HeliFire } from "@/engine/core/schemes/heli_move/HeliFire";
import { getHeliFlyer, HeliFly } from "@/engine/core/schemes/heli_move/HeliFly";
import { getHeliLooker, HeliLook } from "@/engine/core/schemes/heli_move/HeliLook";
import { ISchemeHelicopterMoveState } from "@/engine/core/schemes/heli_move/ISchemeHelicopterMoveState";
import { getHeliFirer, HeliFire } from "@/engine/core/schemes/helicopter/heli_move/HeliFire";
import { getHeliFlyer, HeliFly } from "@/engine/core/schemes/helicopter/heli_move/HeliFly";
import { getHeliLooker, HeliLook } from "@/engine/core/schemes/helicopter/heli_move/HeliLook";
import { ISchemeHelicopterMoveState } from "@/engine/core/schemes/helicopter/heli_move/ISchemeHelicopterMoveState";
import { abort } from "@/engine/core/utils/assertion";
import { parseWaypointsData } from "@/engine/core/utils/ini/ini_parse";
import { trySwitchToAnotherSection } from "@/engine/core/utils/scheme/scheme_switch";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IRegistryObjectState, registry } from "@/engine/core/database";
import { AbstractScheme } from "@/engine/core/objects/ai/scheme/AbstractScheme";
import { HelicopterMoveManager } from "@/engine/core/schemes/heli_move/HelicopterMoveManager";
import { ISchemeHelicopterMoveState } from "@/engine/core/schemes/heli_move/ISchemeHelicopterMoveState";
import { HelicopterMoveManager } from "@/engine/core/schemes/helicopter/heli_move/HelicopterMoveManager";
import { ISchemeHelicopterMoveState } from "@/engine/core/schemes/helicopter/heli_move/ISchemeHelicopterMoveState";
import { getConfigSwitchConditions } from "@/engine/core/utils/ini/ini_config";
import { readIniBoolean, readIniNumber, readIniString } from "@/engine/core/utils/ini/ini_read";
import { LuaLogger } from "@/engine/core/utils/logging";
Expand All @@ -14,7 +14,7 @@ const logger: LuaLogger = new LuaLogger($filename);
*/
export class SchemeHelicopterMove extends AbstractScheme {
public static override readonly SCHEME_SECTION: EScheme = EScheme.HELI_MOVE;
public static override readonly SCHEME_TYPE: ESchemeType = ESchemeType.ITEM;
public static override readonly SCHEME_TYPE: ESchemeType = ESchemeType.HELICOPTER;

/**
* todo
Expand Down
2 changes: 2 additions & 0 deletions src/engine/core/schemes/helicopter/heli_move/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "@/engine/core/schemes/helicopter/heli_move/SchemeHelicopterMove";
export * from "@/engine/core/schemes/helicopter/heli_move/ISchemeHelicopterMoveState";
1 change: 0 additions & 1 deletion src/engine/core/schemes/help_wounded/actions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/help_wounded/evaluators/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/engine/core/schemes/help_wounded/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/engine/core/schemes/help_wounded/utils/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/engine/core/schemes/hit/index.ts

This file was deleted.

Loading

0 comments on commit 707b84a

Please sign in to comment.