mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MIRROR] Fixing bugs about the worst simple_animal coded in and material tiles. (#2654)
* Fixing bugs about the worst simple_animal coded in and material tiles. (#54885) Fixed floorbots applying floor tiles onto already tiled turfs. Fixed floorbot issues with material tiles. Fixed emagged floorbots spawning lattice when deconstructing floor into plating. * Fixing bugs about the worst simple_animal coded in and material tiles. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -417,14 +417,15 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
|
||||
///Merges src into S, as much as possible. If present, the limit arg overrides S.max_amount for transfer.
|
||||
/obj/item/stack/proc/merge(obj/item/stack/S, limit)
|
||||
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
|
||||
return
|
||||
var/transfer = get_amount()
|
||||
if(S.is_cyborg)
|
||||
transfer = min(transfer, round((S.source.max_energy - S.source.energy) / S.cost))
|
||||
else
|
||||
transfer = min(transfer, S.max_amount - S.amount)
|
||||
transfer = min(transfer, (limit ? limit : S.max_amount) - S.amount)
|
||||
if(pulledby)
|
||||
pulledby.start_pulling(S)
|
||||
S.copy_evidences(src)
|
||||
|
||||
Reference in New Issue
Block a user