Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatboy unit detach bug + exFac footprint fix #6192

Merged
merged 5 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/snippets/fix.6192.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(#6192) Removes an erroneous structure footprint from the dummy unit of external factories

(#6192) Fix a bug where deploying when building a unit in the external factory would detach the unit under construction
- Applies to/is fixed in the fatboy, but any non-carrier external factory with deploy capability would have this issue
12 changes: 12 additions & 0 deletions units/UEL0401/UEL0401_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ UEL0401 = ClassUnit(TMobileFactoryUnit, ExternalFactoryComponent) {
end
end,

---Fixes a bug with external factories where ordering "deploy" will detach the unit under construction
---@param self UEL0401
---@param attachBone string
---@param unit Unit
OnTransportDetach = function(self, attachBone, unit)
if not self.Dead and not unit.Dead and unit:GetFractionComplete() < 1.0 then
unit:AttachBoneTo(-2, self, attachBone)
else
TMobileFactoryUnit.OnTransportDetach(self, attachBone, unit)
end
end,

IdleState = State {
---@param self UEL0401
---@param unitBeingBuilt Unit
Expand Down
25 changes: 5 additions & 20 deletions units/ZXA0003/ZXA0003_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,18 @@ UnitBlueprint{
Economy = {
Garanas marked this conversation as resolved.
Show resolved Hide resolved
BuildCostEnergy = 0,
BuildCostMass = 0,
BuildRate = 0.0001,
BuildTime = 0,
MaxBuildDistance = 100,
},
Footprint = {
MaxSlope = 0.25,
SizeX = 1,
SizeZ = 1,
},
General = {
CapCost = 0,
Category = '',
SelectionPriority = 3,
},
Intel = { VisionRadius = 0 },
Physics = {
BankingSlope = 0.5,
BuildOnLayerCaps = {
LAYER_Air = true,
LAYER_Land = false,
LAYER_Orbit = false,
LAYER_Seabed = false,
LAYER_Sub = false,
LAYER_Water = false,
},
MotionType = "RULEUMT_None",
},
SizeX = 0.01,
SizeY = 0.01,
SizeZ = 0.01,
}
SizeX = 0,
SizeY = 0,
SizeZ = 0,
}