Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #104 from Just-a-Unity-Dev/frigid-mapping
Browse files Browse the repository at this point in the history
A bunch of new systems stuffed in one branch because I am too lazy to switch branches and I have way too many ideas in my head
  • Loading branch information
Just-a-Unity-Dev authored Nov 3, 2022
2 parents 1fbe1f8 + 3181db4 commit 1d8b5c0
Show file tree
Hide file tree
Showing 56 changed files with 183,750 additions and 19,730 deletions.
2 changes: 1 addition & 1 deletion Content.Server/StationEvents/Events/Incursion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Content.Server.StationEvents.Events;
public sealed class Incursion : StationEventSystem
{
public static List<string> SpawnedPrototypeChoices = new List<string>()
{"MobGiantSpiderAngry", "MobZed", "MobMimic", "MobSkeletonBoxer"};
{"MobGiantSpiderAngry", "MobZed", "MobSkeletonBoxer"};
public override string Prototype => "Incursion";

public override void Started()
Expand Down
13 changes: 13 additions & 0 deletions Content.Server/_Frigid/Staggerable/StaggerableComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Content.Server._Frigid.Staggerable;

/// <summary>
/// Used to define a humanoid that can be staggered.
/// </summary>
[RegisterComponent, Access(typeof(StaggerableSystem))]
public sealed class StaggerableComponent : Component
{
/// <summary>
/// How many times has this component been staggered?
/// </summary>
public bool Staggered { get; set; } = false;
}
37 changes: 37 additions & 0 deletions Content.Server/_Frigid/Staggerable/StaggerableSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Content.Server.Popups;
using Content.Server.Stunnable;
using Content.Shared.Damage;
using Content.Shared.Popups;
using Robust.Shared.Player;

namespace Content.Server._Frigid.Staggerable;

public sealed class StaggerableSystem : EntitySystem
{
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly StunSystem _stunSystem = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<StaggerableComponent, DamageChangedEvent>(OnDamageChange);
}

private void OnDamageChange(EntityUid uid, StaggerableComponent component, DamageChangedEvent args)
{
if (args.DamageDelta != null)
{
// var totalDamage = args.Damageable.TotalDamage;
var damage = args.DamageDelta.Total;

if (damage > 15 && !component.Staggered)
{
var message = Loc.GetString("staggered-single-message");

_popupSystem.PopupEntity(Loc.GetString("staggered-single-message"), uid, Filter.Pvs(uid), PopupType.LargeCaution);
_stunSystem.TryKnockdown(uid, TimeSpan.FromMilliseconds(damage.Int() * 100), true);
}
}
}
}
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/_frigid/staggered.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
staggered-single-message = Staggered!
staggered-multiple-message = Staggered (x{$amount})!
71 changes: 37 additions & 34 deletions Resources/Locale/en-US/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
job-name-warden = Warden
job-name-security = Police Officer
job-name-cadet = Police Cadet
job-name-hos = Chief of Police
job-name-detective = Detective
job-name-scientist = Scientist
job-name-rd = research director
job-name-psychologist = Psychologist
job-name-intern = Medical Nurse
job-name-doctor = Medical Doctor
job-name-rd = research director
job-name-cmo = chief medical officer
job-name-chemist = Chemist
job-name-assistant = Engineering Student
job-name-engineer = Electrician
job-name-mechanic = Mechanic
job-name-atmostech = Atmospherics Technician
job-name-hop = Secretary
job-name-captain = Mayor
job-name-serviceworker = Community Worker
job-name-warden = warden
job-name-security = officer
job-name-cadet = cadet
job-name-hos = police chief
job-name-detective = detective
job-name-scientist = scientist
job-name-psychologist = psychologist
job-name-intern = nurse
job-name-doctor = doctor
job-name-chemist = pharmacist
job-name-assistant = engineering student
job-name-engineer = electrician
job-name-mechanic = mechanic
job-name-hop = secretary
job-name-captain = mayor
job-name-atmostech = atmospherics technician
job-name-serviceworker = community worker
job-name-reporter = reporter
job-name-musician = musician
job-name-librarian = librarian
job-name-lawyer = lawyer
job-name-mime = mime
job-name-janitor = janitor
job-name-chaplain = priest
job-name-botanist = farmer
job-name-bartender = bartender
job-name-passenger = unemployed
job-name-clerk = clerk
job-name-salvagespec = trash diver
job-name-qm = quartermaster
job-name-cargotech = warehouse worker
job-name-chef = chef
job-name-clown = clown
job-name-prisoner = inmate
job-name-centcomoff = CentCom Official
job-name-reporter = Reporter
job-name-musician = Musician
job-name-librarian = Librarian
job-name-lawyer = Lawyer
job-name-mime = Mime
job-name-ce = chief engineer
job-name-janitor = Janitor
job-name-chaplain = Priest
job-name-botanist = Farmer
job-name-bartender = Bartender
job-name-passenger = Civilian
job-name-salvagespec = Trash Diver
job-name-qm = Quartermaster
job-name-cargotech = Warehouse Worker
job-name-chef = Chef
job-name-clown = Clown
job-name-prisoner = Inmate
job-name-soldier = U.S Military Private
job-name-ertleader = ERT leader
Expand Down
202,446 changes: 182,949 additions & 19,497 deletions Resources/Maps/frigid.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- type: Thirst
- type: Perishable
- type: Safezone
- type: Staggerable

