Difference between revisions of "TS3PR/SimIFace/Sims3.SimIFace/AdditionalSlotPlacementCheckResults"
From SimsWiki
< TS3PR | SimIFace | Sims3.SimIFace
(Added AdditionalSlotPLacementCheckResult in it's own page!) |
(Now has the correct path :p) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
A helper class that checks slots and see if they're valid. This goes from Lots to objects, so is broadly used. You don't need to add this check per se though whenever you're making a script mod for an object, since the GameObject class already takes care of that ;) | A helper class that checks slots and see if they're valid. This goes from Lots to objects, so is broadly used. You don't need to add this check per se though whenever you're making a script mod for an object, since the GameObject class already takes care of that ;) | ||
− | + | ==Used primarily by:== | |
− | *Sims3.Gameplay.Abstracts.GameObject | + | |
+ | *[[TS3PR/Sims3GameplaySystems/Sims3.Gameplay.Abstracts/GameObject/ | Sims3.Gameplay.Abstracts.GameObject]] | ||
+ | |||
+ | ==Code== | ||
<pre> | <pre> |
Latest revision as of 17:20, 1 February 2021
A helper class that checks slots and see if they're valid. This goes from Lots to objects, so is broadly used. You don't need to add this check per se though whenever you're making a script mod for an object, since the GameObject class already takes care of that ;)
[edit] Used primarily by:
[edit] Code
public class AdditionalSlotPlacementCheckResults { public SlotPlacementCheckResults mResults; public bool IsCompatibleUpgrade { get { return SlotPlacementCheckResults.Invalid != (mResults & SlotPlacementCheckResults.CompatibleUpgrade); } set { if (value) { mResults |= SlotPlacementCheckResults.CompatibleUpgrade; } else { mResults &= ~SlotPlacementCheckResults.CompatibleUpgrade; } } } public bool IgnoreSlotPlacementFlags { get { return SlotPlacementCheckResults.Invalid != (mResults & SlotPlacementCheckResults.OverrideSlotPlacementFlags); } set { if (value) { mResults |= SlotPlacementCheckResults.OverrideSlotPlacementFlags; } else { mResults &= ~SlotPlacementCheckResults.OverrideSlotPlacementFlags; } } } public bool IgnoreIntersectionCheck { get { return SlotPlacementCheckResults.Invalid != (mResults & SlotPlacementCheckResults.OverrideIntersectionCheck); } set { if (value) { mResults |= SlotPlacementCheckResults.OverrideIntersectionCheck; } else { mResults &= ~SlotPlacementCheckResults.OverrideIntersectionCheck; } } } public bool CacheResult { get { return SlotPlacementCheckResults.Invalid == (mResults & SlotPlacementCheckResults.DoNotCacheResult); } set { if (!value) { mResults |= SlotPlacementCheckResults.DoNotCacheResult; } else { mResults &= ~SlotPlacementCheckResults.DoNotCacheResult; } } } public SlotPlacementCheckResults GetResults() { return mResults; } }