1 # This file is part of Realism, which is Copyright FunnyMan3595 (Charlie Nolan)
2 # and licensed under the GNU GPL v3. For more details, see LICENSE in the main
6 def __init__(self
, name
, value
, count
):
11 def __eq__(self
, other
):
12 if self
.name
!= other
.name
:
14 if self
.value
!= other
.value
:
18 def split(self
, split_count
):
19 '''Splits this stack of items, returning a new stack with the requested size.'''
20 self
.count
-= split_count
21 return Item(self
.name
, self
.value
, split_count
)
23 def make(self
, count
):
24 '''Creates a stack of count copies of this item.'''
25 return Item(self
.name
, self
.value
, count
)