mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Deconflict once again
This commit is contained in:
@@ -663,8 +663,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
if(job_master)
|
||||
var/currentpositiontally
|
||||
var/totalpositiontally
|
||||
to_chat(src, "<span class='notice'>Job Name: Filled job slot / Total job slots <b>(Free job slots)</b></span>")
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
to_chat(src, "[job.title]: [job.total_positions]")
|
||||
to_chat(src, "<span class='notice'>[job.title]: [job.current_positions] / \
|
||||
[job.total_positions == -1 ? "<b>UNLIMITED</b>" : job.total_positions] \
|
||||
<b>([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])</b></span>")
|
||||
if(job.total_positions != -1) // Only count position that isn't unlimited
|
||||
currentpositiontally += job.current_positions
|
||||
totalpositiontally += job.total_positions
|
||||
to_chat(src, "<b>Currently filled job slots (Excluding unlimited): [currentpositiontally] / [totalpositiontally] ([totalpositiontally - currentpositiontally])</b>")
|
||||
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view())
|
||||
|
||||
@@ -17,11 +17,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
log_debug("Smoothing tiles")
|
||||
for(var/turf/T in smoothTurfs)
|
||||
if(T.smooth)
|
||||
smooth_icon(T)
|
||||
queue_smooth(T)
|
||||
for(var/R in T)
|
||||
var/atom/A = R
|
||||
if(A.smooth)
|
||||
smooth_icon(A)
|
||||
queue_smooth(A)
|
||||
if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps
|
||||
var/turf/simulated/mineral/MT = T
|
||||
MT.add_edges()
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
else
|
||||
if(istype(I, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/RC = I
|
||||
if(RC.flags & OPENCONTAINER)
|
||||
if(RC.container_type & OPENCONTAINER)
|
||||
for(var/datum/reagent/A in RC.reagents.reagent_list)
|
||||
.[A.type] += A.volume
|
||||
.[I.type] += 1
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
possible_transfer_amounts = list(5)
|
||||
volume = 5
|
||||
can_be_placed_into = null
|
||||
flags = OPENCONTAINER | NOBLUDGEON
|
||||
flags = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
var/wipespeed = 30
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
|
||||
|
||||
//Finally, report the full examine_message constructed from the above reports
|
||||
to_chat(user, "[examine_message]")
|
||||
to_chat(user, "<span class='notice'>[examine_message]</span>")
|
||||
return examine_message
|
||||
|
||||
//////////////////////////////
|
||||
@@ -485,37 +485,37 @@
|
||||
if(istype(M, /mob/living/simple_animal/pet/cat))
|
||||
if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent
|
||||
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
|
||||
M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.")
|
||||
M.visible_message("<span class='notice'>[M.name] stares at into [src] while sitting perfectly still.</span>", "<span class='notice'>The lid is closed, so you stare into [src] intently.</span>")
|
||||
else
|
||||
if(fish_count) //Tank must actually have fish to try catching one
|
||||
M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!")
|
||||
M.visible_message("<span class='warning'>[M.name] leaps up onto [src] and attempts to fish through the opening!</span>", "<span class='notice'>You jump up onto [src] and begin fishing through the opening!</span>")
|
||||
if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens
|
||||
M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
|
||||
M.visible_message("<span class='notice'>[M.name] slipped and got soaked!</span>", "<span class='notice'>You slipped and got soaked!</span>")
|
||||
if(istype(M, /mob/living/simple_animal/pet/cat/Syndi))
|
||||
do_sparks(3, 1, src)
|
||||
else //No water or didn't slip, get that fish!
|
||||
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
|
||||
M.visible_message("<span class='warning'>[M.name] catches and devours a live fish!</span>", "<span class='notice'>You catch and devour a live fish, yum!</span>")
|
||||
kill_fish() //Kill a random fish
|
||||
M.health = M.maxHealth //Eating fish heals the predator
|
||||
else
|
||||
to_chat(M, "There are no fish in [src]!")
|
||||
to_chat(M, "<span class='warning'>There are no fish in [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
else if(istype(M, /mob/living/simple_animal/hostile/bear))
|
||||
if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent
|
||||
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
|
||||
M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.")
|
||||
M.visible_message("<span class='notice'>[M.name] scrapes it's claws along [src]'s lid.</span>", "<span class='notice'>The lid is closed, so you scrape your claws against [src]'s lid.</span>")
|
||||
else
|
||||
if(fish_count) //Tank must actually have fish to try catching one
|
||||
M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!")
|
||||
M.visible_message("<span class='warning'>[M.name] reaches into [src] and attempts to fish through the opening!</span>", "<span class='warning'>You reach into [src] and begin fishing through the opening!</span>")
|
||||
if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail
|
||||
M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
|
||||
M.visible_message("<span class='warning'>[M.name] swipes at the water!</span>", "<span class='notice'>You just barely missed that fish!</span>")
|
||||
else //No water or didn't slip, get that fish!
|
||||
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
|
||||
M.visible_message("<span class='warning'>[M.name] catches and devours a live fish!</span>", "<span class='notice'>You catch and devour a live fish, yum!</span>")
|
||||
kill_fish() //Kill a random fish
|
||||
M.health = M.maxHealth //Eating fish heals the predator
|
||||
else
|
||||
to_chat(M, "There are no fish in [src]!")
|
||||
to_chat(M, "<span class='warning'>There are no fish in [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
@@ -530,8 +530,8 @@
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
user.visible_message("[user.name] taps on the [name].", \
|
||||
"You tap on the [name].", \
|
||||
user.visible_message("<span class='notice'>[user.name] taps on the [name].</span>", \
|
||||
"<span class='notice'>You tap on the [name].</span>", \
|
||||
"You hear a knocking sound.")
|
||||
|
||||
/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
@@ -571,62 +571,57 @@
|
||||
if(W.isOn())
|
||||
if(obj_integrity < max_integrity)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "You repair some of the cracks on [src].")
|
||||
to_chat(user, "<span class='notice'>You repair some of the cracks on [src].</span>")
|
||||
obj_integrity = min(obj_integrity + 20, max_integrity)
|
||||
check_health()
|
||||
else
|
||||
to_chat(user, "There is no damage to fix!")
|
||||
to_chat(user, "<span class='notice'>There is no damage to fix!</span>")
|
||||
else
|
||||
if(obj_integrity < max_integrity)
|
||||
to_chat(user, "[W] must be on to repair this damage.")
|
||||
to_chat(user, "<span class='notice'>[W] must be on to repair this damage.</span>")
|
||||
else
|
||||
return ..()
|
||||
//Open reagent containers add and remove water
|
||||
else if(O.is_open_container())
|
||||
if(istype(O, /obj/item/reagent_containers/glass))
|
||||
if(lid_switch)
|
||||
to_chat(user, "Open the lid on [src] first!")
|
||||
return
|
||||
var/obj/item/reagent_containers/glass/C = O
|
||||
//Containers with any reagents will get dumped in
|
||||
if(C.reagents.total_volume)
|
||||
var/water_value = 0
|
||||
water_value += C.reagents.get_reagent_amount("water") //Water is full value
|
||||
water_value += C.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
|
||||
water_value += C.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
|
||||
water_value += C.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
|
||||
water_value += C.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
|
||||
water_value += C.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
|
||||
var/message = ""
|
||||
if(!water_value) //The container has no water value, clear everything in it
|
||||
message = "The filtration process removes everything, leaving the water level unchanged."
|
||||
C.reagents.clear_reagents()
|
||||
else
|
||||
if(water_level == water_capacity)
|
||||
to_chat(user, "[src] is already full!")
|
||||
else
|
||||
message = "The filtration process purifies the water, raising the water level."
|
||||
|
||||
if((water_level + water_value) == water_capacity)
|
||||
message += " You filled [src] to the brim!"
|
||||
if((water_level + water_value) > water_capacity)
|
||||
message += " You overfilled [src] and some water runs down the side, wasted."
|
||||
C.reagents.clear_reagents()
|
||||
adjust_water_level(water_value)
|
||||
user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]")
|
||||
//Empty containers will scoop out water, filling the container as much as possible from the water_level
|
||||
else if(O.is_drainable())
|
||||
//Containers with any reagents will get dumped in
|
||||
if(O.reagents.total_volume)
|
||||
var/water_value = 0
|
||||
water_value += O.reagents.get_reagent_amount("water") //Water is full value
|
||||
water_value += O.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
|
||||
water_value += O.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
|
||||
water_value += O.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
|
||||
water_value += O.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
|
||||
water_value += O.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
|
||||
var/message = ""
|
||||
if(!water_value) //The container has no water value, clear everything in it
|
||||
message = "The filtration process removes everything, leaving the water level unchanged."
|
||||
O.reagents.clear_reagents()
|
||||
else
|
||||
if(!water_level)
|
||||
to_chat(user, "[src] is empty!")
|
||||
if(water_level == water_capacity)
|
||||
to_chat(user, "<span class='notice'>[src] is already full!</span>")
|
||||
else
|
||||
if(water_level >= C.volume) //Enough to fill the container completely
|
||||
C.reagents.add_reagent("fishwater", C.volume)
|
||||
adjust_water_level(-C.volume)
|
||||
user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].")
|
||||
else //Fill the container as much as possible with the water_level
|
||||
C.reagents.add_reagent("fishwater", water_level)
|
||||
adjust_water_level(-water_level)
|
||||
user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].")
|
||||
message = "The filtration process purifies the water, raising the water level."
|
||||
|
||||
if((water_level + water_value) == water_capacity)
|
||||
message += " You filled [src] to the brim!"
|
||||
if((water_level + water_value) > water_capacity)
|
||||
message += " You overfilled [src] and some water runs down the side, wasted."
|
||||
O.reagents.clear_reagents()
|
||||
adjust_water_level(water_value)
|
||||
user.visible_message("<span class='notice'>[user.name] pours the contents of [O.name] into [src].</span>", "<span class='notice'>[message]</span>")
|
||||
//Empty containers will scoop out water, filling the container as much as possible from the water_level
|
||||
else if(O.is_refillable())
|
||||
if(!water_level)
|
||||
to_chat(user, "<span class='notice'>[src] is empty!</span>")
|
||||
else
|
||||
if(water_level >= O.reagents.maximum_volume) //Enough to fill the container completely
|
||||
O.reagents.add_reagent("fishwater", O.reagents.maximum_volume)
|
||||
adjust_water_level(-O.reagents.maximum_volume)
|
||||
user.visible_message("<span class='notice'>[user.name] scoops out some water from [src].</span>", "<span class='notice'>You completely fill [O.name] from [src].</span>")
|
||||
else //Fill the container as much as possible with the water_level
|
||||
O.reagents.add_reagent("fishwater", water_level)
|
||||
adjust_water_level(-water_level)
|
||||
user.visible_message("<span class='notice'>[user.name] scoops out some water from [src].</span>", "<span class='notice'>You fill [O.name] with the last of the water in [src].</span>")
|
||||
//Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process
|
||||
else if(iswrench(O))
|
||||
if(!water_level)
|
||||
@@ -635,17 +630,17 @@
|
||||
if(do_after(user, 50 * O.toolspeed, target = src))
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "[src] must be empty before you disassemble it!")
|
||||
to_chat(user, "<span class='warning'>[src] must be empty before you disassemble it!</span>")
|
||||
//Fish eggs
|
||||
else if(istype(O, /obj/item/fish_eggs))
|
||||
var/obj/item/fish_eggs/egg = O
|
||||
//Don't add eggs if there is no water (they kinda need that to live)
|
||||
if(!water_level)
|
||||
to_chat(user, "[src] has no water; [egg.name] won't hatch without water!")
|
||||
to_chat(user, "<span class='warning'>[src] has no water; [egg.name] won't hatch without water!</span>")
|
||||
else
|
||||
//Don't add eggs if the tank already has the max number of fish
|
||||
if(fish_count >= max_fish)
|
||||
to_chat(user, "[src] can't hold any more fish.")
|
||||
to_chat(user, "<span class='notice'>[src] can't hold any more fish.</span>")
|
||||
else
|
||||
add_fish(egg.fish_type)
|
||||
qdel(egg)
|
||||
@@ -655,30 +650,30 @@
|
||||
if(water_level)
|
||||
if(food_level < 10)
|
||||
if(fish_count == 0)
|
||||
user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.")
|
||||
user.visible_message("<span class='notice'>[user.name] shakes some fish food into the empty [src]... How sad.</span>", "<span class='notice'>You shake some fish food into the empty [src]... If only it had fish.</span>")
|
||||
else
|
||||
user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!")
|
||||
user.visible_message("<span class='notice'>[user.name] feeds the fish in [src]. The fish look excited!</span>", "<span class='notice'>You feed the fish in [src]. They look excited!</span>")
|
||||
adjust_food_level(10)
|
||||
else
|
||||
to_chat(user, "[src] already has plenty of food in it. You decide to not add more.")
|
||||
to_chat(user, "<span class='notice'>[src] already has plenty of food in it. You decide to not add more.</span>")
|
||||
else
|
||||
to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.")
|
||||
to_chat(user, "<span class='notice'>[src] doesn't have any water in it. You should fill it with water first.</span>")
|
||||
//Fish egg scoop
|
||||
else if(istype(O, /obj/item/egg_scoop))
|
||||
if(egg_count)
|
||||
user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].")
|
||||
user.visible_message("<span class='notice'>[user.name] harvests some fish eggs from [src].</span>", "<span class='notice'>You scoop the fish eggs out of [src].</span>")
|
||||
harvest_eggs(user)
|
||||
else
|
||||
user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.")
|
||||
user.visible_message("<span class='notice'>[user.name] fails to harvest any fish eggs from [src].</span>", "<span class='notice'>There are no fish eggs in [src] to scoop out.</span>")
|
||||
//Fish net
|
||||
else if(istype(O, /obj/item/fish_net))
|
||||
harvest_fish(user)
|
||||
//Tank brush
|
||||
else if(istype(O, /obj/item/tank_brush))
|
||||
if(filth_level == 0)
|
||||
to_chat(user, "[src] is already spotless!")
|
||||
to_chat(user, "<span class='warning'>[src] is already spotless!</span>")
|
||||
else
|
||||
adjust_filth_level(-filth_level)
|
||||
user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.")
|
||||
user.visible_message("<span class='notice'>[user.name] scrubs the inside of [src], cleaning the filth.</span>", "<span class='notice'>You scrub the inside of [src], cleaning the filth.</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -235,7 +235,7 @@
|
||||
//empties aren't sealed, so let's open it quietly
|
||||
drink_container = new drink_container()
|
||||
drink_container.canopened = 1
|
||||
drink_container.flags |= OPENCONTAINER
|
||||
drink_container.container_type |= OPENCONTAINER
|
||||
drink_container.forceMove(loc)
|
||||
containers[con_type]--
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
desc = "yummy"
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = null
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
consume_sound = 'sound/items/drink.ogg'
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50)
|
||||
volume = 50
|
||||
@@ -26,7 +26,11 @@
|
||||
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'> None of [src] left, oh no!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!is_drainable())
|
||||
to_chat(user, "<span class='warning'> You need to open [src] first!</span>")
|
||||
return FALSE
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
@@ -35,15 +39,14 @@
|
||||
var/mob/living/silicon/robot/borg = user
|
||||
borg.cell.use(30)
|
||||
var/refill = reagents.get_master_reagent_id()
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
spawn(600)
|
||||
reagents.add_reagent(refill, bitesize)
|
||||
return 1
|
||||
return 0
|
||||
if(refill in GLOB.drinks) // Only synthesize drinks
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, bitesize), 600)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG!
|
||||
var/mob/living/carbon/chugger = over_object
|
||||
if (!(flags & OPENCONTAINER))
|
||||
if (!(container_type & DRAINABLE))
|
||||
to_chat(chugger, "<span class='notice'>You need to open [src] first!</span>")
|
||||
return
|
||||
if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume)
|
||||
@@ -56,39 +59,18 @@
|
||||
break
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
// Moved from the can code; not necessary since closed cans aren't open containers now, but, eh.
|
||||
if(istype(target, /obj/item/reagent_containers/food/drinks/cans))
|
||||
var/obj/item/reagent_containers/food/drinks/cans/cantarget = target
|
||||
if(cantarget.canopened == 0)
|
||||
to_chat(user, "<span class='notice'>You need to open the drink you want to pour into!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'> [target] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'> [src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'> You fill [src] with [trans] units of the contents of [target].</span>")
|
||||
|
||||
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'> [src] is empty.</span>")
|
||||
return
|
||||
return FALSE
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'> [target] is full.</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
return FALSE
|
||||
|
||||
var/datum/reagent/refill
|
||||
var/datum/reagent/refillName
|
||||
if(isrobot(user))
|
||||
@@ -99,22 +81,34 @@
|
||||
to_chat(user, "<span class='notice'> You transfer [trans] units of the solution to [target].</span>")
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
if(refill in GLOB.drinks) // Only synthesize drinks
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
var/chargeAmount = max(30,4*trans)
|
||||
bro.cell.use(chargeAmount)
|
||||
to_chat(user, "Now synthesizing [trans] units of [refillName]...")
|
||||
to_chat(user, "<span class='notice'>Now synthesizing [trans] units of [refillName]...</span>")
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "<span class='notice'>Cyborg [src] refilled.</span>"), 300)
|
||||
|
||||
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
|
||||
if(!is_refillable())
|
||||
to_chat(user, "<span class='warning'>[src]'s tab isn't open!</span>")
|
||||
return FALSE
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty.</span>")
|
||||
return FALSE
|
||||
|
||||
spawn(300)
|
||||
reagents.add_reagent(refill, trans)
|
||||
to_chat(user, "Cyborg [src] refilled.")
|
||||
if(reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return FALSE
|
||||
|
||||
return
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
|
||||
return
|
||||
return FALSE
|
||||
if(is_hot(I))
|
||||
if(reagents)
|
||||
reagents.chem_temp += 15
|
||||
@@ -151,7 +145,8 @@
|
||||
materials = list(MAT_METAL=100)
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
flags = CONDUCT
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/trophy/gold_cup
|
||||
name = "gold cup"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
desc = "Just your average condiment container."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "emptycondiment"
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
//Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites.
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The condiment might be empty after the delay.
|
||||
user.visible_message("<span class='warning'>[user] feeds [M] from [src].</span>")
|
||||
add_attack_logs(user, M, "Fed [src] containing [reagentlist()]")
|
||||
add_attack_logs(user, M, "Fed [src] containing [reagents.log_list()]")
|
||||
|
||||
var/fraction = min(10/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
@@ -75,7 +75,7 @@
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
|
||||
|
||||
//Something like a glass or a food item. Player probably wants to transfer TO it.
|
||||
else if(target.is_open_container() || istype(target, /obj/item/reagent_containers/food/snacks))
|
||||
else if(target.is_drainable() || istype(target, /obj/item/reagent_containers/food/snacks))
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
var/operating = 0 // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
@@ -93,7 +93,7 @@
|
||||
icon_state = off_icon
|
||||
broken = 0 // Fix it!
|
||||
dirty = 0 // just to be sure
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
else
|
||||
to_chat(user, "<span class='alert'>It's broken!</span>")
|
||||
return 1
|
||||
@@ -105,7 +105,7 @@
|
||||
dirty = 0 // It's clean!
|
||||
broken = 0 // just to be sure
|
||||
icon_state = off_icon
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
else //Otherwise bad luck!!
|
||||
to_chat(user, "<span class='alert'>It's dirty!</span>")
|
||||
return 1
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
|
||||
seed = /obj/item/seeds/angel
|
||||
name = "destroying angel"
|
||||
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
|
||||
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amanitin."
|
||||
icon_state = "angel"
|
||||
filling_color = "#C0C0C0"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
icon_state = "weedspray"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
@@ -43,7 +43,7 @@
|
||||
icon_state = "pestspray"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -763,8 +763,8 @@
|
||||
else if(transfer_amount) // Droppers, cans, beakers, what have you.
|
||||
visi_msg="[user] uses [reagent_source] on [target]"
|
||||
irrigate = 1
|
||||
// Beakers, bottles, buckets, etc. Can't use is_open_container though.
|
||||
if(istype(reagent_source, /obj/item/reagent_containers/glass/))
|
||||
// Beakers, bottles, buckets, etc.
|
||||
if(reagent_source.is_drainable())
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
if(irrigate && transfer_amount > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation)
|
||||
|
||||
@@ -11,7 +11,7 @@ var/list/chem_t2_reagents = list(
|
||||
|
||||
var/list/chem_t3_reagents = list(
|
||||
"ethanol", "chlorine", "potassium",
|
||||
"aluminium", "radium", "fluorine",
|
||||
"aluminum", "radium", "fluorine",
|
||||
"iron", "fuel", "silver",
|
||||
"stable_plasma"
|
||||
)
|
||||
|
||||
@@ -1019,7 +1019,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
|
||||
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_MOST)
|
||||
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_MOST)
|
||||
if(!iscarbon(user))
|
||||
LAssailant = null
|
||||
else
|
||||
|
||||
@@ -329,7 +329,13 @@
|
||||
|
||||
|
||||
/mob/living/proc/can_inject()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/is_injectable(allowmobs = TRUE)
|
||||
return (allowmobs && reagents && can_inject())
|
||||
|
||||
/mob/living/is_drawable(allowmobs = TRUE)
|
||||
return (allowmobs && reagents && can_inject())
|
||||
|
||||
/mob/living/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
* Sleepypens
|
||||
*/
|
||||
/obj/item/pen/sleepy
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
origin_tech = "engineering=4;syndicate=2"
|
||||
|
||||
|
||||
|
||||
@@ -242,11 +242,11 @@
|
||||
name = "shotgun dart"
|
||||
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
|
||||
icon_state = "cshell"
|
||||
container_type = OPENCONTAINER
|
||||
projectile_type = /obj/item/projectile/bullet/dart
|
||||
|
||||
/obj/item/ammo_casing/shotgun/dart/New()
|
||||
..()
|
||||
flags |= OPENCONTAINER
|
||||
create_reagents(30)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/dart/attackby()
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/obj/item/dart_cartridge/cartridge = null //Container of darts.
|
||||
var/max_beakers = 3
|
||||
var/dart_reagent_amount = 15
|
||||
var/container_type = /obj/item/reagent_containers/glass/beaker
|
||||
var/containers_type = /obj/item/reagent_containers/glass/beaker
|
||||
var/list/starting_chems = null
|
||||
|
||||
/obj/item/gun/dartgun/update_icon()
|
||||
@@ -49,7 +49,7 @@
|
||||
..()
|
||||
if(starting_chems)
|
||||
for(var/chem in starting_chems)
|
||||
var/obj/B = new container_type(src)
|
||||
var/obj/B = new containers_type(src)
|
||||
B.reagents.add_reagent(chem, 50)
|
||||
beakers += B
|
||||
cartridge = new /obj/item/dart_cartridge(src)
|
||||
@@ -87,7 +87,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(istype(I, /obj/item/reagent_containers/glass))
|
||||
if(!istype(I, container_type))
|
||||
if(!istype(I, containers_type))
|
||||
to_chat(user, "<span class='warning'>[I] doesn't seem to fit into [src].</span>")
|
||||
return
|
||||
if(beakers.len >= max_beakers)
|
||||
|
||||
@@ -143,7 +143,8 @@
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
usesound = 'sound/items/Welder.ogg'
|
||||
toolspeed = 1
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
flags = CONDUCT
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
force = 12
|
||||
sharp = 1
|
||||
|
||||
@@ -683,6 +683,16 @@ var/const/INGEST = 2
|
||||
stuff += A.id
|
||||
return english_list(stuff)
|
||||
|
||||
/datum/reagents/proc/log_list()
|
||||
if(!length(reagent_list))
|
||||
return "no reagents"
|
||||
var/list/data = list()
|
||||
for(var/r in reagent_list) //no reagents will be left behind
|
||||
var/datum/reagent/R = r
|
||||
data += "[R.id] ([round(R.volume, 0.1)]u)"
|
||||
//Using IDs because SOME chemicals (I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return english_list(data)
|
||||
|
||||
//two helper functions to preserve data across reactions (needed for xenoarch)
|
||||
/datum/reagents/proc/get_data(reagent_id)
|
||||
for(var/datum/reagent/D in reagent_list)
|
||||
@@ -744,6 +754,11 @@ var/const/INGEST = 2
|
||||
break
|
||||
return result
|
||||
|
||||
/datum/reagents/proc/holder_full()
|
||||
if(total_volume >= maximum_volume)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
. = ..()
|
||||
processing_objects -= src
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R)
|
||||
var/all_safe = 1
|
||||
for(var/datum/reagent/A in R.reagent_list)
|
||||
if(!safe_chem_list.Find(A.id))
|
||||
if(!GLOB.safe_chem_list.Find(A.id))
|
||||
all_safe = 0
|
||||
return all_safe
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
if(BL.data && BL.data["viruses"])
|
||||
var/list/viruses = BL.data["viruses"]
|
||||
return viruses[index]
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/GetResistancesByIndex(index)
|
||||
if(beaker && beaker.reagents)
|
||||
@@ -40,13 +39,11 @@
|
||||
if(BL.data && BL.data["resistances"])
|
||||
var/list/resistances = BL.data["resistances"]
|
||||
return resistances[index]
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/GetVirusTypeByIndex(index)
|
||||
var/datum/disease/D = GetVirusByIndex(index)
|
||||
if(D)
|
||||
return D.GetDiseaseID()
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/replicator_cooldown(waittime)
|
||||
wait = 1
|
||||
@@ -175,7 +172,6 @@
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
//Prints a nice virus release form. Props to Urbanliner for the layout
|
||||
/obj/machinery/computer/pandemic/proc/print_form(var/datum/disease/advance/D, mob/living/user)
|
||||
@@ -319,12 +315,12 @@
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
onclose(user, "pandemic")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers) && (I.flags & OPENCONTAINER))
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER))
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A beaker is already loaded into the machine!</span>")
|
||||
return
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/reagent_containers) && (I.flags & OPENCONTAINER) )
|
||||
if (istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER) )
|
||||
if (!beaker)
|
||||
if(!user.drop_item())
|
||||
return 1
|
||||
|
||||
@@ -238,12 +238,4 @@ About the Tools:
|
||||
It simply tells us how much to transfer when
|
||||
'pouring' our reagents into something else.
|
||||
|
||||
atom/proc/is_open_container()
|
||||
Checks atom/var/flags & OPENCONTAINER.
|
||||
If this returns 1 , you can use syringes, beakers etc
|
||||
to manipulate the contents of this object.
|
||||
If it's 0, you'll need to write your own custom reagent
|
||||
transfer code since you will not be able to use the standard
|
||||
tools to manipulate it.
|
||||
|
||||
*/
|
||||
@@ -192,7 +192,7 @@
|
||||
/datum/reagent/medicine/styptic_powder
|
||||
name = "Styptic Powder"
|
||||
id = "styptic_powder"
|
||||
description = "Styptic (aluminium sulfate) powder helps control bleeding and heal physical wounds."
|
||||
description = "Styptic (aluminum sulfate) powder helps control bleeding and heal physical wounds."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC"
|
||||
metabolization_rate = 3
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/datum/reagent/toxin/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
update_flags |= M.adjustToxLoss(2, FALSE)
|
||||
update_flags |= M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
return ..() | update_flags
|
||||
|
||||
/datum/reagent/spider_venom
|
||||
|
||||
@@ -61,14 +61,6 @@
|
||||
/obj/item/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/proc/reagentlist() //Return reagents in a reagent_container, default to source
|
||||
var/data
|
||||
if(reagents && reagents.reagent_list && reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
|
||||
/obj/item/reagent_containers/wash(mob/user, atom/source)
|
||||
if(is_open_container())
|
||||
if(reagents.total_volume >= volume)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
var/contained = injected.name
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units")
|
||||
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units")
|
||||
M.LAssailant = user
|
||||
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
item_state = "atoxinbottle"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30)
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
volume = 30
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/on_reagent_change()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50)
|
||||
volume = 50
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
var/label_text = ""
|
||||
// the fucking asshole who designed this can go die in a fire - Iamgoofball
|
||||
@@ -59,10 +59,10 @@
|
||||
..()
|
||||
if(is_open_container())
|
||||
to_chat(usr, "<span class='notice'>You put the lid on [src].</span>")
|
||||
flags ^= OPENCONTAINER
|
||||
container_type ^= REFILLABLE | DRAINABLE
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You take the lid off [src].</span>")
|
||||
flags |= OPENCONTAINER
|
||||
container_type |= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
@@ -262,7 +262,7 @@
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100)
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
@@ -272,7 +272,7 @@
|
||||
volume = 25
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25)
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
can_assembly = 0
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/drugs
|
||||
@@ -282,7 +282,7 @@
|
||||
amount_per_transfer_from_this = 2
|
||||
possible_transfer_amounts = 2
|
||||
volume = 10
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
can_assembly = 0
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact
|
||||
@@ -293,7 +293,7 @@
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
origin_tech = "materials=2;engineering=3;plasmatech=3"
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact/New()
|
||||
..()
|
||||
@@ -307,7 +307,7 @@
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100,300)
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
origin_tech = "bluespace=5;materials=4;plasmatech=4"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/cryoxadone
|
||||
@@ -337,7 +337,7 @@
|
||||
volume = 120
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
slot_flags = SLOT_HEAD
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot)
|
||||
..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
@@ -52,7 +52,7 @@
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!safe_chem_list.Find(R.id))
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = OPENCONTAINER | NOBLUDGEON
|
||||
flags = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
volume = 15
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
sharp = 1
|
||||
container_type = TRANSPARENT
|
||||
var/busy = 0
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
@@ -78,7 +79,7 @@
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
if(reagents.holder_full())
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
return
|
||||
|
||||
@@ -91,7 +92,7 @@
|
||||
if(!do_mob(user, target))
|
||||
busy = 0
|
||||
return
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
if(reagents.holder_full())
|
||||
return
|
||||
busy = 0
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
@@ -104,14 +105,14 @@
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract))
|
||||
if(!target.is_drawable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution.</span>")
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
if(reagents.holder_full())
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
@@ -120,7 +121,7 @@
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/storage/fancy/cigarettes))
|
||||
if(!L && !target.is_injectable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
|
||||
@@ -6,28 +6,22 @@
|
||||
density = 1
|
||||
anchored = 0
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
container_type = DRAINABLE | AMOUNT_VISIBLE
|
||||
|
||||
var/tank_volume = 1000 //In units, how much the dispenser can hold
|
||||
var/reagent_id = "water" //The ID of the reagent that the dispenser uses
|
||||
var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params)
|
||||
return
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params)
|
||||
. = ..()
|
||||
if(I.is_refillable())
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
|
||||
/obj/structure/reagent_dispensers/New()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>It has [reagents.total_volume] units left.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's empty.</span>")
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>[src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
|
||||
@@ -8,7 +8,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
name = "Circuit Imprinter"
|
||||
desc = "Manufactures circuit boards for the construction of machines."
|
||||
icon_state = "circuit_imprinter"
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
var/efficiency_coeff
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
name = "Protolathe"
|
||||
desc = "Converts raw materials into useful objects."
|
||||
icon_state = "protolathe"
|
||||
flags = OPENCONTAINER
|
||||
container_type = OPENCONTAINER
|
||||
|
||||
var/efficiency_coeff
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
icon_state = "grey slime extract"
|
||||
force = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
container_type = INJECTABLE | DRAWABLE
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
// After docking //
|
||||
/atom/proc/postDock(obj/docking_port/S1)
|
||||
if(smooth)
|
||||
smooth_icon(src)
|
||||
queue_smooth(src)
|
||||
|
||||
/obj/machinery/door/airlock/postDock(obj/docking_port/stationary/S1)
|
||||
. = ..()
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
|
||||
/obj/effect/temp_visual/ripple/New()
|
||||
. = ..()
|
||||
smooth_icon(src)
|
||||
queue_smooth(src)
|
||||
animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME)
|
||||
|
||||
@@ -233,12 +233,19 @@
|
||||
if(!health)
|
||||
spawn(0)
|
||||
message_to_riders("<span class='userdanger'>Critical damage to the vessel detected, core explosion imminent!</span>")
|
||||
for(var/i = 10, i >= 0; --i)
|
||||
message_to_riders("<span class='warning'>[i]</span>")
|
||||
if(i == 0)
|
||||
explosion(loc, 2, 4, 8)
|
||||
qdel(src)
|
||||
for(var/i in 1 to 3)
|
||||
var/count = 3
|
||||
message_to_riders("<span class='warning'>[count]</span>")
|
||||
count--
|
||||
sleep(10)
|
||||
if(LAZYLEN(pilot) || LAZYLEN(passengers))
|
||||
for(var/M in passengers + pilot)
|
||||
var/mob/living/L = M
|
||||
L.adjustBruteLoss(300)
|
||||
explosion(loc, 0, 0, 2)
|
||||
robogibs(loc)
|
||||
robogibs(loc)
|
||||
qdel(src)
|
||||
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
||||
|
||||
// Can't cope with toxins at all
|
||||
for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin"))
|
||||
for(var/toxin in GLOB.liver_toxins)
|
||||
if(owner.reagents.has_reagent(toxin))
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user