Conflicts:
	code/modules/power/cable.dm
	icons/obj/power_cond_red.dmi
This commit is contained in:
Chinsky
2014-01-27 02:27:27 +04:00
74 changed files with 1962 additions and 804 deletions

View File

@@ -696,7 +696,7 @@ var/global/floorIsLava = 0
/datum/admins/proc/toggleooc()
set category = "Server"
set desc="Toggle dis bitch"
set desc="Globally Toggles OOC"
set name="Toggle OOC"
ooc_allowed = !( ooc_allowed )
if (ooc_allowed)
@@ -707,6 +707,20 @@ var/global/floorIsLava = 0
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggledsay()
set category = "Server"
set desc="Globally Toggles DSAY"
set name="Toggle DSAY"
dsay_allowed = !( dsay_allowed )
if (dsay_allowed)
world << "<B>Deadchat has been globally enabled!</B>"
else
world << "<B>Deadchat has been globally disabled!</B>"
log_admin("[key_name(usr)] toggled deadchat.")
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
/datum/admins/proc/toggleoocdead()
set category = "Server"
set desc="Toggle dis bitch"

View File

@@ -55,6 +55,7 @@ var/list/admin_verbs_admin = list(
/client/proc/secrets,
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
/datum/admins/proc/PlayerNotes,

View File

@@ -179,7 +179,7 @@
//Atmospherics Rig (BS12)
/obj/item/clothing/head/helmet/space/rig/atmos
desc = "A special helmet designed for work in a hazardou, low pressure environments. Has reduced radiation shielding and protective plating to allow for greater mobility."
desc = "A special helmet designed for work in a hazardous, low pressure environments. Has reduced radiation shielding and protective plating to allow for greater mobility."
name = "atmospherics hardsuit helmet"
icon_state = "rig0-atmos"
item_state = "atmos_helm"

View File

@@ -513,6 +513,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "<span class='warning'>Spawning as a mouse is currently disabled.</span>"
return
var/mob/dead/observer/M = usr
if(config.antag_hud_restricted && M.has_enabled_antagHUD == 1)
src << "<span class='warning'>antagHUD restrictions prevent you from spawning in as a mouse.</span>"
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text

View File

@@ -57,6 +57,12 @@
src << "\red You have deadchat muted."
return
if(!src.client.holder)
if(!dsay_allowed)
src << "\red Deadchat is globally muted"
return
var/input
if(!message)
input = copytext(sanitize(input(src, "Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)

View File

@@ -1192,6 +1192,13 @@
see_in_dark = 8
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(healths) healths.icon_state = "health7" //DEAD healthmeter
if(client)
if(client.view != world.view)
if(locate(/obj/item/weapon/gun/energy/sniperrifle, contents))
var/obj/item/weapon/gun/energy/sniperrifle/s = locate() in src
if(s.zoom)
s.zoom()
else
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_in_dark = species.darksight

View File

@@ -119,7 +119,7 @@
set desc = "Grow to a more complex form."
if(!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play an adult Diona.")
src << alert("You are currently not whitelisted to play as a full diona.")
return 0
if(donors.len < 5)
@@ -190,4 +190,4 @@
universal_speak = 1
src << "\green You feel your awareness expand, and realize you know how to speak with the creatures around you."
else
src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind."
src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind."

View File

@@ -124,11 +124,11 @@
/obj/item/broken_device
name = "broken component"
icon = 'icons/robot_component.dmi'
icon = 'icons/obj/robot_component.dmi'
icon_state = "broken"
/obj/item/robot_parts/robot_component
icon = 'icons/robot_component.dmi'
icon = 'icons/obj/robot_component.dmi'
icon_state = "working"
construction_time = 200
construction_cost = list("metal"=5000)
@@ -214,4 +214,4 @@
if(H.emagged && prob(5))
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
src.add_fingerprint(user)
return
return

View File

@@ -707,8 +707,7 @@
locked = 0
else
user << "You fail to emag the cover lock."
if(prob(25))
src << "Hack attempt detected."
src << "Hack attempt detected."
else
user << "The cover is already unlocked."
return
@@ -725,7 +724,7 @@
lawupdate = 0
connected_ai = null
user << "You emag [src]'s interface."
// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws()
clear_inherent_laws()
@@ -737,7 +736,7 @@
sleep(5)
src << "\red Initiating diagnostics..."
sleep(20)
src << "\red SynBorg v1.7 loaded."
src << "\red SynBorg v1.7.1 loaded."
sleep(5)
src << "\red LAW SYNCHRONISATION ERROR"
sleep(5)
@@ -756,9 +755,8 @@
src.module.rebuild()
updateicon()
else
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
if(prob(25))
src << "Hack attempt detected."
user << "You fail to hack [src]'s interface."
src << "Hack attempt detected."
return
else if(istype(W, /obj/item/borg/upgrade/))
@@ -797,7 +795,7 @@
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe-like arm."), 1)
if ("grab")
if (M == src)
@@ -816,13 +814,6 @@
if ("hurt")
var/damage = rand(10, 20)
if (prob(90))
/*
if (M.class == "combat")
damage += 15
if(prob(20))
weakened = max(weakened,4)
stunned = max(stunned,4)
What is this?*/
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))

View File

@@ -186,6 +186,12 @@
if(L.incorporeal_move)//Move though walls
Process_Incorpmove(direct)
return
if(mob.client)
if(mob.client.view != world.view)
if(locate(/obj/item/weapon/gun/energy/sniperrifle, mob.contents)) // If mob moves while zoomed in with sniper rifle, unzoom them.
var/obj/item/weapon/gun/energy/sniperrifle/s = locate() in mob
if(s.zoom)
s.zoom()
if(Process_Grab()) return
@@ -447,4 +453,4 @@
prob_slip = 0 // Changing this to zero to make it line up with the comment.
prob_slip = round(prob_slip)
return(prob_slip)
return(prob_slip)

View File

@@ -37,6 +37,11 @@
usr << "\red Speech is currently admin-disabled."
return
if(!src.client.holder)
if(!dsay_allowed)
src << "\red Deadchat is globally muted"
return
if(client && !(client.prefs.toggles & CHAT_DEAD))
usr << "\red You have deadchat muted."
return

View File

@@ -110,6 +110,12 @@
if(istype(W, /obj/item/weapon/wirecutters))
///// Z-Level Stuff
if(src.d1 == 12 || src.d2 == 12)
user << "<span class='warning'>You must cut this cable from above.</span>"
return
///// Z-Level Stuff
// if(power_switch)
// user << "\red This piece of cable is tied to a power switch. Flip the switch to remove it."
// return
@@ -125,6 +131,17 @@
for(var/mob/O in viewers(src, null))
O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1)
///// Z-Level Stuff
if(src.d1 == 11 || src.d2 == 11)
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
var/turf/below = locate(src.x, src.y, controller.down_target)
for(var/obj/structure/cable/c in below)
if(c.d1 == 12 || c.d2 == 12)
c.Del()
///// Z-Level Stuff
del(src)
return // not needed, but for clarity
@@ -324,29 +341,75 @@
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
///// Z-Level Stuff
// check if the target is open space
if(istype(F, /turf/simulated/floor/open))
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 11 ) || ( LC.d2 == dirn && LC.d1 == 11))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
var/obj/structure/cable/C = new(F)
var/turf/simulated/floor/open/temp = F
var/obj/structure/cable/C = new(F)
var/obj/structure/cable/D = new(temp.floorbelow)
C.cableColor(item_color)
C.cableColor(item_color)
C.d1 = 0
C.d2 = dirn
C.add_fingerprint(user)
C.updateicon()
C.d1 = 11
C.d2 = dirn
C.add_fingerprint(user)
C.updateicon()
C.powernet = new()
powernets += C.powernet
C.powernet.cables += C
C.powernet = new()
powernets += C.powernet
C.powernet.cables += C
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
D.cableColor(item_color)
D.d1 = 12
D.d2 = 0
D.add_fingerprint(user)
D.updateicon()
D.powernet = C.powernet
D.powernet.cables += D
D.mergeConnectedNetworksOnTurf()
// do the normal stuff
else
///// Z-Level Stuff
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "There's already a cable at that position."
return
var/obj/structure/cable/C = new(F)
C.cableColor(item_color)
C.d1 = 0
C.d2 = dirn
C.add_fingerprint(user)
C.updateicon()
C.powernet = new()
powernets += C.powernet
C.powernet.cables += C
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
use(1)
if (C.shock(user, 50))
if (prob(50)) //fail
new/obj/item/weapon/cable_coil(C.loc, 1, C.cable_color)
del(C)
use(1)
if (C.shock(user, 50))
if (prob(50)) //fail
new/obj/item/weapon/cable_coil(C.loc, 1, C.cable_color)
del(C)
//src.laying = 1
//last = C

