Skip to content

Commit

Permalink
Trade Outpost (New POI) (#1466)
Browse files Browse the repository at this point in the history
* Trade phase 1

* Trade Phase 2, clean station

* Phase 3 - new signs

* Update whitelist.yml

---------

Co-authored-by: Dvir <[email protected]>
  • Loading branch information
MagnusCrowe and dvir001 authored Jun 5, 2024
1 parent 0bdc032 commit 3df6203
Show file tree
Hide file tree
Showing 15 changed files with 40,324 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/mapchecker/whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Nfsd: true
LPBravo: true
Cove: true
Lodge: true
Trade: true

#Cove:
# - WallPlastitanium
Expand Down
18 changes: 17 additions & 1 deletion Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@ private void OnStartup(RoundStartingEvent ev)
var church = "Maps/_NF/POI/beacon.yml";
var grifty = "Maps/_NF/POI/grifty.yml";
var nfsdStation = "/Maps/_NF/POI/nfsd.yml";
var trade = "/Maps/_NF/POI/trade.yml";
var depotColor = new Color(55, 200, 55);
var civilianColor = new Color(55, 55, 200);
var lpbravoColor = new Color(200, 55, 55);
var factionColor = new Color(255, 165, 0);
var mapId = GameTicker.DefaultMap;
var depotOffset = _random.NextVector2(3000f, 5000f);
var depotOffset = _random.NextVector2(4500f, 6000f);
var tinniaOffset = _random.NextVector2(1100f, 2800f);
var caseysOffset = _random.NextVector2(2250f, 4600f);
var tradeOffset = _random.NextVector2(1500f, 2500f);

if (_map.TryLoad(mapId, depotMap, out var depotUids, new MapLoadOptions
{
Expand Down Expand Up @@ -294,6 +296,20 @@ private void OnStartup(RoundStartingEvent ev)
_shuttle.SetIFFColor(labUids[0], factionColor);
}

if (_map.TryLoad(mapId, trade, out var tradeUids, new MapLoadOptions
{
Offset = -tradeOffset
}))
{
if (_prototypeManager.TryIndex<GameMapPrototype>("Trade", out var stationProto))
{
_station.InitializeNewStation(stationProto.Stations["Trade"], tradeUids);
}
var meta = EnsureComp<MetaDataComponent>(tradeUids[0]);
_meta.SetEntityName(tradeUids[0], "Trade Outpost", meta);
_shuttle.SetIFFColor(tradeUids[0], depotColor);
}

var dungenTypes = _prototypeManager.EnumeratePrototypes<DungeonConfigPrototype>();

foreach (var dunGen in dungenTypes)
Expand Down
17 changes: 17 additions & 0 deletions Resources/Locale/en-US/_NF/navmap-beacons/station-beacons.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
station-beacon-atm = ATM
station-beacon-shipyard = Shipyard
station-beacon-sr-office = SR's Office
station-beacon-sr-quarters = SR's Quarters
station-beacon-cargobay-one = Cargo Bay 1
station-beacon-cargobay-two = Cargo Bay 2
station-beacon-cargobay-three = Cargo Bay 3
station-beacon-cargobay-four = Cargo Bay 4
station-beacon-shops = Shops
station-beacon-vending-machines = Vend
station-beacon-transit-shuttle = Bus Stop
station-beacon-dock = Dock
station-beacon-nfsd = NFSD
station-beacon-nfsd-brig = Brig
station-beacon-cafe = Cafe
station-beacon-conference = Conference
39,983 changes: 39,983 additions & 0 deletions Resources/Maps/_NF/POI/trade.yml

Large diffs are not rendered by default.

107 changes: 102 additions & 5 deletions Resources/Prototypes/_NF/Entities/Objects/Devices/station_beacon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
suffix: ATM
components:
- type: NavMapBeacon
text: ATM
defaultText: station-beacon-atm
color: "#0077C1"

- type: entity
Expand All @@ -14,21 +14,118 @@
suffix: Shipyard
components:
- type: NavMapBeacon
text: Shipyard
defaultText: station-beacon-shipyard
color: "#0077C1"

- type: entity
parent: DefaultStationBeaconCommand
id: DefaultStationBeaconFrontierSROffice
suffix: SR's Office
components:
- type: NavMapBeacon
text: SR's Office
defaultText: station-beacon-sr-office

- type: entity
parent: DefaultStationBeaconCommand
id: DefaultStationBeaconFrontierSRQuarters
suffix: SR's Quarters
components:
- type: NavMapBeacon
text: SR's Quarters
defaultText: station-beacon-sr-quarters

- type: entity
parent: DefaultStationBeaconSupply
id: DefaultStationBeaconFrontierCargobayOne
suffix: Cargobay 1
components:
- type: NavMapBeacon
defaultText: station-beacon-cargobay-one

- type: entity
parent: DefaultStationBeaconSupply
id: DefaultStationBeaconFrontierCargobayTwo
suffix: Cargobay 2
components:
- type: NavMapBeacon
defaultText: station-beacon-cargobay-two

- type: entity
parent: DefaultStationBeaconSupply
id: DefaultStationBeaconFrontierCargobayThree
suffix: Cargobay 3
components:
- type: NavMapBeacon
defaultText: station-beacon-cargobay-three

- type: entity
parent: DefaultStationBeaconSupply
id: DefaultStationBeaconFrontierCargobayFour
suffix: Cargobay 4
components:
- type: NavMapBeacon
defaultText: station-beacon-cargobay-four

- type: entity
parent: DefaultStationBeaconService
id: DefaultStationBeaconFrontierShops
suffix: Shops
components:
- type: NavMapBeacon
defaultText: station-beacon-shops

- type: entity
parent: DefaultStationBeaconService
id: DefaultStationBeaconFrontierVend
suffix: Vending Machines
components:
- type: NavMapBeacon
defaultText: station-beacon-vending-machines

- type: entity
parent: DefaultStationBeaconService
id: DefaultStationBeaconFrontierCafe
suffix: Cafe
components:
- type: NavMapBeacon
defaultText: station-beacon-cafe

- type: entity
parent: DefaultStationBeacon
id: DefaultStationBeaconFrontierTransitShuttle
suffix: Bus Stop
components:
- type: NavMapBeacon
defaultText: station-beacon-transit-shuttle

- type: entity
parent: DefaultStationBeacon
id: DefaultStationBeaconFrontierDock
suffix: Dock
components:
- type: NavMapBeacon
defaultText: station-beacon-dock

- type: entity
parent: DefaultStationBeacon
id: DefaultStationBeaconFrontierNFSD
suffix: NFSD
components:
- type: NavMapBeacon
defaultText: station-beacon-nfsd
color: "#f1b223"

- type: entity
parent: DefaultStationBeaconFrontierNFSD
id: DefaultStationBeaconFrontierNFSDBrig
suffix: NFSD Brig
components:
- type: NavMapBeacon
defaultText: station-beacon-nfsd-brig

- type: entity
parent: DefaultStationBeacon
id: DefaultStationBeaconFrontierConference
suffix: Conference Room
components:
- type: NavMapBeacon
defaultText: station-beacon-conference
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,66 @@
components:
- type: Sprite
state: direction_sr

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalCB1
name: cargo bay one sign
description: A direction sign, pointing out which way cargo bay one is.
components:
- type: Sprite
state: direction_cb1

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalCB2
name: cargo bay two sign
description: A direction sign, pointing out which way cargo bay two is.
components:
- type: Sprite
state: direction_cb2

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalCB3
name: cargo bay three sign
description: A direction sign, pointing out which way cargo bay three is.
components:
- type: Sprite
state: direction_cb3

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalCB4
name: cargo bay four sign
description: A direction sign, pointing out which way cargo bay four is.
components:
- type: Sprite
state: direction_cb4

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalNFSD
name: nfsd outpost sign
description: A direction sign, pointing out which way an NFSD outpost is.
components:
- type: Sprite
state: direction_nfsd

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalShop
name: shops sign
description: A direction sign, pointing out which way shops are.
components:
- type: Sprite
state: direction_shop

- type: entity
parent: BaseSignDirectionalNF
id: SignDirectionalVending
name: vending machines sign
description: A direction sign, pointing out which way vending machines are.
components:
- type: Sprite
state: direction_vend
14 changes: 14 additions & 0 deletions Resources/Prototypes/_NF/Maps/POI/trade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- type: gameMap
id: Trade
mapName: 'Trade Outpost'
mapPath: /Maps/_NF/POI/trade.yml
minPlayers: 0
stations:
Trade:
stationProto: StandardFrontierOutpost
components:
- type: StationNameSetup
mapNameTemplate: 'Trade Outpost'
- type: StationJobs
overflowJobs: []
availableJobs: {}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3df6203

Please sign in to comment.