mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-12 08:43:26 +01:00
[MIRROR] Staticpath [MDB ignore] (#12445)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cc106f8032
commit
ba5224fbcb
@@ -1,21 +1,21 @@
|
||||
/stack
|
||||
/datum/stack
|
||||
var/list/contents=new
|
||||
/stack/proc/Push(value)
|
||||
/datum/stack/proc/Push(value)
|
||||
contents+=value
|
||||
|
||||
/stack/proc/Pop()
|
||||
/datum/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
|
||||
/datum/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()
|
||||
/datum/stack/proc/Copy()
|
||||
var/datum/stack/S=new()
|
||||
S.contents=src.contents.Copy()
|
||||
return S
|
||||
|
||||
/stack/proc/Clear()
|
||||
/datum/stack/proc/Clear()
|
||||
contents.Cut()
|
||||
|
||||
Reference in New Issue
Block a user