Added most consuming procs for the collar
Added research and design for collar
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver
|
||||
name = "bluespace collar receiver"
|
||||
name = "Bluespace collar receiver"
|
||||
desc = "A collar containing a miniaturized bluespace whitehole. Other bluespace transmitter collars can connect to this, causing the wearer to receive food from other transmitter collars directly into the stomach. "
|
||||
slot_flags = ITEM_SLOT_NECK
|
||||
var/mob/victim = 0
|
||||
var/mob/living/carbon/victim = 0
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
@@ -18,15 +18,23 @@
|
||||
return FALSE
|
||||
victim = 0
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver/proc/isworn()
|
||||
if(istype(victim, /mob/living/carbon))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver/attackby(obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/K, mob/user, params)
|
||||
if(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
K.linked_receiver = src
|
||||
var/mob/living/carbon/U = user
|
||||
to_chat(U, "<span class='notice'>You link the bluespace collar with the other transmitter</span>")
|
||||
. = ..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter
|
||||
name = "bluespace collar transmitter"
|
||||
name = "Bluespace collar transmitter"
|
||||
desc = "A collar containing a miniaturized bluespace blackhole. Can be connected to a bluespace collar receiver to transmit food to a linked receiver collar. "
|
||||
slot_flags = ITEM_SLOT_NECK
|
||||
var/obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver/linked_receiver = 0
|
||||
@@ -48,11 +56,17 @@
|
||||
linked_receiver = K
|
||||
var/mob/living/carbon/U = user
|
||||
to_chat(U, "<span class='notice'>You link the bluespace collar to the other receiver</span>")
|
||||
. = ..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/islinked()
|
||||
if (linked_receiver && linked_receiver.isworn())
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
// For food
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_food(obj/item/reagent_containers/food/snacks/owner, mob/living/original_eater, mob/living/feeder)
|
||||
if (!linked_receiver)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/eater = linked_receiver.victim
|
||||
@@ -81,7 +95,7 @@
|
||||
|
||||
// For the alternative edible functionality
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_edible(datum/component/edible/foodstuff, mob/living/original_eater, mob/living/feeder)
|
||||
if (!linked_receiver)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
|
||||
var/atom/owner = foodstuff.parent
|
||||
@@ -117,8 +131,8 @@
|
||||
return TRUE
|
||||
|
||||
// For Drinks
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_drink(obj/item/reagent_containers/food/drinks/owner, mob/living/original_eater, mob/living/feeder)
|
||||
if (!linked_receiver)
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_drink(obj/item/reagent_containers/food/drinks/owner, mob/living/original_eater)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/eater = linked_receiver.victim
|
||||
@@ -139,7 +153,46 @@
|
||||
eater.visible_message("<span class='warning'>[eater]'s belly seems to visibly distend a bit further, emitting an audible sloshing noise!</span>", "<span class='danger'>You feel your stomach get filled by liquid, hearing sloshing noises coming from within!</span>")
|
||||
return TRUE
|
||||
|
||||
// For containers
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_container(var/datum/reagents/reagents , fraction, mob/M, mob/user)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/eater = linked_receiver.victim
|
||||
var/self_fed = M == user
|
||||
reagents.reaction(eater, INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, TYPE_PROC_REF(/datum/reagents, trans_to), eater, 5, null, null, null, self_fed? "self swallowed" : "fed by [user]"), 5)
|
||||
eater.visible_message("<span class='warning'>[eater]'s belly seems to visibly distend a bit further, emitting an audible sloshing noise!</span>", "<span class='danger'>You feel your stomach get filled by liquid, hearing sloshing noises coming from within!</span>")
|
||||
return TRUE
|
||||
|
||||
// For industrial feeding tube
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_industrial_feeding(obj/item/reagent_containers/food/snacks/food, datum/reagents/food_reagents, mob/living/original_eater)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/eater = linked_receiver.victim
|
||||
var/food_size = food_reagents.total_volume //We're cramming the Whole Thing down your throat~
|
||||
food_reagents.reaction(eater, INGEST, food_size)
|
||||
food_reagents.trans_to(eater, food_size)
|
||||
eater.fullness += food_size
|
||||
food.checkLiked(food_size, eater) //...Hopefully you like the taste.
|
||||
eater.visible_message("<span class='warning'>[eater]'s belly seems to greatly distend, as if it was being inflated with large amounts of food.</span>", "<span class='danger'>You feel an immense pressure in your stomach, as if food was pumped directly into you.</span>")
|
||||
return TRUE
|
||||
|
||||
// For feeding tube
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/proc/transpose_feeding(transfer_amount, var/obj/item/reagent_containers/beaker, mob/living/original_eater)
|
||||
if (!islinked())
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/eater = linked_receiver.victim
|
||||
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
|
||||
beaker.reagents.reaction(eater, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(eater, transfer_amount)
|
||||
eater.fullness += transfer_amount //Added feeding tube's causing fullness (But ignores limits~)
|
||||
if(prob(10))
|
||||
eater.visible_message("<span class='warning'>[eater]'s belly seems to visibly distend, emitting an audible sloshing noise!</span>", "<span class='danger'>You feel your stomach get pumped full with liquid, hearing sloshing noises coming from within!</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/attack_self(mob/user)
|
||||
linked_receiver = 0
|
||||
var/mob/living/carbon/U = user
|
||||
to_chat(U, "<span class='notice'>You remove the currently linked receiver collar from the buffer</span>")
|
||||
linked_receiver = 0
|
||||
var/mob/living/carbon/U = user
|
||||
to_chat(U, "<span class='notice'>You remove the currently linked receiver collar from the buffer</span>")
|
||||
. = ..()
|
||||
|
||||
@@ -62,10 +62,17 @@
|
||||
if(beaker)
|
||||
if(mode)
|
||||
if(beaker.reagents.total_volume)
|
||||
// Check to see if the person is wearing a bluespace collar
|
||||
var/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/K = 0
|
||||
if(istype(attached, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/human_eater = attached
|
||||
K = human_eater.wear_neck
|
||||
var/transfer_amount = 5
|
||||
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
|
||||
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(attached, transfer_amount)
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_feeding(transfer_amount, beaker, attached))) //If wearing a BS collar, use BS proc. If not, continue as normal
|
||||
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
|
||||
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(attached, transfer_amount)
|
||||
attached.fullness += transfer_amount //Added feeding tube's causing fullness (But ignores limits~)
|
||||
update_icon()
|
||||
|
||||
else if(!beaker.reagents.total_volume && istype(beaker, /obj/item/reagent_containers/food))
|
||||
|
||||
@@ -256,10 +256,18 @@
|
||||
|
||||
SEND_SIGNAL(food, COMSIG_FOOD_EATEN, attached)
|
||||
|
||||
food_reagents.reaction(attached, INGEST, food_size)
|
||||
food_reagents.trans_to(attached, food_size)
|
||||
|
||||
food.checkLiked(food_size, attached) //...Hopefully you like the taste.
|
||||
// Check to see if the person is wearing a bluespace collar
|
||||
var/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/K = 0
|
||||
if(istype(attached, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/human_eater = attached
|
||||
K = human_eater.wear_neck
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_industrial_feeding(food, food_reagents, attached))) //If wearing a BS collar, use BS proc. If not, continue as normal
|
||||
food_reagents.reaction(attached, INGEST, food_size)
|
||||
food_reagents.trans_to(attached, food_size)
|
||||
if(istype(attached, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/human_eater = attached
|
||||
human_eater.fullness += food_size //Added industrial feeding tube's causing fullness (But ignores limits~)
|
||||
food.checkLiked(food_size, attached) //...Hopefully you like the taste.
|
||||
|
||||
|
||||
if(food.trash) //Lets make the trash the food's supposed to make, if it has any
|
||||
|
||||
@@ -57,6 +57,28 @@
|
||||
category = list("Equipment", "Misc", "Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
/datum/design/bluespace_collar_receiver
|
||||
name = "Bluespace collar receiver"
|
||||
desc = "A collar containing a miniaturized bluespace whitehole. Other bluespace transmitter collars can connect to this, causing the wearer to receive food from other transmitter collars directly into the stomach."
|
||||
id = "bluespace_collar_receiver"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(/datum/material/iron = 1000, /datum/material/calorite = 2500, /datum/material/bluespace = 250)
|
||||
construction_time = 75
|
||||
build_path = /obj/item/clothing/neck/petcollar/locked/bluespace_collar_receiver
|
||||
category = list("Equipment", "Misc", "Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
/datum/design/bluespace_collar_transmitter
|
||||
name = "Bluespace collar transmitter"
|
||||
desc = "A collar containing a miniaturized bluespace blackhole. Can be connected to a bluespace collar receiver to transmit food to a linked receiver collar. "
|
||||
id = "bluespace_collar_transmitter"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(/datum/material/iron = 1000, /datum/material/calorite = 1000, /datum/material/bluespace = 500)
|
||||
construction_time = 75
|
||||
build_path = /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter
|
||||
category = list("Equipment", "Misc", "Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
/datum/design/cyberimp_nutriment_turbo
|
||||
name = "Nutriment Pump Implant TURBO"
|
||||
desc = "This implant was meant to prevent people from going hungry, but due to a flaw in its designs, it permanently produces a small amount of nutriment overtime."
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
display_name = "Nutri-Tech Tools"
|
||||
description = "Ending world hunger was never made easier!"
|
||||
prereq_ids = list("biotech", "adv_engi")
|
||||
design_ids = list("calorite_collar", "ci-nutrimentturbo", "bluespace_belt", "adipoelectric_transformer", "cookie_synthesizer", "borg_upgrade_cookiesynthesizer", "borg_upgrade_feedingtube", "ci-fatmobility")
|
||||
design_ids = list("calorite_collar", "ci-nutrimentturbo", "bluespace_belt", "adipoelectric_transformer", "cookie_synthesizer", "borg_upgrade_cookiesynthesizer", "borg_upgrade_feedingtube", "ci-fatmobility","bluespace_collar_receiver","bluespace_collar_transmitter")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
boost_item_paths = list(/obj/item/gun/energy/fatoray, /obj/item/gun/energy/fatoray/cannon, /obj/item/trash/fatoray_scrap1, /obj/item/trash/fatoray_scrap2)
|
||||
hidden = TRUE
|
||||
|
||||
@@ -117,7 +117,7 @@ Behavior that's still missing from this component that original food items had t
|
||||
return
|
||||
var/eatverb = pick(eatverbs)
|
||||
//GS13 - Bluespace collar addition
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.islinked())
|
||||
eater.visible_message("<span class='notice'>[eater] effortlessly [eatverb]s \the [parent].</span>", "<span class='notice'>You effortlessly [eatverb] \the [parent], feeling as if you haven't eaten anything at all.</span>")
|
||||
//GS13 - End
|
||||
else if(junkiness && eater.satiety < -150 && eater.nutrition > NUTRITION_LEVEL_STARVING + 50 && !HAS_TRAIT(eater, TRAIT_VORACIOUS))
|
||||
@@ -139,12 +139,7 @@ Behavior that's still missing from this component that original food items had t
|
||||
if(isbrain(eater))
|
||||
to_chat(feeder, "<span class='warning'>[eater] doesn't seem to have a mouth!</span>")
|
||||
return
|
||||
//GS13 - Bluespace collar addition
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
eater.visible_message("<span class='danger'>[feeder] attempts to feed [eater] [parent].</span>", \
|
||||
"<span class='userdanger'>[feeder] attempts to feed you [parent].</span>")
|
||||
//GS13 - End
|
||||
else if(fullness <= (600 * (1 + eater.overeatduration / 1000)))
|
||||
if(fullness <= (600 * (1 + eater.overeatduration / 1000)))
|
||||
eater.visible_message("<span class='danger'>[feeder] attempts to feed [eater] [parent].</span>", \
|
||||
"<span class='userdanger'>[feeder] attempts to feed you [parent].</span>")
|
||||
else
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/mob/living/carbon/human/human_eater = M
|
||||
K = human_eater.wear_neck
|
||||
if(M == user)
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.islinked())
|
||||
user.visible_message("<span class='notice'>[user] effortlessly swallows a gulp of [src].</span>", "<span class='notice'>You effortlessly swallow a gulp of [src].</span>")
|
||||
//GS13 - End
|
||||
else
|
||||
@@ -49,7 +49,7 @@
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
M.visible_message("<span class='danger'>[user] feeds the contents of [src] to [M].</span>", "<span class='userdanger'>[user] feeds the contents of [src] to [M].</span>")
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_drink(src, M, user))) //GS13 - Bluespace Collar
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_drink(src, M))) //If wearing a BS collar, use BS proc. If not, continue as normal
|
||||
var/fraction = min(gulp_size/reagents.total_volume, 1)
|
||||
checkLiked(fraction, M)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
|
||||
@@ -125,7 +125,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
var/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/K = human_eater.wear_neck //GS13 - Bluespace collar
|
||||
if(M == user) //If you're eating it yourself.
|
||||
//GS13 - Bluespace collar addition
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.islinked()) //Feeding with a collar ignores fullness or junkness
|
||||
user.visible_message("<span class='notice'>[user] effortlessly [eatverb]s \the [src].</span>", "<span class='notice'>You effortlessly [eatverb] \the [src], feeling as if you haven't eaten anything at all.</span>")
|
||||
//GS13 - End
|
||||
else if(junkiness && M.satiety < -150 && M.nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
@@ -147,7 +147,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
else
|
||||
if(!isbrain(M)) //If you're feeding it to someone else.
|
||||
//GS13 - Bluespace collar addition
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter))
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.islinked()) //Feeding with a collar ignores fullness
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed you [src].</span>")
|
||||
//GS13 - End
|
||||
@@ -168,7 +168,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[M] doesn't seem to have a mouth!</span>")
|
||||
return
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_food(src, M, user)))
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_food(src, M, user))) //If wearing a BS collar, use BS proc. If not, continue as normal
|
||||
if(reagents) //Handle ingestion of the reagent.
|
||||
if(M.satiety > -200)
|
||||
M.satiety -= junkiness
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
//GS13 - Bluespace collar addition
|
||||
var/obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter/K = 0
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/human_eater = M
|
||||
K = human_eater.wear_neck
|
||||
if(istype(M))
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
@@ -57,11 +61,15 @@
|
||||
log_reagent("INGESTION: FED BY: [key_name(user)] (loc [user.loc] at [AREACOORD(UT)]) -> [key_name(M)] (loc [M.loc] at [AREACOORD(MT)]) - [reagents.log_list()]")
|
||||
else
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
if (istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.islinked())
|
||||
user.visible_message("<span class='notice'>[user] effortlessly swallows a gulp of [src].</span>", "<span class='notice'>You effortlessly swallow a gulp of [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
log_reagent("INGESTION: SELF: [key_name(user)] (loc [user.loc] at [AREACOORD(T)]) - [reagents.log_list()]")
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, TYPE_PROC_REF(/datum/reagents, trans_to), M, 5, null, null, null, self_fed? "self swallowed" : "fed by [user]"), 5)
|
||||
if (!(istype(K, /obj/item/clothing/neck/petcollar/locked/bluespace_collar_transmitter) && K.transpose_container(reagents, fraction, M, user))) //If wearing a BS collar, use BS proc. If not, continue as normal
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, TYPE_PROC_REF(/datum/reagents, trans_to), M, 5, null, null, null, self_fed? "self swallowed" : "fed by [user]"), 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
|
||||
Reference in New Issue
Block a user