You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
added more to Peep, PeepInformation simplified, and more enums
This commit is contained in:
@@ -195,6 +195,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4953467779861283896}
|
||||
- component: {fileID: 3727345424867289936}
|
||||
- component: {fileID: -4484499083211921036}
|
||||
m_Layer: 0
|
||||
m_Name: Peep
|
||||
@@ -220,6 +221,19 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &3727345424867289936
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5040585313333409549}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1.2975366, y: 2.530463, z: 1.367513}
|
||||
m_Center: {x: 0.006939371, y: 1.3687063, z: 0.036323763}
|
||||
--- !u!114 &-4484499083211921036
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -232,22 +246,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f60834235e1dc684496126a3b6483623, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
type: PLACEHOLDER
|
||||
state: PLACEHOLDER
|
||||
insideThePark:
|
||||
subState:
|
||||
ridesDone:
|
||||
TshirtColour:
|
||||
TrouserColour:
|
||||
TryingToGetTo:
|
||||
DestinationTolerance:
|
||||
intensity:
|
||||
nauseaTolerance:
|
||||
energy: 0
|
||||
happiness: 0
|
||||
hunger: 0
|
||||
thirst: 0
|
||||
toilet: 0
|
||||
--- !u!1 &5666364763405130879
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -21,18 +21,21 @@ namespace OpenRCT2.Unity
|
||||
public byte staffTypeOrNoOfRides; // union of staff type or no. of rides.
|
||||
public byte tshirtColour;
|
||||
public byte trousersColour;
|
||||
public ushort destinationX;
|
||||
public ushort destinationX; // Location that the peep is trying to get to
|
||||
public ushort destinationY;
|
||||
public byte destinationTolerance; // How close the peep is to his destination
|
||||
public byte var37; // Unsure what this is
|
||||
public byte destinationTolerance; // How close to destination before next action/state 0 = exact
|
||||
public byte var37;
|
||||
public byte energy;
|
||||
public byte energyTarget;
|
||||
public byte happiness;
|
||||
public byte happinessTarget;
|
||||
public byte nausea;
|
||||
public byte nauseaTarget;
|
||||
public byte hunger;
|
||||
public byte thirst;
|
||||
public byte toilet;
|
||||
public byte timeToConsume; // Unsure what this is
|
||||
public byte mass;
|
||||
public byte timeToConsume;
|
||||
public byte intensity; // The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits
|
||||
public byte nauseaTolerance;
|
||||
public byte windowInvalidateFlags;
|
||||
@@ -51,7 +54,7 @@ namespace OpenRCT2.Unity
|
||||
public PeepActionSprite actionSpriteType;
|
||||
public PeepActionSprite nextActionSpriteType;
|
||||
public byte actionSpriteImageOffset;
|
||||
public PeepActionSprite action;
|
||||
public PeepAction action;
|
||||
public byte actionFrame;
|
||||
public byte stepProgress;
|
||||
public ushort MechanicTimeSinceCallOrNextInQueue; // time getting to ride to fix
|
||||
@@ -63,7 +66,6 @@ namespace OpenRCT2.Unity
|
||||
public long ridesBeenOn3;
|
||||
public long ridesBeenOn4;
|
||||
public uint Id2;
|
||||
|
||||
public int cashInPocket;
|
||||
public int cashSpent;
|
||||
public int timeInPark;
|
||||
|
||||
@@ -4,61 +4,22 @@ using UnityEngine;
|
||||
|
||||
public class PeepInformation : MonoBehaviour
|
||||
{
|
||||
/*
|
||||
public int value; // will show
|
||||
[SerializeField] private int serPrivValue; // will show
|
||||
[SerializeField] private int serProtValue; // will show
|
||||
private int privValue; // will not show
|
||||
protected int protValue; // will not show
|
||||
[Header("Button Settings")]
|
||||
[Tooltip("Arbitary text message")]
|
||||
*/
|
||||
|
||||
[Header("Peep General Information")]
|
||||
public string name;
|
||||
public string type;
|
||||
public string insideThePark;
|
||||
public string timeInPark;
|
||||
|
||||
[Header("Peep Activity")]
|
||||
public string state;
|
||||
public string subState;
|
||||
public string ridesDone;
|
||||
public string TryingToGetTo;
|
||||
public string DestinationTolerance;
|
||||
public string intensity;
|
||||
public string nauseaTolerance;
|
||||
public string actionSprite;
|
||||
|
||||
[Header("Peep Needs")]
|
||||
[Range(0, 256)] public int energy;
|
||||
[Range(0, 256)] public int happiness;
|
||||
[Range(0, 256)] public int hunger;
|
||||
[Range(0, 256)] public int thirst;
|
||||
[Range(0, 256)] public int toilet;
|
||||
|
||||
private string name;
|
||||
void OnMouseDown()
|
||||
{
|
||||
Debug.Log("Clicked: " + name);
|
||||
}
|
||||
|
||||
public void UpdateInformation(OpenRCT2.Unity.Peep peep)
|
||||
{
|
||||
name = $"{(peep.Name != null ? peep.Name : "null")}";
|
||||
type = $"{peep.type}";
|
||||
state = $"{peep.state}";
|
||||
insideThePark = $"{(peep.outsideOfPark == 0 ? "Yes" : "No")}";
|
||||
subState = $"{peep.substate}";
|
||||
ridesDone = $"{peep.staffTypeOrNoOfRides}";
|
||||
TryingToGetTo = $"{(peep.destinationX + peep.destinationY)}";
|
||||
DestinationTolerance = $"{peep.destinationTolerance}";
|
||||
|
||||
energy = peep.energy;
|
||||
happiness = peep.happiness;
|
||||
hunger = peep.hunger;
|
||||
thirst = peep.thirst;
|
||||
toilet = peep.toilet;
|
||||
|
||||
intensity = $"{peep.intensity}";
|
||||
nauseaTolerance = $"{peep.nauseaTolerance}";
|
||||
actionSprite = $"{peep.actionSpriteType}";
|
||||
timeInPark = $"{peep.timeInPark}";
|
||||
name = $"{peep.type} {peep.Id}";
|
||||
/*
|
||||
var intensityBinary = System.Convert.ToString(peep.intensity, 2);
|
||||
var maxIntensityString = System.Convert.ToString(peep.intensity >> 4);
|
||||
var minIntensityString = System.Convert.ToString(peep.intensity & 0b1111);
|
||||
|
||||
minIntensity = $"{minIntensityString}";
|
||||
maxIntensity = $"{maxIntensityString}";
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user