Skip to content

Commit

Permalink
squashed commits because that old junk is no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
scraphammer committed Oct 20, 2020
0 parents commit 96e1447
Show file tree
Hide file tree
Showing 249 changed files with 5,439 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Classes/AmblerFootstepZone.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//=============================================================================
// AmblerFootstepZone
//=============================================================================
class AmblerFootstepZone extends FiretrucksFootstepZone;

#exec TEXTURE IMPORT FILE="Textures\amblezone.pcx" NAME="i_AmbleZone" GROUP="Icons" MIPS=Off FLAGS=2

/**
A zone that forces the player to walk.
*/

var() bool enabled; //Controls whether or not this zone is enabled. It can be triggered to be disabled.

event actorEntered(Actor other) {
if (enabled && FiretrucksPlayer(other) != none) FiretrucksPlayer(other).forceWalking = true;
}

event actorLeaving(Actor other) {
if (enabled && FiretrucksPlayer(other) != none) FiretrucksPlayer(other).forceWalking = false;
}

function Trigger(actor Other, pawn EventInstigator) {
local FiretrucksPlayer p;
if (enabled) foreach zoneActors(class'FiretrucksPlayer', p) p.forceWalking = false;
else foreach zoneActors(class'FiretrucksPlayer', p) p.forceWalking = true;
enabled = !enabled;
}

defaultproperties
{
Enabled=True
Texture=Texture'Firetrucks.Icons.i_AmbleZone'
}
23 changes: 23 additions & 0 deletions Classes/AnimatingDecoration.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//=============================================================================
// AnimatingDecoration.
//=============================================================================
class AnimatingDecoration extends Decoration;

/**
An animating decoration that I thought mappers might find useful or fun.
*/

var() name animationToLoop; //The animation to be looped. Make sure the <span>mesh</span> specified has the animation you desire.

auto state Looping {
begin:
loopAnim(animationToLoop);
}

defaultproperties
{
animationToLoop="'"
bStatic=False
DrawType=DT_Mesh
Mesh=LodMesh'UnrealI.Squid1'
}
14 changes: 14 additions & 0 deletions Classes/Attachment.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class Attachment extends Effects abstract;
/**
An effect class for attachments to the FiretrucksPlayer.
*/


var Attachment next;

defaultproperties
{
bNetTemporary=False
DrawType=DT_Mesh
bOwnerNoSee=True
}
41 changes: 41 additions & 0 deletions Classes/BaseEvent.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//=============================================================================
// BaseEvent.
//=============================================================================
class BaseEvent extends Triggers;

#exec texture import file=Textures\attachevent.pcx name=i_baseevent group=Icons mips=Off flags=2

/**
For those times when you need to attach something on the fly, or when an attachment is misbehaving
*/

var() bool forceTick; //Whether or not to enable tick() when triggered.
var() name childTag; //Optional tag of child Actor(s).
var() Actor child; //A direct reference to the child. Needed by tick(), but not trigger().
var() Actor parent; //A direct reference to the parent.
var() bool enableTick; //Whether or not tick() is enabled at the start.
var() editconst localized string warning; //"Tick() ignores childTag, must use child"

function tick(float delta) {
super.tick(delta);
if (enableTick || parent == none || child == none) return;
child.setBase(parent);
}

function trigger(Actor other, Pawn eventInstigator) {
local Actor a;
if (parent == none) return;
if (child != none) child.setBase(parent);

if (childTag != '') foreach AllActors(class'Actor', a, childTag) {
a.setBase(parent);
}

if (forceTick) enableTick = true;
}

defaultproperties
{
Warning="Tick() ignores childTag, must use child"
Texture=Texture'Firetrucks.Icons.i_baseevent'
}
29 changes: 29 additions & 0 deletions Classes/Bottle.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//=============================================================================
// Bottle.
//=============================================================================
class Bottle expands Decoration;
/**
A sweet decoration for the drunkard in you!
*/

#exec OBJ LOAD FILE=Liquids.utx

#exec MESH IMPORT MESH=bottle ANIVFILE=MODELS\bottle_a.3d DATAFILE=MODELS\bottle_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=bottle X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=bottle SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=bottle SEQ=BOTTLE STARTFRAME=0 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=Jbottle1 FILE=MODELS\bottle1.PCX GROUP=Skins DETAIL=grittyDetail5

#exec MESHMAP NEW MESHMAP=bottle MESH=bottle
#exec MESHMAP SCALE MESHMAP=bottle X=0.015 Y=0.015 Z=0.03

