Merge pull request #1280 from Citadel-Station-13/upstream-merge-27768

[MIRROR] Cable coils New -> Initialize
This commit is contained in:
LetterJay
2017-05-29 15:01:24 -05:00
committed by GitHub

View File

@@ -527,7 +527,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return(OXYLOSS)
/obj/item/stack/cable_coil/New(loc, new_amount = null, var/param_color = null)
/obj/item/stack/cable_coil/Initialize(mapload, new_amount = null, param_color = null)
. = ..()
if(new_amount) // MAXCOIL by default
amount = new_amount
@@ -779,9 +779,9 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/cut
item_state = "coil_red2"
/obj/item/stack/cable_coil/cut/New(loc)
..()
src.amount = rand(1,2)
/obj/item/stack/cable_coil/cut/Initialize(mapload)
. =..()
amount = rand(1,2)
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_icon()
@@ -819,10 +819,11 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
item_color = "white"
icon_state = "coil_white"
/obj/item/stack/cable_coil/random/New()
/obj/item/stack/cable_coil/random/Initialize(mapload)
. = ..()
item_color = pick("red","orange","yellow","green","cyan","blue","pink","white")
icon_state = "coil_[item_color]"
..()
/obj/item/stack/cable_coil/random/five
amount = 5