From 845c43876cfe45acd41a45d0a16da0c7553becf1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Mar 2017 11:30:28 +0100 Subject: [PATCH] - moved all trivial actor properties into the scripts as 'property' declarations. --- src/scripting/thingdef_properties.cpp | 842 ------------------ src/scripting/zscript/zcc_compile.cpp | 5 + wadsrc/static/zscript/actor.txt | 51 ++ wadsrc/static/zscript/inventory/inventory.txt | 13 +- wadsrc/static/zscript/inventory/weapons.txt | 20 + 5 files changed, 86 insertions(+), 845 deletions(-) diff --git a/src/scripting/thingdef_properties.cpp b/src/scripting/thingdef_properties.cpp index ad6e7e8d8..1094098fb 100644 --- a/src/scripting/thingdef_properties.cpp +++ b/src/scripting/thingdef_properties.cpp @@ -583,33 +583,6 @@ DEFINE_PROPERTY(tag, S, Actor) defaults->SetTag(str); } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(health, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->health=id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(woundhealth, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->WoundHealth = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(reactiontime, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->reactiontime=id; -} - //========================================================================== // //========================================================================== @@ -631,16 +604,6 @@ DEFINE_PROPERTY(painchance, ZI, Actor) } } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(painthreshold, I, Actor) -{ - PROP_INT_PARM(id, 0); - - defaults->PainThreshold = id; -} - //========================================================================== // //========================================================================== @@ -682,106 +645,6 @@ DEFINE_PROPERTY(damage, X, Actor) CreateDamageFunction(bag.Namespace, bag.Version, bag.Info, defaults, id, true, bag.Lumpnum); } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(damagemultiply, F, Actor) -{ - PROP_FLOAT_PARM(dmgm, 0); - defaults->DamageMultiply = dmgm; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(projectilekickback, I, Actor) -{ - PROP_INT_PARM(id, 0); - - defaults->projectileKickback = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(speed, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->Speed = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(floatspeed, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->FloatSpeed = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(radius, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->radius = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(renderradius, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->renderradius = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(height, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->Height=id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(projectilepassheight, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->projectilepassheight=id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(mass, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->Mass=id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(xscale, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->Scale.X = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(yscale, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->Scale.Y = id; -} - //========================================================================== // //========================================================================== @@ -814,78 +677,6 @@ DEFINE_PROPERTY(args, Iiiii, Actor) defaults->flags2|=MF2_ARGSDEFINED; } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(seesound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->SeeSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(attacksound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->AttackSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(bouncesound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->BounceSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(wallbouncesound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->WallBounceSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(painsound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->PainSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(deathsound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->DeathSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(activesound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->ActiveSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(crushpainsound, S, Actor) -{ - PROP_STRING_PARM(str, 0); - defaults->CrushPainSound = str; -} - //========================================================================== // //========================================================================== @@ -951,51 +742,6 @@ DEFINE_PROPERTY(defaultalpha, 0, Actor) defaults->Alpha = gameinfo.gametype == GAME_Heretic ? HR_SHADOW : HX_SHADOW; } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(alpha, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->Alpha = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(maxtargetrange, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->maxtargetrange = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(meleethreshold, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->meleethreshold = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(meleerange, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->meleerange = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(pushfactor, F, Actor) -{ - PROP_DOUBLE_PARM(id, 0); - defaults->pushfactor = id; -} - //========================================================================== // //========================================================================== @@ -1125,42 +871,6 @@ DEFINE_PROPERTY(wallbouncefactor, F, Actor) defaults->wallbouncefactor = clamp(id, 0, 1); } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(bouncecount, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->bouncecount = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(weaveindexXY, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->WeaveIndexXY = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(weaveindexZ, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->WeaveIndexZ = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(minmissilechance, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->MinMissileChance=id; -} - //========================================================================== // //========================================================================== @@ -1222,24 +932,6 @@ DEFINE_PROPERTY(decal, S, Actor) defaults->DecalGenerator = (FDecalBase *)intptr_t(int(FName(str))); } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(maxstepheight, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->MaxStepHeight = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(maxdropoffheight, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->MaxDropOffHeight = i; -} - //========================================================================== // //========================================================================== @@ -1265,61 +957,6 @@ DEFINE_PROPERTY(poisondamage, Iii, Actor) } } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(poisondamagetype, S, Actor) -{ - PROP_STRING_PARM(poisondamagetype, 0); - - defaults->PoisonDamageType = poisondamagetype; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(radiusdamagefactor, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->RadiusDamageFactor = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(selfdamagefactor, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->SelfDamageFactor = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(stealthalpha, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->StealthAlpha = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(cameraheight, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->CameraHeight = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(vspeed, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->Vel.Z = i; -} - //========================================================================== // //========================================================================== @@ -1340,37 +977,6 @@ DEFINE_PROPERTY(spriteangle, F, Actor) defaults->SpriteAngle = i; } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(spriterotation, F, Actor) -{ - PROP_DOUBLE_PARM(i, 0); - defaults->SpriteRotation = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(visibleangles, FF, Actor) -{ - PROP_DOUBLE_PARM(visstart, 0); - PROP_DOUBLE_PARM(visend, 1); - defaults->VisibleStartAngle = visstart; - defaults->VisibleEndAngle = visend; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(visiblepitch, FF, Actor) -{ - PROP_DOUBLE_PARM(visstart, 0); - PROP_DOUBLE_PARM(visend, 1); - defaults->VisibleStartPitch = visstart; - defaults->VisibleEndPitch = visend; -} - //========================================================================== // //========================================================================== @@ -1382,15 +988,6 @@ DEFINE_PROPERTY(friction, F, Actor) defaults->Friction = i; } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(species, S, Actor) -{ - PROP_STRING_PARM(n, 0); - defaults->Species = n; -} - //========================================================================== // //========================================================================== @@ -1472,71 +1069,6 @@ DEFINE_PROPERTY(visibletoplayerclass, Ssssssssssssssssssss, Actor) } } -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(accuracy, I, Actor) -{ - PROP_INT_PARM(i, 0); - defaults->accuracy = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(stamina, I, Actor) -{ - PROP_INT_PARM(i, 0); - defaults->stamina = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(telefogsourcetype, S, Actor) -{ - PROP_STRING_PARM(str, 0); - - defaults->TeleFogSourceType = FindClassTentative(str, RUNTIME_CLASS(AActor)); -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(telefogdesttype, S, Actor) -{ - PROP_STRING_PARM(str, 0); - - defaults->TeleFogDestType = FindClassTentative(str, RUNTIME_CLASS(AActor)); -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(ripperlevel, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->RipperLevel = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(riplevelmin, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->RipLevelMin = id; -} - -//========================================================================== -// -//========================================================================== -DEFINE_PROPERTY(riplevelmax, I, Actor) -{ - PROP_INT_PARM(id, 0); - defaults->RipLevelMax = id; -} - //========================================================================== // //========================================================================== @@ -1593,15 +1125,6 @@ DEFINE_CLASS_PROPERTY(forbiddento, Ssssssssssssssssssss, Inventory) } } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(amount, I, Inventory) -{ - PROP_INT_PARM(i, 0); - defaults->Amount = i; -} - //========================================================================== // //========================================================================== @@ -1646,24 +1169,6 @@ DEFINE_CLASS_PROPERTY(althudicon, S, Inventory) SetIcon(defaults->AltHUDIcon, bag, i); } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(interhubamount, I, Inventory) -{ - PROP_INT_PARM(i, 0); - defaults->InterHubAmount = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(maxamount, I, Inventory) -{ - PROP_INT_PARM(i, 0); - defaults->MaxAmount = i; -} - //========================================================================== // //========================================================================== @@ -1672,25 +1177,6 @@ DEFINE_CLASS_PROPERTY(defmaxamount, 0, Inventory) defaults->MaxAmount = gameinfo.definventorymaxamount; } - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(pickupflash, S, Inventory) -{ - PROP_STRING_PARM(str, 0); - defaults->PickupFlash = FindClassTentative(str, RUNTIME_CLASS(AActor)); -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(pickupsound, S, Inventory) -{ - PROP_STRING_PARM(str, 0); - defaults->PickupSound = str; -} - //========================================================================== // Dummy for Skulltag compatibility... //========================================================================== @@ -1698,51 +1184,6 @@ DEFINE_CLASS_PROPERTY(pickupannouncerentry, S, Inventory) { } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(respawntics, I, Inventory) -{ - PROP_INT_PARM(i, 0); - defaults->RespawnTics = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(usesound, S, Inventory) -{ - PROP_STRING_PARM(str, 0); - defaults->UseSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammogive, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoGive1 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammogive1, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoGive1 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammogive2, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoGive2 = i; -} - //========================================================================== // //========================================================================== @@ -1773,42 +1214,6 @@ DEFINE_CLASS_PROPERTY(ammotype2, S, Weapon) else defaults->AmmoType2 = FindClassTentativeAmmo(str); } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammouse, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoUse1 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammouse1, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoUse1 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(ammouse2, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->AmmoUse2 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(kickback, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->Kickback = i; -} - //========================================================================== // //========================================================================== @@ -1817,69 +1222,6 @@ DEFINE_CLASS_PROPERTY(defaultkickback, 0, Weapon) defaults->Kickback = gameinfo.defKickback; } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(readysound, S, Weapon) -{ - PROP_STRING_PARM(str, 0); - defaults->ReadySound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(selectionorder, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->SelectionOrder = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(minselectionammo1, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->MinSelAmmo1 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(minselectionammo2, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->MinSelAmmo2 = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(sisterweapon, S, Weapon) -{ - PROP_STRING_PARM(str, 0); - defaults->SisterWeaponType = FindClassTentativeWeapon(str); -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(upsound, S, Weapon) -{ - PROP_STRING_PARM(str, 0); - defaults->UpSound = str; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(yadjust, F, Weapon) -{ - PROP_FLOAT_PARM(i, 0); - defaults->YAdjust = i; -} - //========================================================================== // //========================================================================== @@ -1899,42 +1241,6 @@ DEFINE_CLASS_PROPERTY(bobstyle, S, Weapon) defaults->BobStyle = styles[match]; } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(bobspeed, F, Weapon) -{ - PROP_FLOAT_PARM(i, 0); - defaults->BobSpeed = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(bobrangex, F, Weapon) -{ - PROP_FLOAT_PARM(i, 0); - defaults->BobRangeX = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(bobrangey, F, Weapon) -{ - PROP_FLOAT_PARM(i, 0); - defaults->BobRangeY = i; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY(slotnumber, I, Weapon) -{ - PROP_INT_PARM(i, 0); - defaults->SlotNumber = i; -} - //========================================================================== // //========================================================================== @@ -2060,35 +1366,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, duration, I, Inventory) defaults->IntVar(NAME_EffectTics) = (i >= 0) ? i : -i * TICRATE; } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(powerup, strength, F, Inventory) -{ - if (!info->IsDescendantOf(NAME_Powerup) && !info->IsDescendantOf(NAME_PowerupGiver)) - { - I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n"); - return; - } - PROP_DOUBLE_PARM(f, 0); - defaults->FloatVar(NAME_Strength) = f; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(powerup, mode, S, Inventory) -{ - PROP_STRING_PARM(str, 0); - - if (!info->IsDescendantOf(NAME_Powerup) && !info->IsDescendantOf(NAME_PowerupGiver)) - { - I_Error("\"powerup.mode\" requires an actor of type \"Powerup\"\n"); - return; - } - defaults->NameVar(NAME_Mode) = (FName)str; -} - //========================================================================== // //========================================================================== @@ -2286,44 +1563,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, clearcolorset, I, PlayerPawn) } } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, attackzoffset, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->AttackZOffset = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, jumpz, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->JumpZ = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, GruntSpeed, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->GruntSpeed = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, FallingScreamSpeed, FF, PlayerPawn) -{ - PROP_DOUBLE_PARM(minz, 0); - PROP_DOUBLE_PARM(maxz, 1); - defaults->FallingScreamMinSpeed = minz; - defaults->FallingScreamMaxSpeed = maxz; -} - //========================================================================== // //========================================================================== @@ -2355,33 +1594,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, spawnclass, L, PlayerPawn) } } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, viewheight, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->ViewHeight = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, userange, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->UseRange = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, aircapacity, F, PlayerPawn) -{ - PROP_DOUBLE_PARM(z, 0); - defaults->AirCapacity = z; -} - //========================================================================== // //========================================================================== @@ -2410,51 +1622,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, sidemove, F_f, PlayerPawn) } } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, maxhealth, I, PlayerPawn) -{ - PROP_INT_PARM(z, 0); - defaults->MaxHealth = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, mugshotmaxhealth, I, PlayerPawn) -{ - PROP_INT_PARM(z, 0); - defaults->MugShotMaxHealth = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, runhealth, I, PlayerPawn) -{ - PROP_INT_PARM(z, 0); - defaults->RunHealth = z; -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, morphweapon, S, PlayerPawn) -{ - PROP_STRING_PARM(z, 0); - defaults->MorphWeapon = FName(z); -} - -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, flechettetype, S, PlayerPawn) -{ - PROP_STRING_PARM(str, 0); - defaults->FlechetteType = FindClassTentative(str, PClass::FindActor("ArtiPoisonBag")); -} - //========================================================================== // //========================================================================== @@ -2562,15 +1729,6 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, hexenarmor, FFFFF, PlayerPawn) } } -//========================================================================== -// -//========================================================================== -DEFINE_CLASS_PROPERTY_PREFIX(player, portrait, S, PlayerPawn) -{ - PROP_STRING_PARM(val, 0); - defaults->Portrait = val; -} - //========================================================================== // //========================================================================== diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index bcada45cf..e36e59df3 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1959,6 +1959,11 @@ void ZCCCompiler::DispatchScriptProperty(PProperty *prop, ZCC_PropertyStmt *prop for (auto f : prop->Variables) { void *addr; + if (f == nullptr) + { + // This variable was missing. The error had been reported for the property itself already. + return; + } if (f->Flags & VARF_Meta) { diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index a2ef3a8b2..409b90c92 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -231,6 +231,57 @@ class Actor : Thinker native Property GibHealth: GibHealth; Property DeathHeight: DeathHeight; Property BurnHeight: BurnHeight; + property Health: health; + property WoundHealth: WoundHealth; + property ReactionTime: reactiontime; + property PainThreshold: PainThreshold; + property DamageMultiply: DamageMultiply; + property ProjectileKickback: ProjectileKickback; + property Speed: speed; + property FloatSpeed: FloatSpeed; + property Radius: radius; + property RenderRadius: RenderRadius; + property Height: height; + property ProjectilePassHeight: ProjectilePassHeight; + property Mass: mass; + property XScale: ScaleX; + property YScale: ScaleY; + property SeeSound: SeeSound; + property AttackSound: AttackSound; + property BounceSound: BounceSound; + property WallBounceSound: WallBounceSound; + property PainSound: PainSound; + property DeathSound: DeathSound; + property ActiveSound: ActiveSound; + property CrushPainSound: CrushPainSound; + property Alpha: Alpha; + property MaxTargetRange: MaxTargetRange; + property MeleeThreshold: MeleeThreshold; + property MeleeRange: MeleeRange; + property PushFactor: PushFactor; + property BounceCount: BounceCount; + property WeaveIndexXY: WeaveIndexXY; + property WeaveIndexZ: WeaveIndexZ; + property MinMissileChance: MinMissileChance; + property MaxStepHeight: MaxStepHeight; + property MaxDropoffHeight: MaxDropoffHeight; + property PoisonDamageType: PoisonDamageType; + property RadiusDamageFactor: RadiusDamageFactor; + property SelfDamageFactor: SelfDamageFactor; + property StealthAlpha: StealthAlpha; + property CameraHeight: CameraHeight; + property VSpeed: velz; + property SpriteRotation: SpriteRotation; + property VisibleAngles: VisibleStartAngle, VisibleEndAngle; + property VisiblePitch: VisibleStartPitch, VisibleEndPitch; + property Species: Species; + property Accuracy: accuracy; + property Stamina: stamina; + property TelefogSourceType: TelefogSourceType; + property TelefogDestType: TelefogDestType; + property Ripperlevel: RipperLevel; + property RipLevelMin: RipLevelMin; + property RipLevelMax: RipLevelMax; // need some definition work first //FRenderStyle RenderStyle; diff --git a/wadsrc/static/zscript/inventory/inventory.txt b/wadsrc/static/zscript/inventory/inventory.txt index 722f3158b..48a88bc32 100644 --- a/wadsrc/static/zscript/inventory/inventory.txt +++ b/wadsrc/static/zscript/inventory/inventory.txt @@ -26,9 +26,16 @@ class Inventory : Actor native meta String PickupMsg; meta int GiveQuest; - Property PickupMessage: PickupMsg; - Property GiveQuest: GiveQuest; - + property PickupMessage: PickupMsg; + property GiveQuest: GiveQuest; + property Amount: Amount; + property InterHubAmount: InterHubAmount; + property MaxAmount: MaxAmount; + property PickupFlash: PickupFlash; + property PickupSound: PickupSound; + property UseSound: UseSound; + property RespawnTics: RespawnTics; + Default { Inventory.Amount 1; diff --git a/wadsrc/static/zscript/inventory/weapons.txt b/wadsrc/static/zscript/inventory/weapons.txt index 860d387e2..97f4142e6 100644 --- a/wadsrc/static/zscript/inventory/weapons.txt +++ b/wadsrc/static/zscript/inventory/weapons.txt @@ -35,6 +35,26 @@ class Weapon : StateProvider native native bool GivenAsMorphWeapon; native bool bAltFire; // Set when this weapon's alternate fire is used. native readonly bool bDehAmmo; + native readonly int SlotNumber; + + property AmmoGive: AmmoGive1; + property AmmoGive1: AmmoGive1; + property AmmoGive2: AmmoGive2; + property AmmoUse: AmmoUse1; + property AmmoUse1: AmmoUse1; + property AmmoUse2: AmmoUse2; + property Kickback: Kickback; + property ReadySound: ReadySound; + property SelectionOrder: SelectionOrder; + property MinSelectionAmmo1: MinSelAmmo1; + property MinSelectionAmmo2: MinSelAmmo2; + property SisterWeapon: SisterWeaponType; + property UpSound: UpSound; + property YAdjust: YAdjust; + property BobSpeed: BobSpeed; + property BobRangeX: BobRangeX; + property BobRangeY: BobRangeY; + property SlotNumber: SlotNumber; Default {