mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 06:34:45 +01:00
Merge pull request #2073 from CIB/bugfix
Make setblock able to handle block index 0
This commit is contained in:
+3
-1
@@ -188,7 +188,9 @@
|
||||
return result
|
||||
|
||||
/proc/setblock(istring, blocknumber, replacement, blocksize)
|
||||
if(!istring || !blocknumber || !replacement || !blocksize) return 0
|
||||
if(!blocknumber)
|
||||
return istring
|
||||
if(!istring || !replacement || !blocksize) return 0
|
||||
var/result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||
return result
|
||||
|
||||
|
||||
@@ -28,10 +28,12 @@ proc/createRandomZlevel()
|
||||
// var/value = null
|
||||
|
||||
if (pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = copytext(t, 1, pos)
|
||||
// value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = t
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
@@ -56,4 +58,4 @@ proc/createRandomZlevel()
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user