Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding every possible tile data #18

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

JadlionHD
Copy link
Member

Every commit from this PR should be containing atleast 1 tile data that growtopia had.

If you have more information about specific growtopia tile data, leave a comment :D

@JadlionHD JadlionHD added enhancement New feature or request help wanted Extra attention is needed labels Aug 9, 2024
@JadlionHD
Copy link
Member Author

Also note, this PR didnt has a functional checking for every tile that been added here.
Try make a seperate PR for it.

@HTPDeveloper
Copy link

HTPDeveloper commented Aug 10, 2024

Magplant, Gaia etc

case ActionTypes.ITEM_SUCKER: {
        const flag = 0x0;
        buf = new IBuffer(23);

        this.serializeBlockData(buf, { lockPos, flagTile: flag });

        buf.writeU8(ExtraTypes.MAGPLANT);
        buf.writeU32(this.block.magplant?.itemID || 0); 
        buf.writeI32(this.block.magplant?.itemCount || 0); 
        buf.writeU16(this.block.magplant?.flags || 0x0); 
        buf.writeI32(this.block.magplant?.capacity || 5000); 

        return buf.data;
      }

@HTPDeveloper
Copy link

HTPDeveloper commented Aug 10, 2024

  Vend:
      case ActionTypes.VENDING_MACHINE: {
        const flag = 0x0;
        buf = new IBuffer(17);

        this.serializeBlockData(buf, { lockPos, flagTile: Flags.FLAGS_TILEEXTRA });

        buf.writeU8(ExtraTypes.VENDING_MACHINE);
        buf.writeU32(this.block.vendingMachine?.itemID || 0);

        let price = this.block.vendingMachine?.price|| 0;

        // Check if the price should be negative for "ITEM per WORLD LOCK"
        if (price < 0) {
            price = (price >>> 0); 
        }
  
        buf.writeI32(price); 
        return buf.data;
      }

@JadlionHD
Copy link
Member Author

Magplant, Gaia etc

case ActionTypes.ITEM_SUCKER: {
        const flag = 0x0;
        buf = new IBuffer(23);

        this.serializeBlockData(buf, { lockPos, flagTile: flag });

        buf.writeU8(ExtraTypes.MAGPLANT);
        buf.writeU32(this.block.magplant?.itemID || 0); 
        buf.writeI32(this.block.magplant?.itemCount || 0); 
        buf.writeU16(this.block.magplant?.flags || 0x0); 
        buf.writeI32(this.block.magplant?.capacity || 5000); 

        return buf.data;
      }
  Vend:
      case ActionTypes.VENDING_MACHINE: {
        const flag = 0x0;
        buf = new IBuffer(17);

        this.serializeBlockData(buf, { lockPos, flagTile: Flags.FLAGS_TILEEXTRA });

        buf.writeU8(ExtraTypes.VENDING_MACHINE);
        buf.writeU32(this.block.vendingMachine?.itemID || 0);

        let price = this.block.vendingMachine?.price|| 0;

        // Check if the price should be negative for "ITEM per WORLD LOCK"
        if (price < 0) {
            price = (price >>> 0); 
        }
  
        buf.writeI32(price); 
        return buf.data;
      }

Thank you 👍 Appreciate it

@Shulej
Copy link
Contributor

Shulej commented Aug 12, 2024

You forgot to render if provider tiles are turned left :P

case ActionTypes.PROVIDER: {
        let flag = 0x0;
        buf = new IBuffer(13);
        const date = this.block.provider?.date || 0;
        const timePassed = Math.floor((Date.now() - date) / 1000);

        if (this.block.rotatedLeft) flag |= Flags.FLAGS_ROTATED_LEFT;

        this.serializeBlockData(buf, { lockPos, flagTile: flag });

        buf.writeU8(ExtraTypes.PROVIDER);
        buf.writeU32(timePassed);
        return buf.data;
      }

@JadlionHD
Copy link
Member Author

You forgot to render if provider tiles are turned left :P

case ActionTypes.PROVIDER: {
        let flag = 0x0;
        buf = new IBuffer(13);
        const date = this.block.provider?.date || 0;
        const timePassed = Math.floor((Date.now() - date) / 1000);

        if (this.block.rotatedLeft) flag |= Flags.FLAGS_ROTATED_LEFT;

        this.serializeBlockData(buf, { lockPos, flagTile: flag });

        buf.writeU8(ExtraTypes.PROVIDER);
        buf.writeU32(timePassed);
        return buf.data;
      }

Oh yeah didn't realize that

JadlionHD and others added 5 commits August 15, 2024 15:33
* feat: added bypassVersionCheck in config.ts (#19)

* feat: added bypassVersionCheck in config.ts

* refactor: more appropriate config access

* Adding store button (#20)

Co-authored-by: Willi-js <[email protected]>

---------

Co-authored-by: badewen <[email protected]>
Co-authored-by: Willi.js <[email protected]>
Co-authored-by: Willi-js <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants