* Ported sprites from eris

* Added yml

* lid open/close logic

* interactivity

* Working on new secret stash component

* Object will drop on destruction

* Can get item and examine message

* Reagent container and some cleaning

* Moved potted plant to stash

* New base prefab

* Now you can deconstruct toilet

* Small fixes

* Fixed unknown components errors

* Fixed grammar errors

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>

* Now use prob

* More grammar

* Update Content.Server/Construction/Conditions/ToiletLidClosed.cs

Aaaaaaaa

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* No delays

* Amazing sound design

* Moved sound to mono

* Toilet viz

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Alex Evgrashin
2021-01-20 10:02:34 +03:00
committed by GitHub
parent f9f724b4af
commit 02ea6ce57c
16 changed files with 473 additions and 48 deletions

View File

@@ -0,0 +1,26 @@
#nullable enable
using Content.Shared.GameObjects.Components.Watercloset;
using Robust.Client.GameObjects;
using Robust.Client.Interfaces.GameObjects.Components;
namespace Content.Client.GameObjects.Components.Watercloset
{
public class ToiletVisualizer : AppearanceVisualizer
{
public override void OnChangeData(AppearanceComponent component)
{
base.OnChangeData(component);
if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite)) return;
if (!component.TryGetData(ToiletVisuals.LidOpen, out bool lidOpen)) lidOpen = false;
if (!component.TryGetData(ToiletVisuals.SeatUp, out bool seatUp)) seatUp = false;
var state = string.Format("{0}_toilet_{1}",
lidOpen ? "open" : "closed",
seatUp ? "seat_up" : "seat_down");
sprite.LayerSetState(0, state);
}
}
}