The Wait Is Over. (#49)

* Move submodule to Godot

* Update submodule AGAIN.

* Update project files.

* Remove WearableAnimatedSprite from prototypes.

* Remove content repo resource copier.

* Update submodule.

* Fix resource handling.

* Content.Client compiles by commenting out hands GUI.

* Update submodule.

* Fix prototype textures and update submodule.

* Update Submodule.

* Update submodule SOME MORE!

* Random WiP shit I guess

* Make omnisharp not choke on buildchecker.

* Update submodule.

* Highly WiP broken HandsGui code.

* Ok maybe let's not insult omnisharp.

* Fix annoying Omnisharp warning.

* Update submodule.

* Update submodule.

* Hey I forgot to push this but it didn't conflict!

* Fix hands GUI on godot.

* Update submodule.

* Obligatory submodule update.

* Work on exports.

* Work on exports.

* Update submodule.

* Update submodule.

* Fix dumb case mismatch between content and engine

* work pls.

* This maybe.

* Now!

* Update submodule.

* update submodule.

* Some WiP work on exporting aaah.

* OK READY FOR THE BUILDS SERVER.

* Probably should've made those commits in a different order.

* DO THE THING

* update submodule.

* Updates for effects system.

* Update submodule.

* Make file/line numbers show up on Windows Godot.

* Set submodule to master.
This commit is contained in:
Pieter-Jan Briers
2018-04-07 15:31:38 +02:00
committed by GitHub
parent 128728bfcb
commit 6704245a41
46 changed files with 579 additions and 668 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -11,33 +11,42 @@
<AssemblyName>Content.Server</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ContentAssemblyTarget>..\bin\Server\Resources\Assemblies\</ContentAssemblyTarget>
<ContentAssemblyTarget>..\engine\bin\Server\Resources\Assemblies\</ContentAssemblyTarget>
<OutputPath>..\bin\Content.Server\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(ActualOS)' == 'Windows'">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RELEASE</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RELEASE</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;RELEASE</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -126,5 +135,4 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
</Project>
</Project>

View File

@@ -17,43 +17,45 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan
{
public override string Name => "HitscanWeapon";
string spritename = "laser";
string spritename = "Objects/laser.png";
protected override void Fire(IEntity user, LocalCoordinates clicklocation)
{
var userposition = user.GetComponent<TransformComponent>().WorldPosition; //Remember world positions are ephemeral and can only be used instantaneously
var angle = new Angle(clicklocation.Position - userposition);
var theta = angle.Theta;
var ray = new Ray(userposition, angle.ToVec());
var raycastresults = IoCManager.Resolve<ICollisionManager>().IntersectRay(ray, 20, Owner.GetComponent<TransformComponent>().GetMapTransform().Owner);
Hit(raycastresults);
AfterEffects(user, raycastresults, theta);
AfterEffects(user, raycastresults, angle);
}
protected virtual void Hit(RayCastResults ray)
{
if(ray.HitEntity != null && ray.HitEntity.TryGetComponent(out DamageableComponent damage))
if (ray.HitEntity != null && ray.HitEntity.TryGetComponent(out DamageableComponent damage))
{
damage.TakeDamage(DamageType.Heat, 10);
}
}
protected virtual void AfterEffects(IEntity user, RayCastResults ray, double theta)
protected virtual void AfterEffects(IEntity user, RayCastResults ray, Angle angle)
{
var time = IoCManager.Resolve<IGameTiming>().CurTime;
var offset = angle.ToVec() * ray.Distance / 2;
EffectSystemMessage message = new EffectSystemMessage
{
EffectSprite = spritename,
Born = time,
DeathTime = time + TimeSpan.FromSeconds(1),
Size = new Vector2(ray.Distance, 1f),
Coordinates = user.GetComponent<TransformComponent>().LocalPosition,
Coordinates = user.GetComponent<TransformComponent>().LocalPosition.Translated(offset),
//Rotated from east facing
Rotation = (float)theta,
Rotation = (float)angle.Theta,
ColorDelta = new Vector4(0, 0, 0, -1500f),
Color = new Vector4(255,255,255,750)
Color = new Vector4(255, 255, 255, 750),
Shaded = false
};
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<EffectSystem>().CreateParticle(message);
}

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="3.0.0-pre" targetFramework="net451" />
<package id="System.ValueTuple" version="4.3.1" targetFramework="net451" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net451" />
<package id="YamlDotNet" version="4.3.0" targetFramework="net451" />
</packages>
</packages>