// Token: 0x06000014 RID: 20 RVA: 0x000027AC File Offset: 0x000017AC public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3 loc, Rot4 rot, Map map, Thing thingToIgnore = null, Thing thing = null) { AcceptanceReport result; if (Util_sd_bridges.IsAquaticTerrain(map, loc) && Util_sd_bridges.IsAquaticTerrain(map, loc + new IntVec3(0, 0, 1).RotatedBy(rot))) { result = AcceptanceReport.WasAccepted; } else { result = new AcceptanceReport(Translator.Translate("sd_bridges_placeworker_drawbridge_desc")); } return(result); }
// Token: 0x0600001D RID: 29 RVA: 0x00002BE8 File Offset: 0x00001BE8 public override void SpawnDrawbridge() { Map map = base.Map; IntVec3 position = base.Position; Rot4 rotation = base.Rotation; if (Util_sd_bridges.IsAquaticTerrain(map, position) && Util_sd_bridges.IsAquaticTerrain(map, position + new IntVec3(0, 0, 1).RotatedBy(rotation))) { Thing thing = ThingMaker.MakeThing(Building_sd_bridges_drawbridge.sd_bridges_drawbridge_down, base.Stuff); thing.SetFactionDirect(base.Faction); thing.HitPoints = HitPoints; this.DestroyedOrNull(); DoDustPuff(); GenSpawn.Spawn(thing, base.Position, map, base.Rotation, WipeMode.Vanish, false); } else { Messages.Message(Translator.Translate("sd_bridges_drawbridge_not_both_water"), MessageTypeDefOf.CautionInput, true); SoundDefOf.Designate_Failed.PlayOneShotOnCamera(null); } }