Skip to content

Commit

Permalink
add: Abstract item stacking. Client lag removal edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell committed Nov 19, 2024
1 parent f6fcbcc commit 4c12490
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/game/objects/items/weapons/storage/stacked.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* This code contains abstract stacked item. Main goal of this is to make items dropping from storages, smartfridges, etc. not lag the clients out.
* It is, as simple is possible, tries to implement stacked items behavior like in storages.
* Main features:
* - Items appear stacked when dropped from smartfridge on destruction or when amount taken at one time is too high
* - Same rule applies to bags or storages with display_contents_with_number and allow_quick_empty properties enabled
* - Can't be taken by hand. Instead, player takes one sample from entire stack.
* - Same rule applies to pulling. Player pulls only one sample from entire stack.
* - Player can walk over stack.
* - Integrity of stack is determenied by summary of stacked items.
* - One by one items are deleted from stack if stack is damaged by integrity of one stack item.
*/
1 change: 1 addition & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@
#include "code\game\objects\items\weapons\storage\internal.dm"
#include "code\game\objects\items\weapons\storage\lockbox.dm"
#include "code\game\objects\items\weapons\storage\secure.dm"
#include "code\game\objects\items\weapons\storage\stacked.dm"
#include "code\game\objects\items\weapons\storage\storage.dm"
#include "code\game\objects\items\weapons\storage\toolbox.dm"
#include "code\game\objects\items\weapons\storage\uplink_kits.dm"
Expand Down

0 comments on commit 4c12490

Please sign in to comment.