Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/wizards/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Resources/Textures/Structures/Wallmounts/posters.rsi/meta.json
#	Resources/Textures/Tiles/plating_burnt.png
#	Resources/Textures/Tiles/steel_burnt.png
  • Loading branch information
VigersRay committed Nov 28, 2024
2 parents 2f46a5c + b53c8ea commit aca6e6c
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/labeler-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
username: ${{ github.actor }}
team: "content-maintainers,junior-maintainers"
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.LABELER_PAT }}
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
uses: actions-ecosystem/action-add-labels@v1
with:
Expand Down
16 changes: 16 additions & 0 deletions Content.Client/Light/HandheldLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ public override void Initialize()
SubscribeLocalEvent<HandheldLightComponent, AppearanceChangeEvent>(OnAppearanceChange);
}

/// <remarks>
/// TODO: Not properly predicted yet. Don't call this function if you want a the actual return value!
/// </remarks>
public override bool TurnOff(Entity<HandheldLightComponent> ent, bool makeNoise = true)
{
return true;
}

/// <remarks>
/// TODO: Not properly predicted yet. Don't call this function if you want a the actual return value!
/// </remarks>
public override bool TurnOn(EntityUid user, Entity<HandheldLightComponent> uid)
{
return true;
}

private void OnAppearanceChange(EntityUid uid, HandheldLightComponent? component, ref AppearanceChangeEvent args)
{
if (!Resolve(uid, ref component))
Expand Down
2 changes: 1 addition & 1 deletion Content.PatreonParser/Content.PatreonParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
Expand Down
24 changes: 2 additions & 22 deletions Content.Server/Light/EntitySystems/HandheldLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Content.Shared.Light.Components;
using Content.Shared.Rounding;
using Content.Shared.Toggleable;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
Expand Down Expand Up @@ -46,7 +45,6 @@ public override void Initialize()
SubscribeLocalEvent<HandheldLightComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<HandheldLightComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<HandheldLightComponent, GetVerbsEvent<ActivationVerb>>(AddToggleLightVerb);

SubscribeLocalEvent<HandheldLightComponent, ActivateInWorldEvent>(OnActivate);

Expand Down Expand Up @@ -181,25 +179,7 @@ public override void Update(float frameTime)
}
}

private void AddToggleLightVerb(Entity<HandheldLightComponent> ent, ref GetVerbsEvent<ActivationVerb> args)
{
if (!args.CanAccess || !args.CanInteract || !ent.Comp.ToggleOnInteract)
return;

var @event = args;
ActivationVerb verb = new()
{
Text = Loc.GetString("verb-common-toggle-light"),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
Act = ent.Comp.Activated
? () => TurnOff(ent)
: () => TurnOn(@event.User, ent)
};

args.Verbs.Add(verb);
}

public bool TurnOff(Entity<HandheldLightComponent> ent, bool makeNoise = true)
public override bool TurnOff(Entity<HandheldLightComponent> ent, bool makeNoise = true)
{
if (!ent.Comp.Activated || !_lights.TryGetLight(ent, out var pointLightComponent))
{
Expand All @@ -213,7 +193,7 @@ public bool TurnOff(Entity<HandheldLightComponent> ent, bool makeNoise = true)
return true;
}

public bool TurnOn(EntityUid user, Entity<HandheldLightComponent> uid)
public override bool TurnOn(EntityUid user, Entity<HandheldLightComponent> uid)
{
var component = uid.Comp;
if (component.Activated || !_lights.TryGetLight(uid, out var pointLightComponent))
Expand Down
25 changes: 25 additions & 0 deletions Content.Shared/Light/SharedHandheldLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
using Content.Shared.Item;
using Content.Shared.Light.Components;
using Content.Shared.Toggleable;
using Content.Shared.Verbs;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Utility;

namespace Content.Shared.Light;

Expand All @@ -22,6 +24,8 @@ public override void Initialize()
base.Initialize();
SubscribeLocalEvent<HandheldLightComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<HandheldLightComponent, ComponentHandleState>(OnHandleState);

SubscribeLocalEvent<HandheldLightComponent, GetVerbsEvent<ActivationVerb>>(AddToggleLightVerb);
}

private void OnInit(EntityUid uid, HandheldLightComponent component, ComponentInit args)
Expand Down Expand Up @@ -78,4 +82,25 @@ public void UpdateVisuals(EntityUid uid, HandheldLightComponent? component = nul

_appearance.SetData(uid, ToggleableLightVisuals.Enabled, component.Activated, appearance);
}

private void AddToggleLightVerb(Entity<HandheldLightComponent> ent, ref GetVerbsEvent<ActivationVerb> args)
{
if (!args.CanAccess || !args.CanInteract || !ent.Comp.ToggleOnInteract)
return;

var @event = args;
ActivationVerb verb = new()
{
Text = Loc.GetString("verb-common-toggle-light"),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/light.svg.192dpi.png")),
Act = ent.Comp.Activated
? () => TurnOff(ent)
: () => TurnOn(@event.User, ent)
};

args.Verbs.Add(verb);
}

public abstract bool TurnOff(Entity<HandheldLightComponent> ent, bool makeNoise = true);
public abstract bool TurnOn(EntityUid user, Entity<HandheldLightComponent> uid);
}
16 changes: 7 additions & 9 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
Entries:
- author: Flareguy
changes:
- message: Added 2 new vox customization options for both hair & facial hair.
type: Add
- message: Vox Long Braids no longer incorrectly uses the Vox Afro sprite.
type: Fix
id: 7158
time: '2024-08-19T03:32:16.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30815
- author: EmoGarbage404
changes:
- message: The recycler can now be broken down and repaired.
Expand Down Expand Up @@ -3922,3 +3913,10 @@
id: 7657
time: '2024-11-27T05:55:15.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33551
- author: Beck Thompson
changes:
- message: Handheld light verbs are now predicted!
type: Fix
id: 7658
time: '2024-11-28T13:41:01.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33622
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@
- PosterLegitSafetyMothMeth
- PosterLegitSafetyMothHardhat
- PosterLegitSafetyMothSSD
- PosterLegitOppenhopper
chance: 1
6 changes: 6 additions & 0 deletions Resources/Prototypes/Entities/Objects/Weapons/Melee/knife.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
Slash: 12
- type: EmbeddableProjectile
sound: /Audio/Weapons/star_hit.ogg
offset: -0.15,0.0
- type: LandAtCursor
- type: DamageOtherOnHit
damage:
Expand All @@ -108,6 +109,8 @@
sprite: Objects/Weapons/Melee/combat_knife.rsi
- type: DisarmMalus
malus: 0.225
- type: ThrowingAngle
angle: 225

