Prepare fixtures

This commit is contained in:
dkanus 2026-07-14 20:27:09 +07:00
commit 9c94356263
6021 changed files with 722805 additions and 22 deletions

View file

@ -0,0 +1,26 @@
/**
* API that provides functions for working with chat.
* Copyright 2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
* Acedia is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* Acedia is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Acedia. If not, see <https://www.gnu.org/licenses/>.
*/
class Manifest extends _manifest
abstract;
defaultproperties
{
features(0) = class'OldSchoolZedsAddon_Feature'
}

View file

@ -0,0 +1,107 @@
/**
* API that provides functions for working with chat.
* Copyright 2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
* Acedia is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* Acedia is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Acedia. If not, see <https://www.gnu.org/licenses/>.
*/
class OldSchoolZedsAddon extends FeatureConfig
perobjectconfig
config(LZOldSchoolZedsAddon);
// Fleshpound Chaingunner does not use incendiary rounds
var public config bool bDisableIncendiaryRounds;
// Fleshpound Chaingunner no longer has resistance to burned damagetype
var public config bool bDisableIncendiaryResistance;
// Explosive Pound is nerfed.
var public config bool bNerfEP;
// Bloat uses 2.5 puke behavior
var public config bool bEnableOldBloatPuke;
// Crawler uses 2.5 leaping behavior
var public config bool bEnableOldCrawlerBehaviour;
// Swaps Siren Scream Damage type, causing explosives to explode
var public config bool bEnableSirenNadeBoom;
// Use 2.5 Scrake behavior: No rage charging.
var public config bool bEnableOldScrakeBehavior;
// Use 2.5 Fleshpound behavior: No LoS rage and 10 second long rage.
var public config bool bEnableOldFleshpoundBehavior;
protected function HashTable ToData()
{
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("bDisableIncendiaryRounds"), bDisableIncendiaryRounds);
data.SetBool(
P("bDisableIncendiaryResistance"),
bDisableIncendiaryResistance);
data.SetBool(P("bNerfEP"), bNerfEP);
data.SetBool(P("bEnableOldBloatPuke"), bEnableOldBloatPuke);
data.SetBool(P("bEnableOldCrawlerBehaviour"), bEnableOldCrawlerBehaviour);
data.SetBool(P("bEnableSirenNadeBoom"), bEnableSirenNadeBoom);
data.SetBool(P("bEnableOldScrakeBehavior"), bEnableOldScrakeBehavior);
data.SetBool(
P("bEnableOldFleshpoundBehavior"),
bEnableOldFleshpoundBehavior);
return data;
}
protected function FromData(HashTable source)
{
if (source == none) {
return;
}
bDisableIncendiaryRounds
= source.GetBool(P("bDisableIncendiaryRounds"), false);
bDisableIncendiaryResistance
= source.GetBool(P("bDisableIncendiaryResistance"), false);
bNerfEP
= source.GetBool(P("bNerfEP"), false);
bEnableOldBloatPuke
= source.GetBool(P("bEnableOldBloatPuke"), false);
bEnableOldCrawlerBehaviour
= source.GetBool(P("bEnableOldCrawlerBehaviour"), false);
bEnableSirenNadeBoom
= source.GetBool(P("bEnableSirenNadeBoom"), false);
bEnableOldScrakeBehavior
= source.GetBool(P("bEnableOldScrakeBehavior"), false);
bEnableOldFleshpoundBehavior
= source.GetBool(P("bEnableOldFleshpoundBehavior"), false);
}
protected function DefaultIt()
{
bDisableIncendiaryRounds = false;
bDisableIncendiaryResistance = false;
bNerfEP = false;
bEnableOldBloatPuke = false;
bEnableOldCrawlerBehaviour = false;
bEnableSirenNadeBoom = false;
bEnableOldScrakeBehavior = false;
bEnableOldFleshpoundBehavior = false;
}
defaultproperties
{
configName = "LZOldSchoolZedsAddon"
bDisableIncendiaryRounds = false
bDisableIncendiaryResistance = false
bNerfEP = false
bEnableOldBloatPuke = false
bEnableOldCrawlerBehaviour = false
bEnableSirenNadeBoom = false
bEnableOldScrakeBehavior = false
bEnableOldFleshpoundBehavior = false
}

