Ports the Port of Circuits

Ports PsiOmegaDelta's port of integrated circuits, which has several improvements in code quality.
Ports a few small things like the weakref datum and some macros.
This commit is contained in:
Neerti
2016-09-24 18:06:11 -04:00
parent 57c5de6d1c
commit 801a162ba7
19 changed files with 884 additions and 1088 deletions

View File

@@ -630,3 +630,14 @@
return ITEMSIZE_COST_HUGE
else
return ITEMSIZE_COST_NO_CONTAINER
/obj/item/weapon/storage/proc/make_exact_fit()
storage_slots = contents.len
can_hold.Cut()
max_w_class = 0
max_storage_space = 0
for(var/obj/item/I in src)
can_hold[I.type]++
max_w_class = max(I.w_class, max_w_class)
max_storage_space += I.get_storage_cost()