mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 16:04:49 +08:00
MLO editing progress
This commit is contained in:
@@ -261,6 +261,70 @@ namespace CodeWalker.GameFiles
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void AddRoom(MCMloRoomDef room)
|
||||
{
|
||||
if (room == null) return;
|
||||
|
||||
room.OwnerMlo = this;
|
||||
room.Index = rooms?.Length ?? 0;
|
||||
|
||||
var newrooms = rooms?.ToList() ?? new List<MCMloRoomDef>();
|
||||
newrooms.Add(room);
|
||||
rooms = newrooms.ToArray();
|
||||
}
|
||||
public void RemoveRoom(MCMloRoomDef room)
|
||||
{
|
||||
if (room == null) return;
|
||||
|
||||
var newrooms = rooms.ToList();
|
||||
newrooms.Remove(room);
|
||||
rooms = newrooms.ToArray();
|
||||
}
|
||||
|
||||
public void AddPortal(MCMloPortalDef portal)
|
||||
{
|
||||
if (portal == null) return;
|
||||
|
||||
portal.OwnerMlo = this;
|
||||
portal.Index = portals?.Length ?? 0;
|
||||
|
||||
var newportals = portals?.ToList() ?? new List<MCMloPortalDef>();
|
||||
newportals.Add(portal);
|
||||
portals = newportals.ToArray();
|
||||
}
|
||||
public void RemovePortal(MCMloPortalDef portal)
|
||||
{
|
||||
if (portal == null) return;
|
||||
|
||||
var newportals = portals.ToList();
|
||||
newportals.Remove(portal);
|
||||
portals = newportals.ToArray();
|
||||
}
|
||||
|
||||
public void AddEntitySet(MCMloEntitySet set)
|
||||
{
|
||||
if (set == null) return;
|
||||
|
||||
set.OwnerMlo = this;
|
||||
set.Index = entitySets?.Length ?? 0;
|
||||
|
||||
var newsets = entitySets?.ToList() ?? new List<MCMloEntitySet>();
|
||||
newsets.Add(set);
|
||||
entitySets = newsets.ToArray();
|
||||
}
|
||||
public void RemoveEntitySet(MCMloEntitySet set)
|
||||
{
|
||||
if (set == null) return;
|
||||
|
||||
var newsets = entitySets.ToList();
|
||||
newsets.Remove(set);
|
||||
entitySets = newsets.ToArray();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void FixPortalIndexes(int deletedIndex)
|
||||
{
|
||||
foreach (var portal in portals)
|
||||
|
||||
@@ -9557,7 +9557,8 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
|
||||
|
||||
|
||||
//Carl Johnson: I discovered in zonebind
|
||||
specialZoneAttribute = 218662697,
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13125,7 +13125,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo((MetaName)1856972365, PsoDataType.Enum, 24, 0, (MetaName)1756502932),
|
||||
new PsoStructureEntryInfo(MetaName.lawResponseTime, PsoDataType.Enum, 28, 0, (MetaName)3204395397),
|
||||
new PsoStructureEntryInfo(MetaName.lawResponseType, PsoDataType.Enum, 32, 0, (MetaName)4286852891),
|
||||
new PsoStructureEntryInfo((MetaName)218662697, PsoDataType.Enum, 36, 0, (MetaName)4095090001),
|
||||
new PsoStructureEntryInfo(MetaName.specialZoneAttribute, PsoDataType.Enum, 36, 0, (MetaName)4095090001),
|
||||
new PsoStructureEntryInfo(MetaName.vehDirtMin, PsoDataType.Float, 40, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.vehDirtMax, PsoDataType.Float, 44, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.vehDirtGrowScale, PsoDataType.Float, 48, 0, 0),
|
||||
|
||||
Reference in New Issue
Block a user