-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from Frostplays-ZERO/master
A few simple but massive things I wanted to add Includes pull request #123
- Loading branch information
Showing
47 changed files
with
1,562 additions
and
121 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Various changes to graphics | ||
|
||
"givesacoin" and "givescoinamount" for custom enemies, behaving kind of like givesalife but just for an amount of coins | ||
|
||
"givestime" and "givestimeamount" for custom enemies, behaving similarly to givesacoin but for time (music may become jank, but whatever) | ||
|
||
global booleans! can be read by entities and outputted to by collecting customenemies with "booloncollect", as well as read and written by animations. | ||
|
||
usage of "booloncollect": booloncollect should be a string with the name of your boolean, and "boolactoncollect" should be one of {"true", "false", "flip"}, depending on what you want the output to be. Useful for animations. | ||
|
||
global integers! can be used in almost any way global booleans can, ~but for now are broken and shouldn't be.~ | ||
|
||
global integers hopefully work now? | ||
|
||
added intoncollect: | ||
:intoncollect" should be a string with the name of your integer, "intactoncollect" should be one of {"add", "subtract", "set"}, and "intactvalue" should be a number, depending on what you want the output to be. Useful for red coins and stuff like that. | ||
|
||
added outputting on transform: | ||
"transfoutid" is the string with the name of your boolean/integer, "transfoutaction" is the action which is performed on the boolean/integer (any which is defined above), "transfoutvalue" should be an integer if you're outputting to an integer and false if you're outputting to a boolean, and "dontactuallytransform" can be set to true if you don't want the enemy to actually transform. there is no "outputsontransform" - transfoutid and transfoutaction serve that purpose. | ||
|
||
added playsound for animations. | ||
|
||
added a couple sounds. | ||
|
||
|
||
|
||
planned features for next commit; more things to do with integers (such as using them in numinput for animations), more things with animated tiles (such as them triggering directly on global booleans), an example mappack | ||
|
||
new random thing: animations now accept names of globints as numinput. it can also take a built-in variable such as marioworld or mariocoincount with the input "g:marioworld" or "g:mariocoincount". I think. | ||
I may also add this to globinttrigger entities. | ||
|
||
tile property #19 (next to foreground): 2x2. | ||
|
||
fix: the lowtime sound can now only play once, usually. | ||
|
||
...If anything about this is broken, help me fix it, please. | ||
|
||
|
||
|
||
realised that global integers (or glints as they will now be referred to as) can store text, so officially supported that and may add more functions for it | ||
|
||
dialog boxes and textentities can now print globools, glints, and even built-in variables using the prefixes "gb:" "gi:" or "bi:" | ||
|
||
also added the prefix "bb:" for a human-readable version of a globool... could not isolate crash on trying to update a textentity though | ||
|
||
random fix: the intro now actually says CE for more than one frame | ||
|
||
integrated turretbot's MultiCustomTiles mod unsuccessfully - help me successfully integrate it and also add a dropdown for selecting between tilesets http://forum.stabyourself.net/viewtopic.php?f=13&t=4649 | ||
|
||
updated title image - do you like it? If you don't, you don't need to include it |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
animatedbooltimer = class("animatedbooltimer") | ||
animatedbooltimerlist = {} | ||
|
||
function animatedbooltimer:init(x, y, tileno) | ||
self.x = x | ||
self.y = y | ||
self.quadi = 1 | ||
self.timer = 0 | ||
self.quadobj = tilequads[tileno] | ||
self.boolcheck = self.quadobj.boolid | ||
self.delays = self.quadobj.delays | ||
self.frametimes = {} | ||
self.length = 0 | ||
for i = 1, #self.delays do | ||
self.length = self.length + self.delays[i] | ||
self.frametimes[i] = self.length | ||
end | ||
self.dir = 0 | ||
self.oldbool = false | ||
table.insert(animatedbooltimerlist, self) | ||
end | ||
|
||
function animatedbooltimer:update(dt) | ||
local oldi = self:geti() | ||
self.timer = self.timer + dt*self.dir | ||
|
||
if self.timer > self.length then | ||
self.timer = self.length | ||
self.dir = 0 | ||
elseif self.timer < 0 then | ||
self.timer = 0 | ||
self.dir = 0 | ||
end | ||
|
||
local newbool = globoolSH(self.boolcheck, "check") | ||
if newbool ~= self.oldbool then | ||
self.oldbool = newbool | ||
self:input(newbool) | ||
end | ||
|
||
local newi = self:geti() | ||
if oldi ~= newi then | ||
local oldcol = self.quadobj.properties[oldi].collision | ||
local oldportalable = self.quadobj.properties[oldi].portalable | ||
|
||
local props = self.quadobj.properties[newi] | ||
|
||
if oldcol ~= props.collision then | ||
if props.collision then | ||
objects["tile"][self.x .. "-" .. self.y] = tile:new(self.x-1, self.y-1) | ||
else | ||
objects["tile"][self.x .. "-" .. self.y] = nil | ||
checkportalremove(self.x, self.y) | ||
end | ||
end | ||
|
||
if oldportalable ~= props.portalable then | ||
if not props.portalable then | ||
checkportalremove(self.x, self.y) | ||
end | ||
end | ||
end | ||
end | ||
|
||
function animatedbooltimer:input(t) | ||
if t == true then | ||
self.dir = 1 | ||
elseif t == false then | ||
self.dir = -1 | ||
elseif t == "toggle" then | ||
self.dir = -self.dir | ||
|
||
if self.dir == 0 then | ||
if self.timer == 0 then | ||
self.dir = 1 | ||
else | ||
self.dir = -1 | ||
end | ||
end | ||
end | ||
end | ||
|
||
function animatedbooltimer:geti() | ||
for i = 2, #self.frametimes do | ||
if self.timer > self.frametimes[i-1] and self.timer <= self.frametimes[i] then | ||
return i | ||
end | ||
end | ||
|
||
return 1 | ||
end |
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 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
Oops, something went wrong.
41bc45a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at these 1,500 lines of code, it's really dawning on me just how much I did (along with everyone else who contributed a mod merged into this). You probably won't see me for a while, what with school and all - this is taking too much of my time.