diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 44ace0a1895..f6c2028fec5 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -18,6 +18,12 @@ var/compactor = FALSE var/analyzer = FALSE var/decompiler = FALSE + var/delivery = FALSE + var/delivery_tag = "Fuel" + var/list/deliverylists = list() + var/list/deliveryslot_1 = list() + var/list/deliveryslot_2 = list() + var/list/deliveryslot_3 = list() var/datum/research/techonly/files //Analyzerbelly var. var/synced = FALSE var/startdrain = 500 @@ -49,48 +55,11 @@ return if(target in hound.module.modules) return - if(length(contents) > (max_item_count - 1)) + if(length(contents) >= max_item_count) to_chat(user, "Your [src.name] is full. Eject or process contents to continue.") return - if(analyzer == TRUE) - if(istype(target, /obj/item)) - var/obj/target_obj = target - if(target_obj.w_class > ITEMSIZE_LARGE) - to_chat(user, "\The [target] is too large to fit into your [src.name]") - return - user.visible_message("[hound.name] is ingesting [target.name] into their [src.name].", "You start ingesting [target] into your [src.name]...") - if(do_after(user, 30, target) && length(contents) < max_item_count) - target.forceMove(src) - user.visible_message("[hound.name]'s internal analyzer groans lightly as [target.name] slips inside.", "Your internal analyzer groans lightly as [target] slips inside.") - playsound(hound, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) - if(istype(target,/obj/item)) - var/obj/item/tech_item = target - for(var/T in tech_item.origin_tech) - to_chat(user, "\The [tech_item] has level [tech_item.origin_tech[T]] in [CallTechName(T)].") - update_patient() - return - - else if(ishuman(target)) - var/mob/living/carbon/human/trashman = target - if(patient) - to_chat(user, "Your [src.name] is already occupied.") - return - if(trashman.buckled) - to_chat(user, "[trashman] is buckled and can not be put into your [src.name].") - return - user.visible_message("[hound.name] is ingesting [trashman] into their [src.name].", "You start ingesting [trashman] into your [src.name]...") - if(do_after(user, 30, trashman) && !patient && !trashman.buckled && length(contents) < max_item_count) - trashman.forceMove(src) - trashman.reset_view(src) - processing_objects |= src - user.visible_message("[hound.name]'s internal analyzer groans lightly as [trashman] slips inside.", "Your internal analyzer groans lightly as [trashman] slips inside.") - playsound(hound, gulpsound, vol = 100, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) - update_patient() - return - return - - if(compactor == TRUE) + if(compactor) if(istype(target, /obj/item) || istype(target, /obj/effect/decal/remains)) var/obj/target_obj = target if(target_obj.w_class > ITEMSIZE_LARGE) @@ -99,8 +68,16 @@ user.visible_message("[hound.name] is ingesting [target.name] into their [src.name].", "You start ingesting [target] into your [src.name]...") if(do_after(user, 30, target) && length(contents) < max_item_count) target.forceMove(src) - user.visible_message("[hound.name]'s garbage processor groans lightly as [target.name] slips inside.", "Your garbage compactor groans lightly as [target] slips inside.") + user.visible_message("[hound.name]'s [src.name] groans lightly as [target.name] slips inside.", "Your [src.name] groans lightly as [target] slips inside.") playsound(hound, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) + if(analyzer && istype(target,/obj/item)) + var/obj/item/tech_item = target + for(var/T in tech_item.origin_tech) + to_chat(user, "\The [tech_item] has level [tech_item.origin_tech[T]] in [CallTechName(T)].") + if(delivery) + if(islist(deliverylists[delivery_tag])) + deliverylists[delivery_tag] |= target + to_chat(user, "\The [target.name] added to cargo compartment slot: [delivery_tag].") update_patient() return @@ -110,8 +87,12 @@ if(do_after(user, 30, trashmouse) && length(contents) < max_item_count) trashmouse.forceMove(src) trashmouse.reset_view(src) - user.visible_message("[hound.name]'s garbage processor groans lightly as [trashmouse] slips inside.", "Your garbage compactor groans lightly as [trashmouse] slips inside.") + user.visible_message("[hound.name]'s [src.name] groans lightly as [trashmouse] slips inside.", "Your [src.name] groans lightly as [trashmouse] slips inside.") playsound(hound, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) + if(delivery) + if(islist(deliverylists[delivery_tag])) + deliverylists[delivery_tag] |= trashmouse + to_chat(user, "\The [trashmouse] added to cargo compartment slot: [delivery_tag].") update_patient() return @@ -128,11 +109,18 @@ trashman.forceMove(src) trashman.reset_view(src) processing_objects |= src - user.visible_message("[hound.name]'s garbage processor groans lightly as [trashman] slips inside.", "Your garbage compactor groans lightly as [trashman] slips inside.") + user.visible_message("[hound.name]'s [src.name] groans lightly as [trashman] slips inside.", "Your [src.name] groans lightly as [trashman] slips inside.") + message_admins("[key_name(hound)] has eaten [key_name(patient)] as a dogborg. ([hound ? "JMP" : "null"])") playsound(hound, gulpsound, vol = 100, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) + if(delivery) + if(islist(deliverylists[delivery_tag])) + deliverylists[delivery_tag] |= trashman + to_chat(user, "\The [trashman] added to cargo compartment slot: [delivery_tag].") + to_chat(trashman, "[hound.name] has added you to their cargo compartment slot: [delivery_tag].") update_patient() return return + else if(ishuman(target)) var/mob/living/carbon/human/H = target if(H.buckled) @@ -143,48 +131,38 @@ return user.visible_message("[hound.name] is ingesting [H.name] into their [src.name].", "You start ingesting [H] into your [src]...") if(!patient && !H.buckled && do_after (user, 50, H)) - - if(!proximity) return //If they moved away, you can't eat them. - - if(patient) return //If you try to eat two people at once, you can only eat one. - + if(!proximity) + return //If they moved away, you can't eat them. + if(patient) + return //If you try to eat two people at once, you can only eat one. else //If you don't have someone in you, proceed. H.forceMove(src) H.reset_view(src) update_patient() processing_objects |= src - user.visible_message("[hound.name]'s medical pod lights up as [H.name] slips inside into their [src.name].", "Your medical pod lights up as [H] slips into your [src]. Life support functions engaged.") + user.visible_message("[hound.name]'s [src.name] lights up as [H.name] slips inside.", "Your [src] lights up as [H] slips inside. Life support functions engaged.") message_admins("[key_name(hound)] has eaten [key_name(patient)] as a dogborg. ([hound ? "JMP" : "null"])") playsound(hound, gulpsound, vol = 100, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) /obj/item/device/dogborg/sleeper/proc/go_out(var/target) hound = src.loc + items_preserved.Cut() + cleaning = 0 + for(var/list/dlist in deliverylists) + dlist.Cut() if(length(contents) > 0) hound.visible_message("[hound.name] empties out their contents via their [eject_port] port.", "You empty your contents via your [eject_port] port.") - if(target) - if(ishuman(target)) - var/mob/living/carbon/human/person = target + for(var/C in contents) + if(ishuman(C)) + var/mob/living/carbon/human/person = C person.forceMove(get_turf(src)) person.reset_view() else - var/obj/T = target + var/obj/T = C T.loc = hound.loc - else - for(var/C in contents) - if(ishuman(C)) - var/mob/living/carbon/human/person = C - person.forceMove(get_turf(src)) - person.reset_view() - else - var/obj/T = C - T.loc = hound.loc - items_preserved.Cut() - cleaning = 0 playsound(loc, 'sound/effects/splat.ogg', 50, 1) update_patient() else //You clicked eject with nothing in you, let's just reset stuff to be sure. - items_preserved.Cut() - cleaning = 0 update_patient() /obj/item/device/dogborg/sleeper/proc/drain(var/amt = 3) //Slightly reduced cost (before, it was always injecting inaprov) @@ -220,15 +198,33 @@ dat += "Self-Clean" else dat += "Self-Clean" + if(delivery) + dat += "