#exec MESHMAP SETTEXTURE MESHMAP=bottle NUM=1 TEXTURE=Jbottle1
#exec MESHMAP SETTEXTURE MESHMAP=bottle NUM=2 TEXTURE=Liquid8

defaultproperties
{
DrawType=DT_Mesh
Mesh=LodMesh'Firetrucks.Bottle'
}
26 changes: 26 additions & 0 deletions Classes/Bottle2.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//=============================================================================
// Bottle2.
//=============================================================================
class Bottle2 expands Decoration;
/**
Sometimes one bottle isn't enough;
*/

#exec MESH IMPORT MESH=bottle2 ANIVFILE=MODELS\bottle2_a.3d DATAFILE=MODELS\bottle2_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=bottle2 X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=bottle2 SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=bottle2 SEQ=BOTTLE2 STARTFRAME=0 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=Jbottle21 FILE=MODELS\bottle21.PCX GROUP=Skins DETAIL=grittyDetail4

#exec MESHMAP NEW MESHMAP=bottle2 MESH=bottle2
#exec MESHMAP SCALE MESHMAP=bottle2 X=0.01 Y=0.01 Z=0.02

#exec MESHMAP SETTEXTURE MESHMAP=bottle2 NUM=1 TEXTURE=Jbottle21

defaultproperties
{
DrawType=DT_Mesh
Mesh=LodMesh'Firetrucks.Bottle2'
}
20 changes: 20 additions & 0 deletions Classes/Bottle2Inv.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//=============================================================================
// Bottle2Inv.
//=============================================================================
class Bottle2Inv expands FiretrucksPickup;
/**
An inventory item that resembles Bottle2
*/
#exec TEXTURE IMPORT NAME=i_bottle2 FILE=Textures\i_bottle2.PCX GROUP=Icons FLAGS=2 MIPS=OFF

defaultproperties
{
eventOnUse="Bottle2InvEvent"
PickupMessage="You got a small turquoise bottle"
ItemName="Bottle"
PickupViewMesh=LodMesh'Firetrucks.Bottle2'
PickupSound=Sound'UnrealShare.Tentacle.TentSpawn'
ActivateSound=Sound'UnrealShare.Slith.slithr1sl'
Icon=Texture'Firetrucks.Icons.i_bottle2'
Mesh=LodMesh'Firetrucks.Bottle2'
}
26 changes: 26 additions & 0 deletions Classes/Bottle3.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//=============================================================================
// Bottle3.
//=============================================================================
class Bottle3 expands Decoration;
/**
In case hard liquor isn't your thing I modeled this one to look like wine.
*/

#exec MESH IMPORT MESH=bottle3 ANIVFILE=MODELS\bottle3_a.3d DATAFILE=MODELS\bottle3_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=bottle3 X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=bottle3 SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=bottle3 SEQ=BOTTLE3 STARTFRAME=0 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=Jbottle31 FILE=MODELS\bottle31.PCX GROUP=Skins

#exec MESHMAP NEW MESHMAP=bottle3 MESH=bottle3
#exec MESHMAP SCALE MESHMAP=bottle3 X=0.015 Y=0.015 Z=0.03

#exec MESHMAP SETTEXTURE MESHMAP=bottle3 NUM=1 TEXTURE=Jbottle31

defaultproperties
{
DrawType=DT_Mesh
Mesh=LodMesh'Firetrucks.Bottle3'
}
21 changes: 21 additions & 0 deletions Classes/Bottle3Inv.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//=============================================================================
// Bottle3Inv.
//=============================================================================
class Bottle3Inv expands FiretrucksPickup;
/**
An inventory item that appears like Bottle3
*/

#exec TEXTURE IMPORT NAME=i_bottle3 FILE=Textures\i_bottle3.PCX GROUP=Icons FLAGS=2 MIPS=OFF

defaultproperties
{
eventOnUse="Bottle3InvEvent"
PickupMessage="You got a wine bottle."
ItemName="Bottle"
PickupViewMesh=LodMesh'Firetrucks.Bottle3'
PickupSound=Sound'UnrealShare.Slith.SliImpact'
ActivateSound=Sound'UnrealShare.Slith.SliSpawn'
Icon=Texture'Firetrucks.Icons.i_bottle3'
Mesh=LodMesh'Firetrucks.Bottle3'
}
21 changes: 21 additions & 0 deletions Classes/BottleInv.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//=============================================================================
// BottleInv.
//=============================================================================
class BottleInv expands FiretrucksPickup;
/**
An inventory item that looks like the Bottle
*/

