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

Lua: Continuation of #240 #390

Closed
wants to merge 2 commits into from
Closed

Conversation

YoYo178
Copy link
Contributor

@YoYo178 YoYo178 commented Dec 15, 2022

  • Added player:SetFortPoints( int ), Sets the player's fort points to a specified value.

Some of the additions below need more testing

  • Continuation of Lua: Expose more buildable functions #240
    • buildable:IsBuilt() Boolean, returns true if the buildable is built.
    • buildable:Detonate() Detonates the buildable. -- NEEDS MORE TESTING doesn't leave gibs, and even the explosion isn't visible
    • buildable:RemoveQuietly() Removes the buildable quietly.
    • buildable:IsSabotaged() Boolean, returns true if the buildable is sabotaged
    • buildable:IsMaliciouslySabotaged() Boolean, returns true if the buildable is maliciously sabotaged.
    • buildable:GetSaboteur() Returns the player who sabotaged the buildable.
    • buildable:Sabotage( player ) Sabotages the buildable. -- NEEDS MORE TESTING sg behaves weirdly, doesn't change team and starts "teamkilling" the player
    • buildable:MaliciouslySabotage( player ) Maliciously sabotages the buildable -- NEEDS MORE TESTING sg behaves weirdly, doesn't change team and starts "teamkilling" the player
    • buildable:RemoveSaboteur( bool ) Removes the saboteur from the buildable, passing a Boolean specifies if the notification should be suppressed or not. -- NEEDS MORE TESTING sg sometimes still continues to "teamkill" the player for a while even after removing saboteur
    • buildabe:CanSabotage() Boolean, returns true if the buildable can be sabotaged.

some random changes :P
(edit - created a function for builable:SetSaboteur() yet forgot to define it in ff_lualib_buildables, my bad)

@gumbuknine
Copy link

what's the difference between a sabotage and a malicious sabotage? i don't get it, isn't there just one kind of sabotage?

@YoYo178
Copy link
Contributor Author

YoYo178 commented Dec 15, 2022

what's the difference between a sabotage and a malicious sabotage? i don't get it, isn't there just one kind of sabotage?

i am confused between both of them but i'm sure, that 1 of them is when you set the sabotage (you know the bar that appears)
and the other is when you actually sabotage the sentry (it switches teams and starts killing them then dies)

@YoYo178 YoYo178 closed this Jan 2, 2024
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.

None yet

2 participants