Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat CUP Terrains - Add sitting compatibility #10645

Merged
merged 7 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 101 additions & 54 deletions addons/compat_cup_terrains/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,72 +1,119 @@
class CBA_Extended_EventHandlers;
#define XEH_INHERITED class EventHandlers {class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};}

class CfgVehicles {
class House;
class House_Small_F;
class Strategic;
class House_EP1: House {};
class Thing_EP1;
class Land_Bench_EP1: Thing_EP1 {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 90;
EXGVAR(sitting,sitPosition)[] = {{0, 0.45, -0.7}, {0, -0.45, -0.7}};
EXGVAR(sitting,interactPosition)[] = {{0, 0.45, 0.3}, {0, -0.45, 0.3}};
EGVAR(interaction,replaceTerrainObject) = 1;
};

class Land_Benzina_schnell: House {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-1.5,-3.93,-1.25}, {2.35,-3.93,-1.25}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[0,-3.93,-1.25]";
distance = 5;
condition = "true";
};
};
class CUP_basin_a;
class CUP_hospital_bench: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {{0.35, 0, 0}, {-0.35, 0, 0}};
EXGVAR(sitting,interactPosition)[] = {{0.35, 0, 0.45}, {-0.35, 0, 0.45}};
EGVAR(interaction,replaceTerrainObject) = 1;
};
class Land_A_FuelStation_Feed: Strategic {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class CUP_ch_mod_h: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.4};
EGVAR(interaction,replaceTerrainObject) = 1;
};
class Land_Ind_FuelStation_Feed_EP1: House_EP1 {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class CUP_kitchen_chair_a: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.45};
EGVAR(interaction,replaceTerrainObject) = 1;
};
class Land_FuelStation_Feed_PMC: Strategic {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class CUP_lobby_chair: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.45};
EGVAR(interaction,replaceTerrainObject) = 1;
};
class FuelStation: House_Small_F {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{1.25, .2, -1.1}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[1.25, .2, -1]";
distance = 5;
condition = "true";
};
};
class CUP_office_chair: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, -0.4};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0};
EGVAR(interaction,replaceTerrainObject) = 1;
};
class WarfareBBaseStructure;
class Base_WarfareBVehicleServicePoint: WarfareBBaseStructure {
// "vehicle service point" (a conex /w barrels) - need hooks???
XEH_INHERITED;
class CUP_ch_office_B: CUP_basin_a {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.45};
EGVAR(interaction,replaceTerrainObject) = 1;
};

class Land_stand_waterl_EP1: House_EP1 {
EXGVAR(field_rations,waterSupply) = 250;
EXGVAR(field_rations,offset)[] = {0, -0.33, 0.4};
class Thing;
class Land_Barrel_water: Thing {
EXGVAR(field_rations,waterSupply) = 160;
EXGVAR(field_rations,offset)[] = {0, 0, 0.25};
};
class FoldChair: Thing {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, -0.1, -0.45};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.3};

EGVAR(interaction,replaceTerrainObject) = 1;
EGVAR(dragging,canCarry) = 1;
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
class WoodChair: FoldChair {
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.45};
};
class Park_bench1: WoodChair {
EXGVAR(sitting,sitPosition)[] = {{0.45, 0, -0.3}, {-0.45, 0, -0.3}};
EXGVAR(sitting,interactPosition)[] = {{0.45, 0, 0.2}, {-0.45, 0, 0.2}};
};

class Base_CUP_Furniture;
class CUP_armchair: Base_CUP_Furniture {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {0, 0, 0};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.45};
EGVAR(interaction,replaceTerrainObject) = 1;
};

class Small_Items_EP1;
class Land_Chair_EP1: Small_Items_EP1 {
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 90;
EXGVAR(sitting,sitPosition)[] = {0, 0, -0.5};
EXGVAR(sitting,interactPosition)[] = {0, 0, 0.3};

EGVAR(interaction,replaceTerrainObject) = 1;
EGVAR(dragging,canCarry) = 1;
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 270;
};

