This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was generated by ChatGPT, given a list of 100 commit messages and a prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server int MyMod_DebugFilter = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------- | |
// the default pointer is "self" for use in a custom player class. | |
// For an inventory item it would be owner, etc. | |
// if (KeyCheck(BT_ATTACK, KPT_JUSTPRESSED)) { console.printf("just pressed Attack!"); } | |
// ---------------------------------------- | |
bool KeyCheck(int toCheck, int checkType = KPT_PRESSING, PlayerPawn pointer = null) { | |
if (pointer == null) { pointer = PlayerPawn(self); } // default fallback | |
if (!pointer) { return; } // nullcheck just to be safe | |
int b = pointer.player.cmd.buttons; int ob = pointer.player.oldbuttons; | |
switch (checkType) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make a string from a variable template | |
static string BuildVariableString(string msg){ | |
// some input example strings: | |
// "an empty {beer|soda|wine|champagne} bottle. {It is {cracked|broken|unlabeled}.}" | |
// "a {small|large|||} plush {emoji|cacodemon|teddy bear|furbie} toy." | |
// Collapse substrings, repeat until no more { } | |
while(true){ | |
int LeftBrace = msg.RightIndexOf("{"); // find the rightmost left-brace { | |
int RightBrace = msg.IndexOf("}",LeftBrace+1); // find the nearest matching right-brace } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type DropDef | |
Active As Integer | |
XPos As Single | |
YPos As Single | |
ZPos As Single | |
XVel As Single | |
YVel As Single | |
ZVel As Single | |
Radius As Single | |
Color As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ytd-thumbnail-overlay-time-status-renderer { | |
opacity: 0.0!important; | |
transition: opacity 0.1s!important; | |
} | |
.ytd-thumbnail:hover ytd-thumbnail-overlay-time-status-renderer { | |
opacity: 1.0!important; | |
transition: opacity 0.5s!important; | |
z-index: 2!important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NewGame: SCREEN 0: RANDOMIZE TIMER: WIDTH 80, 60: HP = 100: XP = 0: Level = 1: _FULLSCREEN | |
NewLevel: | |
CLS: NewCave = 0: Col = 40: Row = 30: TYPE MonDef: X AS INTEGER: Y AS INTEGER: END TYPE: DIM Monsters(15) AS MonDef: DIM SHARED K$ | |
FOR X = 2 TO 79: FOR Y = 2 TO 59: COLOR 8: LOCATE Y, X: PRINT "#";: NEXT: NEXT | |
FOR X = 5 TO 76: FOR Y = 5 TO 56: COLOR 8: LOCATE Y, X: PRINT ".";: NEXT: NEXT | |
FOR i = 0 TO (80 * 60 / 8): COLOR 8: LOCATE INT(52 * RND + 5), INT(72 * RND + 5): PRINT "#";: NEXT: LOCATE 1, 40: PRINT "Step 1+"; i; " ": KEYDELAY 1 | |
FOR i = 1 TO 5: FOR X = 5 TO 75: FOR Y = 5 TO 55 | |
IF RND < .15 AND (SCREEN(Y - 1, X) = 35 OR SCREEN(Y + 1, X) = 35 OR SCREEN(Y, X + 1) = 35 OR SCREEN(Y, X - 1) = 35) THEN COLOR 8: LOCATE Y, X: PRINT "#"; | |
IF SCREEN(Y, X) = 35 AND (SCREEN(Y - 1, X) = 46 AND SCREEN(Y + 1, X) = 46 AND SCREEN(Y, X + 1) = 46 AND SCREEN(Y, X - 1) = 46) THEN COLOR 8: LOCATE Y, X: PRINT "."; | |
IF RND < .005 AND SCREEN(Y, X) = 46 THEN COLOR 14: LOCATE Y, X: PRINT "*"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version "4.5" | |
// Food items that can be directly eaten | |
class ExampleMod_RedApple : UaS_Consumable { | |
default { | |
UaS_Consumable.Calories 95; // Calories | |
UaS_Consumable.Fluid 85; // Millilitres (remember most non-dehydrated foods have a lot of water in them) | |
UaS_Consumable.Bulk 10; // influences number of "bites" it takes to consume foods. | |
UaS_Consumable.Description "A medium-sized red apple."; | |
// UaS_Consumable.OpenMessage1 ""; // Random messages on opening packaged items |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version "4.3" | |
const maxparticles = 200; | |
const rad = 12; | |
class TestFireSpawner2 : actor { | |
vector3 firepos[maxparticles]; | |
vector3 firevel[maxparticles]; | |
double fireheat[maxparticles]; | |
color firecolor; |
NewerOlder