Cargo Compartment


" + dat += "Active Slot: [delivery_tag]" + if(islist(deliverylists[delivery_tag])) + dat += "Eject Slot" dat += "
" - if(compactor == TRUE && length(contents))//garbage counter for trashpup - var/obj/item/device/dogborg/sleeper/compactor/garbo = src - dat += "Current load: [length(contents)] / [garbo.max_item_count] objects.
" + if(!delivery && compactor && length(contents))//garbage counter for trashpup + dat += "Current load: [length(contents)] / [max_item_count] objects.
" dat += "([list2text(contents,", ")])

" - if(analyzer == TRUE && synced == FALSE) + if(delivery && length(contents)) + dat += "Current load: [length(contents)] / [max_item_count] objects.
" + dat += "Cargo compartment slot: Cargo 1.
" + if(length(deliveryslot_1)) + dat += "([list2text(deliveryslot_1,", ")])
" + dat += "Cargo compartment slot: Cargo 2.
" + if(length(deliveryslot_2)) + dat += "([list2text(deliveryslot_2,", ")])
" + dat += "Cargo compartment slot: Cargo 3.
" + if(length(deliveryslot_3)) + dat += "([list2text(deliveryslot_3,", ")])
" + dat += "Cargo compartment slot: Fuel.
" + dat += "([list2text(contents - (deliveryslot_1 + deliveryslot_2 + deliveryslot_3),", ")])