View File

@@ -112,7 +112,17 @@
// if unmarked==1, only return those with no powernet
/proc/power_list(var/turf/T, var/source, var/d, var/unmarked=0)
. = list()
var/fdir = (!d)? 0 : turn(d, 180) // the opposite direction to d (or 0 if d==0)
var/fdir = (!d)? 0 : turn(d, 180)
// the opposite direction to d (or 0 if d==0)
///// Z-Level Stuff
var/Zdir
if(d==11)
Zdir = 11
else if (d==12)
Zdir = 12
else
Zdir = 999
///// Z-Level Stuff
// world.log << "d=[d] fdir=[fdir]"
for(var/AM in T)
if(AM == source) continue //we don't want to return source
@@ -129,7 +139,9 @@
var/obj/structure/cable/C = AM
if(!unmarked || !C.powernet)
if(C.d1 == fdir || C.d2 == fdir)
///// Z-Level Stuff
if(C.d1 == fdir || C.d2 == fdir || C.d1 == Zdir || C.d2 == Zdir)
///// Z-Level Stuff
. += C
else if(C.d1 == turn(C.d2, 180))
. += C
@@ -140,11 +152,43 @@
. = list() // this will be a list of all connected power objects
var/turf/T = loc
if(d1) T = get_step(src, d1)
if(T) . += power_list(T, src, d1, 1)
///// Z-Level Stuff
if(d1)
if(d1 <= 10)
T = get_step(src, d1)
if(T)
. += power_list(T, src, d1, 1)
else if (d1 == 11 || d1 == 12)
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up && d1 == 12)
T = locate(src.x, src.y, controller.up_target)
if(T)
. += power_list(T, src, 11, 1)
if(controller.down && d1 == 11)
T = locate(src.x, src.y, controller.down_target)
if(T)
. += power_list(T, src, 12, 1)
else if(!d1)
if(T)
. += power_list(T, src, d1, 1)
T = get_step(src, d2)
if(T) . += power_list(T, src, d2, 1)
if(d2 == 11 || d2 == 12)
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up && d2 == 12)
T = locate(src.x, src.y, controller.up_target)
if(T)
. += power_list(T, src, 11, 1)
if(controller.down && d2 == 11)
T = locate(src.x, src.y, controller.down_target)
if(T)
. += power_list(T, src, 12, 1)
else
T = get_step(src, d2)
if(T)
. += power_list(T, src, d2, 1)
///// Z-Level Stuff
return .

