TG sync Sunday (#201)

* stage one

* datums and shit

* game stuff

* modules

* tgstation.dme

* tools

* these things for icons

* compiling fixes

* merge spree on TG

* other updates

* updated maps with deepfryers

* My helpers were not helping
This commit is contained in:
Poojawa
2017-02-06 00:36:56 -06:00
committed by GitHub
parent aeeca195c7
commit 73b6b33f79
279 changed files with 3548 additions and 2585 deletions
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9799169C-0C95-4873-B6B5-211E007A15F4}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DMTreeToGlobalsList</RootNamespace>
<AssemblyName>DMTreeToGlobalsList</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
+65
View File
@@ -0,0 +1,65 @@
using System;
using System.IO;
using System.Xml;
namespace DMTreeToGlobalsList
{
class Program
{
static void Main(string[] args)
{
if (args.Length < 1 || !File.Exists(args[0]))
{
Console.WriteLine("Usage: DMTreeToGlobalsList.exe <path to code tree xml> [Prefix] [Postfix]");
return;
}
var XMLPath = args[0];
string Prefix = "", Postfix = "";
if (args.Length > 1)
{
Prefix = args[1];
if (args.Length > 2)
Postfix = args[2];
}
XmlDocument Doc;
using (var FS = new FileStream(XMLPath, FileMode.Open, FileAccess.Read))
{
try
{
while (FS.ReadByte() != '<') ;
}
catch
{
Console.WriteLine("Failed to find start point of XML in output");
return;
}
FS.Seek(-1, SeekOrigin.Current);
Doc = new XmlDocument();
try
{
Doc.Load(FS);
}
catch
{
Console.WriteLine("Failed to load the XML document");
return;
}
}
try
{
var DMNode = Doc.ChildNodes[1];
foreach (XmlNode Child in DMNode.ChildNodes)
if (Child.Name == "var")
Console.WriteLine(Prefix + Child.FirstChild.Value.Trim() + Postfix);
}
catch
{
Console.WriteLine("Failed parsing the XML");
return;
}
}
}
}
+21 -1
View File
@@ -253,6 +253,9 @@ def get_map_raw_text(mapfile):
return reading.read()
def parse_map(map_raw_text): #still does not support more than one z level per file, but should parse any format
in_comment_line = False
comment_trigger = False
in_quote_block = False
in_key_block = False
in_data_block = False
@@ -289,9 +292,26 @@ def parse_map(map_raw_text): #still does not support more than one z level per f
if not in_map_block:
if char == "\n" or char == "\t":
if char == "\n":
in_comment_line = False
comment_trigger = False
continue
if in_comment_line:
continue
if char == "\t":
continue
if char == "/" and not in_quote_block:
if comment_trigger:
in_comment_line = True
continue
else:
comment_trigger = True
else:
comment_trigger = False
if in_data_block:
if in_varedit_block:
+2 -2
View File
@@ -17,10 +17,10 @@ def tgm_check(map_file):
def save_map(map_data,filepath,tgm=False):
map_data['dictionary'] = map_helpers.sort_dictionary(map_data['dictionary'])
if tgm:
map_helpers.write_dictionary_tgm(filepath, map_data['dictionary'])
map_helpers.write_dictionary_tgm(filepath, map_data['dictionary'],None)
map_helpers.write_grid_coord_small(filepath, map_data['grid'], map_data['maxx'], map_data['maxy'])
else:
map_helpers.write_dictionary(filepath, map_data['dictionary'])
map_helpers.write_dictionary(filepath, map_data['dictionary'],None)
map_helpers.write_grid(filepath, map_data['grid'], map_data['maxx'], map_data['maxy'])
def update_all_maps(update_file=None, update_string=None, map_directory=None, verbose=False):
+5 -1
View File
@@ -7,5 +7,9 @@ shopt -s globstar
if [ "$BUILD_TOOLS" = false ]; then
(! grep 'step_[xy]' _maps/**/*.dmm)
source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
tools/travis/dm.sh -DTRAVISBUILDING -M${DM_MAPFILE} tgstation.dme
if [ "$BUILD_TESTING" = true ]; then
tools/travis/dm.sh -DTRAVISBUILDING -M${DM_MAPFILE} tgstation.dme
else
tools/travis/dm.sh -DTRAVISBUILDING -DTRAVISTESTING -Mruntimestation tgstation.dme
fi;
fi;