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

Dynamic Doors #62

Merged
merged 11 commits into from
Jul 30, 2023
Merged

Dynamic Doors #62

merged 11 commits into from
Jul 30, 2023

Conversation

complexza
Copy link
Member

Overview

Dynamic Doors are cool, Allows you to actually use doors and they automatically work.

Details

You can basically open and close the doors when you place them as furniture.

Video

DynamicDoorsOn.mov
DynamicDoorsOff.mov

UI Changes / Functionality

Include a before and after screenshot/recording if applicable. Short recordings showing that your changes work are helpful, but optional. None

Testing Steps

Provide a list of repro steps on how to test that your changes are valid.

  • Did you test the changes you made?
  • Did you test core functionality of the script to ensure your changes do not regress other areas?
  • Did you test your changes in multiplayer to ensure it works correctly on all clients?

@complexza complexza changed the title Dynamic doors Dynamic Doors Jul 28, 2023
@complexza
Copy link
Member Author

Video for the Fix Commit

Before

BeforeFix.mp4

After

AfterFix.mp4

Copy link
Contributor

@BackSH00TER BackSH00TER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR! Just a couple of nit comments

README.md Outdated
https://github.com/complexza/ps-housing/assets/74205343/196bb25e-75b9-42f6-b1c3-fe86ad477544

### Setup
- You will need to set the `Config.EnableDynanicDoors = true`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit typo: EnableDynamicDoors

@@ -47,6 +47,18 @@ This will open a furniture store complete with all of the props. Select an item

> Note: The place on ground button sometimes does not work properly depending on where the native detects the ground to be.

## Dynamic Doors Preview & Setup

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe just add a note in here on what is meant by dynamic doors (ie: place doros and that they work like a door, rather than a static asset that cant be open/closed)

Side note for future, it might even be cool to see if we can make some of these interior doors lockable (i wonder if it would work with the existing doorlock systems when you place a door down??)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be something to look into for the near future I think, That wouuld be pretty sick!


### Setup
- You will need to set the `Config.EnableDynanicDoors = true`
- You will have to add this convar into your server.cfg `setr game_enableDynamicDoorCreation "true"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why is this convar needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually not sure, I just knows it makes the doors dynamic, as far as I know the convar just converts the doors into the dynamic mode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added game_enableDynamicDoorCreation network check bypass, allowing the creation of doors dynamically in a network environment (thanks to @Nikez, @z3t4s, and okqut).

I found this when it was added https://forum.cfx.re/t/cfx-re-community-pulse-june-2023-edition/5109543

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh sick! Thanks, I struggled to find docs on it!

README.md Outdated Show resolved Hide resolved
@complexza
Copy link
Member Author

image

Last Commit

@@ -34,23 +34,24 @@
class="bg-[color:var(--color-tertiary)] text-[2rem] w-[4rem] h-[4rem] text-center aspect-square"
on:click={() => {
SendNUI('selectOwnedItem', item)
console.log(item.type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console log

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed Good Sir

<i class="fa-solid fa-xmark" />
</button>
{/if}
{#if item.type != 'storage' && item.type != 'clothing'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add more item types (which I'm sure we will), this won't be very extensible and we'll potentially need to keep adding all the item types here to exclude.

@ImXirvin what was the original intention behind this check. It seems like its just to prevent them from removing the Wardrobe or Storage furniture items. Is that really necessary? I'm almost thinking we remove the conditional entirely and just show the remove furniture button on everything

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is true, If Xirvin says the check isn't really necessary, I think it might be better removing that whole check!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@complexza ya, lets just remove that check, make everything removeable.

if someone removes their stash, they'll just have to replace it again to access the items, but it shouldnt even have any effects of data loss since the stuff for creating/opening inventory is al separate, the storage items is just the means to open it

@BackSH00TER BackSH00TER merged commit c8f6153 into Project-Sloth:main Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants