turnstates
This commit is contained in:
parent
1a13781220
commit
cd85677efd
57 changed files with 1813 additions and 104 deletions
27
eastern flames/scripts/lb_auto/lb_auto.gml
Normal file
27
eastern flames/scripts/lb_auto/lb_auto.gml
Normal file
|
@ -0,0 +1,27 @@
|
|||
function lb_auto(str, maxlength) {
|
||||
var possible = true;
|
||||
var j;
|
||||
var lbcount = 0;
|
||||
var specialchars = 0;
|
||||
for (i=0; i<string_length(str); i++) {
|
||||
while string_char_at(str, i) = "|" {
|
||||
c_badpractice(str);
|
||||
}
|
||||
if string_char_at(str, i) == "#" lbcount = 0;
|
||||
//if string_char_at(str, i) == "|" lbcount -= 2;
|
||||
if lbcount >= maxlength {
|
||||
for (j=0; j<lbcount; j++) {
|
||||
if string_char_at(str, i-j) == " " && lbcount-j < maxlength {
|
||||
str = string_insert("#", str, i-j);
|
||||
str = string_delete(str, i-j+1, 1);
|
||||
possible = true;
|
||||
break;
|
||||
}
|
||||
possible = false;
|
||||
}
|
||||
lbcount = j;
|
||||
}
|
||||
lbcount++;
|
||||
}
|
||||
return str;
|
||||
}
|
12
eastern flames/scripts/lb_auto/lb_auto.yy
Normal file
12
eastern flames/scripts/lb_auto/lb_auto.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "Scripts",
|
||||
"path": "folders/Scripts.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "lb_auto",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue