QuoteMay 1
Mechanoid raids.Created charge blaster and inferno cannon weapons for mechanoids.
Having a look at the changelog and I saw this.
Don't know about you, but inferno cannon sounds terrifying to me.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteMay 1
Mechanoid raids.Created charge blaster and inferno cannon weapons for mechanoids.
public void rotateToInterface()
{
foreach (IntVec3 adj in GenAdj.AdjacentSquaresCardinalInBounds(Position))
{
foreach (Thing thing in Find.Grids.ThingsAt(adj))
{
Building temp = thing as Building;
if (temp != null)
{
if (temp.canConnect) // change this to be the correct 'rotation' restriction (eg, is nutrient past dispenser)
{
this.rotation = getConnectingSide(this.Position, temp.Position);
}
}
}
}
}
public IntRot getConnectingSide(IntVec3 child, IntVec3 parent)
{
// x = left/right map
// y = up/down layer
// z = up/down map
if (parent.x > child.x) return IntRot.east;
if (parent.x < child.x) return IntRot.west;
if (parent.z > child.z) return IntRot.north;
return IntRot.south;
}
<fixedStorageSettings>
<priority>Normal</priority>
<allowances>
<categories>
<li>Manufactured</li>
<li>ResourcesRaw</li>
</categories>
</allowances>
</fixedStorageSettings>
<defaultStorageSettings>
<priority>Normal</priority>
<allowances>
<categories>
<li>Manufactured</li>
<li>ResourcesRaw</li>
</categories>
</allowances>
</defaultStorageSettings>
<inspectorTabs>
<li>UI.ITab_Storage</li>
</inspectorTabs>
public class Accessor : DBuilding, SlotGroupParent
{
public Enum.accessorMode mode
{
get
{
return ((Digitisation.AccessorProperties)def).mode;
}
}
public int speed
{
get
{
return ((Digitisation.AccessorProperties)def).speed;
}
}
public ThingDef item;
public StorageSettings settings;
public SlotGroup slotGroup;
private List<IntVec3> cachedOccupiedSquares;
public override void SpawnSetup()
{
base.SpawnSetup();
slotGroup = new SlotGroup(this);
cachedOccupiedSquares = this.AllSlotSquares().ToList<IntVec3>();
}
public override void PostMake()
{
base.PostMake();
settings = new StorageSettings(this);
if (def.defaultStorageSettings != null)
settings.CopyFrom(def.defaultStorageSettings);
}
public override void Tick()
{
base.Tick();
}
public override void ExposeData()
{
base.ExposeData();
Scribe_Deep.LookDeep<StorageSettings>(ref settings, "settings", this);
}
public override void Destroy()
{
slotGroup.Notify_ParentDestroying();
base.Destroy();
}
public virtual IEnumerable<IntVec3> AllSlotSquares()
{
foreach (IntVec3 sq in GenAdj.SquaresOccupiedBy(this))
{
yield return sq;
}
}
public List<IntVec3> AllSlotSquaresListFast()
{
return cachedOccupiedSquares;
}
public StorageSettings GetParentStoreSettings()
{
return def.fixedStorageSettings;
}
public StorageSettings GetStoreSettings()
{
return settings;
}
public void Notify_LostThing(Thing newItem)
{
}
public void Notify_ReceivedThing(Thing newItem)
{
}
public string SlotYielderLabel()
{
return Label;
}
InvalidCastException: Cannot cast from source type to destination type.
at UI.ITab_Storage.FillTab () [0x00000] in <filename unknown>:0
at UI.ITab.DoTabGui () [0x00000] in <filename unknown>:0
at UI.InspectPane.DoTabs (IEnumerable`1 tabs) [0x00000] in <filename unknown>:0
at UI.InspectPane.InspectPaneOnGUI () [0x00000] in <filename unknown>:0
at UI.TabInspect.PanelOnGUI (Rect fillRect) [0x00000] in <filename unknown>:0
at UI.UIPanel.PanelOnGUI () [0x00000] in <filename unknown>:0
at UI.MainTabsRoot.GameControlsOnGUI () [0x00000] in <filename unknown>:0
at UI.UIMapRoot.UIRootOnGUI () [0x00000] in <filename unknown>:0
at Root.OnGUI () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
switch (maxMeshCount)
{
case 1:
num3 = 1;
goto IL_F3;
case 2:
case 3:
IL_96:
if (maxMeshCount == 9)
{
num3 = 3;
goto IL_F3;
}
if (maxMeshCount == 16)
{
num3 = 4;
goto IL_F3;
}
if (maxMeshCount != 32)
{
Log.Error(this.def + " must have plant.MaxMeshCount that is a perfect square.");
goto IL_F3;
}
num3 = 5;
goto IL_F3;
case 4:
num3 = 2;
goto IL_F3;
}
goto IL_96;