Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up #14

Merged
merged 14 commits into from
Jul 9, 2024
Merged

up #14

2 changes: 1 addition & 1 deletion Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ public static readonly CVarDef<bool>
/// Controls whether the server will deny any players that are not whitelisted in the DB.
/// </summary>
public static readonly CVarDef<bool> WhitelistEnabled =
CVarDef.Create("whitelist.enabled", false, CVar.SERVERONLY);
CVarDef.Create("whitelist.enabled", true, CVar.SERVERONLY);

/// <summary>
/// The loc string to display as a disconnect reason when someone is not whitelisted.
Expand Down
42 changes: 40 additions & 2 deletions Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,48 @@ private void OnBallisticInteractUsing(EntityUid uid, BallisticAmmoProviderCompon
return;

if (GetBallisticShots(component) >= component.Capacity)
{
Popup(Loc.GetString("gun-ballistic-transfer-target-full", ("entity", args.Target)), uid, args.User);
return;
}

if (EntityManager.HasComponent<SpeedLoaderComponent>(args.Used))
{
var emptySlots = component.Capacity - component.UnspawnedCount - component.Entities.Count; // Number of empty slots in the shotgun

var ammo = new List<(EntityUid? Entity, IShootable Shootable)>();
var ev = new TakeAmmoEvent(emptySlots, ammo, Transform(uid).Coordinates, args.User);
RaiseLocalEvent(args.Used, ev);

// empty speedloader
if (ev.Ammo.Count == 0)
{
Popup(Loc.GetString("gun-speedloader-empty"), uid, args.User);
return;
}

foreach (var (ent, _) in ammo)
{
if (ent == null)
continue;

component.Entities.Add(ent.Value);
Containers.Insert(ent.Value, component.Container);

if (IsClientSide(ent.Value))
Del(ent.Value);

if (ev.Ammo.Count == 0)
break;
}
}
// if not a speedloader just insert
else
{
component.Entities.Add(args.Used);
Containers.Insert(args.Used, component.Container);
}

component.Entities.Add(args.Used);
Containers.Insert(args.Used, component.Container);
// Not predicted so
Audio.PlayPredicted(component.SoundInsert, uid, args.User);
args.Handled = true;
Expand Down
4 changes: 4 additions & 0 deletions Resources/Audio/_Nuclear14/Weapons/Firing/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- files: ["brushgunfire.ogg"]
license: "CC-BY-NC-SA-3.0"
copyright: "BigIron github and it's sources"
source: "https://www.myinstants.com/en/instant/war-never-changes-fallouts-narrator-15365/" # unsure what to attribute when there ain't link source
Binary file not shown.
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/_Nuclear14/department.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ department-BrotherhoodMidwest-description = Midwest branch of the Brotherhood of
department-BrotherhoodWashington-description = Washington branch of the Brotherhood of Steel
department-CaravanCompany-description = The local Caravan Company responsible for import and export of goods.
department-NCR-description = A settler detachment sent by the New California Republic
department-NCRRanger-description = A special detachment of NCR which overtake near impossible duties to aid New California Republic in their victory over slavery and raiders.
department-Ranger-description = Desert Rangers which haven't joined the NCR and instead kept being their own faction. Their view of NCR isn't the best, but they tolerate them.
department-Tribe-description = A local tribal group trying to get by.
department-Vault-description = The local Vault Dwellers
department-Wastelander-description = Wastelanders living in the pacific northwest.
Expand Down
43,298 changes: 29,198 additions & 14,100 deletions Resources/Maps/N14/sunnyvale2.yml

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions Resources/Prototypes/Entities/Mobs/Player/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
name: Urist McHands
parent: BaseMobHuman
id: MobHuman
#components:
#- type: PotentialPsionic #Nyano - Summary: makes potentially psionic.
components:
- type: NpcFactionMember
factions:
- Wastelander

#Syndie
- type: entity
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
- type: CanHostGuardian
- type: NpcFactionMember
factions:
- NanoTrasen
- Wastelander
- type: CreamPied
- type: Stripping
- type: Strippable
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
abstract: true
components:
- type: Hunger
starvationDamage:
types:
Cold: 0.5
Bloodloss: 0.5
- type: Icon # It will not have an icon in the adminspawn menu without this. Body parts seem fine for whatever reason.
sprite: Mobs/Species/Human/parts.rsi
state: full
Expand Down
10 changes: 5 additions & 5 deletions Resources/Prototypes/Maps/N14/sunnyvale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
# BoSWashingtonResearcher: [ 2, 0 ]
# BoSWashingtonSoldier: [ 2, 2 ]
# BoSWashingtonRecruit: [ 0, 2 ]
# BoSMidPaladinCommander: [ 1, 0 ]
# BoSMidPaladin: [ 2, 0 ]
# BoSMidKnight: [ 2, 0 ]
# BoSMidScribe: [ 2, 0 ]
# BoSMidSquire: [ 2, 1 ]
BoSMidPaladinCommander: [ 1, 1 ]
BoSMidPaladin: [ 2, 1 ]
BoSMidKnight: [ 2, 1 ]
BoSMidScribe: [ 2, 1 ]
BoSMidSquire: [ 2, 1 ]
111 changes: 111 additions & 0 deletions Resources/Prototypes/_Nuclear14/Catalog/Fills/Boxes/mre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
- type: entity
name: cardboard box
parent: BoxBase
id: N14BoxCardboardMREBox
description: An old cardboard box for storing things.
components:
- type: Sprite
sprite: _Nuclear14/Objects/Misc/storage.rsi
state: c-ration

- type: entity
name: C ration
parent: N14BoxCardboardMREBox
id: N14BoxCardboardMREBoxCFilled
components:
- type: StorageFill
contents:
- id: N14FoodTinC1
- id: N14FoodTinC2
- id: N14FoodTinC3
- id: FoodCondimentPacketHotsauce
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketKetchup
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketBbq
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketHorseradish
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketMustard
prob: 0.2
orGroup: Condiment
- id: DrinkWaterBottleFull
prob: 0.9
orGroup: Bottle
- id: DrinkBeerBottleFull
prob: 0.1
orGroup: Bottle
- id: N14CigaretteWinston
prob: 0.1
orGroup: Cigarette
- id: N14CigaretteSalem
prob: 0.1
orGroup: Cigarette
- id: N14CigaretteRepublic
prob: 0.1
orGroup: Cigarette
- id: N14CigaretteMarlboro
prob: 0.2
orGroup: Cigarette
- id: N14CigaretteKool
prob: 0.1
orGroup: Cigarette
- id: Matchbox

- type: entity
name: K ration
parent: N14BoxCardboardMREBox
id: N14BoxCardboardMREBoxKFilled
components:
- type: StorageFill
contents:
- id: N14FoodTinK
- id: N14FoodTinKCracker
- id: N14FoodTinC3
- id: FoodCondimentPacketHotsauce
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketKetchup
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketBbq
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketHorseradish
prob: 0.2
orGroup: Condiment
- id: FoodCondimentPacketMustard
prob: 0.2
orGroup: Condiment
- id: DrinkWaterBottleFull
prob: 0.6
orGroup: Bottle
- id: DrinkBeerBottleFull
prob: 0.2
orGroup: Bottle
- id: DrinkMREFlask
prob: 0.1
orGroup: Bottle
- id: DrinkSodaWaterBottleFull
prob: 0.1
orGroup: Bottle
- id: N14CigarettePackWinston
prob: 0.1
orGroup: Cigarette
- id: N14CigarettePackSalem
prob: 0.1
orGroup: Cigarette
- id: N14CigarettePackRepublics
prob: 0.1
orGroup: Cigarette
- id: N14CigarettePackMarlboro
prob: 0.2
orGroup: Cigarette
- id: N14CigarettePackKool
prob: 0.1
orGroup: Cigarette
- id: Lighter
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,23 @@
intervalSeconds: 600
minimumEntitiesSpawned: 1
maximumEntitiesSpawned: 3

- type: entity
parent: N14TimedSpawnerMolerat
id: N14TimedSpawnerChicken
name: Chicken Timed Spawner
components:
- type: Sprite
layers:
- state: blue
- sprite: _Nuclear14/Mobs/Animals/chicken.rsi
state: chicken
- state: timed
- type: Timer
- type: TimedSpawner
prototypes:
- N14MobChicken
chance: 0.95
intervalSeconds: 600
minimumEntitiesSpawned: 1
maximumEntitiesSpawned: 3
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
- state: passenger # TODO make new icons

- type: entity
id: N14SpawnPointBoSMidInitiate
id: N14SpawnPointBoSMidInitiate # change this when I care
parent: N14SpawnPointWastelander
name: BOS midwest initiate
name: BOS midwest squire
components:
- type: SpawnPoint
job_id: BoSMidInitiate
job_id: BoSMidSquire
- type: Sprite
layers:
- state: green
Expand Down
15 changes: 15 additions & 0 deletions Resources/Prototypes/_Nuclear14/Entities/Markers/Spawners/mobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
prototypes:
- N14MobBrahmin

- type: entity
name: Chicken Spawner
id: N14SpawnMobChicken
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- sprite: _Nuclear14/Mobs/Animals/chicken.rsi
state: chicken
- state: ai
- type: ConditionalSpawner
prototypes:
- N14MobChicken

- type: entity
name: Bighorner Spawner
id: N14SpawnMobBighorner
Expand Down
Loading
Loading