mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Truly amazing (#23380)
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Experimental procs by ESwordTheCat!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Get index of last char occurence to string.
|
||||
*
|
||||
* @args
|
||||
* A, string to be search
|
||||
* B, char used for search
|
||||
*
|
||||
* @return
|
||||
* >0, index of char at string
|
||||
* 0, char not found
|
||||
* -1, parameter B is not a char
|
||||
* -2, parameter A is not a string
|
||||
*/
|
||||
/proc/strpos(const/A, const/B)
|
||||
if(istext(A) == 0 || length(A) < 1)
|
||||
return -2
|
||||
|
||||
if(istext(B) == 0 || length(B) > 1)
|
||||
return -1
|
||||
|
||||
var/i = findtext(A, B)
|
||||
|
||||
if(0 == i)
|
||||
return 0
|
||||
|
||||
while(i)
|
||||
. = i
|
||||
i = findtext(A, B, i + 1)
|
||||
|
||||
/proc/isInTypes(atom/Object, types)
|
||||
var/prototype = Object.type
|
||||
Object = null
|
||||
|
||||
for(var/type in params2list(types))
|
||||
if(ispath(prototype, text2path(type)))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -129,7 +129,6 @@
|
||||
#include "code\__HELPERS\colour_helpers.dm"
|
||||
#include "code\__HELPERS\constants.dm"
|
||||
#include "code\__HELPERS\debugger.dm"
|
||||
#include "code\__HELPERS\experimental.dm"
|
||||
#include "code\__HELPERS\files.dm"
|
||||
#include "code\__HELPERS\filters.dm"
|
||||
#include "code\__HELPERS\game.dm"
|
||||
|
||||
Reference in New Issue
Block a user