diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3b642ffd2fd..a092ed7b65e 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -299,9 +299,10 @@ its easier to just keep the beam vertical. //Deal with gloves the pass finger/palm prints. if(!ignoregloves) if(H.gloves && H.gloves != src) - var/obj/item/clothing/gloves/G = H.gloves - if(!prob(G.fingerprint_chance)) - return 0 + if(istype(H.gloves, /obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = H.gloves + if(!prob(G.fingerprint_chance)) + return 0 //More adminstuffz if(fingerprintslast != H.key) diff --git a/code/game/gamemodes/technomancer/devices/gloves_of_regen.dm b/code/game/gamemodes/technomancer/devices/gloves_of_regen.dm index 630a9bdb101..0056675afc5 100644 --- a/code/game/gamemodes/technomancer/devices/gloves_of_regen.dm +++ b/code/game/gamemodes/technomancer/devices/gloves_of_regen.dm @@ -19,7 +19,6 @@ min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE - var/mob/living/carbon/human/wearer = null /obj/item/clothing/gloves/regen/equipped(var/mob/living/carbon/human/H) if(H && H.gloves == src) diff --git a/code/modules/client/preference_setup/loadout/loadout_gloves.dm b/code/modules/client/preference_setup/loadout/loadout_gloves.dm index 2656e221dbe..658b2c8e12e 100644 --- a/code/modules/client/preference_setup/loadout/loadout_gloves.dm +++ b/code/modules/client/preference_setup/loadout/loadout_gloves.dm @@ -74,4 +74,28 @@ /datum/gear/gloves/fingerless display_name = "fingerless gloves" - path = /obj/item/clothing/gloves/fingerless \ No newline at end of file + path = /obj/item/clothing/gloves/fingerless + +/datum/gear/gloves/ring + display_name = "ring selection" + description = "Choose from a number of rings." + path = /obj/item/clothing/gloves/ring + cost = 1 + +/datum/gear/gloves/ring/New() + ..() + var/ringtype = list() + ringtype["CTI ring"] = /obj/item/clothing/gloves/ring/cti + ringtype["Mariner University ring"] = /obj/item/clothing/gloves/ring/mariner + ringtype["engagement ring"] = /obj/item/clothing/gloves/ring/engagement + ringtype["signet ring"] = /obj/item/clothing/gloves/ring/seal/signet + ringtype["masonic ring"] = /obj/item/clothing/gloves/ring/seal/mason + ringtype["ring, steel"] = /obj/item/clothing/gloves/ring/material/steel + ringtype["ring, iron"] = /obj/item/clothing/gloves/ring/material/iron + ringtype["ring, silver"] = /obj/item/clothing/gloves/ring/material/silver + ringtype["ring, gold"] = /obj/item/clothing/gloves/ring/material/gold + ringtype["ring, platinum"] = /obj/item/clothing/gloves/ring/material/platinum + ringtype["ring, glass"] = /obj/item/clothing/gloves/ring/material/glass + ringtype["ring, wood"] = /obj/item/clothing/gloves/ring/material/wood + ringtype["ring, plastic"] = /obj/item/clothing/gloves/ring/material/plastic + gear_tweaks += new/datum/gear_tweak/path(ringtype) \ No newline at end of file diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 80009147ce4..e8ec514e566 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -170,6 +170,7 @@ icon_state = O.icon_state set_dir(O.dir) +//////////////////////////////////////////////////////////////////////////////////////// //Gloves /obj/item/clothing/gloves name = "gloves" @@ -183,8 +184,11 @@ siemens_coefficient = 0.75 var/wired = 0 var/obj/item/weapon/cell/cell = 0 - var/overgloves = 0 var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through + var/obj/item/clothing/gloves/ring = null //Covered ring + var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping + var/glove_level = 2 //What "layer" the glove is on + var/overgloves = 0 //Used by gauntlets and arm_guards body_parts_covered = HANDS slot_flags = SLOT_GLOVES attack_verb = list("challenged") @@ -201,6 +205,8 @@ /obj/item/clothing/gloves/emp_act(severity) if(cell) cell.emp_act(severity) + if(ring) + ring.emp_act(severity) ..() // Called just before an attack_hand(), in mob/UnarmedAttack() @@ -225,6 +231,59 @@ species_restricted -= "Tajara" return */ + +/obj/item/clothing/gloves/mob_can_equip(mob/user, slot) + var/mob/living/carbon/human/H = user + + if(slot && slot == slot_gloves) + if(istype(H.gloves, /obj/item/clothing/gloves/ring)) + ring = H.gloves + if(ring.glove_level >= src.glove_level) + to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.") + ring = null + return 0 + else + H.drop_from_inventory(ring) //Remove the ring (or other under-glove item in the hand slot?) so you can put on the gloves. + ring.forceMove(src) + to_chat(user, "You slip \the [src] on over \the [src.ring].") + else + ring = null + + if(!..()) + if(ring) //Put the ring back on if the check fails. + if(H.equip_to_slot_if_possible(ring, slot_gloves)) + src.ring = null + return 0 + + wearer = H //TODO clean this when magboots are cleaned + return 1 + +/obj/item/clothing/gloves/dropped() + ..() + + if(!wearer) + return + + var/mob/living/carbon/human/H = wearer + if(ring && istype(H)) + if(!H.equip_to_slot_if_possible(ring, slot_gloves)) + ring.forceMove(get_turf(src)) + src.ring = null + wearer = null + +///////////////////////////////////////////////////////////////////// +//Rings + +/obj/item/clothing/gloves/ring + name = "ring" + w_class = ITEMSIZE_TINY + icon = 'icons/obj/clothing/rings.dmi' + gender = NEUTER + species_restricted = list("exclude", "Diona") + siemens_coefficient = 1 + glove_level = 1 + fingerprint_chance = 100 + /////////////////////////////////////////////////////////////////////// //Head /obj/item/clothing/head diff --git a/code/modules/clothing/gloves/arm_guards.dm b/code/modules/clothing/gloves/arm_guards.dm index ef7d0b28dc1..80a5cfd7353 100644 --- a/code/modules/clothing/gloves/arm_guards.dm +++ b/code/modules/clothing/gloves/arm_guards.dm @@ -5,11 +5,11 @@ overgloves = 1 w_class = ITEMSIZE_NORMAL -/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) +/obj/item/clothing/gloves/arm_guard/mob_can_equip(var/mob/living/carbon/human/H, slot) if(..()) //This will only run if no other problems occured when equiping. if(H.wear_suit) if(H.wear_suit.body_parts_covered & ARMS) - H << "You can't wear \the [src] with \the [H.wear_suit], it's in the way." + to_chat(H, "You can't wear \the [src] with \the [H.wear_suit], it's in the way.") return 0 return 1 diff --git a/code/modules/clothing/gloves/gauntlets.dm b/code/modules/clothing/gloves/gauntlets.dm index 94956ec714f..bc65252d38f 100644 --- a/code/modules/clothing/gloves/gauntlets.dm +++ b/code/modules/clothing/gloves/gauntlets.dm @@ -9,16 +9,16 @@ /obj/item/clothing/gloves/gauntlets //Used to cover gloves, otherwise act as gloves. name = "gauntlets" desc = "These gloves go over regular gloves." + glove_level = 3 overgloves = 1 var/obj/item/clothing/gloves/gloves = null //Undergloves - var/mob/living/carbon/human/wearer = null //For glove procs /obj/item/clothing/gloves/gauntlets/mob_can_equip(mob/user) var/mob/living/carbon/human/H = user if(H.gloves) gloves = H.gloves if(gloves.overgloves) - user << "You are unable to wear \the [src] as \the [H.gloves] are in the way." + to_chat(user, "You are unable to wear \the [src] as \the [H.gloves] are in the way.") gloves = null return 0 H.drop_from_inventory(gloves) @@ -30,7 +30,7 @@ gloves = null return 0 if(gloves) - user << "You slip \the [src] on over \the [gloves]." + to_chat(user, "You slip \the [src] on over \the [gloves].") wearer = H return 1 @@ -39,6 +39,7 @@ if(gloves) if(!H.equip_to_slot_if_possible(gloves, slot_gloves)) gloves.forceMove(get_turf(src)) + if(ring) + gloves.ring = ring src.gloves = null - wearer = null - ..() \ No newline at end of file + wearer = null \ No newline at end of file diff --git a/code/modules/clothing/rings/material.dm b/code/modules/clothing/rings/material.dm new file mode 100644 index 00000000000..355d6acf587 --- /dev/null +++ b/code/modules/clothing/rings/material.dm @@ -0,0 +1,47 @@ +///////////////////////////////////////// +//Material Rings +/obj/item/clothing/gloves/ring/material + icon = 'icons/obj/clothing/rings.dmi' + icon_state = "material" + +/obj/item/clothing/gloves/ring/material/New(var/newloc, var/new_material) + ..(newloc) + if(!new_material) + new_material = DEFAULT_WALL_MATERIAL + material = get_material_by_name(new_material) + if(!istype(material)) + qdel(src) + return + name = "[material.display_name] ring" + desc = "A ring made from [material.display_name]." + color = material.icon_colour + +/obj/item/clothing/gloves/ring/material/get_material() + return material + +/obj/item/clothing/gloves/ring/material/wood/New(var/newloc) + ..(newloc, "wood") + +/obj/item/clothing/gloves/ring/material/plastic/New(var/newloc) + ..(newloc, "plastic") + +/obj/item/clothing/gloves/ring/material/iron/New(var/newloc) + ..(newloc, "iron") + +/obj/item/clothing/gloves/ring/material/steel/New(var/newloc) + ..(newloc, "steel") + +/obj/item/clothing/gloves/ring/material/silver/New(var/newloc) + ..(newloc, "silver") + +/obj/item/clothing/gloves/ring/material/gold/New(var/newloc) + ..(newloc, "gold") + +/obj/item/clothing/gloves/ring/material/platinum/New(var/newloc) + ..(newloc, "platinum") + +/obj/item/clothing/gloves/ring/material/phoron/New(var/newloc) + ..(newloc, "phoron") + +/obj/item/clothing/gloves/ring/material/glass/New(var/newloc) + ..(newloc, "glass") diff --git a/code/modules/clothing/rings/rings.dm b/code/modules/clothing/rings/rings.dm new file mode 100644 index 00000000000..0bd745ed917 --- /dev/null +++ b/code/modules/clothing/rings/rings.dm @@ -0,0 +1,85 @@ +///////////////////////////////////////// +//Standard Rings +/obj/item/clothing/gloves/ring/engagement + name = "engagement ring" + desc = "An engagement ring. It certainly looks expensive." + icon_state = "diamond" + +/obj/item/clothing/gloves/ring/engagement/attack_self(mob/user) + user.visible_message("\The [user] gets down on one knee, presenting \the [src].","You get down on one knee, presenting \the [src].") + +/obj/item/clothing/gloves/ring/cti + name = "CTI ring" + desc = "A ring commemorating graduation from CTI." + icon_state = "cti-grad" + +/obj/item/clothing/gloves/ring/mariner + name = "Mariner University ring" + desc = "A ring commemorating graduation from Mariner University." + icon_state = "mariner-grad" + + +///////////////////////////////////////// +//Reagent Rings + +/obj/item/clothing/gloves/ring/reagent + flags = OPENCONTAINER + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 4) + +/obj/item/clothing/gloves/ring/reagent/New() + ..() + create_reagents(15) + +/obj/item/clothing/gloves/ring/reagent/equipped(var/mob/living/carbon/human/H) + ..() + if(istype(H) && H.gloves==src) + + if(reagents.total_volume) + to_chat(H, "You feel a prick as you slip on \the [src].") + if(H.reagents) + var/contained_reagents = reagents.get_reagents() + var/trans = reagents.trans_to_mob(H, 15, CHEM_BLOOD) + admin_inject_log(usr, H, src, contained_reagents, trans) + return + +//Sleepy Ring +/obj/item/clothing/gloves/ring/reagent/sleepy + name = "silver ring" + desc = "A ring made from what appears to be silver." + icon_state = "material" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + +/obj/item/clothing/gloves/ring/reagent/sleepy/New() + ..() + reagents.add_reagent(/datum/reagent/chloralhydrate, 15) // Less than a sleepy-pen, but still enough to knock someone out + +///////////////////////////////////////// +//Seals and Signet Rings +/obj/item/clothing/gloves/ring/seal/secgen + name = "Secretary-General's official seal" + desc = "The official seal of the Secretary-General of the Sol Central Government, featured prominently on a silver ring." + icon_state = "seal-secgen" + +/obj/item/clothing/gloves/ring/seal/mason + name = "masonic ring" + desc = "The Square and Compasses feature prominently on this Masonic ring." + icon_state = "seal-masonic" + +/obj/item/clothing/gloves/ring/seal/signet + name = "signet ring" + desc = "A signet ring, for when you're too sophisticated to sign letters." + icon_state = "seal-signet" + var/nameset = 0 + +/obj/item/clothing/gloves/ring/seal/signet/attack_self(mob/user) + if(nameset) + to_chat(user, "The [src] has already been claimed!") + return + + to_chat(user, "You claim the [src] as your own!") + change_name(user) + nameset = 1 + +/obj/item/clothing/gloves/ring/seal/signet/proc/change_name(var/signet_name = "Unknown") + name = "[signet_name]'s signet ring" + desc = "A signet ring belonging to [signet_name], for when you're too sophisticated to sign letters." \ No newline at end of file diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 63e4d939653..4a53a244056 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -36,13 +36,14 @@ user.update_inv_shoes() //so our mob-overlays update user.update_action_buttons() -/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user) +/obj/item/clothing/shoes/magboots/mob_can_equip(mob/user, slot) var/mob/living/carbon/human/H = user if(H.shoes) shoes = H.shoes if(shoes.overshoes) - user << "You are unable to wear \the [src] as \the [H.shoes] are in the way." + if(slot && slot == slot_shoes) + to_chat(user, "You are unable to wear \the [src] as \the [H.shoes] are in the way.") shoes = null return 0 H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots. @@ -55,7 +56,8 @@ return 0 if (shoes) - user << "You slip \the [src] on over \the [shoes]." + if(slot && slot == slot_shoes) + to_chat(user, "You slip \the [src] on over \the [shoes].") set_slowdown() wearer = H return 1 diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index 3e3099bbbcc..ccda4fc9f64 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -12,6 +12,8 @@ recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] armor plate", /obj/item/weapon/material/armor_plating, 1, time = 20, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] grave marker", /obj/item/weapon/material/gravemarker, 5, time = 50, supplied_material = "[name]") + recipes += new/datum/stack_recipe("[display_name] ring", /obj/item/clothing/gloves/ring/material, 1, on_floor = 1, supplied_material = "[name]") + if(integrity>=50) recipes += new/datum/stack_recipe("[display_name] door", /obj/structure/simple_door, 10, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index cee809d5961..0af97704348 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -466,7 +466,7 @@ user << browse("[name][info_links][stamps]", "window=[name]") return - else if(istype(P, /obj/item/weapon/stamp)) + else if(istype(P, /obj/item/weapon/stamp) || istype(P, /obj/item/clothing/gloves/ring/seal)) if((!in_range(src, usr) && loc != user && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != user && user.get_active_hand() != P)) return diff --git a/icons/obj/clothing/rings.dmi b/icons/obj/clothing/rings.dmi new file mode 100644 index 00000000000..5274bf8735d Binary files /dev/null and b/icons/obj/clothing/rings.dmi differ diff --git a/polaris.dme b/polaris.dme index 66e1fedb0e7..52f4a16e208 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1290,6 +1290,8 @@ #include "code\modules\clothing\masks\miscellaneous.dm" #include "code\modules\clothing\masks\monitor.dm" #include "code\modules\clothing\masks\voice.dm" +#include "code\modules\clothing\rings\material.dm" +#include "code\modules\clothing\rings\rings.dm" #include "code\modules\clothing\shoes\boots.dm" #include "code\modules\clothing\shoes\colour.dm" #include "code\modules\clothing\shoes\leg_guards.dm"