Merge remote-tracking branch 'upstream/master' into remove-weapons

This commit is contained in:
Fox McCloud
2018-04-19 17:01:38 -04:00
25 changed files with 426 additions and 338 deletions
@@ -32,6 +32,7 @@
********************/
/obj/machinery/kitchen_machine/New()
..()
create_reagents(100)
reagents.set_reacting(FALSE)
if(!available_recipes)
+35 -22
View File
@@ -184,6 +184,10 @@ By design, d1 is the smallest direction and d2 is the highest
shock(user, 5, 0.2)
else if(istype(W, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = W
cable_color(C.colourName)
else
if(W.flags & CONDUCT)
shock(user, 50, 0.7)
@@ -218,11 +222,18 @@ By design, d1 is the smallest direction and d2 is the highest
qdel(src) // qdel
return
obj/structure/cable/proc/cableColor(var/colorC)
var/color_n = "#DD0000"
obj/structure/cable/proc/cable_color(var/colorC)
if(colorC)
color_n = colorC
color = color_n
if(colorC == "rainbow")
color = color_rainbow()
else
color = colorC
else
color = "#DD0000"
/obj/structure/cable/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
return color
/////////////////////////////////////////////////
// Cable laying helpers
@@ -588,30 +599,20 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
..()
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
// Cable merging is handled by parent proc
if(C.amount >= MAXCOIL)
to_chat(user, "The coil is too long, you cannot add any more cable to it.")
to_chat(user, "The coil is as long as it will get.")
return
if( (C.amount + src.amount <= MAXCOIL) )
to_chat(user, "You join the cable coils together.")
C.give(src.amount) // give it cable
src.use(src.amount) // make sure this one cleans up right
return
else
var/amt = MAXCOIL - C.amount
to_chat(user, "You transfer [amt] length\s of cable from one coil to the other.")
C.give(amt)
src.use(amt)
to_chat(user, "You transfer [get_amount_transferred()] length\s of cable from one coil to the other.")
return
//add cables to the stack
/obj/item/stack/cable_coil/proc/give(var/extra)
if(amount + extra > MAXCOIL)
amount = MAXCOIL
else
amount += extra
update_icon()
if(istype(W, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = W
cable_color(C.colourName)
///////////////////////////////////////////////
// Cable laying procedures
@@ -619,7 +620,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
/obj/item/stack/cable_coil/proc/get_new_cable(location)
var/obj/structure/cable/C = new(location)
C.cableColor(color)
C.cable_color(color)
return C
@@ -736,7 +737,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
return
C.cableColor(color)
C.cable_color(color)
C.d1 = nd1
C.d2 = nd2
@@ -806,6 +807,18 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
/obj/item/stack/cable_coil/proc/cable_color(var/colorC)
if(colorC)
if(colorC == "rainbow")
colorC = color_rainbow()
color = colorC
else
color = COLOR_RED
/obj/item/stack/cable_coil/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
return color
/obj/item/stack/cable_coil/cyborg
name = "cyborg cable coil"
+1 -1
View File
@@ -24,5 +24,5 @@
else
..()
/obj/structure/cable/heavyduty/cableColor(var/colorC)
/obj/structure/cable/heavyduty/cable_color(var/colorC)
return