Commit graph

56 commits

Author SHA1 Message Date
toaster
5ccdd4fd12 Environment::printKill: Use sizeu1 for system-independent pointer prints 2024-05-21 00:37:00 +01:00
Lactozilla
51ac2cf61a Add branch limit and implement printKill 2024-05-11 22:08:31 -03:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
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
AJ Martinez
7b2c5276c6 Add opcodes for HUD message system 2024-01-17 00:46:22 -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
Sal
84543da38a Implement getModuleName for ACS environment 2023-11-22 14:37:07 +00:00
toaster
dce2c73df1 thinker_era
A first pass in attempts to fix crashes when ACS causes map changes.
Frustratingly still got a crash, but I think this is definitely the right foundation to work with.
2023-11-04 17:11:59 +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
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
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
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
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
e6e7056aae Add bot styles & bot spawn ACS function 2023-06-14 09:16:38 -04:00
Sal
7b98752b67 Merge branch 'refactor-mapthing' into 'master'
Read-only mapthing_t

See merge request KartKrew/Kart!1252
2023-06-14 00:07:42 +00: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
Sally Coolatta
9d80323a3a Read-only mapthing_t
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.

So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
2023-05-25 14:40:55 -04:00
Sally Coolatta
427ffceac9 ACS: Get/SetThingProperty 2023-05-02 18:44:29 -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
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
Sally Coolatta
825f78457c Fix default args being undefined instead of 0 2023-03-22 16:37:47 -04:00
Sally Coolatta
181501860f Make stringarg application consistent
stringarg[0] and stringarg[1] are now are used as doubles of arg[0] and arg[1]. Specials that use both string args and regular args need to shift their args up to accomedate. This makes the behavior align more closely with the other Doom ports and removes a dumb manual string arg amount thing in callSpecImpl.

I only adjusted the specials that can be called from ACS. I did not mess with level load specials or thing types, since it's not as important. It would be nice to clean them up before release for consistency, though.
2023-03-14 08:03:20 -04:00
Sally Coolatta
62dd76dbcd Use a modified ACSVM to support 10 arg linedefs 2023-03-14 08:03:19 -04:00
Sally Coolatta
00063307bc Add TimeAttack ACS function 2023-03-14 08:03:18 -04:00
Sally Coolatta
e4a6124805 Add BreakTheCapsules ACS function
Returns true or false if the map is being played in Break the Capsules or not.
2023-03-14 08:02:58 -04:00
Sally Coolatta
28354ec70e SetLineRenderStyle ACS function
SetLineRenderStyle(int tag, int blend, int alpha)

Changes the blend mode and transparency of a linedef. Requires new compiler config for the blend mode constants.
2023-03-14 08:02:58 -04:00
Sally Coolatta
c4525a61a2 Add results screen 2023-03-03 17:30:35 -05:00
Sally Coolatta
0f9f10d90f Add PodiumPosition ACS function
Returns the best position of all non-CPU players.
2023-03-03 16:10:04 -05:00
Sally Coolatta
9073d5bd17 Add CameraWait ACS function
Pauses a script until the tagged camera has no more waypoints to follow.
2023-03-03 16:10:03 -05:00
James R
eab22f645c Merge branch 'titlecard-cecho' into 'master'
Titlecard CEcho

See merge request KartKrew/Kart!952
2023-03-01 17:21:13 +00:00
James R
70cd31e04d ACS: include required C++ headers 2023-02-22 03:20:47 -08:00
James R
3e9b2e45e5 ACS: include libraries headers before any game headers 2023-02-22 03:20:47 -08:00
Lat
9f1e5d08c2 Allow multiple lines in titlecard cecho, overwrite cecho in ACS instead of making a new action 2023-02-21 20:56:45 +01:00