mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #9663 from PsiOmegaDelta/150604-StackFixes
Stack splitting and cable merging fixes.
This commit is contained in:
@@ -252,6 +252,7 @@
|
||||
var/orig_amount = src.amount
|
||||
if (transfer && src.use(transfer))
|
||||
var/obj/item/stack/newstack = new src.type(loc, transfer)
|
||||
newstack.color = color
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
transfer_fingerprints_to(newstack)
|
||||
if(blood_DNA)
|
||||
|
||||
@@ -613,6 +613,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/obj/item/stack/cable_coil/proc/can_merge(var/obj/item/stack/cable_coil/C)
|
||||
return color == C.color
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/can_merge()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/weapon/wirecutters) && src.get_amount() > 1)
|
||||
@@ -623,6 +629,11 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
if(!can_merge(C))
|
||||
user << "These coils do not go together."
|
||||
return
|
||||
|
||||
if(C.get_amount() >= get_max_amount())
|
||||
user << "The coil is too long, you cannot add any more cable to it."
|
||||
return
|
||||
|
||||
6
html/changelogs/PsiOmegaDelta-StackFixes.yml
Normal file
6
html/changelogs/PsiOmegaDelta-StackFixes.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
author: PsiOmegaDelta
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Split stacks no longer lose their coloring."
|
||||
- tweak: "Can no longer merge cables of different colors."
|
||||
Reference in New Issue
Block a user