From 836e76bdd505ee2fd696f2fb2615f8884463c028 Mon Sep 17 00:00:00 2001
From: Yamato <66829532+louis1706@users.noreply.github.com>
Date: Sat, 7 Mar 2026 03:24:15 +0100
Subject: [PATCH] feat: PrefabHelper HczOneSided / HczTwoSided /
HczBreakableDoor
---
EXILED/Exiled.API/Enums/PrefabType.cs | 1 +
EXILED/Exiled.API/Features/PrefabHelper.cs | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/EXILED/Exiled.API/Enums/PrefabType.cs b/EXILED/Exiled.API/Enums/PrefabType.cs
index 43936f1d8..c3ce00898 100644
--- a/EXILED/Exiled.API/Enums/PrefabType.cs
+++ b/EXILED/Exiled.API/Enums/PrefabType.cs
@@ -12,6 +12,7 @@ namespace Exiled.API.Enums
///
/// Type of prefab.
///
+ ///
public enum PrefabType
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
diff --git a/EXILED/Exiled.API/Features/PrefabHelper.cs b/EXILED/Exiled.API/Features/PrefabHelper.cs
index 179991e63..22579651a 100644
--- a/EXILED/Exiled.API/Features/PrefabHelper.cs
+++ b/EXILED/Exiled.API/Features/PrefabHelper.cs
@@ -14,8 +14,8 @@ namespace Exiled.API.Features
using Exiled.API.Enums;
using Exiled.API.Features.Attributes;
-
using MapGeneration.Distributors;
+ using MapGeneration.RoomConnectors;
using Mirror;
using UnityEngine;
@@ -57,6 +57,11 @@ public static PrefabAttribute GetPrefabAttribute(this PrefabType prefabType)
/// Returns the .
public static GameObject GetPrefab(PrefabType prefabType)
{
+ if (prefabType is PrefabType.HCZOneSided or PrefabType.HCZTwoSided)
+ {
+ prefabType = PrefabType.HCZBreakableDoor;
+ }
+
if (Prefabs.TryGetValue(prefabType, out (GameObject, Component) prefab))
return prefab.Item1;
@@ -112,6 +117,17 @@ public static GameObject Spawn(PrefabType prefabType, Vector3 position = default
positionSync.Network_rotationY = (sbyte)Mathf.RoundToInt(rotation.Value.eulerAngles.y / 5.625F);
}
+ if (prefabType is PrefabType.HCZOneSided or PrefabType.HCZTwoSided or PrefabType.HCZBreakableDoor)
+ {
+ newGameObject.GetComponent().Network_syncBitmask = prefabType switch
+ {
+ PrefabType.HCZTwoSided => 0b00000000,
+ PrefabType.HCZOneSided => 0b00000001,
+ PrefabType.HCZBreakableDoor => 0b00000011,
+ _ => 0
+ };
+ }
+
NetworkServer.Spawn(newGameObject);
return newGameObject;