View File

@@ -32,7 +32,7 @@ var/global/list/rad_collectors = list()
P.air_contents.toxins = 0
eject()
else
P.air_contents.toxins -= 0.001*drainratio
P.air_contents.adjust(tx = -0.001*drainratio)
return

View File

@@ -215,7 +215,7 @@
//world << "[href] ; [href_list[href]]"
if (!istype(src.loc, /turf) || istype(usr, /mob/living/silicon/ai))
if (!istype(src.loc, /turf) && !istype(usr, /mob/living/silicon/))
return 0 // Do not update ui
if( href_list["cmode"] )

View File

@@ -205,37 +205,54 @@ obj/item/weapon/gun/energy/staff/focus
projectile_type = "/obj/item/projectile/energy/plasma"
/obj/item/weapon/gun/energy/sniperrifle
name = "L.W.A.P. Sniper Rifle"
desc = "A rifle constructed of lightweight materials, fitted with a SMART aiming-system scope."
icon = 'icons/obj/gun.dmi'
icon_state = "sniper"
fire_sound = 'sound/weapons/marauder.ogg'
origin_tech = "combat=6;materials=5;powerstorage=4"
projectile_type = "/obj/item/projectile/beam/sniper"
slot_flags = SLOT_BACK
charge_cost = 250
fire_delay = 35
w_class = 4.0
var/zoom = 0
name = "L.W.A.P. Sniper Rifle"
desc = "A rifle constructed of lightweight materials, fitted with a SMART aiming-system scope."
icon = 'icons/obj/gun.dmi'
icon_state = "sniper"
fire_sound = 'sound/weapons/marauder.ogg'
origin_tech = "combat=6;materials=5;powerstorage=4"
projectile_type = "/obj/item/projectile/beam/sniper"
slot_flags = SLOT_BACK
charge_cost = 250
fire_delay = 35
w_class = 4.0
var/zoom = 0
/obj/item/weapon/gun/energy/sniperrifle/dropped(mob/user)
user.client.view = world.view
zoom = 0
/*
This is called from
modules/mob/mob_movement.dm if you move you will be zoomed out
modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
*/
/obj/item/weapon/gun/energy/sniperrifle/verb/zoom()
set category = "Special Verbs"
set name = "Zoom"
set popup_menu = 0
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
usr << "No."
return
set category = "Object"
set name = "Use Sniper Scope"
set popup_menu = 0
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
usr << "You are unable to focus down the scope of the rifle."
return
if(!zoom && global_hud.darkMask[1] in usr.client.screen)
usr << "Your welding equipment gets in the way of you looking down the scope"
return
if(!zoom && usr.get_active_hand() != src)
usr << "You are too distracted to look down the scope, perhaps if it was in your active hand this might work better"
return
src.zoom = !src.zoom
usr << ("<font color='[src.zoom?"blue":"red"]'>Zoom mode [zoom?"en":"dis"]abled.</font>")
if(zoom)
usr.client.view = 12
usr << sound('sound/mecha/imag_enh.ogg',volume=50)
else
usr.client.view = world.view//world.view - default mob view size
return
if(usr.client.view == world.view)
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1) // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.button_pressed_F12(1)
usr.client.view = 12
zoom = 1
else
usr.client.view = world.view
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1)
zoom = 0
usr << "<font color='[zoom?"blue":"red"]'>Zoom mode [zoom?"en":"dis"]abled.</font>"
return

