Skip to content

Commit

Permalink
Update for Plazas and Promenades (#280)
Browse files Browse the repository at this point in the history
- Some radio stations were moved to different bitmap
- Change ApplyBrush method parameters
- Update release notes
Fixes #279
  • Loading branch information
kaenganxt authored Sep 14, 2022
1 parent 9df6643 commit 840a3c6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/basegame/Injections/DistrictHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ public static void Postfix(bool __result, ref byte district)

[HarmonyPatch(typeof(DistrictTool))]
[HarmonyPatch("ApplyBrush")]
[HarmonyPatch(new Type[] { typeof(DistrictTool.Layer), typeof(byte), typeof(float), typeof(Vector3), typeof(Vector3) })]
[HarmonyPatch(new Type[] { typeof(DistrictTool.Layer), typeof(byte), typeof(float), typeof(Vector3), typeof(Vector3), typeof(bool) })]
public class ApplyBrush
{
public static void Postfix(DistrictTool.Layer layer, byte district, float brushRadius, Vector3 startPosition, Vector3 endPosition)
public static void Postfix(DistrictTool.Layer layer, byte districtOrPark, float brushRadius, Vector3 startPosition, Vector3 endPosition)
{
if (!IgnoreHelper.Instance.IsIgnored())
{
Command.SendToAll(new DistrictAreaModifyCommand
{
Layer = layer,
District = district,
District = districtOrPark,
BrushRadius = brushRadius,
StartPosition = startPosition,
EndPosition = endPosition
Expand Down
4 changes: 2 additions & 2 deletions src/basegame/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public static void PatchAll()
harmony.PatchAll(typeof(BaseGameConnection).Assembly);
Log.Info("[CSM BaseGame] Patched!");
}
catch (Exception)
catch (Exception e)
{
Log.Info("[CSM BaseGame] Patching failed");
Log.Error("[CSM BaseGame] Patching failed: ", e);
}
}

Expand Down
7 changes: 2 additions & 5 deletions src/csm/Helpers/DLCHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ namespace CSM.Helpers
public static class DLCHelper
{
private const SteamHelper.DLC_BitMask RadioStations = SteamHelper.DLC_BitMask.RadioStation1 |
SteamHelper.DLC_BitMask.RadioStation2 |
SteamHelper.DLC_BitMask.RadioStation3 |
SteamHelper.DLC_BitMask.RadioStation4 |
SteamHelper.DLC_BitMask.RadioStation5;
// Only need to check 1 - 5 as others are
SteamHelper.DLC_BitMask.RadioStation2;
// Only need to check 1 and 2 as others are
// in BitMask2 which we ignore completely.

private static SteamHelper.DLC_BitMask RemoveRadioStations(SteamHelper.DLC_BitMask bitmask)
Expand Down
20 changes: 15 additions & 5 deletions src/csm/Panels/MessagePanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,21 @@ public void DisplayReleaseNotes()
Version version = Assembly.GetAssembly(typeof(CSM)).GetName().Version;

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

Show(true);
Expand Down

0 comments on commit 840a3c6

Please sign in to comment.