From f1218127f854343cb9a1ecba8464904f43354b5c Mon Sep 17 00:00:00 2001 From: helado de brownie Date: Mon, 27 Jul 2020 17:25:41 -0400 Subject: [PATCH] update to work with new version --- .gitignore | 3 ++ Baja Blast.csproj | 10 +++++ LiquidBajaBlast.cs | 91 +++++++++++++++------------------------------- README.markdown | 7 ++-- Spoilers.markdown | 10 +++-- workshop.json | 9 ++++- 6 files changed, 61 insertions(+), 69 deletions(-) create mode 100644 .gitignore create mode 100644 Baja Blast.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99b640b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin/ +obj/ +Assembly-CSharp.dll diff --git a/Baja Blast.csproj b/Baja Blast.csproj new file mode 100644 index 0000000..5ac28f4 --- /dev/null +++ b/Baja Blast.csproj @@ -0,0 +1,10 @@ + + + netstandard2.0 + false + + + + + + diff --git a/LiquidBajaBlast.cs b/LiquidBajaBlast.cs index 157674d..f9b855e 100644 --- a/LiquidBajaBlast.cs +++ b/LiquidBajaBlast.cs @@ -1,64 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Text; -using XRL.Liquids; -using XRL.World; using XRL.World.Parts; -namespace XRL.Liquids { +namespace XRL.Liquids +{ [IsLiquid] - public class LiquidBajaBlast : BaseLiquid { - private static BaseLiquid Convalessence = LiquidVolume.getLiquid ("convalessence"); - - public LiquidBajaBlast () : base (Convalessence.ID, Convalessence.FlameTemperature, Convalessence.VaporTemperature, Convalessence.Cooling) {} - - public override void BeforeRender (LiquidVolume Liquid, Event eRender) { - Convalessence.BeforeRender (Liquid, eRender); } - - public override void BeforeRenderSecondary (LiquidVolume Liquid, Event eRender) { - Convalessence.BeforeRenderSecondary (Liquid, eRender); } - - public override bool Drank (LiquidVolume Liquid, int Volume, GameObject Target, StringBuilder Message, ref bool ExitInterface) { - return Convalessence.Drank (Liquid, Volume, Target, Message, ref ExitInterface); } - - public override bool Froze (LiquidVolume Liquid) { - return Convalessence.Froze (Liquid); } - - public override string GetAdjective (LiquidVolume Liquid) { - if (Liquid == null || Liquid.ComponentLiquids [Convalessence.ID] > 0) { - return "&Cbaja"; } - else { - return null; } } - - public override string GetColor () { - return Convalessence.GetColor (); } - - public override List GetColors () { - return Convalessence.GetColors (); } - - public override string GetName (LiquidVolume _) { - return "&Cbaja blast"; } - - public override int GetNavigationWeight (LiquidVolume Liquid, GameObject GO, bool Smart, bool Slimewalking, ref bool Uncacheable) { - return Convalessence.GetNavigationWeight (Liquid, GO, Smart, Slimewalking, ref Uncacheable); } - - public override string GetPreparedCookingIngredient () { - return Convalessence.GetPreparedCookingIngredient (); } - - public override string GetSmearedName (LiquidVolume _) { - return "&Cbaja"; } - - public override void ObjectInCell (LiquidVolume Liquid, GameObject GO) { - Convalessence.ObjectInCell (Liquid, GO); } - - public override void RenderBackground (LiquidVolume Liquid, RenderEvent eRender) { - Convalessence.RenderBackground (Liquid, eRender); } - - public override void RenderPrimary (LiquidVolume Liquid, RenderEvent eRender) { - Convalessence.RenderPrimary (Liquid, eRender); } - - public override void RenderSecondary (LiquidVolume Liquid, RenderEvent eRender) { - Convalessence.RenderSecondary (Liquid, eRender); } - - public override void RenderSmearPrimary (LiquidVolume Liquid, RenderEvent eRender) { - Convalessence.RenderSmearPrimary (Liquid, eRender); } } } + [System.Serializable] + public class LiquidBajaBlast : LiquidConvalessence + { + public const string NAME = "{{C|baja blast}}"; + public const string ADJECTIVE = "{{C|baja}}"; + public const string STAINED_NAME = "{{C|baja-blast}}"; + + public override string GetAdjective(LiquidVolume _) + { + return ADJECTIVE; + } + + public override string GetName(LiquidVolume _) + { + return NAME; + } + + public override string GetSmearedName(LiquidVolume _) + { + return ADJECTIVE; + } + + public override string GetStainedName(LiquidVolume _) + { + return STAINED_NAME; + } + } +} diff --git a/README.markdown b/README.markdown index 43b1a14..51092f0 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,5 @@ -This purely cosmetic mod “adds” baja blast to the game. (It was already in the -game under the name of convalessence.) +Baja Blast is a cosmetic Caves of Qud mod that clarifies the truth of convalessence: That it is baja blast. -Official repository: https://github.com/HeladoDeBrownie/Caves-of-Qud-Baja-Blast +The latest release was tested with Caves of Qud version 2.0.201.5. + +See [the spoilers](Spoilers.markdown) for more information. diff --git a/Spoilers.markdown b/Spoilers.markdown index 5577e9e..36ebd41 100644 --- a/Spoilers.markdown +++ b/Spoilers.markdown @@ -1,4 +1,6 @@ -- Convalessence is now called `baja blast`. -- An object that has had baja blast poured on it is described as `baja`. -- A mixture in which baja blast is not the primary liquid is described as `baja`. -- There are no functional changes. Baja blast acts just like convalessence. +In total, this mod: + +* renames convalessence to “baja blast”; +* changes the adjective for convalessence to “baja”; +* changes the smeared name for convalessence to “baja”; +* and changes the stained name for convalessence to “baja-blast” (as in “baja-blast-stained”; this probably doesn't matter since convalessence doesn't stain). diff --git a/workshop.json b/workshop.json index 2812f2f..54fecb9 100644 --- a/workshop.json +++ b/workshop.json @@ -1 +1,8 @@ -{"workshopId":1798541850,"Title":"Baja Blast","Description":"This purely cosmetic mod “adds” baja blast to the game. (It was already in the game under the name of convalessence.)\n\nOfficial repository: https://github.com/HeladoDeBrownie/Caves-of-Qud-Baja-Blast","Tags":"cosmetic,scripting","Visibility":"2","ImagePath":"preview.png"} \ No newline at end of file +{ + "workshopId": 1798541850, + "Title": "Baja Blast", + "Description": "Baja Blast is a cosmetic Caves of Qud mod that clarifies the truth of convalessence: That it is baja blast.\n\nThe latest release was tested with Caves of Qud version 2.0.201.5.\n\nSee spoilers and more at: https://github.com/HeladoDeBrownie/Caves-of-Qud-Baja-Blast", + "Tags": "Cosmetic,Liquid,Script", + "Visibility": "2", + "ImagePath": "preview.png" +}