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

Доработка генокрадов по тз сплика #427

Closed
wants to merge 11 commits into from
Closed
2 changes: 1 addition & 1 deletion Content.Server/Changeling/ChangelingSystem.Abilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ private void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref Ac

var reagents = new List<(string, FixedPoint2)>()
{
("Synaptizine", 5f)
("Ephedrine", 15f)
};
if (TryInjectReagents(uid, reagents))
_popup.PopupEntity(Loc.GetString("changeling-inject"), uid, uid);
Expand Down
15 changes: 10 additions & 5 deletions Content.Server/Changeling/ChangelingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void UpdateChemicals(EntityUid uid, ChangelingComponent comp, float? amo
}
private void UpdateBiomass(EntityUid uid, ChangelingComponent comp, float? amount = null)
{
comp.Biomass += amount ?? -1;
comp.Biomass += amount ?? 0;
comp.Biomass = Math.Clamp(comp.Biomass, 0, comp.MaxBiomass);
Dirty(uid, comp);
_alerts.ShowAlert(uid, "ChangelingBiomass");
Expand Down Expand Up @@ -387,13 +387,18 @@ public bool TryReagentSting(EntityUid uid, ChangelingComponent comp, EntityTarge
}
public bool TryToggleItem(EntityUid uid, EntProtoId proto, ChangelingComponent comp, string? clothingSlot = null)
{
if (!comp.Equipment.TryGetValue(proto.Id, out var item) && item == null)
if (!comp.Equipment.TryGetValue(proto.Id, out var item))
{
item = Spawn(proto, Transform(uid).Coordinates);
if (clothingSlot != null && !_inventory.TryEquip(uid, (EntityUid) item, clothingSlot, force: true))
if (clothingSlot != null)
{
QueueDel(item);
return false;
if (!_inventory.TryEquip(uid, (EntityUid) item, clothingSlot, force: true))
{
QueueDel(item);
return false;
}
comp.Equipment.Add(proto.Id, item);
return true;
}
else if (!_hands.TryForcePickupAnyHand(uid, (EntityUid) item))
{
Expand Down
3 changes: 3 additions & 0 deletions Content.Server/Content.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
<ProjectReference Include="..\Sunrise\Content.Sunrise.Interfaces.Server\Content.Sunrise.Interfaces.Server.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="_Sunrise\Antag\Systems\" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Content.Server._Sunrise.Antag.Components;

/// <summary>
/// This is used for...
/// </summary>
[RegisterComponent]
public sealed partial class MultiAntagSelectionComponent : Component
{
[DataField]
public List<Component> Components;
}
12 changes: 0 additions & 12 deletions Content.Shared/Changeling/HivemindComponent.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
heatingCoefficient: 0.001
coolingCoefficient: 0.001
- type: ToggleableClothing
clothingPrototype: ClothingHeadHelmetHardsuitMaxim
clothingPrototype: ClothingHeadHelmetHardsuitMaxim
- type: ContainerContainer
containers:
cell_slot: !type:ContainerSlot
Expand Down Expand Up @@ -1030,7 +1030,7 @@
clothingPrototype: ClothingHeadHelmetHardsuitSanta

- type: entity
parent: ClothingOuterBaseLarge
parent: [ ClothingOuterBaseLarge, AllowSuitStorageClothing ]
id: ChangelingClothingOuterHardsuit
name: organic space suit
description: A spaceworthy biomass of pressure and temperature resistant tissue.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/GameRules/midround.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
lateJoinAdditional: true
mindRoles:
- MindRoleChangeling

- type: entity
parent: BaseGameRule
id: Vampire
Expand Down
100 changes: 99 additions & 1 deletion Resources/Prototypes/Objectives/changeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
id: BaseChangelingObjective
components:
- type: Objective
difficulty: 1.5 # unused but necessary i guess
difficulty: 1.5
issuer: objective-issuer-hivemind
- type: RoleRequirement
roles:
Expand Down Expand Up @@ -65,3 +65,101 @@
- type: TargetObjective
title: objective-condition-escape-identity-title
- type: PickRandomPerson

- type: entity
abstract: true
parent: [BaseChangelingObjective, BaseStealObjective]
id: BaseChangelingStealObjective
components:
- type: StealCondition
verifyMapExistence: true
- type: Objective
difficulty: 1.5
- type: ObjectiveLimit
limit: 2

- type: entity
parent: BaseChangelingStealObjective
id: CMOHyposprayChangelingStealObjective
components:
- type: NotJobRequirement
job: ChiefMedicalOfficer
- type: StealCondition
owner: job-name-cmo
stealGroup: Hypospray

- type: entity
parent: BaseChangelingStealObjective
id: RDHardsuitChangelingStealObjective
components:
- type: NotJobRequirement
job: ResearchDirector
- type: StealCondition
owner: job-name-rd
stealGroup: ClothingOuterHardsuitRd
- type: Objective
difficulty: 1

- type: entity
parent: BaseChangelingStealObjective
id: EnergyShotgunChangelingStealObjective
components:
- type: Objective
difficulty: 2
- type: NotJobRequirement
job: HeadOfSecurity
- type: StealCondition
stealGroup: WeaponEnergyShotgun
owner: job-name-hos

- type: entity
parent: BaseChangelingStealObjective
id: MagbootsChangelingStealObjective
components:
- type: NotJobRequirement
job: ChiefEngineer
- type: StealCondition
stealGroup: ClothingShoesBootsMagAdv
owner: job-name-ce

- type: entity
parent: BaseChangelingStealObjective
id: ClipboardChangelingStealObjective
components:
- type: NotJobRequirement
job: Quartermaster
- type: StealCondition
stealGroup: BoxFolderQmClipboard
owner: job-name-qm

- type: entity
abstract: true
parent: BaseChangelingStealObjective
id: BaseCaptainChangelingObjective
components:
- type: Objective
difficulty: 2.5
- type: NotJobRequirement
job: Captain

- type: entity
parent: BaseCaptainChangelingObjective
id: CaptainIDChangelingStealObjective
components:
- type: StealCondition
stealGroup: CaptainIDCard

- type: entity
parent: BaseCaptainChangelingObjective
id: CaptainJetpackChangelingStealObjective
components:
- type: StealCondition
stealGroup: JetpackCaptainFilled

- type: entity
parent: BaseCaptainChangelingObjective
id: CaptainGunChangelingStealObjective
components:
- type: StealCondition
stealGroup: WeaponAntiqueLaser
owner: job-name-captain