" + + if(analyzer && synced) dat += "Sync Files
" //Cleaning and there are still un-preserved items @@ -328,7 +324,29 @@ eject_port = "ingestion" sleeperUI(usr) return - + if(href_list["deliveryslot"]) + var/tag = input("Select active delivery slot.") as null|anything in deliverylists + if(!tag) + return 0 + delivery_tag = tag + sleeperUI(usr) + return + if(href_list["slot_eject"]) + if(length(deliverylists[delivery_tag]) > 0) + hound.visible_message("[hound.name] empties out their cargo compartment via their [eject_port] port.", "You empty your cargo compartment via your [eject_port] port.") + for(var/C in deliverylists[delivery_tag]) + if(ishuman(C)) + var/mob/living/carbon/human/person = C + person.forceMove(get_turf(src)) + person.reset_view() + else + var/obj/T = C + T.loc = hound.loc + playsound(loc, 'sound/effects/splat.ogg', 50, 1) + update_patient() + deliverylists[delivery_tag].Cut() + sleeperUI(usr) + return if(href_list["sync"]) synced = TRUE var/success = 0 @@ -380,6 +398,13 @@ if(UI_open == TRUE) sleeperUI(hound) + //Cleaning looks better with red on, even with nobody in it + if(cleaning || (length(contents) > 10) || (decompiler && (length(contents) > 5)) || (analyzer && (length(contents) > 1))) + hound.sleeper_r = TRUE + hound.sleeper_g = FALSE + hound.updateicon() + return + //Well, we HAD one, what happened to them? if(patient in contents) if(patient_laststat != patient.stat) @@ -420,18 +445,8 @@ hound.updateicon() return(C) - //Cleaning looks better with red on, even with nobody in it - if(cleaning || (length(contents) > 11)) - hound.sleeper_r = TRUE - hound.sleeper_g = FALSE - - //Letting analyzer gut swell if overloaded. - if(analyzer == TRUE && (length(contents) > 1)) - hound.sleeper_r = TRUE - hound.sleeper_g = FALSE - //Couldn't find anyone, and not cleaning - else if(!cleaning && !patient && !length(contents)) + if(!cleaning && !patient) hound.sleeper_r = FALSE hound.sleeper_g = FALSE @@ -448,7 +463,7 @@ if(!(I in contents)) items_preserved -= I - var/list/touchable_items = contents - items_preserved + var/list/touchable_items = contents - items_preserved - (deliveryslot_1 + deliveryslot_2 + deliveryslot_3) //Belly is entirely empty if(!length(touchable_items)) @@ -493,7 +508,7 @@ for(var/mob/living/T in (touchable_items)) touchable_items -= T //Exclude mobs from loose item picking. if((T.status_flags & GODMODE) || !T.digestable) - items_preserved += T + items_preserved |= T else var/old_brute = T.getBruteLoss() var/old_burn = T.getFireLoss() @@ -535,7 +550,7 @@ if(brain) hound.remove_from_mob(brain,src) brain.forceMove(src) - items_preserved += brain + items_preserved |= brain else T.drop_from_inventory(I, src) if(ishuman(T)) @@ -568,12 +583,12 @@ drain(-50 * digested) if(volume) water.add_charge(volume) - if(!analyzer && compactor && T.matter) + if(!analyzer && !delivery && compactor && T.matter) for(var/material in T.matter) var/total_material = T.matter[material] if(istype(T,/obj/item/stack)) var/obj/item/stack/stack = T - total_material *= stack.get_amount() + total_material *= (0.5 * stack.get_amount()) if(material == DEFAULT_WALL_MATERIAL) metal.add_charge(total_material) if(material == "glass") @@ -641,4 +656,11 @@ desc = "A mounted matter decompiling unit with fuel processor." icon_state = "decompiler" max_item_count = 10 - decompiler = TRUE \ No newline at end of file + decompiler = TRUE + +/obj/item/device/dogborg/sleeper/compactor/delivery //Unfinished and unimplemented, still testing. + name = "Cargo Belly" + desc = "A mounted cargo bay unit for tagged deliveries." + icon_state = "decompiler" + max_item_count = 20 + delivery = TRUE \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station_vr.dm b/code/modules/mob/living/silicon/robot/robot_modules/station_vr.dm index 0bc16ccc3b6..56d0bb0182a 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station_vr.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station_vr.dm @@ -148,7 +148,7 @@ var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water synths += water @@ -159,6 +159,7 @@ var/obj/item/device/dogborg/sleeper/K9/B = new /obj/item/device/dogborg/sleeper/K9(src) //Eat criminals. Bring them to the brig. B.water = water + src.modules += B R.icon = 'icons/mob/widerobot_vr.dmi' R.hands.icon = 'icons/mob/screen1_robot_vr.dmi' @@ -216,7 +217,7 @@ var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water synths += water @@ -227,6 +228,7 @@ var/obj/item/device/dogborg/sleeper/B = new /obj/item/device/dogborg/sleeper(src) //So they can nom people and heal them B.water = water + src.modules += B R.icon = 'icons/mob/widerobot_vr.dmi' R.hands.icon = 'icons/mob/screen1_robot_vr.dmi' @@ -260,7 +262,7 @@ var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water synths += water @@ -271,6 +273,7 @@ var/obj/item/device/dogborg/sleeper/K9/B = new /obj/item/device/dogborg/sleeper/K9(src) B.water = water + src.modules += B R.icon = 'icons/mob/64x64robot_vr.dmi' R.hands.icon = 'icons/mob/screen1_robot_vr.dmi' @@ -301,17 +304,17 @@ var/datum/matter_synth/metal = new /datum/matter_synth/metal() metal.name = "Steel reserves" metal.recharge_rate = 0 - metal.max_energy = 100000 + metal.max_energy = 50000 metal.energy = 0 var/datum/matter_synth/glass = new /datum/matter_synth/glass() glass.name = "Glass reserves" glass.recharge_rate = 0 - glass.max_energy = 100000 + glass.max_energy = 50000 glass.energy = 0 var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water @@ -383,7 +386,7 @@ var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water synths += water @@ -394,6 +397,7 @@ var/obj/item/device/dogborg/sleeper/compactor/analyzer/B = new /obj/item/device/dogborg/sleeper/compactor/analyzer(src) B.water = water + src.modules += B R.icon = 'icons/mob/widerobot_vr.dmi' R.hands.icon = 'icons/mob/screen1_robot_vr.dmi' @@ -426,7 +430,7 @@ src.modules += new /obj/item/device/t_scanner(src) src.modules += new /obj/item/taperoll/engineering(src) src.modules += new /obj/item/weapon/inflatable_dispenser/robot(src) - src.modules += new /obj/item/device/geiger(src) + src.modules += new /obj/item/weapon/pickaxe(src) src.modules += new /obj/item/weapon/dogborg/jaws/small(src) src.modules += new /obj/item/device/dogborg/boop_module(src) src.emag = new /obj/item/weapon/dogborg/pounce(src) @@ -435,27 +439,27 @@ var/datum/matter_synth/metal = new /datum/matter_synth/metal() metal.name = "Steel reserves" metal.recharge_rate = 50 - metal.max_energy = 100000 + metal.max_energy = 50000 metal.energy = 5000 var/datum/matter_synth/glass = new /datum/matter_synth/glass() glass.name = "Glass reserves" glass.recharge_rate = 50 - glass.max_energy = 100000 + glass.max_energy = 50000 glass.energy = 5000 var/datum/matter_synth/wood = new /datum/matter_synth/wood() wood.name = "Wood reserves" wood.recharge_rate = 50 - wood.max_energy = 100000 + wood.max_energy = 50000 wood.energy = 5000 var/datum/matter_synth/plastic = new /datum/matter_synth/plastic() plastic.name = "Plastic reserves" plastic.recharge_rate = 50 - plastic.max_energy = 100000 + plastic.max_energy = 50000 plastic.energy = 5000 var/datum/matter_synth/water = new /datum/matter_synth() water.name = "Water reserves" water.recharge_rate = 0 - water.max_energy = 1000 + water.max_energy = 500 water.energy = 0 R.water_res = water