Merge pull request #8996 from Ghommie/Ghommie-cit166

Adds in worn overlays for different types of cuffs.
This commit is contained in:
kevinz000
2019-08-04 19:19:19 -07:00
committed by GitHub
15 changed files with 46 additions and 31 deletions

View File

@@ -26,6 +26,7 @@
gender = PLURAL
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "handcuff"
item_state = "handcuff"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
flags_1 = CONDUCT_1
@@ -103,7 +104,6 @@
desc = "A pair of restraints fashioned from long strands of flesh."
icon = 'icons/obj/mining.dmi'
icon_state = "sinewcuff"
item_state = "sinewcuff"
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
@@ -172,6 +172,13 @@
desc = "Fake handcuffs meant for gag purposes."
breakouttime = 10 //Deciseconds = 1s
/obj/item/restraints/handcuffs/fake/kinky
name = "kinky handcuffs"
desc = "Fake handcuffs meant for erotic roleplay."
icon = 'modular_citadel/icons/obj/items_and_weapons.dmi'
icon_state = "handcuffgag"
item_state = "kinkycuff"
/obj/item/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/stack/rods))
@@ -206,7 +213,8 @@
/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"
icon_state = "zipties"
item_state = "zipties"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
materials = list()
@@ -217,7 +225,6 @@
/obj/item/restraints/handcuffs/cable/zipties/used
desc = "A pair of broken zipties."
icon_state = "cuff_used"
item_state = "cuff"
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
return
@@ -230,6 +237,7 @@
gender = PLURAL
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "handcuff"
item_state = "legcuff"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
flags_1 = CONDUCT_1

View File

@@ -67,6 +67,7 @@
name = "replicant manacles"
desc = "Heavy manacles made out of freezing-cold metal. It looks like brass, but feels much more solid."
icon_state = "brass_manacles"
item_state = "brass_manacles"
item_flags = DROPDEL
/obj/item/restraints/handcuffs/clockwork/dropped(mob/user)

View File

@@ -59,15 +59,19 @@
/mob/living/carbon/alien/humanoid/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
var/cuff_icon = "aliencuff"
if(handcuffed)
var/cuff_icon = handcuffed.item_state
var/dmi_file = 'icons/mob/alien.dmi'
if(mob_size == MOB_SIZE_LARGE)
cuff_icon = "aliencuff_[caste]"
cuff_icon += "_[caste]"
dmi_file = 'icons/mob/alienqueen.dmi'
if(handcuffed)
overlays_standing[HANDCUFF_LAYER] = mutable_appearance(dmi_file, cuff_icon, -HANDCUFF_LAYER)
var/mutable_appearance/cuffs = mutable_appearance(dmi_file, cuff_icon, -HANDCUFF_LAYER)
cuffs.color = handcuffed.color
overlays_standing[HANDCUFF_LAYER] = cuffs
apply_overlay(HANDCUFF_LAYER)
//Royals have bigger sprites, so inhand things must be handled differently.

View File

@@ -11,8 +11,8 @@
var/silent = FALSE //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
var/dreaming = 0 //How many dream images we have left to send
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
var/obj/item/restraints/handcuffed //Whether or not the mob is handcuffed
var/obj/item/restraints/legcuffed //Same as handcuffs but for legs. Bear traps use this.
var/disgust = 0

View File

@@ -473,14 +473,6 @@ There are several things that need to be remembered:
overlays_standing[BACK_LAYER] = back_overlay
apply_overlay(BACK_LAYER)
/mob/living/carbon/human/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
clear_alert("legcuffed")
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = mutable_appearance('icons/mob/mob.dmi', "legcuff1", -LEGCUFF_LAYER)
apply_overlay(LEGCUFF_LAYER)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed)
/proc/wear_female_version(t_color, icon, layer, type)
var/index = t_color
var/icon/female_clothing_icon = GLOB.female_clothing_icons[index]

View File

@@ -43,12 +43,15 @@
/mob/living/carbon/monkey/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
clear_alert("legcuffed")
if(legcuffed)
var/mutable_appearance/legcuff_overlay = mutable_appearance('icons/mob/mob.dmi', "legcuff1", -LEGCUFF_LAYER)
legcuff_overlay.pixel_y = 8
overlays_standing[LEGCUFF_LAYER] = legcuff_overlay
apply_overlay(LEGCUFF_LAYER)
var/mutable_appearance/legcuffs = mutable_appearance('icons/mob/restraints.dmi', legcuffed.item_state, -LEGCUFF_LAYER)
legcuffs.color = handcuffed.color
legcuffs.pixel_y = 8
overlays_standing[HANDCUFF_LAYER] = legcuffs
apply_overlay(LEGCUFF_LAYER)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
//monkey HUD updates for items in our inventory

View File

@@ -176,9 +176,22 @@
/mob/living/carbon/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
overlays_standing[HANDCUFF_LAYER] = mutable_appearance('icons/mob/mob.dmi', "handcuff1", -HANDCUFF_LAYER)
var/mutable_appearance/cuffs = mutable_appearance('icons/mob/restraints.dmi', handcuffed.item_state, -HANDCUFF_LAYER)
cuffs.color = handcuffed.color
overlays_standing[HANDCUFF_LAYER] = cuffs
apply_overlay(HANDCUFF_LAYER)
/mob/living/carbon/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
clear_alert("legcuffed")
if(legcuffed)
var/mutable_appearance/legcuffs = mutable_appearance('icons/mob/restraints.dmi', legcuffed.item_state, -LEGCUFF_LAYER)
legcuffs.color = handcuffed.color
overlays_standing[HANDCUFF_LAYER] = legcuffs
apply_overlay(LEGCUFF_LAYER)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
//mob HUD updates for items in our inventory

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

After

Width:  |  Height:  |  Size: 260 KiB

BIN
icons/mob/restraints.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

View File

@@ -1,5 +0,0 @@
/obj/item/restraints/handcuffs/fake/kinky
name = "kinky handcuffs"
desc = "Fake handcuffs meant for erotic roleplay."
icon = 'modular_citadel/icons/obj/items_and_weapons.dmi'
icon_state = "handcuffgag"

View File

@@ -2884,7 +2884,6 @@
#include "modular_citadel\code\game\objects\effects\temporary_visuals\projectiles\tracer.dm"
#include "modular_citadel\code\game\objects\items\balls.dm"
#include "modular_citadel\code\game\objects\items\boombox.dm"
#include "modular_citadel\code\game\objects\items\handcuffs.dm"
#include "modular_citadel\code\game\objects\items\holy_weapons.dm"
#include "modular_citadel\code\game\objects\items\honk.dm"
#include "modular_citadel\code\game\objects\items\meat.dm"