mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-20 11:47:47 +01:00
More modularity and miner borgo belly upgrade
This commit is contained in:
@@ -43,6 +43,9 @@
|
||||
var/recycles = FALSE
|
||||
var/medsensor = TRUE //Does belly sprite come with patient ok/dead light?
|
||||
var/obj/item/device/healthanalyzer/med_analyzer = null
|
||||
var/ore_storage = FALSE //CHOMPAdd
|
||||
var/max_ore_storage = 500 //CHOMPAdd
|
||||
var/current_capacity = 0 //CHOMPAdd
|
||||
|
||||
/obj/item/device/dogborg/sleeper/New()
|
||||
..()
|
||||
@@ -281,6 +284,9 @@
|
||||
dat += "<font color='red'><B>Current load:</B> [length(contents)] / [max_item_count] objects.</font><BR>"
|
||||
dat += "<font color='gray'>([contents.Join(", ")])</font><BR><BR>"
|
||||
|
||||
if(ore_storage) //CHOMPAdd
|
||||
dat += "<font color='red'><B>Current ore capacity:</B> [current_capacity] / [max_ore_storage].</font><BR>"
|
||||
|
||||
if(delivery && length(contents))
|
||||
dat += "<font color='red'><B>Current load:</B> [length(contents)] / [max_item_count] objects.</font><BR>"
|
||||
dat += "<font color='gray'>Cargo compartment slot: Cargo 1.</font><BR>"
|
||||
@@ -769,10 +775,53 @@
|
||||
|
||||
/obj/item/device/dogborg/sleeper/compactor/supply //Miner borg belly
|
||||
name = "Supply Satchel"
|
||||
desc = "A mounted survival unit with fuel processor."
|
||||
desc = "A mounted survival unit with fuel processor and ore storage." //CHOMPEdit Start
|
||||
icon_state = "sleeperc"
|
||||
injection_chems = list("glucose","inaprovaline","tricordrazine")
|
||||
max_item_count = 1
|
||||
max_item_count = 20
|
||||
ore_storage = TRUE
|
||||
var/list/stored_ore = list(
|
||||
"sand" = 0,
|
||||
"hematite" = 0,
|
||||
"carbon" = 0,
|
||||
"raw copper" = 0,
|
||||
"raw tin" = 0,
|
||||
"void opal" = 0,
|
||||
"painite" = 0,
|
||||
"quartz" = 0,
|
||||
"raw bauxite" = 0,
|
||||
"phoron" = 0,
|
||||
"silver" = 0,
|
||||
"gold" = 0,
|
||||
"marble" = 0,
|
||||
"uranium" = 0,
|
||||
"diamond" = 0,
|
||||
"platinum" = 0,
|
||||
"lead" = 0,
|
||||
"mhydrogen" = 0,
|
||||
"verdantium" = 0,
|
||||
"rutile" = 0)
|
||||
|
||||
/obj/item/device/dogborg/sleeper/compactor/supply/Entered(atom/movable/thing, atom/OldLoc)
|
||||
. = ..()
|
||||
if(istype(thing, /obj/item/weapon/ore))
|
||||
var/obj/item/weapon/ore/ore = thing
|
||||
stored_ore[ore.material]++
|
||||
current_capacity++
|
||||
qdel(ore)
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/dogborg/sleeper/compactor/supply))
|
||||
var/obj/item/device/dogborg/sleeper/compactor/supply/S = W
|
||||
for(var/ore in S.stored_ore)
|
||||
if(S.stored_ore[ore] > 0)
|
||||
var/ore_amount = S.stored_ore[ore] // How many ores does the satchel have?
|
||||
stored_ore[ore] += ore_amount // Add the ore to the machine.
|
||||
S.stored_ore[ore] = 0 // Set the value of the ore in the satchel to 0.
|
||||
S.current_capacity = 0 // Set the amount of ore in the satchel to 0.
|
||||
to_chat(user, "<span class='notice'>You empty the satchel into the box.</span>")
|
||||
return
|
||||
..() //CHOMPEdit End
|
||||
|
||||
/obj/item/device/dogborg/sleeper/command //Command borg belly //CHOMP addition
|
||||
name = "Bluespace Filing Belly"
|
||||
|
||||
@@ -615,11 +615,11 @@
|
||||
//Vac attachment
|
||||
/obj/item/device/vac_attachment
|
||||
name = "Vac attachment"
|
||||
desc = "Useful for slurping mess off the floors. Even things and stuff depending on settings."
|
||||
desc = "Useful for slurping mess off the floors. Even things and stuff depending on settings. Can be connected to a trash bag or vore belly."
|
||||
icon = 'modular_chomp/icons/mob/dogborg_ch.dmi'
|
||||
icon_state = "sucker-0"
|
||||
hitsound = 'sound/effects/attackblob.ogg'
|
||||
var/vac_power = 0
|
||||
var/output_dest = null
|
||||
var/list/vac_settings = list(
|
||||
"power off" = 0,
|
||||
"dust and grime" = 1,
|
||||
@@ -627,26 +627,81 @@
|
||||
"pests and small objects" = 3,
|
||||
"medium objects" = 4,
|
||||
"large objects" = 5,
|
||||
"large pests" = 6
|
||||
"large pests" = 6,
|
||||
"output destination" = 7,
|
||||
)
|
||||
|
||||
/obj/item/device/vac_attachment/New()
|
||||
..()
|
||||
flags |= NOBLUDGEON //No more attack messages
|
||||
|
||||
/obj/item/device/vac_attachment/attack_self(mob/user)
|
||||
var/set_input = tgui_input_list(user, "Set your vacuum attachment's power level", "Vac Settings", vac_settings)
|
||||
/obj/item/device/vac_attachment/attack_self(mob/living/user)
|
||||
var/set_input = null
|
||||
if(!output_dest)
|
||||
set_input = "output destination"
|
||||
if(!set_input)
|
||||
set_input = tgui_input_list(user, "Set your vacuum attachment's power level or output mode.", "Vac Settings", vac_settings)
|
||||
if(set_input)
|
||||
vac_power = vac_settings[set_input]
|
||||
icon_state = "sucker-[vac_power]"
|
||||
if(set_input == "output destination")
|
||||
var/set_output = tgui_input_list(user, "Set your vacuum attachment's connection port", "Vac Settings", list("Vore Belly", "Borg Belly", "Trash Bag"))
|
||||
if(set_output)
|
||||
if(set_output == "Borg Belly")
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
var/obj/item/weapon/robot_module/M = R.module
|
||||
for(var/obj/item/device/dogborg/sleeper/S in M.modules)
|
||||
if(istype(S))
|
||||
output_dest = S
|
||||
return
|
||||
to_chat(user, "<span class='warning'>Borg belly not found.</span>")
|
||||
if(set_output == "Trash Bag")
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
var/obj/item/weapon/robot_module/M = R.module
|
||||
for(var/obj/item/weapon/storage/bag/trash/T in M.modules)
|
||||
if(istype(T))
|
||||
output_dest = T
|
||||
return
|
||||
for(var/obj/item/weapon/storage/bag/trash/T in user.contents)
|
||||
if(istype(T))
|
||||
output_dest = T
|
||||
return
|
||||
to_chat(user, "<span class='warning'>Trash bag not found.</span>")
|
||||
if(set_output == "Vore Belly")
|
||||
if(user.vore_selected)
|
||||
output_dest = user.vore_selected
|
||||
return
|
||||
else
|
||||
vac_power = vac_settings[set_input]
|
||||
icon_state = "sucker-[vac_power]"
|
||||
|
||||
/obj/item/device/vac_attachment/afterattack(atom/target, mob/living/user, proximity)
|
||||
if(vac_power < 1)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!user.vore_selected)
|
||||
if(!output_dest)
|
||||
return
|
||||
if(istype(output_dest,/obj/item/weapon/storage/bag/trash))
|
||||
if(get_turf(output_dest) != get_turf(user))
|
||||
vac_power = 0
|
||||
icon_state = "sucker-0"
|
||||
output_dest = null
|
||||
to_chat(user, "<span class='warning'>Trash bag not found. Shutting down.</span>")
|
||||
return
|
||||
var/obj/item/weapon/storage/bag/trash/B = output_dest
|
||||
if(LAZYLEN(B.contents) >= B.max_storage_space) //A bit more lenient than the w_class system to avoid complicated spaghetti.
|
||||
to_chat(user, "<span class='warning'>Trash bag full. Empty trash bag contents to continue.</span>")
|
||||
return
|
||||
if(istype(output_dest,/obj/item/device/dogborg/sleeper))
|
||||
var/obj/item/device/dogborg/sleeper/B = output_dest
|
||||
if(LAZYLEN(B.contents) >= B.max_item_count)
|
||||
to_chat(user, "<span class='warning'>[B.name] full. Empty or process contents to continue.</span>")
|
||||
return
|
||||
if(B.ore_storage)
|
||||
if(B.current_capacity >= B.max_ore_storage)
|
||||
to_chat(user, "<span class='warning'>Ore storage full. Deposit ore contents to a box continue.</span>")
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(isturf(target))
|
||||
user.visible_message("<span class='filter_notice'>[user] begins vacuuming the mess off \the [target.name]...</span>", "<span class='notice'>You begin vacuuming the mess off \the [target.name]...</span>")
|
||||
@@ -714,12 +769,15 @@
|
||||
if(I.drop_sound)
|
||||
playsound(src, I.drop_sound, vac_power * 5, 1, -1)
|
||||
playsound(src, 'sound/rakshasa/corrosion3.ogg', vac_power * 15, 1, -1)
|
||||
F.forceMove(user.vore_selected)
|
||||
F.forceMove(output_dest)
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/T = target
|
||||
T.dirt = 0
|
||||
T.clean_blood()
|
||||
else if(istype(target,/obj/item))
|
||||
return
|
||||
if(!isturf(target.loc))
|
||||
return
|
||||
if(istype(target,/obj/item))
|
||||
var/obj/item/I = target
|
||||
if(is_type_in_list(I,item_vore_blacklist))
|
||||
return
|
||||
@@ -731,7 +789,7 @@
|
||||
if(I.drop_sound)
|
||||
playsound(src, I.drop_sound, vac_power * 5, 1, -1)
|
||||
playsound(src, 'sound/rakshasa/corrosion3.ogg', vac_power * 15, 1, -1)
|
||||
I.forceMove(user.vore_selected)
|
||||
I.forceMove(output_dest)
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
playsound(src, 'sound/machines/kitchen/candymaker/candymaker-mid1.ogg', vac_power * 20, 1, -1)
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
@@ -752,7 +810,7 @@
|
||||
L.SpinAnimation(5,1)
|
||||
spawn(5)
|
||||
playsound(src, 'sound/rakshasa/corrosion3.ogg', vac_power * 15, 1, -1)
|
||||
L.forceMove(user.vore_selected)
|
||||
L.forceMove(output_dest)
|
||||
return
|
||||
|
||||
/obj/item/device/vac_attachment/resolve_attackby(atom/A, mob/user, var/attack_modifier = 1, var/click_parameters)
|
||||
|
||||
Reference in New Issue
Block a user