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

Improve console commands #1354

Merged
merged 11 commits into from
Dec 1, 2023
Merged

Improve console commands #1354

merged 11 commits into from
Dec 1, 2023

Conversation

iamteapot422
Copy link
Contributor

@iamteapot422 iamteapot422 commented Nov 22, 2023

Introduce a couple of methods to remove code repetition and significantly shorten all the commands.
Also fix a little bug, where long help command was executing twice

Copy link
Contributor

@stilnat stilnat left a comment

Choose a reason for hiding this comment

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

quick review :
hit body part seems to work okay, I tested it by cutting the right arm and then calling
hitbodypart HumanHandRightItem(Clone) all toxic 1000

it destroys it instantly as expected

same test for destroy body part, I get an exception

using command destroybodypart HumanHandRightItem(Clone)

NullReferenceException: Object reference not set to an instance of an object
SS3D.Systems.IngameConsoleSystem.Commands.Command.ReceiveCheckResponse[T] (System.String[] args, SS3D.Systems.IngameConsoleSystem.Commands.Command+CheckArgsResponse& response, T& calculatedValues) (at Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/Command.cs:67)
SS3D.Systems.IngameConsoleSystem.Commands.DestroyBodyPartCommand.Perform (System.String[] args, FishNet.Connection.NetworkConnection conn) (at Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/DestroyBodyPartCommand.cs:26)
SS3D.Systems.IngameConsoleSystem.CommandsController.RpcLogic___CmdProcessOnlineCommand_161581254 (System.String commandName, System.String[] args, FishNet.Connection.NetworkConnection conn) (at Assets/Scripts/SS3D/Systems/IngameConsoleSystem/CommandsController.cs:127)

@stilnat stilnat changed the title Improve console commands [WIP] Improve console commands Nov 28, 2023
@iamteapot422 iamteapot422 changed the title [WIP] Improve console commands Improve console commands Nov 30, 2023
Copy link
Contributor

@stilnat stilnat left a comment

Choose a reason for hiding this comment

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

Tested about half commands on host and 5 or 6 on clients, everything works, code makes sense and reduce a lot the clutter. Please get your branch up to date and it's ready to merge.

Assets/Scripts/SS3D/Core/IsExternalInit.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@stilnat stilnat left a comment

Choose a reason for hiding this comment

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

all good, nice stuff, good work

@stilnat stilnat merged commit 5ece8c0 into RE-SS3D:develop Dec 1, 2023
2 checks passed
@iamteapot422 iamteapot422 deleted the console branch December 18, 2023 13:19
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