- type: entity
name: Urist McHands
Expand Down
25 changes: 0 additions & 25 deletions Resources/Prototypes/Entities/Structures/Windows/shuttle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,6 @@
- type: Damageable
damageContainer: Inorganic
damageModifierSet: RGlass
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 1000
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 500
behaviors:
- !type:PlaySoundBehavior
sound:
collection: GlassBreak
- !type:SpawnEntitiesBehavior
spawn:
ShardGlassReinforced:
min: 1
max: 2
PartRodMetal:
min: 1
max: 2
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: IconSmooth
base: swindow
- type: Appearance
Expand Down
12 changes: 11 additions & 1 deletion Resources/Prototypes/NPCs/attack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
branches:
# Keep hitting them if they're in LOS
- tasks:
- id: MoveToCombatDistantTargetPrimitive
- id: RangedAttackTargetPrimitive

# Move to range and hit them
- tasks:
- id: MoveToCombatTargetPrimitive
- id: MoveToCombatDistantTargetPrimitive
- id: RangedAttackTargetPrimitive


Expand Down Expand Up @@ -107,3 +108,12 @@
targetKey: CombatTargetCoordinates
pathfindKey: CombatTargetPathfind
rangeKey: MeleeRange

- type: htnPrimitive
id: MoveToCombatDistantTargetPrimitive
operator: !type:MoveToOperator
pathfindInPlanning: true
removeKeyOnFinish: false
targetKey: CombatTargetCoordinates
pathfindKey: CombatTargetPathfind
rangeKey: 15
2 changes: 2 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Civilian/bartender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- !type:DepartmentTimeRequirement
department: Civilian
time: 1800
- !type:OverallPlaytimeRequirement
time: 1800
startingGear: BartenderGear
icon: "Bartender"
access:
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
startingGear: ChaplainGear
icon: "Chaplain"
supervisors: job-supervisors-hop
requirements:
- !type:DepartmentTimeRequirement
department: Civilian
time: 1800
- !type:OverallPlaytimeRequirement
time: 1800
access:
- Chapel
- Maintenance
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Civilian/chef.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- !type:DepartmentTimeRequirement
department: Civilian
time: 1800
- !type:OverallPlaytimeRequirement
time: 1800
startingGear: ChefGear
icon: "Chef"
supervisors: job-supervisors-hop
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Civilian/reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
startingGear: ReporterGear
icon: "Reporter"
supervisors: job-supervisors-hop
requirements:
- !type:DepartmentTimeRequirement
department: Civilian
time: 1800
- !type:OverallPlaytimeRequirement
time: 1800
access:
- Service
- Maintenance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
playTimeTracker: JobStationEngineer
startingGear: ElectricalEngineerGear
icon: "ElectricalEngineer"
requirements:
- !type:OverallPlaytimeRequirement
time: 4800
access:
- Engineering

Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
playTimeTracker: JobMedicalDoctor
startingGear: DoctorGear
icon: "MedicalDoctor"
requirements:
- !type:OverallPlaytimeRequirement
time: 4800
- !type:DepartmentTimeRequirement
department: Medical
time: 1800
access:
- Medical
- Maintenance
Expand Down
4 changes: 3 additions & 1 deletion Resources/Prototypes/Roles/Jobs/Medical/medical_intern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
playTimeTracker: JobMedicalIntern
startingGear: MedicalInternGear
icon: "Nurse"
canBeAntag: false
requirements:
- !type:OverallPlaytimeRequirement
time: 4800
access:
- Medical
- Maintenance
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Medical/psychologist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
startingGear: PsychologistGear
icon: "Psychologist"
supervisors: job-supervisors-cmo
requirements:
- !type:OverallPlaytimeRequirement
time: 4800
access:
- Medical
- Maintenance
Expand Down
5 changes: 2 additions & 3 deletions Resources/Prototypes/Roles/Jobs/Science/chemist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
supervisors: job-supervisors-cmo
access:
- Chemistry
- Research
- Medical

- type: startingGear
id: ChemistGear
Expand All @@ -16,8 +16,7 @@
back: ClothingBackpackChemistryFilled
shoes: ClothingShoesColorWhite
outerClothing: ClothingOuterCoatLabChem
id: ChemistryPDA
belt: ClothingBeltMedical
id: ChemistIDCard
pocket1: SpaceCash30
pocket2: RadioHandheld
# the purple glasses?
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Science/scientist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
startingGear: ScientistGear
icon: "Scientist"
supervisors: job-supervisors-rd
requirements:
- !type:OverallPlaytimeRequirement
time: 4800
access:
- Research

Expand Down
8 changes: 5 additions & 3 deletions Resources/Prototypes/Roles/Jobs/Security/detective.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
name: job-name-detective
playTimeTracker: JobDetective
requirements:
- !type:DepartmentTimeRequirement
department: Security
time: 3600
- !type:DepartmentTimeRequirement
department: Security
time: 3600
- !type:OverallPlaytimeRequirement
time: 4800
startingGear: DetectiveGear
icon: "Detective"
supervisors: job-supervisors-hos
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Security/security_cadet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
department: Security
time: 7200
inverted: true # stop playing intern if you're good at security!
- !type:OverallPlaytimeRequirement
time: 4800
startingGear: SecurityCadetGear
icon: "SecurityCadet"
supervisors: job-supervisors-security
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Roles/Jobs/Security/security_officer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- !type:DepartmentTimeRequirement
department: Security
time: 1800
- !type:OverallPlaytimeRequirement
time: 4800
startingGear: SecurityOfficerGear
icon: "SecurityOfficer"
supervisors: job-supervisors-hos
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Tiles/floors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,6 @@
placementVariants: [0, 1, 2, 3, 4, 5, 6]
baseTurfs:
- Space
isSubfloor: true
canCrowbar: false
footstepSounds:
collection: FootstepAsteroid
Expand All @@ -1115,7 +1114,6 @@
placementVariants: [0, 1, 2, 3, 4, 5, 6, 7]
baseTurfs:
- Space
isSubfloor: true
canCrowbar: false
footstepSounds:
collection: FootstepAsteroid
Expand Down
Loading

0 comments on commit 1d8b5c0

Please sign in to comment.