View file

@ -0,0 +1,165 @@
/**
* API that provides functions for working with chat.
* Copyright 2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
* Acedia is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* Acedia is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Acedia. If not, see <https://www.gnu.org/licenses/>.
*/
class OldSchoolZedsAddon_Feature extends Feature;
struct FlagUpdateDefinition
{
var string flagName;
var string variableName;
var class<Actor> relevantClass;
};
var private array<FlagUpdateDefinition> flagToUpdate;
protected function OnEnabled()
{
_server.unreal.GetGameType().AddToPackageMap("KFOldSchoolZeds");
Log("BEFORE!!!" @ _server.unreal.GetKFGameType().MonsterCollection @ _server.unreal.GetKFGameType().InitSquads.length);
_server.unreal.GetGameType().AddMutator(string(class'KF25OSMut'));
Log("PUHPUH!!!" @ _server.unreal.mutator.FindInstance(class'KF25OSMut'));
Log("AFTER!!!" @ _server.unreal.GetKFGameType().MonsterCollection @ _server.unreal.GetKFGameType().InitSquads.length);
}
protected function SwapConfig(FeatureConfig config)
{
local KF25OSMut mutatorInstance;
local OldSchoolZedsAddon newConfig;
newConfig = OldSchoolZedsAddon(config);
if (newConfig == none) {
return;
}
mutatorInstance =
KF25OSMut(_server.unreal.mutator.FindInstance(class'KF25OSMut'));
UpdateFlags(mutatorInstance, newConfig);
UpdateDefaultMutatorFlags(newConfig);
UpdateDefaultActorsFlags(newConfig);
}
// Necessary boiler plate code for updating default values
private function UpdateDefaultMutatorFlags(OldSchoolZedsAddon newConfig)
{
if (newConfig == none) {
return;
}
class'KF25OSMut'.default.bDisableIncendiaryRounds =
newConfig.bDisableIncendiaryRounds;
class'KF25OSMut'.default.bDisableIncendiaryResistance =
newConfig.bDisableIncendiaryResistance;
class'KF25OSMut'.default.bEnableOldBloatPuke =
newConfig.bEnableOldBloatPuke;
class'KF25OSMut'.default.bEnableOldCrawlerBehaviour =
newConfig.bEnableOldCrawlerBehaviour;
class'KF25OSMut'.default.bEnableSirenNadeBoom =
newConfig.bEnableSirenNadeBoom;
class'KF25OSMut'.default.bEnableOldScrakeBehavior =
newConfig.bEnableOldScrakeBehavior;
class'KF25OSMut'.default.bEnableOldFleshpoundBehavior =
newConfig.bEnableOldFleshpoundBehavior;
class'KF25OSMut'.default.bNerfEP = newConfig.bNerfEP;
}
// Necessary boiler plate code for updating default values
private function UpdateDefaultActorsFlags(OldSchoolZedsAddon newConfig)
{
if (newConfig == none) {
return;
}
class'ZombieRangedPoundOS'.default.bDisableIncendiaryRounds =
newConfig.bDisableIncendiaryRounds;
class'ZombieRangedPoundOS'.default.bDisableIncendiaryResistance =
newConfig.bDisableIncendiaryResistance;
class'ZombieBloatOS'.default.bEnableOldBloatPuke =
newConfig.bEnableOldBloatPuke;
class'ControllerCrawlerOS'.default.bEnableOldCrawlerBehaviour =
newConfig.bEnableOldCrawlerBehaviour;
class'ZombieSirenOS'.default.bEnableSirenNadeBoom =
newConfig.bEnableSirenNadeBoom;
class'ZombieScrakeOS'.default.bEnableOldScrakeBehavior =
newConfig.bEnableOldScrakeBehavior;
class'ZombieFleshPoundOS'.default.bEnableOldFleshpoundBehavior =
newConfig.bEnableOldFleshpoundBehavior;
class'ControllerFleshpoundOS'.default.bEnableOldFleshpoundBehavior =
newConfig.bEnableOldFleshpoundBehavior;
class'ZombieExplosivesPoundOS'.default.bNerfed = newConfig.bNerfEP;
class'GunnerGLProjectile'.default.bNerfed = newConfig.bNerfEP;
}
private function UpdateFlags(
KF25OSMut mutatorInstance,
OldSchoolZedsAddon config)
{
local int i;
local string flagName, variableName, flagValue;
if (config == none) {
return;
}
for (i = 0; i < flagToUpdate.length; i += 1)
{
flagName = flagToUpdate[i].flagName;
flagValue = config.GetPropertyText(flagToUpdate[i].flagName);
variableName = flagToUpdate[i].variableName;
if (variableName == "") {
variableName = flagToUpdate[i].flagName;
}
if (mutatorInstance != none){
mutatorInstance.SetPropertyText(flagName, flagValue);
}
if (flagToUpdate[i].relevantClass != none)
{
UpdateActorsFlag(
flagToUpdate[i].relevantClass,
variableName,
flagValue);
}
}
}
private function UpdateActorsFlag(
class<Actor> classToUpdate,
string variableName,
string variableValue)
{
local LevelInfo level;
local Actor nextActorInstance;
if (classToUpdate == none) {
return;
}
level = _server.unreal.GetLevel();
foreach level.DynamicActors(classToUpdate, nextActorInstance) {
nextActorInstance.SetPropertyText(variableName, variableValue);
}
}
defaultproperties
{
configClass = class'OldSchoolZedsAddon'
flagToUpdate(0) = (flagName="bDisableIncendiaryRounds",relevantClass=class'ZombieRangedPoundOS')
flagToUpdate(1) = (flagName="bDisableIncendiaryResistance",relevantClass=class'ZombieRangedPoundOS')
flagToUpdate(2) = (flagName="bNerfEP",variableName="bNerfed",relevantClass=class'ZombieExplosivesPoundOS')
flagToUpdate(3) = (flagName="bNerfEP",variableName="bNerfed",relevantClass=class'GunnerGLProjectile')
flagToUpdate(4) = (flagName="bEnableOldBloatPuke",relevantClass=class'ZombieBloatOS')
flagToUpdate(5) = (flagName="bEnableOldCrawlerBehaviour",relevantClass=class'ControllerCrawlerOS')
flagToUpdate(6) = (flagName="bEnableSirenNadeBoom",relevantClass=class'ZombieSirenOS')
flagToUpdate(7) = (flagName="bEnableOldScrakeBehavior",relevantClass=class'ZombieScrakeOS')
flagToUpdate(8) = (flagName="bEnableOldFleshpoundBehavior",relevantClass=class'ZombieFleshPoundOS')
flagToUpdate(9) = (flagName="bEnableOldFleshpoundBehavior",relevantClass=class'ControllerFleshpoundOS')
}

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /kf_sources/LZOldSchoolZedsAddon/Classes/</title></head>
<body>
<h1>Index of /kf_sources/LZOldSchoolZedsAddon/Classes/</h1><hr><pre><a href="../">../</a>
<a href="Manifest.uc">Manifest.uc</a> 10-Sep-2022 21:07 991
<a href="OldSchoolZedsAddon.uc">OldSchoolZedsAddon.uc</a> 10-Sep-2022 20:23 4200
<a href="OldSchoolZedsAddon_Feature.uc">OldSchoolZedsAddon_Feature.uc</a> 10-Sep-2022 21:41 6796
</pre><hr></body>
</html>