class House;
class Land_pumpa: House {
EXGVAR(field_rations,waterSupply) = -10;
EXGVAR(field_rations,offset)[] = {0.3, 0, 0.68};
};

class Thing;
class Land_Barrel_water: Thing {
EXGVAR(field_rations,waterSupply) = 160;
EXGVAR(field_rations,offset)[] = {0, 0, 0.25};
class House_EP1;
class Land_stand_waterl_EP1: House_EP1 {
EXGVAR(field_rations,waterSupply) = 250;
EXGVAR(field_rations,offset)[] = {0, -0.33, 0.4};

EGVAR(interaction,replaceTerrainObject) = 1;
EXGVAR(sitting,canSit) = 1;
EXGVAR(sitting,sitDirection) = 180;
EXGVAR(sitting,sitPosition)[] = {{-0.4, -0.8, -0.9}, {0.4, -0.8, -0.9}};
EXGVAR(sitting,interactPosition)[] = {{-0.4, -0.75, 0.3}, {0.4, -0.75, 0.3}};
};
};
56 changes: 56 additions & 0 deletions addons/compat_cup_terrains/compat_cup_refuel/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
class CBA_Extended_EventHandlers;
#define XEH_INHERITED class EventHandlers {class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};}

class CfgVehicles {
class House;
class House_Small_F;
class Strategic;
class House_EP1: House {};

class Land_Benzina_schnell: House {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-1.5,-3.93,-1.25}, {2.35,-3.93,-1.25}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[0,-3.93,-1.25]";
distance = 5;
condition = "true";
};
};
};
class Land_A_FuelStation_Feed: Strategic {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_Ind_FuelStation_Feed_EP1: House_EP1 {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
class Land_FuelStation_Feed_PMC: Strategic {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{-0.34,0,0}, {0.34,0,0}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
};
class FuelStation: House_Small_F {
XEH_INHERITED;
EGVAR(refuel,hooks)[] = {{1.25, .2, -1.1}};
EGVAR(refuel,fuelCargo) = REFUEL_INFINITE_FUEL;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
position = "[1.25, .2, -1]";
distance = 5;
condition = "true";
};
};
};
class WarfareBBaseStructure;
class Base_WarfareBVehicleServicePoint: WarfareBBaseStructure {
// "vehicle service point" (a conex /w barrels) - need hooks???
XEH_INHERITED;
};
};
27 changes: 27 additions & 0 deletions addons/compat_cup_terrains/compat_cup_refuel/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "script_component.hpp"
#include "\z\ace\addons\refuel\defines.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CABuildings",
"CAStructuresHouse_A_FuelStation",
"CAStructures_E_Ind_Ind_FuelStation",
"CAStructures_PMC_FuelStation",
"CUP_Buildings_Config",
"ace_refuel"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {"Community Upgrade Project", "Mike"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
addonRootClass = QUOTE(ADDON);
};
};

#include "CfgVehicles.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define SUBCOMPONENT refuel
#define SUBCOMPONENT_BEAUTIFIED refuel
#include "..\script_component.hpp"
11 changes: 5 additions & 6 deletions addons/compat_cup_terrains/config.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "script_component.hpp"
#include "\z\ace\addons\refuel\defines.hpp"

class CfgPatches {
class ADDON {
Expand All @@ -8,11 +7,11 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"CABuildings",
"CAStructuresHouse_A_FuelStation",
"CAStructures_E_Ind_Ind_FuelStation",
"CAStructures_PMC_FuelStation",
"CUP_Buildings_Config",
"CUP_CAStructures_E_Misc_Misc_Interier",
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
"CUP_CAStructures_E_Misc_Misc_Market",
"CUP_Editor_Buildings_Config",
"CUP_Editor_Structures_Config",
"CUP_Misc3_Config",
"ace_common"
};
skipWhenMissingDependencies = 1;
Expand Down
Loading