Skip to content

Commit 840a3c6

Browse files
authored
Update for Plazas and Promenades (#280)
- Some radio stations were moved to different bitmap - Change ApplyBrush method parameters - Update release notes Fixes #279
1 parent 9df6643 commit 840a3c6

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

src/basegame/Injections/DistrictHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ public static void Postfix(bool __result, ref byte district)
3232

3333
[HarmonyPatch(typeof(DistrictTool))]
3434
[HarmonyPatch("ApplyBrush")]
35-
[HarmonyPatch(new Type[] { typeof(DistrictTool.Layer), typeof(byte), typeof(float), typeof(Vector3), typeof(Vector3) })]
35+
[HarmonyPatch(new Type[] { typeof(DistrictTool.Layer), typeof(byte), typeof(float), typeof(Vector3), typeof(Vector3), typeof(bool) })]
3636
public class ApplyBrush
3737
{
38-
public static void Postfix(DistrictTool.Layer layer, byte district, float brushRadius, Vector3 startPosition, Vector3 endPosition)
38+
public static void Postfix(DistrictTool.Layer layer, byte districtOrPark, float brushRadius, Vector3 startPosition, Vector3 endPosition)
3939
{
4040
if (!IgnoreHelper.Instance.IsIgnored())
4141
{
4242
Command.SendToAll(new DistrictAreaModifyCommand
4343
{
4444
Layer = layer,
45-
District = district,
45+
District = districtOrPark,
4646
BrushRadius = brushRadius,
4747
StartPosition = startPosition,
4848
EndPosition = endPosition

src/basegame/Patcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public static void PatchAll()
1616
harmony.PatchAll(typeof(BaseGameConnection).Assembly);
1717
Log.Info("[CSM BaseGame] Patched!");
1818
}
19-
catch (Exception)
19+
catch (Exception e)
2020
{
21-
Log.Info("[CSM BaseGame] Patching failed");
21+
Log.Error("[CSM BaseGame] Patching failed: ", e);
2222
}
2323
}
2424

src/csm/Helpers/DLCHelper.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ namespace CSM.Helpers
33
public static class DLCHelper
44
{
55
private const SteamHelper.DLC_BitMask RadioStations = SteamHelper.DLC_BitMask.RadioStation1 |
6-
SteamHelper.DLC_BitMask.RadioStation2 |
7-
SteamHelper.DLC_BitMask.RadioStation3 |
8-
SteamHelper.DLC_BitMask.RadioStation4 |
9-
SteamHelper.DLC_BitMask.RadioStation5;
10-
// Only need to check 1 - 5 as others are
6+
SteamHelper.DLC_BitMask.RadioStation2;
7+
// Only need to check 1 and 2 as others are
118
// in BitMask2 which we ignore completely.
129

1310
private static SteamHelper.DLC_BitMask RemoveRadioStations(SteamHelper.DLC_BitMask bitmask)

src/csm/Panels/MessagePanel.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,21 @@ public void DisplayReleaseNotes()
177177
Version version = Assembly.GetAssembly(typeof(CSM)).GetName().Version;
178178

179179
string message = $"Version {version.Major}.{version.Minor}\n" +
180-
$"Last Update: January 28th, 2022\n\n" +
181-
"- Fixes:\n" +
182-
" - Support Airports Update. Note\n" +
183-
" that not all new features are" +
184-
" supported for now!\n";
180+
"Last Update: September 15th, 2022\n\n" +
181+
"- Features:\n" +
182+
" - Support Plazas Update\n" +
183+
" - Sync soil trade\n" +
184+
" - Sync street tree upgrades\n" +
185+
" - Sync changed service vehicles\n" +
186+
" - Add check if server is\n" +
187+
" reachable from the internet\n" +
188+
" - Add check for updates\n" +
189+
" - Add modding API\n" +
190+
" - Assets and supported mods need to be\n" +
191+
" equal to the server's when joining\n" +
192+
" - Fixes:\n" +
193+
" - Support more screen resolutions\n" +
194+
" - Support LoadingScreenMod\n";
185195
SetMessage(message);
186196

187197
Show(true);

0 commit comments

Comments
 (0)