View File

@@ -177,7 +177,7 @@ mob/living/proc/Targeted(var/obj/item/weapon/gun/I) //Self explanitory.
target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locked")
update_targeted()
//Adding the buttons to the controler person
//Adding the buttons to the controller person
var/mob/living/T = I.loc
if(T)
if(T.client)

View File

@@ -1,39 +1,67 @@
/proc/GetColors(hex) //Actually converts hex to rgb
hex = uppertext(hex)
var/hi1 = text2ascii(hex, 2)
var/lo1 = text2ascii(hex, 3)
var/hi2 = text2ascii(hex, 4)
var/lo2 = text2ascii(hex, 5)
var/hi3 = text2ascii(hex, 6)
var/lo3 = text2ascii(hex, 7)
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
/proc/mix_color_from_reagents(var/list/reagent_list)
if(!reagent_list || !reagent_list.len) return 0
if(!reagent_list || !length(reagent_list))
return 0
var/list/rgbcolor = list(0,0,0)
var/finalcolor = 0
for(var/datum/reagent/re in reagent_list) //TODO: weigh final colour by amount of reagents; make this algorithm use hex
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color
else
var/newcolor[3]
var/prergbcolor[3]
prergbcolor = rgbcolor
newcolor = GetColors(re.color)
var/contents = length(reagent_list)
var/list/weight = new /list(contents)
var/list/redcolor = new /list(contents)
var/list/greencolor = new /list(contents)
var/list/bluecolor = new /list(contents)
var/i
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
//fill the list of weights
for(i=1; i<=contents; i++)
var/datum/reagent/re = reagent_list[i]
var/reagentweight = re.volume
if(istype(re, /datum/reagent/paint))
reagentweight *= 20 //Paint colours a mixture twenty times as much
weight[i] = reagentweight
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
//fill the lists of colours
for(i=1; i<=contents; i++)
var/datum/reagent/re = reagent_list[i]
var/hue = re.color
if(length(hue) != 7)
return 0
redcolor[i]=hex2num(copytext(hue,2,4))
greencolor[i]=hex2num(copytext(hue,4,6))
bluecolor[i]=hex2num(copytext(hue,6,8))
//mix all the colors
var/red = mixOneColor(weight,redcolor)
var/green = mixOneColor(weight,greencolor)
var/blue = mixOneColor(weight,bluecolor)
//assemble all the pieces
var/finalcolor = "#[red][green][blue]"
return finalcolor
// This isn't a perfect color mixing system, the more reagents that are inside,
// the darker it gets until it becomes absolutely pitch black! I dunno, maybe
// that's pretty realistic? I don't do a whole lot of color-mixing anyway.
// If you add brighter colors to it it'll eventually get lighter, though.
/proc/mixOneColor(var/list/weight, var/list/color)
if (!weight || !color || length(weight)!=length(color))
return 0
var/contents = length(weight)
var/i
//normalize weights
var/listsum = 0
for(i=1; i<=contents; i++)
listsum += weight[i]
for(i=1; i<=contents; i++)
weight[i] /= listsum
//mix them
var/mixedcolor = 0
for(i=1; i<=contents; i++)
mixedcolor += weight[i]*color[i]
mixedcolor = round(mixedcolor)
//until someone writes a formal proof for this algorithm, let's keep this in
if(mixedcolor<0x00 || mixedcolor>0xFF)
return 0
var/finalcolor = num2hex(mixedcolor)
while(length(finalcolor)<2)
finalcolor = text("0[]",finalcolor) //Takes care of leading zeroes
return finalcolor

