Posts by yahwho

A small new update is available now!
Update: The standalone should now be available! Sorry for the delay!

    Hi Red,


    We could do with a few more PlayerEvent classes, I will update this post as and when to keep them all together.


    PlayerPlaceOreEvent - player is placing ore in a furnace

    PlayerPlaceUncookedFoodEvent (probably with a better name) - event listener for placing food in an oven, on cooking grate etc


    PlayerSheerSheepEvent (or similar)


    PlayerPlacePeltEvent (or similar) - I know picking up a pelt from a drying rack triggers the OnPlayerRemoveObjectEvent event, so maybe placing pelts need to triggered on the OnPlayerPlaceObjectEvent



    PlayerPlacePaintObjectEvent - both for painting and paint removal

    Addition:


    PlayerDestroyTerrainEvent - not the event itself (already exists) moreso the getTerrainID always returns 1. So there are no means to determine what has been hit.

    Argh, looks like even if you set a status of a door to open via the API, if it's locked you still can't open it. :dizzy:



    Java
    println("obj.getStatus() = " + obj.getStatus(), PrintlnColour.YELLOW); //prints 0 (locked door)
    final byte next = (obj.getStatus() == 0) ? (byte) 1 : (byte) 0;//flip the bit
    obj.setStatus(next);//sets to 1



    Console states "Door <long id> is locked..."





    EDIT: Wait a minute... not 1 its 100 :crazy: let me try that...
    EDIT2: Nope, setting to 100 still doesn't override the lock.

    I have tried this, but the elementObject does not have a getObjectDefinition method exposed in the API. :wat:


    Unless I'm incorrectly assuming that elementObject variable is a ObjectElement object?



    Hi Red,


    I see there are Objects.Type definitions.


    It would be great if we could get a ElementObject and get the Type definition.


    Sudo:


    Code
    if (elementObject instanceof Object.Storage) { ... }


    At the moment I'm having to use elementObject.getObjectID() then a comparison.

    Hi red51

    One last question (or two) here regarding modals...

    Is it possible to override the text that is displayed on the buttons?

    And, is it possible to change the alignment of text so it's, for example, aligned to the left?

    But we could add a method to the Internals class which enables you to apply custom StyleSheets to any UI element (this way you would be able to override the hover style of built-in elements)

    That would be awesome Red :thumbup:


    As a result, you can only load custom StyleSheets from AssetBundles atm

    Annoyance yes I agree, but If I wrapped it in a loader this would hopefully only be an annoyanceonce :saint:

    red51


    So is it possible override the hover background colour on modal windows like the Accept_Decline one?


    I see that the Style is based on IStyle in Unity, and that uses USS for this, I am assuming USS is Unity's version of CSS?

    I'm almost certain I did mention this a while back... but now you have me thinking 🤔😅


    If I understand correctly you want to be able to change the default cursor as well as set custom cursors when hovering API-created UI elements?


    Exactly this.


    I think this could be done by a new onMouseMove method and moving a image x y pos, but then again, this may trigger too many events and may not be feasible and may end up being clunky.


    It's more a "would be nice" API access, it's certainly not a show stopper :D