#exec TEXTURE IMPORT NAME=i_bottle FILE=Textures\i_bottle.PCX GROUP=Icons FLAGS=2 MIPS=OFF

defaultproperties
{
eventOnUse="BottleInvEvent"
PickupMessage="You got a bottle of brown fluid."
ItemName="Bottle"
PickupViewMesh=LodMesh'Firetrucks.Bottle'
PickupSound=Sound'UnrealShare.Tentacle.TentSpawn'
ActivateSound=Sound'UnrealShare.Slith.slithr1sl'
Icon=Texture'Firetrucks.Icons.i_bottle'
Mesh=LodMesh'Firetrucks.Bottle'
}
63 changes: 63 additions & 0 deletions Classes/CameraEvent.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//=============================================================================
// CameraEvent.
//=============================================================================
class CameraEvent extends Triggers;

#exec texture import file=Textures\cameraevent.pcx name=i_camEvent group=Icons mips=Off

/**
When triggered, switches the player's view to a specified camera for a period of time.
*/

var() FiretrucksCamera cameraToUse; //The camera to be used for the event.
var() float duration; //The duration of the event, in seconds. If set to 0, it will last until retriggered.

var bool isActive;

function Trigger(actor Other, pawn EventInstigator) {
if (cameraToUse == none) return;
if (isActive) {
restorePlayerView();
isActive = false;
} else {
switchPlayerView();
isActive = true;
if (duration > 0) setTimer(duration, false);
}
}

function timer() {
if (isActive) {
restorePlayerView();
isActive = false;
triggerEvent(event, Self, Instigator);
}
}

simulated function switchPlayerView() {
local PlayerPawn p;
foreach allactors(class'playerpawn', p) {
if (FiretrucksPlayer(p) != none) {
FiretrucksPlayer(p).switchPlayerView(cameraToUse, self);
}
}
}

simulated function restorePlayerView() {
local PlayerPawn p;
if (cameraToUse == none) {
if (FiretrucksPlayer(p) != none) FiretrucksPlayer(p).restorePlayerView(self, true);
else return;
}
foreach allactors(class'playerpawn', p) {
if (FiretrucksPlayer(p) != none) {
FiretrucksPlayer(p).restorePlayerView(self);
}
}
triggerEvent(event, Self, Instigator);
}

defaultproperties
{
Texture=Texture'Firetrucks.Icons.i_camEvent'
}
61 changes: 61 additions & 0 deletions Classes/Collider.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//=============================================================================
// Collider.
//=============================================================================
class Collider extends Triggers;

#exec texture import file=Textures\collider.pcx name=i_collider group=Icons mips=Off flags=2

/**
When triggered, can toggle collision of a specified actor.
*/

var() name targetTag; //The tag of the target actor(s).
var() enum ColliderType {
CT_ON,
CT_OFF,
CT_TOGGLE,
} collideType; //Controls whether collision is enabled, disabled, or toggled.
var() enum CollideTargetType {
TT_TAG, //SLOW AVOID USE
TT_TARGET, //this is *hella* fast!
TT_PROTOTYPE, //SLOW AVOID USE
} targetType; //Controls how this actor acquires its targets. Using tags or prototypes is very slow and should be used sparingly. If there are ten things you want to toggle collision for, it is faster during runtime to use ten Collider actors set to TT_TARGET than it is to use one with a tag.
var() Actor collideTarget; //The exact target, if the targeting mode is set to use an exact target.
var() class<Actor> prototype; //The class of actors to toggle, if set to that mode.

function Trigger(actor Other, pawn EventInstigator) {
local Actor a;
switch(targetType) {
case TT_TAG:
foreach allactors(class'Actor', a, targetTag) colliderMain(a);
break;
case TT_TARGET:
colliderMain(collideTarget);
break;
case TT_PROTOTYPE:
foreach allactors(protoType, a) colliderMain(a);
break;
}
triggerEvent(event, other, eventInstigator);
}

function colliderMain(Actor a) {
if (a != none) {
switch(collideType) {
case CT_ON:
a.setCollision(true, true, true);
break;
case CT_OFF:
a.setCollision(false, false, false);
break;
case CT_TOGGLE:
a.setCollision(!a.bCollideActors, !a.bcollideActors, !a.bblockPlayers);
break;
}
}
}

defaultproperties
{
Texture=Texture'Firetrucks.Icons.i_collider'
}

0 comments on commit 96e1447

Please sign in to comment.