Originally Posted by
kakuke1
Haha, I think I just saw you ingame! -snip-
Yeah, I saw you in game... talking to someone else! Sounds like good features, what are you using to load teleport destinations? I attempted making a system to save/load destinations just per line in a text file... not the best.
I finally got this to work though
Code:
Poker[] pokerTables = UnityEngine.Object.FindObjectsOfType<Poker>();
this.addMessage("Poker tables: " + pokerTables.Length);
Poker pt = pokerTables[cardTable];
Player[] players =
(Player[])typeof(Poker).GetField("", BindingFlags.NonPublic | BindingFlags.Instance)
.GetValue(pt);
for (int i = 0; i < players.Length; i++)
{
if (players[i] == null) continue;
Player p = players[i];
string message = p.id + ": ";
Hand h = p.hand[0];
if (h == null) continue;
message += "\r\nhand: ";
foreach (Card c in h.cards)
{
if (c == null) continue;
c.updown2d = false;
message += "(" + c.getNameValue() + "of " + c.getSuit() + ") - ";
}
this.addMessage(message + "\r\n");
}
Also have some ghetto noclip (universal):
Code:
public class NoClipComponent : MonoBehaviour
{
private Vector3 position;
private new bool enabled;
void Start()
{
position = transform.position;
enabled = true;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Keypad5))
{
enabled = !enabled;
position = transform.position;
}
if (!enabled) return;
float value = 0.33f;
if (Input.GetKey(KeyCode.LeftShift))
{
value *= 3;
}
else if (Input.GetKey(KeyCode.LeftControl))
{
value /= 3;
}
float x = 0;
float y = 0;
float z = 0;
// forward back
if (Input.GetKey(KeyCode.Keypad8))
{
z += value;
}
if (Input.GetKey(KeyCode.Keypad2))
{
z -= value;
}
// left right
if (Input.GetKey(KeyCode.Keypad4))
{
x -= value;
}
if (Input.GetKey(KeyCode.Keypad6))
{
x += value;
}
// up down
if (Input.GetKey(KeyCode.Keypad0))
{
y -= value;
}
if (Input.GetKey(KeyCode.KeypadPeriod))
{
y += value;
}
position.x += x;
position.y += y;
position.z += z;
//transform.Translate(x, y, z);
transform.position = position;
}
}
I'm trying to add items to my inventory now. If anyone figures out a way, could they pass it along? Here's what I've tried so far:
Code:
/*for (int i = 0; i < Store.chipsPerObject.Length; i++)
{
Store.chipsPerObject[i] = 483010947; // 0
}*/
List<string> objectIDs = new List<string>();
foreach (List<StoreObject> sos in Store.storeContents)
{
foreach (StoreObject so in sos)
{
this.addMessage(so.ObjectID);
objectIDs.Add(so.ObjectID);
//Inventory.AddLocalInventory(so.ObjectID);
}
}
//Inventory.AddInventory(objectIDs.ToArray());
Store.PurchaseRPStore(objectIDs);
this.addMessage("Added " + objectIDs.Count + " items to inventory");
//SteamHandler.Purchase(Store.chipObjectIDs.ToList());
Code:
Store.purchaseType = StorePurchaseType.RP;
for (int i = 0; i < CasinoGlobal.storePurchaseType.Length; i++)
{
CasinoGlobal.storePurchaseType[i] = StorePurchaseType.RP;
}
On Update():
Code:
SteamHandler.purchaseError = PurchaseError.NONE;
SteamHandler.purchaseComplete = true;
if (SteamHandler.processing)
{
SteamHandler.ProcessingComplete(PurchaseError.NONE);
GateKeeper.ToastChipsEarned(1337);
}
None of these worked. Doing Inventory.AddToInventory showed the items as bought and I could no longer purchase them, but they did not actually exist in my inventory. Also tried local inventory.
Changing store type to RP allows me to buy them but it is the same as above. No RP is taken.
Attempted to verify steam purchases on update... didn't work.