Commit graph

70 commits

Author SHA1 Message Date
James R
78da8bb816 ACS: add Music_Dim function, API to g_musicfade 2024-04-04 05:20:19 -07:00
toaster
bd82ca8ccf Add PlayerExiting() ACS callfunc 2024-03-30 16:38:53 +00:00
toaster
385988eeed Add PlayerLosing() to ACS
Exposes K_IsPlayerLosing. Necessary for Sealed Star script adjustment
2024-03-30 16:03:37 +00:00
Oni
973d5ba658 Merge branch 'objective-hud' into 'master'
Add persistent objective messages via K_AddMessage, expose to ACS

See merge request KartKrew/Kart!1843
2024-01-20 00:19:17 +00:00
James R
b903da899e Objective text ACS: return false
I think these are only supposed to return true if they
suspend thread execution, but I'm not sure.
2024-01-17 20:13:16 -08:00
Eidolon
bdc0795704 Fix several Clang compile warnings 2024-01-16 06:11:43 -05:00
AJ Martinez
9b224356fe Add persistent objective messages via K_AddMessage, expose to ACS 2024-01-15 17:49:10 -07:00
toaster
75205e3f79 New ACS functions (resolves #697)
- For Tutorials specifically
    - void Dialogue_AutoDismiss(void)
        - Dismisses the current dialogue (including from other threads).
    - str CheckTutorialChallenge(void)
        - Returns special values depending on state relevant to the Tutorial Challenge.
            - Returns a blank string in netgames, or if none of the following are true.
            - Returns "Active" if the skip is in progress.
            - Returns "Failed" if the skip was just failed.
            - Returns "Locked" if not available with this gamedata.
- Other tiny check functions
    - bool PositionStart(void)
        - Returns true if leveltime < starttime.
    - bool FreePlay(void)
        - Returns true if in Free Play.
2023-12-10 18:23:57 +00:00
toaster
cdb2b44aa6 ACS-Dialogue interface: New threads with dialogue auto-skip previous threads with dialogue
If some dialogue needs to be never-missable, that's the mapper's responsibility - but now they won't get randomly interleaved if multiple are activated just by regular free driving, which was the worst kind of default
2023-12-10 16:10:45 +00:00
toaster
f01e3bce9b CallFunc_DialogueSetCustomSpeaker: Support empty string 2023-11-30 17:54:51 +00:00
Oni
bcc8fc6438 Merge branch 'freeze' into 'master'
Mobj thinker freeze condition rework

Closes #690

See merge request KartKrew/Kart!1505
2023-10-02 05:42:19 +00:00
James R.
fa86512a4b ACS music functions: add optional bool to only affect player activator 2023-09-25 02:06:16 -07:00
Sally Coolatta
d3ee4d631a Add "Freeze" ACS function 2023-09-23 15:54:01 -04:00
toaster
63844b3839 ACS: Extra tidy
- Rename final BreakTheCapsules material to PrisonBreak
- Fix comment for PlayerScore (previously copypaste mistake)
2023-09-17 21:59:07 +01:00
toaster
3c1246412e ACS: Add PlayerBot
Returns bot status of activating player
ZDoom had a bot status function that could be mimiced... but it used a passed player number, when all we need to check for is the activator.
To this end, has a different name (the ZDoom version was "PlayerIsBot")
2023-09-17 21:58:56 +01:00
toaster
5926ee952a ACS: Add IsNetworkGame
- Mimics existing ZDoom(/Hexen?) ACS function for checking Netgame status
2023-09-17 21:47:19 +01:00
toaster
815e125188 Disable all g_dialogue-dependent ACS behaviour in netgame conditions
Actual solution to Test Run dialogue in servers
2023-09-17 13:50:32 +01:00
toaster
e854ce53f5 Add "GetGrabbedSprayCan" to ACS
- If netgame or no Spray Can has been grabbed on this map, return 0
- If all Spray Cans have been grabbed in other maps, return "_Completed"
- Otherwise, return the name for the Spray Can color attached to this map
2023-09-13 18:10:08 +01:00
toaster
ce86ebbd52 Add "GrandPrix" check function to ACS
Resolves #669
Done in this branch to keep ACS changes together
2023-09-13 18:06:15 +01:00
James R
baf7f82af3 HU_DoTitlecardCEcho: add splitscreen support and interrupt feature
- Takes player argument and only appears on the screen if
  they're a display player.
- Uses 4P font when in splitscreen.
- Uses 1P font if not in splitscreen, or player argument
  is NULL -- message to everyone.
- Interrupt argument controls whether the message should
  overwrite another message that's already playing.
  - Global and player specific messages are considered
    separately.
2023-08-26 21:39:18 +01:00
Sally Coolatta
3c14931764 Merge master 2023-08-25 18:39:01 -04:00
Sally Coolatta
3c8eb505cc Merge branch 'master' into thing-script-args 2023-08-25 18:32:55 -04:00
Sally Coolatta
e30ff926d8 Default voice to sfx_ktalk
Someone just needs to put an actual sound for it in sounds.pk3
2023-08-25 13:15:50 -04:00
Sally Coolatta
764010b3ab Implement talk sounds
We're in Undertale
2023-08-25 07:53:09 -04:00
Sally Coolatta
3009f1c106 Small dialogue polish
- Slide in from top
- Fix chaining multiple dialogues with the same speaker not working
- Unset when changing level
- Sped up punctuation pause a bit
2023-08-25 06:50:12 -04:00
Sally Coolatta
16e6aa423e Dialogue 2 2023-08-24 17:28:53 -04:00
James R
f234c47d8a ACS: add Music_Play, Music_StopAll and Music_Remap 2023-08-21 01:04:19 -07:00
Sally Coolatta
9d940ed654 Separate script args from mapthing args
SRB2 uses a LOT of mapthing args compared to Hexen (which has none) and ZDoom (which only has them on objects that will never ever activate scripts). So we really badly needed to separate the two if we want attaching scripts to things to be useful.
2023-08-21 03:33:04 -04:00
James R
0b9d691ad6 acs/call-funcs.cpp: add ExitLevel function 2023-08-20 00:56:05 -07:00
James R
1a3ef843a5 acs/call-funcs.cpp: add StopLevelExit function 2023-08-20 00:36:00 -07:00
James R
8a72f42818 Split G_ExitLevel into G_BeginLevelExit and G_FinishExitLevel
- Save retry condition in G_BeginLevelExit
- Apply condition in G_FinishExitLevel

Preparation for ACS level end scripts, since the exit
condition will need be known when the countdown starts,
not when it ends (that'd be too late to do anything in the
level).
2023-08-20 00:36:00 -07:00
James R
eff895178b ACS_SectorThingCounter: fix infinite loop in touching iterator 2023-08-14 18:11:33 -07:00
Sally Coolatta
ae7325cbc3 Add PlayerNumber and ActivatorTID from ZDoom 2023-08-14 04:41:19 -04:00
--get
0bb4e0b0fa ACS: Better thing counting
- ThingCount has an extra argument for sector tag.
- CountEnemies and CountPushables have an extra argument for thing tag.
- Sector tag 0 for CountEnemies and CountPushables now redirects to activator sector.
2023-08-14 03:50:45 -04:00
Sally Coolatta
80d0231e8a ACS AddBot: Push -1 on fail instead of MAXPLAYERS 2023-06-14 09:30:34 -04:00
Sally Coolatta
e6e7056aae Add bot styles & bot spawn ACS function 2023-06-14 09:16:38 -04:00
toaster
f91f075a0d ACS: void MapWarp(str mapname, bool showintermission)
An immediate level change on command, to the specified level (via string).
Utilises the existing nextmapoverride and skipstats system, but with skipstats assumed to be the default.
2023-06-02 20:56:27 +01:00
toaster
8d9b42e49b Skin name search-assistive hashing
More opportunities for early rejection in table-wide searches, in anticipation of future work.
- Many circumstances independently implemented string name comparisons. Most of these have been converted to use R_SkinAvailable, with one exception.
    - M_CharacterSelectInit already needs to iterate over the characters, so produce the skin hash independently.
2023-05-30 12:21:40 +01:00
toaster
0f266198ca ACS_GetColorFromString; Fix copypaste error indexing into skin array rather than color array
Discovered while writing the following commit.
2023-05-30 12:21:40 +01:00
Sally Coolatta
31f0df6103 ACS: Fix tag iterations not working 2023-05-02 19:30:09 -04:00
Sally Coolatta
8588881f4d ACS: Add SIDE_BOTH support for SetSideProperty 2023-05-02 18:44:30 -04:00
Sally Coolatta
4f2c47fde0 ACS: Try to fix sprnames garbage 2023-05-02 18:44:30 -04:00
Sally Coolatta
427ffceac9 ACS: Get/SetThingProperty 2023-05-02 18:44:29 -04:00
Sally Coolatta
f8744560df ACS: Add SIDE_PROP_REPEATCOUNT
Missed this one.
2023-05-02 18:44:28 -04:00
Sally Coolatta
d9382f2100 ACS: UDMF user properties
Lines, sides, sectors, and things now all support the "Custom" tab properly. Label a property as `user_[whatever you want]` in this tab, and it will be added to the structure. ACS will then be able to retrieve it using the `Get[x]UserProperty()` function.
2023-05-02 18:44:27 -04:00
Sally Coolatta
a366948c62 ACS: Remove SECTOR_PROP_SPECIAL
This is only used in binary, and ACS shouldn't be implementing any binary stuff anymore.
2023-05-02 18:44:26 -04:00
Sally Coolatta
5521284fa0 ACS: Implement Line and Side get/set functions
Additionally, these all now support tag 0 as getting/setting properties from the activator.
2023-05-02 18:44:26 -04:00
Sally Coolatta
e27e6c1353 ACS: Get/Set property prototyping
Mostly proof-of-concept so that Charyb can play around with it and tell me if it works for her.
2023-05-02 18:44:25 -04:00
Eidolon
01cc68a9b5 Fix ACS extern barriers 2023-04-10 19:57:56 -05:00
toaster
7d8fe85767 battleprisons rename compilation repair 2023-03-19 13:06:55 +00:00