From 6ee45ff44f1d745c190caead670efcfacfa505d5 Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:13:45 +0200 Subject: [PATCH 1/2] life crystals need to be equiped by their owner --- citadel.dme | 1 + code/modules/vore/fluffstuff/custom_items.dm | 121 -------------- code/modules/vore/fluffstuff/life_crystals.dm | 156 ++++++++++++++++++ 3 files changed, 157 insertions(+), 121 deletions(-) create mode 100644 code/modules/vore/fluffstuff/life_crystals.dm diff --git a/citadel.dme b/citadel.dme index c8e98a9627d2..5b28681f4521 100644 --- a/citadel.dme +++ b/citadel.dme @@ -4762,6 +4762,7 @@ #include "code\modules\vore\fluffstuff\custom_items_cit.dm" #include "code\modules\vore\fluffstuff\custom_mecha.dm" #include "code\modules\vore\fluffstuff\custom_permits.dm" +#include "code\modules\vore\fluffstuff\life_crystals.dm" #include "code\modules\vore\fluffstuff\guns\bsharpoon.dm" #include "code\modules\vore\fluffstuff\guns\crestrose.dm" #include "code\modules\vore\fluffstuff\guns\dominator.dm" diff --git a/code/modules/vore/fluffstuff/custom_items.dm b/code/modules/vore/fluffstuff/custom_items.dm index 9e08915a4b17..a49ccfa82bf9 100644 --- a/code/modules/vore/fluffstuff/custom_items.dm +++ b/code/modules/vore/fluffstuff/custom_items.dm @@ -411,127 +411,6 @@ icon_state = "amp" body_cover_flags = 0 -//Lots of people are using this now. -/obj/item/clothing/accessory/collar/vmcrystal - name = "life crystal" - desc = "A small crystal with four little dots in it. It feels slightly warm to the touch. \ - Read manual before use! Can be worn, held, or attached to uniform. NOTE: Device contains antimatter." - w_class = ITEMSIZE_SMALL - - icon = 'icons/vore/custom_items_vr.dmi' - icon_override = 'icons/vore/custom_items_vr.dmi' - - icon_state = "khlife" - item_state = "khlife_overlay" - overlay_state = "khlife_overlay" - - slot_flags = SLOT_TIE - - var/mob/owner = null - var/client/owner_c = null //They'll be dead when we message them probably. - var/state = 0 //0 - New, 1 - Paired, 2 - Breaking, 3 - Broken (same as iconstates) - -/obj/item/clothing/accessory/collar/vmcrystal/Initialize(mapload) - . = ..() - update_state(0) - -/obj/item/clothing/accessory/collar/vmcrystal/Destroy() //Waitwaitwait - if(state == 1) - process() //Nownownow - return ..() //Okfine - -/obj/item/clothing/accessory/collar/vmcrystal/process(delta_time) - check_owner() - if((state > 1) || !owner) - STOP_PROCESSING(SSobj, src) - -/obj/item/clothing/accessory/collar/vmcrystal/attack_self(mob/user) - . = ..() - if(.) - return - if(state > 0) //Can't re-pair, one time only, for security reasons. - to_chat(user, "The [name] doesn't do anything.") - return 0 - - owner = user //We're paired to this guy - owner_c = user.client //This is his client - update_state(1) - to_chat(user, "The [name] glows pleasantly blue.") - START_PROCESSING(SSobj, src) - -/obj/item/clothing/accessory/collar/vmcrystal/proc/check_owner() - //He's dead, jim - if((state == 1) && owner && (owner.stat == DEAD)) - update_state(2) - audible_message("The [name] begins flashing red.") - sleep(30) - visible_message("The [name] shatters into dust!") - if(owner_c) - to_chat(owner_c, "The HAVENS system is notified of your demise via \the [name].") - update_state(3) - name = "broken [initial(name)]" - desc = "This seems like a necklace, but the actual pendant is missing." - -/obj/item/clothing/accessory/collar/vmcrystal/proc/update_state(var/tostate) - state = tostate - icon_state = "[initial(icon_state)][tostate]" - update_icon() -/* -/obj/item/paper/vmcrystal_manual - name = "VM-LC91-1 manual" - info = {"
The VeyMed Life Crystal is a small device typically worn around the neck for the purpose of reporting your status to the HAVENS (VeyMed's High-AVailability ENgram Storage) system, so that appropriate measures can be taken in the case of your body's demise. The whole device is housed inside a pleasing-to-the-eye elongated diamond.
-Upon your body's desmise, the crystal will send a transmission to HAVENS. Depending on your membership level, the appropriate actions can be taken to ensure that you are back up and enjoying existence as soon as possible.
- -Nanotrasen has negotiated a FREE Star membership for you in the HAVENS system, though an upgrade can be obtained depending on your citizenship and reputation level.
- - As a reminder, the membership levels in HAVENS are: -The Life Crystal is a small 5cm long diamond containing four main components which are visible inside the translucent gem.
- - From tip to top, they are: -The diamond itself is coated in a layer of graphene, to give it a pleasant rainbow finish. This also serves as a conductor that, if broken, will discharge the antimatter bottle immediately as it is unsafe to do so any point after the crystal is broken via physical means.
-This device contains antimatter. Please consult all local regulations when travelling to ensure compliance with local laws.
"} -*/ -/obj/item/storage/box/vmcrystal - name = "life crystal case" - icon = 'icons/vore/custom_items_vr.dmi' - icon_state = "khlifebox" - desc = "This case can only hold the VM-LC91-1 and a manual." - item_state_slots = list(SLOT_ID_RIGHT_HAND = "syringe_kit", SLOT_ID_LEFT_HAND = "syringe_kit") - storage_slots = 2 - can_hold = list(/obj/item/clothing/accessory/collar/vmcrystal) - max_storage_space = ITEMSIZE_COST_SMALL * 2 - w_class = ITEMSIZE_SMALL - -/obj/item/storage/box/vmcrystal/Initialize(mapload) - . = ..() -// new /obj/item/paper/vmcrystal_manual(src) - new /obj/item/clothing/accessory/collar/vmcrystal(src) - /obj/item/cane/fluff name = "cane" desc = "A cane used by a true gentlemen. Or a clown." diff --git a/code/modules/vore/fluffstuff/life_crystals.dm b/code/modules/vore/fluffstuff/life_crystals.dm new file mode 100644 index 000000000000..aa79762f2f68 --- /dev/null +++ b/code/modules/vore/fluffstuff/life_crystals.dm @@ -0,0 +1,156 @@ +//Lots of people are using this now. +/obj/item/clothing/accessory/collar/vmcrystal + name = "life crystal" + desc = "A small crystal with four little dots in it. It feels slightly warm to the touch. \ + Read manual before use! Can be worn, held, or attached to uniform. NOTE: Device contains antimatter." + w_class = ITEMSIZE_SMALL + + icon = 'icons/vore/custom_items_vr.dmi' + icon_override = 'icons/vore/custom_items_vr.dmi' + + icon_state = "khlife" + item_state = "khlife_overlay" + overlay_state = "khlife_overlay" + + slot_flags = SLOT_TIE + + var/mob/owner = null + var/client/owner_c = null //They'll be dead when we message them probably. + var/state = 0 //0 - New, 1 - Paired, 2 - Breaking, 3 - Broken (same as iconstates) + var/last_vitals //Write world.time in once owner dies or the crystal is removed + +/obj/item/clothing/accessory/collar/vmcrystal/Initialize(mapload) + . = ..() + update_state(0) + +/obj/item/clothing/accessory/collar/vmcrystal/Destroy() //Waitwaitwait + if(state == 1) + process() //Nownownow + return ..() //Okfine + +/obj/item/clothing/accessory/collar/vmcrystal/process(delta_time) + check_owner() + if(!owner) + STOP_PROCESSING(SSobj, src) + +/obj/item/clothing/accessory/collar/vmcrystal/attack_self(mob/user) + . = ..() + if(.) + return + if(state > 0) //Can't re-pair, one time only, for security reasons. + to_chat(user, "The [name] doesn't do anything.") + return 0 + + owner = user //We're paired to this guy + owner_c = user.client //This is his client + update_state(1) + to_chat(user, "The [name] glows pleasantly blue.") + START_PROCESSING(SSobj, src) + +/obj/item/clothing/accessory/collar/vmcrystal/proc/check_owner() + //He's dead, jim + if(state < 1) + return + if(!owner)//How did we get here? + return + if((owner.stat == DEAD) || (get_turf(owner) != get_turf(src))) + if(state == 1) + become_alert() + if((state == 2) && (last_vitals < world.time - 1 MINUTE)) + send_message() + else + if(state == 2) + become_calm() + + +/obj/item/clothing/accessory/collar/vmcrystal/proc/become_alert() + update_state(2) + audible_message(SPAN_WARNING("The [name] begins flashing red and vibrating in at a low frequency."), + SPAN_WARNING("The [name] begins vibrating in at a low frequency.")) + last_vitals = world.time + +/obj/item/clothing/accessory/collar/vmcrystal/proc/become_calm() + update_state(1) + audible_message(SPAN_NOTICE("[src] stops flashing red and vibrating as it resyncronises with its linked owner."), + SPAN_NOTICE("[src] stops vibrating in at a low frequency")) + +/obj/item/clothing/accessory/collar/vmcrystal/proc/send_message() + visible_message(SPAN_WARNING("The [name] shatters into dust!")) + GLOB.global_announcer.autosay("[owner] has died!", "[owner]'s Death Alarm") + if(owner_c) + to_chat(owner_c, "The HAVENS system is notified of your demise via \the [name].") + update_state(3) + name = "broken [initial(name)]" + desc = "This seems like a necklace, but the actual pendant is missing." + +/obj/item/clothing/accessory/collar/vmcrystal/proc/update_state(var/tostate) + state = tostate + icon_state = "[initial(icon_state)][tostate]" + update_icon() + +/obj/item/clothing/accessory/collar/vmcrystal/dropped(mob/user, flags, atom/newLoc) + . = ..() + check_owner() + +/obj/item/clothing/accessory/collar/vmcrystal/pickup(mob/user, flags, atom/oldLoc) + . = ..() + check_owner() + +/obj/item/clothing/accessory/collar/vmcrystal/unequipped(mob/user, slot, flags) + . = ..() + check_owner() +/* +/obj/item/paper/vmcrystal_manual + name = "VM-LC91-1 manual" + info = {"The VeyMed Life Crystal is a small device typically worn around the neck for the purpose of reporting your status to the HAVENS (VeyMed's High-AVailability ENgram Storage) system, so that appropriate measures can be taken in the case of your body's demise. The whole device is housed inside a pleasing-to-the-eye elongated diamond.
+Upon your body's desmise, the crystal will send a transmission to HAVENS. Depending on your membership level, the appropriate actions can be taken to ensure that you are back up and enjoying existence as soon as possible.
+ +Nanotrasen has negotiated a FREE Star membership for you in the HAVENS system, though an upgrade can be obtained depending on your citizenship and reputation level.
+ + As a reminder, the membership levels in HAVENS are: +The Life Crystal is a small 5cm long diamond containing four main components which are visible inside the translucent gem.
+ + From tip to top, they are: +The diamond itself is coated in a layer of graphene, to give it a pleasant rainbow finish. This also serves as a conductor that, if broken, will discharge the antimatter bottle immediately as it is unsafe to do so any point after the crystal is broken via physical means.
+This device contains antimatter. Please consult all local regulations when travelling to ensure compliance with local laws.
"} +*/ +/obj/item/storage/box/vmcrystal + name = "life crystal case" + icon = 'icons/vore/custom_items_vr.dmi' + icon_state = "khlifebox" + desc = "This case can only hold the VM-LC91-1 and a manual." + item_state_slots = list(SLOT_ID_RIGHT_HAND = "syringe_kit", SLOT_ID_LEFT_HAND = "syringe_kit") + storage_slots = 2 + can_hold = list(/obj/item/clothing/accessory/collar/vmcrystal) + max_storage_space = ITEMSIZE_COST_SMALL * 2 + w_class = ITEMSIZE_SMALL + +/obj/item/storage/box/vmcrystal/Initialize(mapload) + . = ..() +// new /obj/item/paper/vmcrystal_manual(src) + new /obj/item/clothing/accessory/collar/vmcrystal(src) From dddacb78fddcbc38a6d579479758d0f628f2230c Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:22:37 +0200 Subject: [PATCH 2/2] Announcer name adjusted --- code/modules/vore/fluffstuff/life_crystals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/vore/fluffstuff/life_crystals.dm b/code/modules/vore/fluffstuff/life_crystals.dm index aa79762f2f68..47e1f1102195 100644 --- a/code/modules/vore/fluffstuff/life_crystals.dm +++ b/code/modules/vore/fluffstuff/life_crystals.dm @@ -76,7 +76,7 @@ /obj/item/clothing/accessory/collar/vmcrystal/proc/send_message() visible_message(SPAN_WARNING("The [name] shatters into dust!")) - GLOB.global_announcer.autosay("[owner] has died!", "[owner]'s Death Alarm") + GLOB.global_announcer.autosay("[owner] has died!", "[owner]'s Life Crystal") if(owner_c) to_chat(owner_c, "The HAVENS system is notified of your demise via \the [name].") update_state(3)