This commit is contained in:
2025-08-14 15:16:36 +08:00
parent 1fafac51bb
commit 0e0a952b0f
6 changed files with 80 additions and 65 deletions

View File

@@ -103,7 +103,7 @@ namespace WulaFallenEmpire
Building_Bed bed = (Building_Bed)GenClosest.ClosestThingReachable(
pawn.Position,
pawn.Map,
ThingRequest.ForDef(ThingDefOf_WULA.WULA_Charging_Station_Synth),
ThingRequest.ForGroup(ThingRequestGroup.BuildingArtificial),
PathEndMode.InteractionCell,
TraverseParms.For(pawn),
9999f,
@@ -112,6 +112,9 @@ namespace WulaFallenEmpire
Building_Bed bed_internal = b as Building_Bed;
if (bed_internal == null) return false;
var chargingComp = bed_internal.GetComp<CompChargingBed>();
if (chargingComp == null) return false;
var powerComp = bed_internal.GetComp<CompPowerTrader>();
return !bed_internal.IsForbidden(pawn) &&
pawn.CanReserve(bed_internal) &&