-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> We like mechs here, yeah? --- # Changelog <!-- You can add an author after the `:cl:` to change the name that appears in the changelog (ex: `:cl: Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> :cl: Mocho, John Space - tweak: The H.O.N.K. has received an airtight cabin for honk operations in outer space. - add: Added the Ripley MK-II, a heavy, slow all-purpose mech, featuring a pressurized cabin for space operations. - add: Added the Clarke, A fast moving mech for space travel, with built in thrusters (not certain if they work properly though :trollface:) - add: Added the Gygax, a lightly armored and highly mobile mech with enough force to rip walls, or someone's head off. - add: Added the Durand, a slow but beefy combat suit that you dont want to fight in close quarters. - add: Added the Marauder, a specialized mech issued to ERT operatives. - add: Added the Seraph, a specialized combat suit issued to ??? operatives. - add: The syndicate has started issuing units under the codenames "Dark Gygax" and "Mauler" to syndicate agents at an introductory price. - add: The exosuit fabricator can now be emagged to reveal new recipes. - add: There are 4 new bounties cargo can fulfill for mechs. Feedback on the cost/reward is welcome! --------- Signed-off-by: sleepyyapril <[email protected]> Co-authored-by: John Space <[email protected]> Co-authored-by: gluesniffler <[email protected]> Co-authored-by: ScyronX <[email protected]>
- Loading branch information
1 parent
3d9ac9b
commit e3003b6
Showing
210 changed files
with
4,714 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Content.Server/_Goobstation/Mech/Equipment/EntitySystems/MechGunSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using Content.Server.Mech.Systems; | ||
using Content.Server.Power.Components; | ||
using Content.Server.Power.EntitySystems; | ||
using Content.Shared.Mech.Components; | ||
using Content.Shared.Mech.EntitySystems; | ||
using Content.Shared.Mech.Equipment.Components; | ||
using Content.Shared.Throwing; | ||
using Content.Shared.Weapons.Ranged.Components; | ||
using Robust.Shared.Random; | ||
|
||
namespace Content.Server.Mech.Equipment.EntitySystems; | ||
public sealed class MechGunSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly MechSystem _mech = default!; | ||
[Dependency] private readonly BatterySystem _battery = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<MechEquipmentComponent, HandleMechEquipmentBatteryEvent>(OnHandleMechEquipmentBattery); | ||
SubscribeLocalEvent<HitscanBatteryAmmoProviderComponent, CheckMechWeaponBatteryEvent>(OnCheckBattery); | ||
SubscribeLocalEvent<ProjectileBatteryAmmoProviderComponent, CheckMechWeaponBatteryEvent>(OnCheckBattery); | ||
} | ||
|
||
private void OnHandleMechEquipmentBattery(EntityUid uid, MechEquipmentComponent component, HandleMechEquipmentBatteryEvent args) | ||
{ | ||
if (!component.EquipmentOwner.HasValue) | ||
return; | ||
|
||
if (!TryComp<MechComponent>(component.EquipmentOwner.Value, out var mech)) | ||
return; | ||
|
||
if (TryComp<BatteryComponent>(uid, out var battery)) | ||
{ | ||
var ev = new CheckMechWeaponBatteryEvent(battery); | ||
RaiseLocalEvent(uid, ref ev); | ||
|
||
if (ev.Cancelled) | ||
return; | ||
|
||
ChargeGunBattery(uid, battery); | ||
} | ||
} | ||
|
||
private void OnCheckBattery(EntityUid uid, BatteryAmmoProviderComponent component, CheckMechWeaponBatteryEvent args) | ||
{ | ||
if (args.Battery.CurrentCharge > component.FireCost) | ||
args.Cancelled = true; | ||
} | ||
|
||
private void ChargeGunBattery(EntityUid uid, BatteryComponent component) | ||
{ | ||
if (!TryComp<MechEquipmentComponent>(uid, out var mechEquipment) || !mechEquipment.EquipmentOwner.HasValue) | ||
return; | ||
|
||
if (!TryComp<MechComponent>(mechEquipment.EquipmentOwner.Value, out var mech)) | ||
return; | ||
|
||
var maxCharge = component.MaxCharge; | ||
var currentCharge = component.CurrentCharge; | ||
|
||
var chargeDelta = maxCharge - currentCharge; | ||
|
||
// TODO: The battery charge of the mech would be spent directly when fired. | ||
if (chargeDelta <= 0 || mech.Energy - chargeDelta < 0) | ||
return; | ||
|
||
if (!_mech.TryChangeEnergy(mechEquipment.EquipmentOwner.Value, -chargeDelta, mech)) | ||
return; | ||
|
||
_battery.SetCharge(uid, component.MaxCharge, component); | ||
} | ||
} | ||
|
||
[ByRefEvent] | ||
public record struct CheckMechWeaponBatteryEvent(BatteryComponent Battery, bool Cancelled = false); |
16 changes: 16 additions & 0 deletions
16
Content.Server/_Goobstation/Temperature/KillOnOverheatComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Content.Shared.Atmos; | ||
|
||
namespace Content.Server._Goobstation.Temperature; | ||
|
||
/// <summary> | ||
/// Kills an entity when its temperature goes over a threshold. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(KillOnOverheatSystem))] | ||
public sealed partial class KillOnOverheatComponent : Component | ||
{ | ||
[DataField] | ||
public float OverheatThreshold = Atmospherics.T0C + 110f; | ||
|
||
[DataField] | ||
public LocId OverheatPopup = "ipc-overheat-popup"; | ||
} |
33 changes: 33 additions & 0 deletions
33
Content.Server/_Goobstation/Temperature/KillOnOverheatSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Content.Server.Temperature.Components; | ||
using Content.Shared.IdentityManagement; | ||
using Content.Shared.Mobs; | ||
using Content.Shared.Mobs.Components; | ||
using Content.Shared.Mobs.Systems; | ||
using Content.Shared.Popups; | ||
using Content.Shared.Damage.Components; | ||
|
||
namespace Content.Server._Goobstation.Temperature; | ||
|
||
public sealed class KillOnOverheatSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly MobStateSystem _mob = default!; | ||
[Dependency] private readonly SharedPopupSystem _popup = default!; | ||
|
||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
|
||
var query = EntityQueryEnumerator<KillOnOverheatComponent, TemperatureComponent, MobStateComponent>(); | ||
while (query.MoveNext(out var uid, out var comp, out var temp, out var mob)) | ||
{ | ||
if (mob.CurrentState == MobState.Dead | ||
|| temp.CurrentTemperature < comp.OverheatThreshold | ||
|| HasComp<GodmodeComponent>(uid)) | ||
continue; | ||
|
||
var msg = Loc.GetString(comp.OverheatPopup, ("name", Identity.Name(uid, EntityManager))); | ||
_popup.PopupEntity(msg, uid, PopupType.LargeCaution); | ||
_mob.ChangeMobState(uid, MobState.Dead, mob); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.