Merge pull request #3606 from Citadel-Station-13/upstream-merge-31972
[MIRROR] Greyscale cables
This commit is contained in:
@@ -88,8 +88,9 @@
|
||||
/obj/item/restraints/handcuffs/cable
|
||||
name = "cable restraints"
|
||||
desc = "Looks like some cables tied together. Could be used to tie something up."
|
||||
icon_state = "cuff_red"
|
||||
item_state = "coil_red"
|
||||
icon_state = "cuff"
|
||||
item_state = "coil"
|
||||
item_color = "red"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=75)
|
||||
@@ -98,6 +99,18 @@
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
var/datum/robot_energy_storage/wirestorage = null
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/Initialize(mapload, param_color)
|
||||
. = ..()
|
||||
|
||||
var/list/cable_colors = GLOB.cable_colors
|
||||
item_color = param_color || item_color || pick(cable_colors)
|
||||
if(cable_colors[item_color])
|
||||
item_color = cable_colors[item_color]
|
||||
update_icon()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/update_icon()
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
@@ -116,36 +129,28 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/red
|
||||
icon_state = "cuff_red"
|
||||
item_state = "coil_red"
|
||||
item_color = "red"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/yellow
|
||||
icon_state = "cuff_yellow"
|
||||
item_state = "coil_yellow"
|
||||
item_color = "yellow"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/blue
|
||||
icon_state = "cuff_blue"
|
||||
item_state = "coil_blue"
|
||||
item_color = "blue"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/green
|
||||
icon_state = "cuff_green"
|
||||
item_state = "coil_green"
|
||||
item_color = "green"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/pink
|
||||
icon_state = "cuff_pink"
|
||||
item_state = "coil_pink"
|
||||
item_color = "pink"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/orange
|
||||
icon_state = "cuff_orange"
|
||||
item_state = "coil_orange"
|
||||
item_color = "orange"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/cyan
|
||||
icon_state = "cuff_cyan"
|
||||
item_state = "coil_cyan"
|
||||
item_color = "cyan"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/white
|
||||
icon_state = "cuff_white"
|
||||
item_state = "coil_white"
|
||||
item_color = "white"
|
||||
|
||||
/obj/item/restraints/handcuffs/alien
|
||||
icon_state = "handcuffAlien"
|
||||
@@ -209,17 +214,18 @@
|
||||
/obj/item/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
|
||||
icon_state = "cuff_white"
|
||||
icon_state = "cuff"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
materials = list()
|
||||
breakouttime = 450 //Deciseconds = 45s
|
||||
trashtype = /obj/item/restraints/handcuffs/cable/zipties/used
|
||||
item_color = "white"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties/used
|
||||
desc = "A pair of broken zipties."
|
||||
icon_state = "cuff_white_used"
|
||||
item_state = "cuff_white"
|
||||
icon_state = "cuff_used"
|
||||
item_state = "cuff"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
|
||||
return
|
||||
|
||||
@@ -169,6 +169,11 @@
|
||||
W.ini_dir = W.dir
|
||||
//END: oh fuck i'm so sorry
|
||||
|
||||
else if(istype(O, /obj/item/restraints/handcuffs/cable))
|
||||
var/obj/item/cuffs = O
|
||||
cuffs.item_color = item_color
|
||||
cuffs.update_icon()
|
||||
|
||||
if (QDELETED(O))
|
||||
return //It's a stack and has already been merged
|
||||
|
||||
@@ -261,7 +266,7 @@
|
||||
if (user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
change_stack(user,1)
|
||||
return change_stack(user,1)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user