- type: entity
name: survival knife
Expand Down Expand Up @@ -286,6 +289,7 @@
Slash: 5
- type: EmbeddableProjectile
sound: /Audio/Weapons/star_hit.ogg
offset: -0.15,0.0
- type: LandAtCursor
- type: DamageOtherOnHit
ignoreResistances: true
Expand All @@ -295,3 +299,5 @@
Piercing: 15
- type: Item
sprite: Objects/Weapons/Melee/throwing_knife.rsi
- type: ThrowingAngle
angle: 225
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,15 @@
- type: Sprite
state: poster52_legit

- type: entity
parent: PosterBase
id: PosterLegitOppenhopper
name: "Oppenhopper"
description: "A poster for a long-forgotten movie. It follows a group of tenacious greenhorns from the Grasshopper Sector as they defend against onslaughts of the infamous Nuclear Operatives. The tagline reads: \"Nuke Ops will continue until robustness improves.\""
components:
- type: Sprite
state: poster53_legit


#maps

Expand Down
17 changes: 0 additions & 17 deletions Resources/Prototypes/Tiles/floors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -884,23 +884,6 @@
itemDrop: FloorTileItemSteel #This should probably be made null when it becomes possible to make it such, in SS13 prying destroyed tiles wouldn't give you anything.
heatCapacity: 10000

- type: tile
id: FloorSteelBurnt
name: tiles-steel-floor
sprite: /Textures/Tiles/steel_burnt.png
variants: 2
placementVariants:
- 1.0
- 1.0
baseTurf: Plating
isSubfloor: false
deconstructTools: [ Prying ]
footstepSounds:
collection: FootstepFloor
itemDrop: FloorTileItemSteel #Same case as FloorSteelDamaged, make it null when possible
heatCapacity: 10000


# Concrete
- type: tile
id: FloorConcrete
Expand Down
11 changes: 0 additions & 11 deletions Resources/Prototypes/Tiles/plating.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
friction: 0.3
heatCapacity: 10000

- type: tile
id: PlatingBurnt
name: tiles-plating
sprite: /Textures/Tiles/plating_burnt.png
baseTurf: Lattice
isSubfloor: true
footstepSounds:
collection: FootstepPlating
friction: 0.3
heatCapacity: 10000

- type: tile
id: PlatingAsteroid
name: tiles-asteroid-plating
Expand Down
14 changes: 14 additions & 0 deletions Resources/Prototypes/Tiles/tile_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,24 @@
id: FloorAsteroidCoarseSandDug
target: FloorAsteroidSandDug

# 2023-09-09

- type: tileAlias
id: FloorGlassAlt
target: FloorGlass

- type: tileAlias
id: FloorRGlassAlt
target: FloorRGlass

# 2024-11-15
# Burnt tiles now exist, but they don't use the tiles system. They're decals.
# There's presently no way to add decals over existing tiles, so this will have to suffice for now.

- type: tileAlias
id: PlatingBurnt
target: PlatingDamaged

- type: tileAlias
id: FloorSteelBurnt
target: FloorSteelDamaged
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"version": 1,
"license": "CC0-1.0",
"copyright": "Original base by deltanedas (github) for SS14. Resprited by (DISCORD)@ps3moira#9488. Resprited by KREKS",
"size": {
Expand Down
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.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@
{
"name": "poster52_legit"
},
{
"name": "poster53_legit"
},
{
"name": "random_legit"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Resources/Textures/Tiles/plating_burnt.png
Binary file not shown.
Binary file removed Resources/Textures/Tiles/steel_burnt.png
Binary file not shown.

0 comments on commit aca6e6c

Please sign in to comment.