mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fix #3525
- Add origin_tech to regular beakers (material 1, directly based on similar value for glass sheets), add origin_tech corresponding to their research techs to bluespace and statis beakers (both types). Vials inherit beaker origin_tech - Unfuck pathing in advanced beaker types, which forced me to modify the abandoned_crates file (use an actual branch-off for large beakers) - Actually use variable inheritance instead of repeating the same values over and over - Add logging for dousing shit with thermite - Span, formatting, visible_message, newline, absolute pathing - Remove commented vial definition duplicate
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
/obj/structure/closet/crate/secure/loot/bay_03
|
||||
New()
|
||||
..()
|
||||
new/obj/item/weapon/reagent_containers/glass/beaker/bluespacelarge(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/beaker/bluespace/large(src)
|
||||
/obj/structure/closet/crate/secure/loot/bay_04
|
||||
New()
|
||||
..()
|
||||
@@ -33,7 +33,7 @@
|
||||
New()
|
||||
..()
|
||||
for(var/i = 0, i < 3, i++)
|
||||
new/obj/item/weapon/reagent_containers/glass/beaker/noreactlarge(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/beaker/noreact/large(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/bay_07
|
||||
New()
|
||||
@@ -63,4 +63,4 @@
|
||||
/obj/structure/closet/crate/secure/loot/bay_11
|
||||
New()
|
||||
..()
|
||||
new/obj/item/weapon/melee/baton/loaded(src)
|
||||
new/obj/item/weapon/melee/baton/loaded(src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// (Mixing)Glass.
|
||||
/// (Mixing) Glass.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
name = " "
|
||||
@@ -9,6 +9,7 @@
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "null"
|
||||
item_state = "null"
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50)
|
||||
volume = 50
|
||||
@@ -48,12 +49,12 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/examine(mob/user)
|
||||
..()
|
||||
if (!is_open_container())
|
||||
user << "<span class='info'>Airtight lid seals it completely.</span>"
|
||||
if(!is_open_container())
|
||||
user << "<span class='info'>An airtight lid seals it completely.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attack_self()
|
||||
..()
|
||||
if (is_open_container())
|
||||
if(is_open_container())
|
||||
usr << "<span class = 'notice'>You put the lid on \the [src]."
|
||||
flags ^= OPENCONTAINER
|
||||
else
|
||||
@@ -63,7 +64,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/afterattack(obj/target, mob/user , flag)
|
||||
|
||||
if (!is_open_container() || !flag)
|
||||
if(!is_open_container() || !flag)
|
||||
return
|
||||
|
||||
for(var/type in src.can_be_placed_into)
|
||||
@@ -71,50 +72,51 @@
|
||||
return
|
||||
|
||||
if(ismob(target) && target.reagents && reagents.total_volume)
|
||||
user << "<span class='notice'>You splash the solution onto [target].</span>"
|
||||
|
||||
var/mob/living/M = target
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with \the [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used \the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) splashed [M.name] ([M.key]) with \the [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("<span class='warning'>[] has been splashed with something by []!</span>", target, user), 1)
|
||||
user.visible_message("<span class='warning'>[target] has been splashed with something by [user]!</span>", \
|
||||
"<span class='notice'>You splash the solution onto \the [target].</span>")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
spawn(5)
|
||||
src.reagents.clear_reagents()
|
||||
return
|
||||
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(!target.reagents.total_volume && target.reagents)
|
||||
user << "<span class='warning'>[target] is empty.</span>"
|
||||
user << "<span class='warning'>\The [target] is empty.</span>"
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='warning'>[src] is full.</span>"
|
||||
user << "<span class='warning'>\The [src] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>"
|
||||
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [target].</span>"
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='warning'>[src] is empty.</span>"
|
||||
user << "<span class='warning'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "<span class='warning'>[target] is full.</span>"
|
||||
user << "<span class='warning'>\The [target] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution to \the [target].</span>"
|
||||
|
||||
// /vg/: Logging transfers of bad things
|
||||
if(istype(target.reagents_to_log) && target.reagents_to_log.len)
|
||||
@@ -124,8 +126,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="<span class='danger'>([english_list(badshit)])</span>"
|
||||
message_admins("[user.name] ([user.ckey]) added [trans]U to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [trans]U to \a [target] with [src].")
|
||||
message_admins("[user.name] ([user.ckey]) added [trans]U to \a [target] with \the [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [trans]U to \a [target] with \the [src].")
|
||||
|
||||
//Safety for dumping stuff into a ninja suit. It handles everything through attackby() and this is unnecessary.
|
||||
else if(istype(target, /obj/item/clothing/suit/space/space_ninja))
|
||||
@@ -137,13 +139,18 @@
|
||||
else if(istype(target, /obj/machinery/anomaly))
|
||||
return
|
||||
|
||||
else if(reagents.total_volume)
|
||||
user << "<span class='notice'>You splash the solution onto [target].</span>"
|
||||
else if(reagents.total_volume) //We have already checked for mobs, so this has to be a non-mob
|
||||
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>", \
|
||||
"<span class='notice'>You splash the solution onto \the [target].</span>")
|
||||
if(reagents.has_reagent("fuel"))
|
||||
message_admins("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
message_admins("<span class='red'>[user.name] ([user.ckey]) poured Welder Fuel on \the [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)</span>")
|
||||
log_game("[user.name] ([user.ckey]) poured Welder Fuel on \the [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
if(reagents.has_reagent("thermite"))
|
||||
message_admins("<span class='red'>[user.name] ([user.ckey]) poured Thermite onto \the [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)</span>")
|
||||
log_game("[user.name] ([user.ckey]) poured Thermite onto \the [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
spawn(5)
|
||||
src.reagents.clear_reagents()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -169,45 +176,50 @@
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
g_amt = 500
|
||||
w_type = RECYK_GLASS
|
||||
origin_tech = "materials=1"
|
||||
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/on_reagent_change()
|
||||
|
||||
update_icon()
|
||||
overlays.len = 0
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/pickup(mob/user)
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9) filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24) filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49) filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74) filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79) filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90) filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY) filling.icon_state = "[icon_state]100"
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/dropped(mob/user)
|
||||
|
||||
if (!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
|
||||
overlays += lid
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/attack_hand()
|
||||
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/update_icon()
|
||||
|
||||
overlays.len = 0
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9) filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24) filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49) filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74) filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79) filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90) filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY) filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
overlays += filling
|
||||
|
||||
if(!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
|
||||
overlays += lid
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
@@ -215,10 +227,7 @@
|
||||
icon_state = "beakerlarge"
|
||||
g_amt = 1500
|
||||
volume = 100
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100)
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact
|
||||
name = "stasis beaker"
|
||||
@@ -226,19 +235,16 @@
|
||||
icon_state = "beakernoreact"
|
||||
g_amt = 500
|
||||
volume = 50
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
flags = FPRINT | OPENCONTAINER | NOREACT
|
||||
origin_tech = "bluespace=3;materials=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreactlarge
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact/large
|
||||
name = "large stasis beaker"
|
||||
desc = "A beaker powered by experimental bluespace technology. Chemicals are held in stasis and do not react inside of it. Can hold up to 100 units."
|
||||
icon_state = "beakernoreactlarge"
|
||||
g_amt = 1500
|
||||
volume = 100
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
flags = FPRINT | OPENCONTAINER | NOREACT
|
||||
origin_tech = "bluespace=4;materials=6"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
@@ -247,21 +253,18 @@
|
||||
g_amt = 2000
|
||||
volume = 200
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100,200)
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
origin_tech = "bluespace=2;materials=3"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespacelarge
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace/large
|
||||
name = "large bluespace beaker"
|
||||
desc = "A prototype ultra-capacity beaker, courtesy of bluespace research. Can hold up to 300 units."
|
||||
icon_state = "beakerbluespacelarge"
|
||||
g_amt = 5000
|
||||
volume = 300
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100,150,200,300)
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
|
||||
origin_tech = "bluespace=3;materials=5"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
@@ -269,24 +272,24 @@
|
||||
icon_state = "vial"
|
||||
g_amt = 250
|
||||
volume = 25
|
||||
w_type = RECYK_GLASS
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25)
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("cryoxadone", 30)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/sulphuric
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("sacid", 50)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/slime
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("slimejelly", 50)
|
||||
@@ -308,25 +311,13 @@
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
slot_flags = SLOT_HEAD
|
||||
|
||||
attackby(var/obj/D, mob/user as mob)
|
||||
if(isprox(D))
|
||||
user << "You add [D] to [src]."
|
||||
del(D)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
// vials are defined twice, what?
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
desc = "Small glass vial. Looks fragile."
|
||||
icon_state = "vial"
|
||||
g_amt = 500
|
||||
volume = 15
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1,5,15)
|
||||
flags = FPRINT | OPENCONTAINER */
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob)
|
||||
if(isprox(D))
|
||||
user << "You add \the [D] to \the [src]."
|
||||
del(D)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/blender_jug
|
||||
|
||||
@@ -2306,7 +2306,7 @@ k
|
||||
reliability = 100
|
||||
build_path = /obj/item/bluespace_crystal/artificial
|
||||
|
||||
/datum/design/bluespacebeaker_small
|
||||
/datum/design/bluespacebeaker
|
||||
name = "Bluespace Beaker"
|
||||
desc = "A newly-developed high-capacity beaker, courtesy of bluespace research. Can hold up to 200 units."
|
||||
id = "bluespacebeaker_small"
|
||||
@@ -2324,9 +2324,9 @@ k
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$diamond" = 1500, "$iron" = 6000, "$glass" = 6000)
|
||||
reliability = 100
|
||||
build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespacelarge
|
||||
build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace/large
|
||||
|
||||
/datum/design/stasisbeaker_small
|
||||
/datum/design/stasisbeaker
|
||||
name = "Stasis Beaker"
|
||||
desc = "A beaker powered by experimental bluespace technology. Chemicals are held in stasis and do not react inside of it. Can hold up to 50 units."
|
||||
id = "stasisbeaker_small"
|
||||
@@ -2344,7 +2344,7 @@ k
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$diamond" = 1500, "$iron" = 3750, "$glass" = 3750, "$uranium" = 1500)
|
||||
reliability = 100
|
||||
build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreactlarge
|
||||
build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreact/large
|
||||
|
||||
/datum/design/reactive_teleport_armor
|
||||
name = "Reactive Teleport Armor"
|
||||
@@ -3032,4 +3032,4 @@ k
|
||||
req_tech = list ("engineering" = 3, "biotech" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/botany_bioballistic
|
||||
build_path = /obj/item/weapon/circuitboard/botany_bioballistic
|
||||
|
||||
Reference in New Issue
Block a user