Closed xAstroBoy closed 5 months ago
See #236
Yeah but still works if you try to overlap multiple objects together
What does that mean?
What does that mean?
The patch fixed just you cannot build outside the ship, yet inside you can still put multiple stuff overlapped on themself, build everywhere should be renamed no build constraints, which still is similiar
Sure, I'll add it back in with a new name.
@winstxnhdw your nullcheck is not working, still breaks the build, just add if(foo != null) and is a easy fix..
no, i just used the wrong conditional like an idiot
Anyways, this is a very good time to reflect the use of IsNotNull
. It used to be helpful at the start to handle fake nulls but now it has become a burden. It doesn't even provide type guard intellisense.
I think from here onwards, I'll prefer the following style.
if (___placingObject.Unfake() is not PlaceableShipObject placingObject) return true;
But you are right, it really does look like this is the best way to write it here
static bool Prefix(ref bool __result, ref bool ___CanConfirmPosition, ref PlaceableShipObject? ___placingObject) {
if (___placingObject == null) return true;
___placingObject.AllowPlacementOnCounters = true;
___placingObject.AllowPlacementOnWalls = true;
___CanConfirmPosition = true;
__result = Helper.LocalPlayer?.inTerminalMenu is false;
return false;
}
I dont get why it got removed, i reverted the removal and is still working