diff --git a/Content.Server/Content.Server.csproj b/Content.Server/Content.Server.csproj
index 1b6a6f545d..378740744c 100644
--- a/Content.Server/Content.Server.csproj
+++ b/Content.Server/Content.Server.csproj
@@ -92,6 +92,7 @@
+
diff --git a/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs b/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs
index 01ca424b3c..a34795f072 100644
--- a/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs
+++ b/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs
@@ -3,13 +3,14 @@ using SS14.Shared.Interfaces.GameObjects;
using SS14.Shared.Utility;
using YamlDotNet.RepresentationModel;
using SS14.Server.GameObjects;
+using Content.Server.GameObjects.EntitySystems;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
///
/// Tool used to weld metal together, light things on fire, or melt into constituent parts
///
- class WelderComponent : ToolComponent, EntitySystems.IUse
+ class WelderComponent : ToolComponent, EntitySystems.IUse, EntitySystems.IExamine
{
SpriteComponent spriteComponent;
@@ -138,5 +139,14 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
return false;
}
}
+
+ string IExamine.Examine()
+ {
+ if(Activated)
+ {
+ return "The welding tool is currently lit";
+ }
+ return null;
+ }
}
}
diff --git a/Content.Server/GameObjects/Components/Power/PowerDevice.cs b/Content.Server/GameObjects/Components/Power/PowerDevice.cs
index abc2936d9e..f419b31616 100644
--- a/Content.Server/GameObjects/Components/Power/PowerDevice.cs
+++ b/Content.Server/GameObjects/Components/Power/PowerDevice.cs
@@ -1,4 +1,5 @@
-using SS14.Server.GameObjects;
+using Content.Server.GameObjects.EntitySystems;
+using SS14.Server.GameObjects;
using SS14.Shared.GameObjects;
using SS14.Shared.Interfaces.GameObjects;
using SS14.Shared.IoC;
@@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Power
///
/// Component that requires power to function
///
- public class PowerDeviceComponent : Component
+ public class PowerDeviceComponent : Component, EntitySystems.IExamine
{
public override string Name => "PowerDevice";
@@ -134,6 +135,15 @@ namespace Content.Server.GameObjects.Components.Power
}
}
+ string IExamine.Examine()
+ {
+ if(!Powered)
+ {
+ return "The device is not powered";
+ }
+ return null;
+ }
+
private void UpdateLoad(float value)
{
var oldLoad = _load;
diff --git a/Content.Server/GameObjects/EntitySystems/Click/ClickParser.cs b/Content.Server/GameObjects/EntitySystems/Click/ClickParser.cs
index 055af9eaa2..d786825bc4 100644
--- a/Content.Server/GameObjects/EntitySystems/Click/ClickParser.cs
+++ b/Content.Server/GameObjects/EntitySystems/Click/ClickParser.cs
@@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.EntitySystems
EntitySystemManager.GetEntitySystem().UserInteraction(message, player);
break;
case (ClickType.Left | ClickType.Shift):
- //Examine system
+ EntitySystemManager.GetEntitySystem().Examine(message, player);
break;
case ClickType.Right:
//Verb System
diff --git a/Content.Server/GameObjects/EntitySystems/Click/ExamineSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/ExamineSystem.cs
new file mode 100644
index 0000000000..0a437deb52
--- /dev/null
+++ b/Content.Server/GameObjects/EntitySystems/Click/ExamineSystem.cs
@@ -0,0 +1,71 @@
+using SS14.Server.Interfaces.Chat;
+using SS14.Server.Interfaces.GameObjects;
+using SS14.Shared.GameObjects;
+using SS14.Shared.GameObjects.System;
+using SS14.Shared.Interfaces.GameObjects;
+using SS14.Shared.IoC;
+using SS14.Shared.Log;
+using System;
+using System.Text;
+
+namespace Content.Server.GameObjects.EntitySystems
+{
+ public interface IExamine
+ {
+ ///
+ /// Returns an status examine value for components appended to the end of the description of the entity
+ ///
+ ///
+ string Examine();
+ }
+
+ public class ExamineSystem : EntitySystem
+ {
+
+ public void Examine(ClickEventMessage msg, IEntity player)
+ {
+ //Get entity clicked upon from UID if valid UID, if not assume no entity clicked upon and null
+ IEntity examined = null;
+ if (msg.Uid.IsValid())
+ examined = EntityManager.GetEntity(msg.Uid);
+
+ if (examined == null)
+ return;
+
+ //Verify player has a transform component
+ if (!player.TryGetComponent(out var playerTransform))
+ {
+ return;
+ }
+ //Verify player is on the same map as the entity he clicked on
+ else if (msg.Coordinates.MapID != playerTransform.MapID)
+ {
+ Logger.Warning(string.Format("Player named {0} clicked on a map he isn't located on", player.Name));
+ return;
+ }
+
+ //Start a stringbuilder since we have no idea how many times this could be appended to
+ StringBuilder fullexaminetext = new StringBuilder("This is " + examined.Name);
+
+ //Add an entity description if one is declared
+ if(!string.IsNullOrEmpty(examined.Description))
+ {
+ fullexaminetext.Append(Environment.NewLine + examined.Description);
+ }
+
+ //Add component statuses from components that report one
+ foreach (var examinecomponents in examined.GetComponents())
+ {
+ string componentdescription = examinecomponents.Examine();
+ if(!string.IsNullOrEmpty(componentdescription))
+ {
+ fullexaminetext.Append(Environment.NewLine + componentdescription);
+ }
+ }
+
+ //Send to client chat channel
+ //TODO: Fix fact you can only send to all clients because you cant resolve clients from player entities
+ IoCManager.Resolve().DispatchMessage(SS14.Shared.Console.ChatChannel.Visual, fullexaminetext.ToString());
+ }
+ }
+}
diff --git a/Resources/Prototypes/Entities/Clothing.yml b/Resources/Prototypes/Entities/Clothing.yml
index 72e9a69fab..f051c4e0a1 100644
--- a/Resources/Prototypes/Entities/Clothing.yml
+++ b/Resources/Prototypes/Entities/Clothing.yml
@@ -14,6 +14,7 @@
parent: Clothing
id: ShoesItem
name: Shoes
+ description: Don't take them off at your office Christmas party
components:
- type: Sprite
texture: Items/shoes.png
@@ -29,6 +30,7 @@
parent: Clothing
id: JanitorUniform
name: Janitor Jumpsuit
+ description: The jumpsuit for the poor sop with a mop
components:
- type: Sprite
texture: Items/janitorsuit.png
@@ -44,6 +46,7 @@
parent: Clothing
id: SecurityVestClothing
name: Security Vest
+ description: Bulletproof vest, more or less
components:
- type: Sprite
texture: Clothing/armorvest.png
@@ -57,6 +60,7 @@
parent: Clothing
id: UtilityBeltClothing
name: Utility Belt
+ description: Belt for holding all your usual tools
components:
- type: Sprite
texture: Clothing/belt_utility.png
@@ -73,6 +77,7 @@
parent: Clothing
id: BackpackClothing
name: Backpack
+ description: A convenient storage pack
components:
- type: Sprite
texture: Clothing/backpack.png
@@ -88,7 +93,8 @@
- type: entity
parent: Clothing
id: MesonGlasses
- name: Mesons
+ name: Optical Meson Scanners
+ description: The pinnacle of modern science, wallhacks in real life
components:
- type: Sprite
texture: Clothing/glasses_meson.png
@@ -102,6 +108,7 @@
parent: Clothing
id: YellowGloves
name: Insulated Gloves
+ description: Electrical gloves that keep you from frying
components:
- type: Sprite
texture: Clothing/gloves_yellow.png
@@ -115,6 +122,7 @@
parent: Clothing
id: HelmetSecurity
name: Security Helmet
+ description: A slick logo covers the ear: "Concussions are better than holes!"
components:
- type: Sprite
texture: Clothing/helmet_sec.png
@@ -128,6 +136,7 @@
parent: Clothing
id: GasMaskClothing
name: Gas Mask
+ description: Regulations require these to be stocked after the fourth coolant leak
components:
- type: Sprite
texture: Clothing/gasmask.png
@@ -141,6 +150,7 @@
parent: Clothing
id: IDCardStandard
name: Identification Card
+ description: A card necessary to access various areas aboard the station
components:
- type: Sprite
texture: Clothing/idcard_standard.png
@@ -154,6 +164,7 @@
parent: Clothing
id: RadioHeadsetEars
name: Headset Radio
+ description: The radio to keep up to date in real time with fun onboard station activities
components:
- type: Sprite
texture: Clothing/ears_headset.png
diff --git a/Resources/Prototypes/Entities/Door.yml b/Resources/Prototypes/Entities/Door.yml
index 0fde1f500b..8b4defe564 100644
--- a/Resources/Prototypes/Entities/Door.yml
+++ b/Resources/Prototypes/Entities/Door.yml
@@ -1,6 +1,7 @@
- type: entity
id: DoorContent
name: Actual door
+ description: It opens, it closes!
components:
- type: Transform
- type: Clickable
diff --git a/Resources/Prototypes/Entities/Items.yml b/Resources/Prototypes/Entities/Items.yml
index f16899e2f0..ab398a0875 100644
--- a/Resources/Prototypes/Entities/Items.yml
+++ b/Resources/Prototypes/Entities/Items.yml
@@ -14,6 +14,7 @@
name: "Emergency Toolbox With Handle"
parent: BaseItem
id: RedToolboxItem
+ description: A shiny red and robust container
components:
- type: Sprite
texture: Items/toolbox_r.png
@@ -28,6 +29,7 @@
name: "Mechanical Toolbox With Handle"
parent: BaseItem
id: BlueToolboxItem
+ description: A blue box, not the kind you're thinking of
components:
- type: Sprite
texture: Items/toolbox_b.png
@@ -42,6 +44,7 @@
name: "Electrical Toolbox With Handle"
parent: BaseItem
id: YellowToolboxItem
+ description: A toolbox typically stocked with electrical gear
components:
- type: Sprite
texture: Items/toolbox_y.png
@@ -56,6 +59,7 @@
name: "Extra-Grip™ Mop"
parent: BaseItem
id: MopItem
+ description: A mop that cant be stopped, viscera cleanup detail awaits
components:
- type: Sprite
texture: Items/mop.png
@@ -69,6 +73,7 @@
name: "Lantern"
parent: BaseItem
id: FlashlightLantern
+ description: They light the way to freedom
components:
- type: Sprite
texture: Items/Flashlight.png
diff --git a/Resources/Prototypes/Entities/Mobs.yml b/Resources/Prototypes/Entities/Mobs.yml
index ca92cfc035..d231a4713d 100644
--- a/Resources/Prototypes/Entities/Mobs.yml
+++ b/Resources/Prototypes/Entities/Mobs.yml
@@ -2,9 +2,26 @@
name: Urist McHands
id: HumanMob_Content
parent: __engine_human
+ description: A miserable pile of secrets
components:
- type: Hands
hands:
- left
- right
- type: Inventory
+
+- type: entity
+ id: MobObserver
+ name: Observer
+ save: false
+ description: Boo!
+ components:
+ - type: Transform
+ - type: Sprite
+ sprite: Mob/observer.png
+ scale: 2, 2
+ drawdepth: MobBase
+ - type: Icon
+ icon: Mob/observer.png
+ - type: Physics
+ mass: 5
\ No newline at end of file
diff --git a/Resources/Prototypes/Entities/Power.yml b/Resources/Prototypes/Entities/Power.yml
index 22233797ac..249bc8330f 100644
--- a/Resources/Prototypes/Entities/Power.yml
+++ b/Resources/Prototypes/Entities/Power.yml
@@ -1,6 +1,7 @@
- type: entity
id: Wire
name: Wire
+ description: Transfers power, avoid letting things come down it
components:
- type: Transform
- type: Clickable
@@ -20,6 +21,7 @@
parent: Wire
id: BlueWire
name: BlueWire
+ description: Transfers power, and puts on a good show of it
components:
- type: Sprite
color: Blue
@@ -27,6 +29,7 @@
- type: entity
id: Generator
name: Generator
+ description: A portal to hell which summons power from the nether
components:
- type: Transform
- type: Clickable
@@ -41,6 +44,7 @@
- type: entity
id: WPPnobattery
name: WPPnobattery
+ description: Supplies power directly to nearby objects
components:
- type: Transform
- type: Clickable
@@ -58,6 +62,7 @@
parent: WPPnobattery
id: WPP
name: WPP
+ description: Supplies power at range, has a backup battery just in case
components:
- type: PowerStorage
Capacity: 1000
@@ -69,6 +74,7 @@
- type: entity
id: SMES
name: SMES
+ description: Stores power in its supermagnetic cells
components:
- type: Transform
- type: Clickable
@@ -88,6 +94,7 @@
- type: entity
id: WiredMachine
name: WiredMachine
+ description: A monstrosity that does nothing but suck up power from the nearby wires
components:
- type: Transform
- type: Clickable
@@ -105,6 +112,7 @@
- type: entity
id: WirelessMachine
name: WirelessMachine
+ description: A terrifying monstrosity that sucks up power from the wireless transmitters, Tesla would be proud
components:
- type: Transform
- type: Clickable
diff --git a/Resources/Prototypes/Entities/Projectiles.yml b/Resources/Prototypes/Entities/Projectiles.yml
index 0f256cac77..1158315fca 100644
--- a/Resources/Prototypes/Entities/Projectiles.yml
+++ b/Resources/Prototypes/Entities/Projectiles.yml
@@ -1,6 +1,7 @@
- type: entity
id: ProjectileBullet
name: ProjectileBullet
+ description: If you can see this you're dead!
components:
- type: Transform
- type: Sprite
diff --git a/Resources/Prototypes/Entities/Tools.yml b/Resources/Prototypes/Entities/Tools.yml
index a4c385eba2..9fb88cb60c 100644
--- a/Resources/Prototypes/Entities/Tools.yml
+++ b/Resources/Prototypes/Entities/Tools.yml
@@ -2,6 +2,7 @@
name: Wirecutter
parent: BaseItem
id: Wirecutter
+ description: This kills the wire.
components:
- type: Wirecutter
- type: Sprite
@@ -14,6 +15,7 @@
name: Screwdriver
parent: BaseItem
id: Screwdriver
+ description: Industrial grade torque in a small screwdriving package
components:
- type: Screwdriver
- type: Sprite
@@ -26,6 +28,7 @@
name: Welder
parent: BaseItem
id: Welder
+ description: Melts anything as long as its fueled, don't forget your eye protection
components:
- type: Welder
- type: Sprite
@@ -45,6 +48,7 @@
name: Wrench
parent: BaseItem
id: Wrench
+ description: A common tool for assembly and disassembly, righty tighty lefty loosey
components:
- type: Wrench
- type: Sprite
@@ -57,6 +61,7 @@
name: Crowbar
parent: BaseItem
id: Crowbar
+ description: A multipurpose tool to pry open doors and fight interdimensional invaders
components:
- type: Crowbar
- type: Sprite
@@ -69,6 +74,7 @@
name: Multitool
parent: BaseItem
id: Multitool
+ description: An advanced tool to copy, store, and send electrical pulses and signals through wires and machines
components:
- type: Multitool
- type: Sprite
diff --git a/Resources/Prototypes/Entities/Weapons.yml b/Resources/Prototypes/Entities/Weapons.yml
index 9ce7336ba0..3ed04cb57c 100644
--- a/Resources/Prototypes/Entities/Weapons.yml
+++ b/Resources/Prototypes/Entities/Weapons.yml
@@ -2,6 +2,7 @@
name: "LASER"
parent: BaseItem
id: LaserItem
+ description: A weapon using light amplified by the stimulated emission of radiation
components:
- type: Sprite
texture: Objects/gun.png
@@ -15,6 +16,7 @@
name: GUN
parent: BaseItem
id: GUNITEM
+ description: A rooty tooty point and shooty
components:
- type: Sprite
texture: Objects/projectileweapon.png
diff --git a/Resources/textures/Mob/observer.png b/Resources/textures/Mob/observer.png
new file mode 100644
index 0000000000..b4e5471458
Binary files /dev/null and b/Resources/textures/Mob/observer.png differ