Files
VOREStation/code/modules/scripting/stack.dm
Kashargul 1def015bad end of file Fix (#17308)
* end of file Fix

* fix those lints too
2025-03-10 16:15:35 -04:00

22 lines
427 B
Plaintext

/stack
var/list/contents=new
/stack/proc/Push(value)
contents+=value
/stack/proc/Pop()
if(!contents.len) return null
. = contents[contents.len]
contents.len--
/stack/proc/Top() //returns the item on the top of the stack without removing it
if(!contents.len) return null
return contents[contents.len]
/stack/proc/Copy()
var/stack/S=new()
S.contents=src.contents.Copy()
return S
/stack/proc/Clear()
contents.Cut()