View File

@@ -43,7 +43,7 @@
/obj/machinery/chem_dispenser/process()
if(recharged < 0)
if(recharged <= 0)
recharge()
recharged = 15
else
@@ -68,7 +68,7 @@
options[/obj/item/stack/sheet/mineral/gold] = "Wire a golden filament to fix it."
options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it."
options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it."
stat |= BROKEN
while(amount > 0)
amount -= 1
@@ -104,13 +104,12 @@
*
* @return nothing
*/
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if(stat & (BROKEN|NOPOWER)) return
if(user.stat || user.restrained()) return
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null)
if(broken_requirements.len)
user << "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>"
return
if(stat & (BROKEN|NOPOWER)) return
if(user.stat || user.restrained()) return
// this is the data which will be sent to the ui
var/data[0]
@@ -140,15 +139,15 @@
if(temp)
chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list...
data["chemicals"] = chemicals
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -194,6 +193,8 @@
else
user.drop_item()
del(B)
if(broken_requirements.len==0)
stat ^= BROKEN
return
if(src.beaker)
user << "Something is already loaded into the machine."
@@ -1258,4 +1259,4 @@
var/amount = O.reagents.total_volume
O.reagents.trans_to(beaker, amount)
if(!O.reagents.total_volume)
remove_object(O)
remove_object(O)

View File

@@ -1393,13 +1393,6 @@ datum
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
holywater
name = "Holy Water"
id = "holywater"
description = "This was once water, but has been altered by higher powers."
reagent_state = LIQUID
color = "#535E66" // rgb: 83, 94, 102
nanites
name = "Nanomachines"
id = "nanites"

View File

