Skip to content

Commit

Permalink
Reset the rotation of items (unitystation#10516)
Browse files Browse the repository at this point in the history
* Reset Item rotations option + UOP cleanup

* Move to core.physics

* Update UniversalObjectPhysics.cs

* Update UniversalObjectPhysics.cs
  • Loading branch information
MaxIsJoe authored Sep 4, 2024
1 parent 4898c89 commit f3aae50
Show file tree
Hide file tree
Showing 196 changed files with 2,889 additions and 2,488 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using AdminCommands;
using Core;
using UnityEngine;
using UnityEditor;
using Systems.Atmospherics;
Expand All @@ -15,6 +16,7 @@
using ScriptableObjects;
using Systems.Character;
using Systems.Score;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

namespace IngameDebugConsole
{
Expand Down
2 changes: 1 addition & 1 deletion UnityProject/Assets/Materials/BlurryVisionMaterial.mat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions UnityProject/Assets/Prefabs/Items/Item.prefab

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Core;
using HealthV2;
using Items;
using Items.Others;
Expand All @@ -10,6 +11,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

namespace Chemistry.Components
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SpawnAtJobType : CharacterAttributeBehavior
public override void Run(GameObject characterBody)
{
Transform spawnTransform;
var physics = characterBody.GetComponent<UniversalObjectPhysics>();
var physics = characterBody.GetComponent<Physics.UniversalObjectPhysics>();
// Spawn normal location for special jobs or if less than 2 minutes passed
if (GameManager.Instance.RoundTime < ARRIVALS_SPAWN_TIME)
{
Expand Down
4 changes: 2 additions & 2 deletions UnityProject/Assets/Scripts/Core/Editor/Tools/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ private static void CenterObjects()
int count = 0;
foreach (GameObject gameObject in SceneManager.GetActiveScene().GetRootGameObjects())
{
foreach (var objectPhysics in gameObject.GetComponentsInChildren<UniversalObjectPhysics>())
foreach (var objectPhysics in gameObject.GetComponentsInChildren<Physics.UniversalObjectPhysics>())
{
if (objectPhysics.SnapToGridOnStart == false) continue;

Expand Down Expand Up @@ -625,7 +625,7 @@ private static void RemoveMissingScripts()
if (Missing)
{
Undo.RegisterCompleteObjectUndo(o, "Remove missing scripts");
o.AddComponent<UniversalObjectPhysics>();
o.AddComponent<Physics.UniversalObjectPhysics>();
GameObjectUtility.RemoveMonoBehavioursWithMissingScript(o);
EditorUtility.SetDirty(o);
goCount++;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Collections.Generic;
using Core;
using Health.Objects;
using HealthV2;
using UnityEngine;
using Systems.Atmospherics;
using Tiles;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

namespace Systems.Interaction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using AddressableReferences;
using Core;
using UnityEngine;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

[CreateAssetMenu(fileName = "TableInteractionClimb", menuName = "Interaction/TileInteraction/TableInteractionClimb")]
public class TableInteractionClimb : TileInteraction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Core;
using UnityEngine;
using TileManagement;
using HealthV2;
Expand All @@ -10,6 +11,7 @@
using Objects.Wallmounts;
using ScriptableObjects;
using Tiles;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;


// TODO: namespace me to Systems.Interaction (have fun)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Core;
using Logs;
using Messages.Client.Interaction;
using UnityEngine;
Expand All @@ -14,6 +15,7 @@
using UI.Action;
using Tiles;
using UI.Core.Action;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

/// <summary>
/// Main entry point for handling all input events
Expand Down
2 changes: 2 additions & 0 deletions UnityProject/Assets/Scripts/Core/Lifecycle/Despawn.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Threading.Tasks;
using Core;
using Logs;
using UnityEngine;
using Systems.Electricity;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

/// <summary>
/// Main API for despawning objects. If you ever need to despawn something, look here
Expand Down
2 changes: 2 additions & 0 deletions UnityProject/Assets/Scripts/Core/Lifecycle/ObjectPool.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

using System.Collections.Generic;
using System.Linq;
using Core;
using Logs;
using Mirror;
using UnityEngine;
using UniversalObjectPhysics = Core.Physics.UniversalObjectPhysics;

/// <summary>
/// Encapsulates the object pool itself and all the objects in the pool.
Expand Down
Loading

0 comments on commit f3aae50

Please sign in to comment.