Skip to content

Commit

Permalink
Fix debug builds so we can debug again (new-frontiers-14#1825)
Browse files Browse the repository at this point in the history
* Add missing ActionToggle prototypes

* Fix NoRot having a Rot

* Remove action toggles

* DevMap: restore magboots, invalid transit uid chks

---------

Co-authored-by: Whatstone <[email protected]>
  • Loading branch information
GreaseMonk and whatston3 authored Aug 9, 2024
1 parent f0c5969 commit 4f710b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 82 deletions.
10 changes: 5 additions & 5 deletions Content.Server/_NF/PublicTransit/PublicTransitSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ private void OnShuttleArrival(EntityUid uid, TransitShuttleComponent comp, ref F

while (consoleQuery.MoveNext(out var consoleUid, out _))
{
if (Transform(consoleUid).GridUid == uid)
if (Transform(consoleUid).GridUid == uid && TryComp(comp.NextStation, out MetaDataComponent? metadata))
{
var destinationString = MetaData(comp.NextStation).EntityName;
var destinationString = metadata.EntityName;

_chat.TrySendInGameICMessage(consoleUid, Loc.GetString("public-transit-arrival",
("destination", destinationString), ("waittime", _cfgManager.GetCVar(NF14CVars.PublicTransitWaitTime))),
Expand Down Expand Up @@ -191,9 +191,9 @@ public override void Update(float frameTime)

while (consoleQuery.MoveNext(out var consoleUid, out _))
{
if (Transform(consoleUid).GridUid == uid)
if (Transform(consoleUid).GridUid == uid && TryComp(comp.NextStation, out MetaDataComponent? metadata))
{
var destinationString = MetaData(comp.NextStation).EntityName;
var destinationString = metadata.EntityName;

_chat.TrySendInGameICMessage(consoleUid, Loc.GetString("public-transit-departure",
("destination", destinationString), ("flytime", FlyTime)),
Expand All @@ -206,7 +206,7 @@ public override void Update(float frameTime)
if (TryGetNextStation(out var nextStation) && nextStation is {Valid : true} destination)
comp.NextStation = destination;

comp.NextTransfer += TimeSpan.FromSeconds(FlyTime + _cfgManager.GetCVar(NF14CVars.PublicTransitWaitTime));
comp.NextTransfer = curTime + TimeSpan.FromSeconds(FlyTime + _cfgManager.GetCVar(NF14CVars.PublicTransitWaitTime));
}
}

Expand Down
77 changes: 0 additions & 77 deletions Resources/Maps/_NF/Test/dev_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,38 +406,6 @@ entities:
- type: Broadphase
- type: OccluderTree
- type: LoadedMap
- proto: ActionToggleMagboots
entities:
- uid: 282
components:
- type: Transform
parent: 725
- type: InstantAction
container: 725
- proto: ActionToggleMagbootsGaloshes
entities:
- uid: 1209
components:
- type: Transform
parent: 1208
- type: InstantAction
container: 1208
- proto: ActionToggleMagbootsNfsd
entities:
- uid: 1211
components:
- type: Transform
parent: 1210
- type: InstantAction
container: 1210
- proto: ActionToggleMagbootsPirate
entities:
- uid: 1207
components:
- type: Transform
parent: 1206
- type: InstantAction
container: 1206
- proto: AdvancedCapacitorStockPart
entities:
- uid: 266
Expand Down Expand Up @@ -3495,71 +3463,27 @@ entities:
- type: Transform
pos: 0.5172012,8.121316
parent: 179
- type: Magboots
toggleActionEntity: 282
- type: ActionsContainer
- type: ContainerContainer
containers:
actions: !type:Container
ents:
- 282
- proto: ClothingShoesBootsMagGaloshes
entities:
- uid: 1208
components:
- type: Transform
pos: 0.5613978,8.433816
parent: 179
- type: Magboots
toggleActionEntity: 1209
- type: ActionsContainer
- type: ContainerContainer
containers:
actions: !type:Container
ents:
- 1209
- proto: ClothingShoesBootsMagNfsdFilled
entities:
- uid: 1210
components:
- type: Transform
pos: 0.26973104,8.662983
parent: 179
- type: Magboots
toggleActionEntity: 1211
- type: ContainerContainer
containers:
item: !type:ContainerSlot
showEnts: False
occludes: True
ent: null
actions: !type:Container
showEnts: False
occludes: True
ents:
- 1211
- type: ActionsContainer
- proto: ClothingShoesBootsMagPirateFilled
entities:
- uid: 1206
components:
- type: Transform
pos: 0.16303456,8.308816
parent: 179
- type: Magboots
toggleActionEntity: 1207
- type: ContainerContainer
containers:
item: !type:ContainerSlot
showEnts: False
occludes: True
ent: null
actions: !type:Container
showEnts: False
occludes: True
ents:
- 1207
- type: ActionsContainer
- proto: ClothingUniformJumpsuitEngineering
entities:
- uid: 424
Expand Down Expand Up @@ -5461,7 +5385,6 @@ entities:
- uid: 1078
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: 12.5,24.5
parent: 179
- type: DeviceLinkSink
Expand Down

0 comments on commit 4f710b2

Please sign in to comment.