@@ -485,7 +485,7 @@ datum
name = "Potassium Chlorophoride"
id = "potassium_chlorophoride"
result = "potassium_chlorophoride"
required_reagents = list("potassium_chloride" = 1, "plasma" = 1, "chloral_hydrate" = 1)
required_reagents = list("potassium_chloride" = 1, "plasma" = 1, "chloralhydrate" = 1)
result_amount = 4
stoxin

View File

@@ -47,11 +47,10 @@
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue It contains "
if(reagents && reagents.reagent_list.len)
usr << "\blue [src.reagents.total_volume] units of liquid."
usr << "\blue It contains [src.reagents.total_volume] units of liquid."
else
usr << "\blue nothing."
usr << "\blue It is empty."
if (!is_open_container())
usr << "\blue Airtight lid seals it completely."

View File

@@ -65,9 +65,19 @@
if(10)
base_state = "pipe-j2s"
dpdir = dir | left | flip
///// Z-Level stuff
if(11)
base_state = "pipe-u"
dpdir = dir
if(12)
base_state = "pipe-d"
dpdir = dir
///// Z-Level stuff
if(ptype<6 || ptype>8)
///// Z-Level stuff
if(ptype<6 || ptype>8 && !(ptype==11 || ptype==12))
///// Z-Level stuff
icon_state = "con[base_state]"
else
icon_state = base_state
@@ -139,6 +149,12 @@
return /obj/machinery/disposal/deliveryChute
if(9,10)
return /obj/structure/disposalpipe/sortjunction
///// Z-Level stuff
if(11)
return /obj/structure/disposalpipe/up
if(12)
return /obj/structure/disposalpipe/down
///// Z-Level stuff
return

View File

@@ -873,6 +873,12 @@
C.ptype = 9
if("pipe-j2s")
C.ptype = 10
///// Z-Level stuff
if("pipe-u")
C.ptype = 11
if("pipe-d")
C.ptype = 12
///// Z-Level stuff
src.transfer_fingerprints_to(C)
C.dir = dir
C.density = 0
@@ -900,8 +906,113 @@
update()
return
///// Z-Level stuff
/obj/structure/disposalpipe/up
icon_state = "pipe-u"
New()
..()
dpdir = dir
update()
return
nextdir(var/fromdir)
var/nextdir
if(fromdir == 11)
nextdir = dir
else
nextdir = 12
return nextdir
transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir)
H.dir = nextdir
var/turf/T
var/obj/structure/disposalpipe/P
if(nextdir == 12)
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up)
T = locate(src.x, src.y, controller.up_target)
if(!T)
H.loc = src.loc
return
else
for(var/obj/structure/disposalpipe/down/F in T)
P = F
else
T = get_step(src.loc, H.dir)
P = H.findpipe(T)
if(P)
// find other holder in next loc, if inactive merge it with current
var/obj/structure/disposalholder/H2 = locate() in P
if(H2 && !H2.active)
H.merge(H2)
H.loc = P
else // if wasn't a pipe, then set loc to turf
H.loc = T
return null
return P
/obj/structure/disposalpipe/down
icon_state = "pipe-d"
New()
..()
dpdir = dir
update()
return
nextdir(var/fromdir)
var/nextdir
if(fromdir == 12)
nextdir = dir
else
nextdir = 11
return nextdir
transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir)
H.dir = nextdir
var/turf/T
var/obj/structure/disposalpipe/P
if(nextdir == 11)
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
T = locate(src.x, src.y, controller.down_target)
if(!T)
H.loc = src.loc
return
else
for(var/obj/structure/disposalpipe/up/F in T)
P = F
else
T = get_step(src.loc, H.dir)
P = H.findpipe(T)
if(P)
// find other holder in next loc, if inactive merge it with current
var/obj/structure/disposalholder/H2 = locate() in P
if(H2 && !H2.active)
H.merge(H2)
H.loc = P
else // if wasn't a pipe, then set loc to turf
H.loc = T
return null
return P
///// Z-Level stuff
//a three-way junction with dir being the dominant direction
/obj/structure/disposalpipe/junction