This commit is contained in:
DJSnapshot
2014-04-05 16:24:56 -07:00
179 changed files with 4901 additions and 4359 deletions

View File

@@ -34,8 +34,8 @@ world/IsBanned(key,address,computer_id)
var/ckeytext = ckey(key)
if(!establish_db_connection())
world.log << "Ban database connection failure. Key [ckeytext] not checked"
diary << "Ban database connection failure. Key [ckeytext] not checked"
error("Ban database connection failure. Key [ckeytext] not checked")
log_misc("Ban database connection failure. Key [ckeytext] not checked")
return
var/failedcid = 1

View File

@@ -22,7 +22,7 @@
/proc/ToRban_update()
spawn(0)
diary << "Downloading updated ToR data..."
log_misc("Downloading updated ToR data...")
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
var/list/rawlist = file2list(http["CONTENT"])
@@ -36,10 +36,10 @@
if(!cleaned) continue
F[cleaned] << 1
F["last_update"] << world.realtime
diary << "ToR data updated!"
log_misc("ToR data updated!")
if(usr) usr << "ToRban updated."
return 1
diary << "ToR data update aborted: no data."
log_misc("ToR data update aborted: no data.")
return 0
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
@@ -85,4 +85,4 @@
return
#undef TORFILE
#undef TOR_UPDATE_INTERVAL
#undef TOR_UPDATE_INTERVAL

View File

@@ -103,8 +103,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
establish_db_connection()
if(!dbcon.IsConnected())
world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
error("Failed to connect to database in load_admins(). Reverting to legacy system.")
log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return
@@ -123,8 +123,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(directory[ckey])
if(!admin_datums)
world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return

View File

@@ -66,8 +66,8 @@ DEBUG
log_admin("jobban_keylist was empty")
else
if(!establish_db_connection())
world.log << "Database connection failed. Reverting to the legacy ban system."
diary << "Database connection failed. Reverting to the legacy ban system."
error("Database connection failed. Reverting to the legacy ban system.")
log_misc("Database connection failed. Reverting to the legacy ban system.")
config.ban_legacy_system = 1
jobban_loadbanfile()
return

View File

@@ -35,7 +35,7 @@
icon_state = "night"
item_state = "glasses"
origin_tech = "magnets=2"
darkness_view = 3
darkness_view = 7
/obj/item/clothing/glasses/eyepatch
name = "eyepatch"

View File

@@ -21,7 +21,7 @@
desc = "A sterile mask designed to help prevent the spread of diseases."
icon_state = "sterile"
item_state = "sterile"
w_class = 1
w_class = 2
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.01

View File

@@ -1,3 +1,7 @@
//*****************
//**Cham Jumpsuit**
//*****************
/obj/item/clothing/under/chameleon
//starts off as black
name = "black jumpsuit"
@@ -6,60 +10,35 @@
item_color = "black"
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
origin_tech = "syndicate=3"
siemens_coefficient = 0.8
var/list/clothing_choices = list()
New()
..()
for(var/U in typesof(/obj/item/clothing/under/color)-(/obj/item/clothing/under/color))
var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/cloud,
/obj/item/clothing/under/golem, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits.
for(var/U in typesof(/obj/item/clothing/under)-blocked)
var/obj/item/clothing/under/V = new U
src.clothing_choices += V
for(var/U in typesof(/obj/item/clothing/under/rank)-(/obj/item/clothing/under/rank))
var/obj/item/clothing/under/V = new U
src.clothing_choices += V
src.clothing_choices[V.name] = U
return
attackby(obj/item/clothing/under/U as obj, mob/user as mob)
..()
if(istype(U, /obj/item/clothing/under/chameleon))
user << "\red Nothing happens."
return
if(istype(U, /obj/item/clothing/under))
if(src.clothing_choices.Find(U))
user << "\red Pattern is already recognised by the suit."
return
src.clothing_choices += U
user << "\red Pattern absorbed by the suit."
emp_act(severity)
name = "psychedelic"
desc = "Groovy!"
icon_state = "psyche"
item_color = "psyche"
spawn(200)
name = "Black Jumpsuit"
icon_state = "bl_suit"
item_color = "black"
desc = null
..()
update_icon()
usr.update_inv_w_uniform()
verb/change()
set name = "Change Color"
set name = "Change Jumpsuit Appearance"
set category = "Object"
set src in usr
if(icon_state == "psyche")
usr << "\red Your suit is malfunctioning"
return
var/obj/item/clothing/under/A
A = input("Select Colour to change it to", "BOOYEA", A) in clothing_choices
if(!A)
var/picked = input("Select jumpsuit to change it to", "Chameleon Jumpsuit")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
@@ -69,14 +48,415 @@
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
usr.update_inv_w_uniform() //so our overlays update.
if(usr)
usr.update_inv_w_uniform() //so our overlays update.
//*****************
//**Chameleon Hat**
//*****************
/obj/item/clothing/head/chameleon
name = "grey cap"
icon_state = "greysoft"
item_state = "greysoft"
item_color = "grey"
desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
/obj/item/clothing/under/chameleon/all/New()
..()
var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/chameleon/all)
//to prevent an infinite loop
for(var/U in typesof(/obj/item/clothing/under)-blocked)
var/obj/item/clothing/under/V = new U
src.clothing_choices += V
New()
..()
var/blocked = list(/obj/item/clothing/head/chameleon,
/obj/item/clothing/head/space/golem, /obj/item/clothing/head/justice,)//Prevent infinite loops and bad hats.
for(var/U in typesof(/obj/item/clothing/head)-blocked)
var/obj/item/clothing/head/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "grey cap"
desc = "It's a baseball hat in a tasteful grey colour."
icon_state = "greysoft"
item_color = "grey"
update_icon()
usr.update_inv_head()
verb/change()
set name = "Change Hat/Helmet Appearance"
set category = "Object"
set src in usr
var/picked = input("Select headwear to change it to", "Chameleon Hat")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
flags_inv = A.flags_inv
if(usr)
usr.update_inv_head() //so our overlays update.
//******************
//**Chameleon Suit**
//******************
/obj/item/clothing/suit/chameleon
name = "armor"
icon_state = "armor"
item_state = "armor"
desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/suit, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
/obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
for(var/U in typesof(/obj/item/clothing/suit)-blocked)
var/obj/item/clothing/suit/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "armor"
desc = "An armored vest that protects against some damage."
icon_state = "armor"
item_color = "armor"
update_icon()
usr.update_inv_wear_suit()
verb/change()
set name = "Change Exosuit Appearance"
set category = "Object"
set src in usr
var/picked = input("Select exosuit to change it to", "Chameleon Exosuit")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
flags_inv = A.flags_inv
if(usr)
usr.update_inv_wear_suit() //so our overlays update.
//*******************
//**Chameleon Shoes**
//*******************
/obj/item/clothing/shoes/chameleon
name = "black shoes"
icon_state = "black"
item_state = "black"
item_color = "black"
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/clothing/shoes/chameleon,
/obj/item/clothing/shoes/golem, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes.
for(var/U in typesof(/obj/item/clothing/shoes)-blocked)
var/obj/item/clothing/shoes/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "black shoes"
desc = "A pair of black shoes."
icon_state = "black"
item_state = "black"
item_color = "black"
update_icon()
usr.update_inv_shoes()
verb/change()
set name = "Change Footwear Appearance"
set category = "Object"
set src in usr
var/picked = input("Select shoes to change it to", "Chameleon Shoes")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
if(usr)
usr.update_inv_shoes() //so our overlays update.
//**********************
//**Chameleon Backpack**
//**********************
/obj/item/weapon/storage/backpack/chameleon
name = "backpack"
icon_state = "backpack"
item_state = "backpack"
desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/weapon/storage/backpack/chameleon, /obj/item/weapon/storage/backpack/satchel/withwallet)
for(var/U in typesof(/obj/item/weapon/storage/backpack)-blocked)//Prevent infinite loops and bad backpacks.
var/obj/item/weapon/storage/backpack/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "backpack"
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
item_state = "backpack"
update_icon()
usr.update_inv_back()
verb/change()
set name = "Change Backpack Appearance"
set category = "Object"
set src in usr
var/picked = input("Select backpack to change it to", "Chameleon Backpack")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/weapon/storage/backpack/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
if(usr)
usr.update_inv_back() //so our overlays update.
//********************
//**Chameleon Gloves**
//********************
/obj/item/clothing/gloves/chameleon
name = "black gloves"
icon_state = "black"
item_state = "bgloves"
item_color = "brown"
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/clothing/gloves/chameleon)//Prevent infinite loops and bad hats.
for(var/U in typesof(/obj/item/clothing/gloves)-blocked)
var/obj/item/clothing/gloves/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "black gloves"
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
icon_state = "black"
item_color = "brown"
update_icon()
usr.update_inv_gloves()
verb/change()
set name = "Change Gloves Appearance"
set category = "Object"
set src in usr
var/picked = input("Select gloves to change it to", "Chameleon Gloves")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
flags_inv = A.flags_inv
if(usr)
usr.update_inv_gloves() //so our overlays update.
//******************
//**Chameleon Mask**
//******************
/obj/item/clothing/mask/chameleon
name = "gas mask"
icon_state = "gas_alt"
item_state = "gas_alt"
desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/clothing/mask/chameleon)//Prevent infinite loops and bad hats.
for(var/U in typesof(/obj/item/clothing/mask)-blocked)
var/obj/item/clothing/mask/V = new U
if(V)
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "gas mask"
desc = "It's a gas mask."
icon_state = "gas_alt"
update_icon()
usr.update_inv_wear_mask()
verb/change()
set name = "Change Mask Appearance"
set category = "Object"
set src in usr
var/picked = input("Select mask to change it to", "Chameleon Mask")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
flags_inv = A.flags_inv
if(usr)
usr.update_inv_wear_mask() //so our overlays update.
//*********************
//**Chameleon Glasses**
//*********************
/obj/item/clothing/glasses/chameleon
name = "Optical Meson Scanner"
icon_state = "meson"
item_state = "glasses"
desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside."
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
New()
..()
var/blocked = list(/obj/item/clothing/glasses/chameleon)//Prevent infinite loops and bad hats.
for(var/U in typesof(/obj/item/clothing/glasses)-blocked)
var/obj/item/clothing/glasses/V = new U
src.clothing_choices[V.name] = U
return
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
name = "Optical Meson Scanner"
desc = "It's a set of mesons."
icon_state = "meson"
update_icon()
usr.update_inv_glasses()
verb/change()
set name = "Change Glasses Appearance"
set category = "Object"
set src in usr
var/picked = input("Select glasses to change it to", "Chameleon Glasses")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
return
var/newtype = clothing_choices[picked]
var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
flags_inv = A.flags_inv
if(usr)
usr.update_inv_glasses() //so our overlays update.
//*****************
//**Chameleon Gun**
//*****************
/obj/item/weapon/gun/projectile/chameleon
name = "desert eagle"
desc = "A fake Desert Eagle with a dial on the side to change the gun's disguise."
icon_state = "deagle"
w_class = 3.0
max_shells = 7
caliber = ".45"
origin_tech = "combat=2;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/chameleon"
var/list/gun_choices = list()
New()
..()
var/blocked = list(/obj/item/weapon/gun/projectile/chameleon)
for(var/U in typesof(/obj/item/weapon/gun/)-blocked)
var/obj/item/weapon/gun/V = new U
src.gun_choices[V.name] = U
return
emp_act(severity)
name = "desert eagle"
desc = "It's a desert eagle."
icon_state = "deagle"
update_icon()
usr.update_inv_r_hand()
usr.update_inv_l_hand()
verb/change()
set name = "Change Gun Appearance"
set category = "Object"
set src in usr
var/picked = input("Select gun to change it to", "Chameleon Gun")as null|anything in gun_choices
if(!picked || !gun_choices[picked])
return
var/newtype = gun_choices[picked]
var/obj/item/weapon/gun/A = new newtype
desc = null
permeability_coefficient = 0.90
desc = A.desc
name = A.name
icon_state = A.icon_state
item_state = A.item_state
flags_inv = A.flags_inv
if(usr)
usr.update_inv_r_hand()
usr.update_inv_l_hand() //so our overlays update.

View File

@@ -762,7 +762,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "mara_kilpatrick_1"
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
////// Small locket - Altair An-Nasaqan - Serithi
@@ -775,7 +775,7 @@
item_color = "altair_locket"
slot_flags = 0
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
slot_flags = SLOT_MASK
////// Silver locket - Konaa Hirano - Konaa_Hirano
@@ -789,7 +789,7 @@
item_color = "konaahirano"
slot_flags = 0
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
slot_flags = SLOT_MASK
var/obj/item/held //Item inside locket.
@@ -819,7 +819,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "nasir_khayyam_1"
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
slot_flags = SLOT_MASK
////// Emerald necklace - Ty Foster - Nega
@@ -830,7 +830,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "ty_foster"
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
////// Apollon Pendant - Michael Guess - Dragor23
/obj/item/clothing/mask/michael_guess_1
@@ -839,7 +839,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "michael_guess_1"
flags = FPRINT|TABLEPASS
w_class = 1
w_class = 2
slot_flags = SLOT_MASK
//////////// Shoes ////////////

View File

@@ -6,7 +6,7 @@
icon = 'icons/obj/storage.dmi'
icon_state = "evidenceobj"
item_state = ""
w_class = 1
w_class = 2
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
if(!proximity) return

View File

@@ -11,7 +11,7 @@
throwforce = 1.0
throw_speed = 1
throw_range = 2
w_class = 1.0
w_class = 2.0
var/access = list()
access = access_crate_cash
var/worth = 0

View File

@@ -207,7 +207,7 @@ I said no!
/datum/recipe/donkpocket
items = list(
/obj/item/weapon/reagent_containers/food/snacks/dough,
/obj/item/weapon/reagent_containers/food/snacks/faggot
/obj/item/weapon/reagent_containers/food/snacks/meatball
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
@@ -619,7 +619,7 @@ I said no!
/datum/recipe/meatballsoup
reagents = list("water" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/faggot ,
/obj/item/weapon/reagent_containers/food/snacks/meatball ,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
)
@@ -887,8 +887,8 @@ I said no!
reagents = list("water" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti
@@ -896,10 +896,10 @@ I said no!
reagents = list("water" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/spesslaw
@@ -1084,7 +1084,7 @@ I said no!
/datum/recipe/sausage
items = list(
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/cutlet,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sausage
@@ -1185,7 +1185,7 @@ I said no!
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
make_food(var/obj/container as obj)
@@ -1215,6 +1215,12 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/tofurkey
// Fuck Science!
/datum/recipe/ruinedvirusdish
items = list(
/obj/item/weapon/virusdish
)
result = /obj/item/weapon/ruinedvirusdish
//////////////////////////////////////////
// bs12 food port stuff
@@ -1240,11 +1246,11 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/flatbread
/datum/recipe/faggot
/datum/recipe/meatball
items = list(
/obj/item/weapon/reagent_containers/food/snacks/rawfaggot
/obj/item/weapon/reagent_containers/food/snacks/rawmeatball
)
result = /obj/item/weapon/reagent_containers/food/snacks/faggot
result = /obj/item/weapon/reagent_containers/food/snacks/meatball
/datum/recipe/cutlet
items = list(

View File

@@ -247,7 +247,7 @@
icon_state ="scanner"
throw_speed = 1
throw_range = 5
w_class = 1.0
w_class = 2.0
flags = FPRINT | TABLEPASS
var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book // Currently scanned book

View File

@@ -1,3 +1,12 @@
#define ORE_PROC_GOLD 1
#define ORE_PROC_SILVER 2
#define ORE_PROC_DIAMOND 4
#define ORE_PROC_GLASS 8
#define ORE_PROC_PLASMA 16
#define ORE_PROC_URANIUM 32
#define ORE_PROC_IRON 64
#define ORE_PROC_CLOWN 128
/**********************Mineral processing unit console**************************/
/obj/machinery/mineral/processing_unit_console
@@ -32,84 +41,83 @@
//iron
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_adamantine)
if(machine.ore_iron)
if (machine.selected_iron==1)
if (machine.selected & ORE_PROC_IRON)
dat += text("<A href='?src=\ref[src];sel_iron=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_iron=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Iron: [machine.ore_iron]<br>")
else
machine.selected_iron = 0
machine.selected &= ~ORE_PROC_IRON
//sand - glass
if(machine.ore_glass)
if (machine.selected_glass==1)
if (machine.selected & ORE_PROC_GLASS)
dat += text("<A href='?src=\ref[src];sel_glass=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_glass=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Sand: [machine.ore_glass]<br>")
else
machine.selected_glass = 0
machine.selected &= ~ORE_PROC_GLASS
//plasma
if(machine.ore_plasma)
if (machine.selected_plasma==1)
if (machine.selected & ORE_PROC_PLASMA)
dat += text("<A href='?src=\ref[src];sel_plasma=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_plasma=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Plasma: [machine.ore_plasma]<br>")
else
machine.selected_plasma = 0
machine.selected &= ~ORE_PROC_PLASMA
//uranium
if(machine.ore_uranium)
if (machine.selected_uranium==1)
if (machine.selected & ORE_PROC_URANIUM)
dat += text("<A href='?src=\ref[src];sel_uranium=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_uranium=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Uranium: [machine.ore_uranium]<br>")
else
machine.selected_uranium = 0
machine.selected &= ~ORE_PROC_URANIUM
//gold
if(machine.ore_gold)
if (machine.selected_gold==1)
if (machine.selected & ORE_PROC_GOLD)
dat += text("<A href='?src=\ref[src];sel_gold=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_gold=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Gold: [machine.ore_gold]<br>")
else
machine.selected_gold = 0
machine.selected &= ~ORE_PROC_GOLD
//silver
if(machine.ore_silver)
if (machine.selected_silver==1)
if (machine.selected & ORE_PROC_SILVER)
dat += text("<A href='?src=\ref[src];sel_silver=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_silver=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Silver: [machine.ore_silver]<br>")
else
machine.selected_silver = 0
machine.selected &= ~ORE_PROC_SILVER
//diamond
if(machine.ore_diamond)
if (machine.selected_diamond==1)
if (machine.selected & ORE_PROC_DIAMOND)
dat += text("<A href='?src=\ref[src];sel_diamond=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_diamond=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Diamond: [machine.ore_diamond]<br>")
else
machine.selected_diamond = 0
machine.selected &= ~ORE_PROC_DIAMOND
//bananium
if(machine.ore_clown)
if (machine.selected_clown==1)
if (machine.selected & ORE_PROC_CLOWN)
dat += text("<A href='?src=\ref[src];sel_clown=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_clown=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Bananium: [machine.ore_clown]<br>")
else
machine.selected_clown = 0
machine.selected &= ~ORE_PROC_CLOWN
//On or off
dat += text("Machine is currently ")
@@ -132,44 +140,45 @@
src.add_fingerprint(usr)
if(href_list["sel_iron"])
if (href_list["sel_iron"] == "yes")
machine.selected_iron = 1
machine.selected |= ORE_PROC_IRON
else
machine.selected_iron = 0
machine.selected &= ~ORE_PROC_IRON
if(href_list["sel_glass"])
if (href_list["sel_glass"] == "yes")
machine.selected_glass = 1
machine.selected |= ORE_PROC_GLASS
else
machine.selected_glass = 0
machine.selected &= ~ORE_PROC_GLASS
if(href_list["sel_plasma"])
if (href_list["sel_plasma"] == "yes")
machine.selected_plasma = 1
machine.selected |= ORE_PROC_PLASMA
else
machine.selected_plasma = 0
machine.selected &= ~ORE_PROC_PLASMA
if(href_list["sel_uranium"])
if (href_list["sel_uranium"] == "yes")
machine.selected_uranium = 1
machine.selected |= ORE_PROC_URANIUM
else
machine.selected_uranium = 0
machine.selected &= ~ORE_PROC_URANIUM
if(href_list["sel_gold"])
if (href_list["sel_gold"] == "yes")
machine.selected_gold = 1
machine.selected |= ORE_PROC_GOLD
else
machine.selected_gold = 0
machine.selected &= ~ORE_PROC_GOLD
if(href_list["sel_silver"])
if (href_list["sel_silver"] == "yes")
machine.selected_silver = 1
machine.selected |= ORE_PROC_SILVER
else
machine.selected_silver = 0
machine.selected &= ~ORE_PROC_SILVER
if(href_list["sel_diamond"])
if (href_list["sel_diamond"] == "yes")
machine.selected_diamond = 1
machine.selected |= ORE_PROC_DIAMOND
else
machine.selected_diamond = 0
machine.selected &= ~ORE_PROC_DIAMOND
if(href_list["sel_clown"])
if (href_list["sel_clown"] == "yes")
machine.selected_clown = 1
machine.selected |= ORE_PROC_CLOWN
else
machine.selected_clown = 0
machine.selected &= ~ORE_PROC_CLOWN
if(href_list["set_on"])
if (href_list["set_on"] == "on")
machine.on = 1
@@ -187,6 +196,7 @@
icon_state = "furnace"
density = 1
anchored = 1.0
luminosity = 3 //Big fire with window, yeah it puts out a little light.
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
var/obj/machinery/mineral/CONSOLE = null
@@ -199,6 +209,8 @@
var/ore_iron = 0;
var/ore_clown = 0;
var/ore_adamantine = 0;
var/selected = 0
/*
var/selected_gold = 0
var/selected_silver = 0
var/selected_diamond = 0
@@ -207,8 +219,10 @@
var/selected_uranium = 0
var/selected_iron = 0
var/selected_clown = 0
*/
var/on = 0 //0 = off, 1 =... oh you know!
/obj/machinery/mineral/processing_unit/New()
..()
spawn( 5 )
@@ -227,14 +241,17 @@
var/i
for (i = 0; i < 10; i++)
if (on)
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_GLASS)
if (ore_glass > 0)
ore_glass--;
new /obj/item/stack/sheet/glass(output.loc)
else
on = 0
continue
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (selected == ORE_PROC_GLASS + ORE_PROC_IRON)
if (ore_glass > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
@@ -242,49 +259,49 @@
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_GOLD)
if (ore_gold > 0)
ore_gold--;
new /obj/item/stack/sheet/mineral/gold(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_SILVER)
if (ore_silver > 0)
ore_silver--;
new /obj/item/stack/sheet/mineral/silver(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_DIAMOND)
if (ore_diamond > 0)
ore_diamond--;
new /obj/item/stack/sheet/mineral/diamond(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_PLASMA)
if (ore_plasma > 0)
ore_plasma--;
new /obj/item/stack/sheet/mineral/plasma(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_URANIUM)
if (ore_uranium > 0)
ore_uranium--;
new /obj/item/stack/sheet/mineral/uranium(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (selected == ORE_PROC_IRON)
if (ore_iron > 0)
ore_iron--;
new /obj/item/stack/sheet/metal(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (selected == ORE_PROC_IRON + ORE_PROC_PLASMA)
if (ore_iron > 0 && ore_plasma > 0)
ore_iron--;
ore_plasma--;
@@ -292,20 +309,23 @@
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
if (selected == ORE_PROC_CLOWN)
if (ore_clown > 0)
ore_clown--;
new /obj/item/stack/sheet/mineral/clown(output.loc)
else
on = 0
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
continue
/*
if (selected == ORE_PROC_GLASS + ORE_PROC_PLASMA)
if (ore_glass > 0 && ore_plasma > 0)
ore_glass--;
ore_plasma--;
new /obj/item/stack/sheet/glass/plasmaglass(output.loc)
else
on = 0
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
continue
if (selected == ORE_PROC_GLASS + ORE_PROC_IRON + ORE_PROC_PLASMA)
if (ore_glass > 0 && ore_plasma > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
@@ -314,10 +334,10 @@
else
on = 0
continue
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
//Iamgoofball here, this comment I'm typing right now was made in 11/1/2013. If you're reading this in 2020, then please let me know if the world has gone into a nuclear apocalypse. Also Urist has been tried and hung for how lazy he was. That and he was jaywalking.
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
*/
if (selected == ORE_PROC_URANIUM + ORE_PROC_DIAMOND)
if (ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
ore_diamond -= 1
@@ -325,62 +345,63 @@
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (selected == ORE_PROC_SILVER + ORE_PROC_PLASMA)
if (ore_silver >= 1 && ore_plasma >= 3)
ore_silver -= 1
ore_plasma -= 3
new /obj/item/stack/sheet/mineral/mythril(output.loc)
else
on = 0
continue*/
continue
//if a non valid combination is selected
var/b = 1 //this part checks if all required ores are available
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
if (!selected)
b = 0
if (selected_gold == 1)
if (selected & ORE_PROC_GOLD)
if (ore_gold <= 0)
b = 0
if (selected_silver == 1)
if (selected & ORE_PROC_SILVER)
if (ore_silver <= 0)
b = 0
if (selected_diamond == 1)
if (selected & ORE_PROC_DIAMOND)
if (ore_diamond <= 0)
b = 0
if (selected_uranium == 1)
if (selected & ORE_PROC_URANIUM)
if (ore_uranium <= 0)
b = 0
if (selected_plasma == 1)
if (selected & ORE_PROC_PLASMA)
if (ore_plasma <= 0)
b = 0
if (selected_iron == 1)
if (selected & ORE_PROC_IRON)
if (ore_iron <= 0)
b = 0
if (selected_glass == 1)
if (selected & ORE_PROC_GLASS)
if (ore_glass <= 0)
b = 0
if (selected_clown == 1)
if (selected & ORE_PROC_CLOWN)
if (ore_clown <= 0)
b = 0
if (b) //if they are, deduct one from each, produce slag and shut the machine off
if (selected_gold == 1)
if (selected & ORE_PROC_GOLD)
ore_gold--
if (selected_silver == 1)
if (selected & ORE_PROC_SILVER)
ore_silver--
if (selected_diamond == 1)
if (selected & ORE_PROC_DIAMOND)
ore_diamond--
if (selected_uranium == 1)
if (selected & ORE_PROC_URANIUM)
ore_uranium--
if (selected_plasma == 1)
if (selected & ORE_PROC_PLASMA)
ore_plasma--
if (selected_iron == 1)
if (selected & ORE_PROC_IRON)
ore_iron--
if (selected_clown == 1)
if (selected & ORE_PROC_CLOWN)
ore_clown--
new /obj/item/weapon/ore/slag(output.loc)
on = 0
@@ -397,44 +418,44 @@
if (istype(O,/obj/item/weapon/ore/iron))
ore_iron++;
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/glass))
ore_glass++;
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/diamond))
ore_diamond++;
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/plasma))
ore_plasma++
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/gold))
ore_gold++
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/silver))
ore_silver++
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/uranium))
ore_uranium++
O.loc = null
del(O)
//del(O)
continue
if (istype(O,/obj/item/weapon/ore/clown))
ore_clown++
O.loc = null
del(O)
//del(O)
continue
O.loc = src.output.loc
else
break
return
return

View File

@@ -242,85 +242,108 @@
/obj/machinery/mineral/stacking_machine/process()
if (src.output && src.input)
var/obj/item/O
var/obj/item/stack/O
while (locate(/obj/item, input.loc))
O = locate(/obj/item, input.loc)
O = locate(/obj/item/stack, input.loc)
if(isnull(O))
var/obj/item/I = locate(/obj/item, input.loc)
if (istype(I,/obj/item/weapon/ore/slag))
I.loc = null
else
I.loc = output.loc
continue
if (istype(O,/obj/item/stack/sheet/metal))
ore_iron+= O:amount;
del(O)
ore_iron+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
ore_diamond+= O:amount;
del(O)
ore_diamond+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
ore_plasma+= O:amount
del(O)
ore_plasma+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/gold))
ore_gold+= O:amount
del(O)
ore_gold+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/silver))
ore_silver+= O:amount
del(O)
ore_silver+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/clown))
ore_clown+= O:amount
del(O)
ore_clown+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
ore_uranium+= O:amount
del(O)
ore_uranium+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
ore_plasmaglass+= O:amount
del(O)
ore_plasmaglass+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmarglass))
ore_plasmarglass+= O:amount
del(O)
ore_plasmarglass+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
ore_glass+= O:amount
del(O)
ore_glass+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
ore_rglass+= O:amount
del(O)
ore_rglass+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasteel))
ore_plasteel+= O:amount
del(O)
ore_plasteel+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
ore_adamantine+= O:amount
del(O)
ore_adamantine+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/mythril))
ore_mythril+= O:amount
del(O)
ore_mythril+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/cardboard))
ore_cardboard+= O:amount
del(O)
ore_cardboard+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/wood))
ore_wood+= O:amount
del(O)
ore_wood+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/cloth))
ore_cloth+= O:amount
del(O)
ore_cloth+= O.amount
O.loc = null
//del(O)
continue
if (istype(O,/obj/item/stack/sheet/leather))
ore_leather+= O:amount
del(O)
continue
if (istype(O,/obj/item/weapon/ore/slag))
del(O)
ore_leather+= O.amount
O.loc = null
//del(O)
continue
O.loc = src.output.loc
if (ore_gold >= stack_amt)
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold
G.amount = stack_amt

View File

@@ -81,45 +81,46 @@
throwforce = 0.0
w_class = 1.0
var/string_attached
var/sides = 2
/obj/item/weapon/coin/New()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/weapon/coin/gold
name = "Gold coin"
name = "gold coin"
icon_state = "coin_gold"
/obj/item/weapon/coin/silver
name = "Silver coin"
name = "silver coin"
icon_state = "coin_silver"
/obj/item/weapon/coin/diamond
name = "Diamond coin"
name = "diamond coin"
icon_state = "coin_diamond"
/obj/item/weapon/coin/iron
name = "Iron coin"
name = "iron coin"
icon_state = "coin_iron"
/obj/item/weapon/coin/plasma
name = "Solid plasma coin"
name = "solid plasma coin"
icon_state = "coin_plasma"
/obj/item/weapon/coin/uranium
name = "Uranium coin"
name = "uranium coin"
icon_state = "coin_uranium"
/obj/item/weapon/coin/clown
name = "Bananaium coin"
name = "bananaium coin"
icon_state = "coin_clown"
/obj/item/weapon/coin/adamantine
name = "Adamantine coin"
name = "adamantine coin"
icon_state = "coin_adamantine"
/obj/item/weapon/coin/mythril
name = "Mythril coin"
name = "mythril coin"
icon_state = "coin_mythril"
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -150,3 +151,13 @@
string_attached = null
user << "\blue You detach the string from the coin."
else ..()
/obj/item/weapon/coin/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""
if(result == 1)
comment = "tails"
else if(result == 2)
comment = "heads"
user.visible_message("<span class='notice'>[user] has thrown the [src]. It lands on [comment]! </span>", \
"<span class='notice'>You throw the [src]. It lands on [comment]! </span>")

View File

@@ -5,7 +5,7 @@
icon_state = "brain2"
flags = TABLEPASS
force = 1.0
w_class = 1.0
w_class = 2.0
throwforce = 1.0
throw_speed = 3
throw_range = 5

View File

@@ -195,17 +195,22 @@
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
src.sleeping = max(0,src.sleeping-5)
if(src.sleeping == 0)
src.resting = 0
if(lying)
src.sleeping = max(0,src.sleeping-5)
if(src.sleeping == 0)
src.resting = 0
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
"<span class='notice'>You shake [src] trying to wake [t_him] up!")
else
M.visible_message("<span class='notice'>[M] hugs [src] to make [t_him] feel better!</span>", \
"<span class='notice'>You hug [src] to make [t_him] feel better!</span>")
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
M.visible_message( \
"\blue [M] shakes [src] trying to wake [t_him] up!", \
"\blue You shake [src] trying to wake [t_him] up!", \
)
/mob/living/carbon/proc/eyecheck()
return 0

View File

@@ -58,6 +58,12 @@
dizziness = 0
jitteriness = 0
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
handle_hud_list()
//Handle species-specific deaths.
if(species) species.handle_death(src)

View File

@@ -258,8 +258,9 @@
continue
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
continue
if(!species.flags & IS_SYNTHETIC)
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
continue
else
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name], it has"
if(temp.brute_dam) switch(temp.brute_dam)
@@ -274,7 +275,8 @@
wound_flavor_text["[temp.display_name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
if(wound_flavor_text["[temp.display_name]"])
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
@@ -469,4 +471,4 @@
else
return 0
else
return 0
return 0

View File

@@ -1096,7 +1096,7 @@
var/tdamage = 0
var/ticks = 0
while (germs < 2501 && ticks < 100000 && round(damage/10)*20)
diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]"
log_misc("VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]")
ticks++
if (prob(round(damage/10)*20))
germs++

View File

@@ -192,8 +192,9 @@
This function restores the subjects blood to max.
*/
/mob/living/carbon/human/proc/restore_blood()
var/blood_volume = vessel.get_reagent_amount("blood")
vessel.add_reagent("blood",560.0-blood_volume)
if(!species.flags & NO_BLOOD)
var/blood_volume = vessel.get_reagent_amount("blood")
vessel.add_reagent("blood",560.0-blood_volume)
/*

View File

@@ -53,7 +53,10 @@
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
var/last_dam = -1 //Used for determining if we need to process all organs or just some or even none.
var/list/bad_external_organs = list()// organs we check until they are good.
var/xylophone = 0 //For the spoooooooky xylophone cooldown
var/mob/remoteview_target = null
var/hand_blood_color
var/hand_blood_color

View File

@@ -104,11 +104,14 @@
handle_stasis_bag()
if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
return //We go ahead and process them 5 times for HUD images and other stuff though.
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
handle_environment(environment) //Optimized a good bit.
//Status updates, death etc.
handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp
handle_regular_status_updates() //Optimized a bit
update_canmove()
//Update our name based on whether our face is obscured/disfigured
@@ -182,7 +185,7 @@
if (prob(3))
switch(pick(1,2,3))
if(1)
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that meatball traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
if(2)
say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!"))
if(3)
@@ -383,7 +386,7 @@
//spread some viruses while we are at it
if (virus2.len > 0)
if (get_infection_chance(src) && prob(20))
if (prob(10) && get_infection_chance(src))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
@@ -575,25 +578,23 @@
else
loc_temp = environment.temperature
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]"
if(abs(loc_temp - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE)
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
//Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit.
if(stat != 2)
stabilize_temperature_from_calories()
// log_debug("Adjusting to atmosphere.")
//After then, it reacts to the surrounding atmosphere based on your thermal protection
if(loc_temp < BODYTEMP_COLD_DAMAGE_LIMIT) //Place is colder than we are
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
// log_debug("[loc_temp] is Cold. Cooling by [amt]")
bodytemperature += amt
else if (loc_temp > BODYTEMP_HEAT_DAMAGE_LIMIT) //Place is hotter than we are
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
// log_debug("[loc_temp] is Heat. Heating up by [amt]")
bodytemperature += amt
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
@@ -683,7 +684,7 @@
proc/stabilize_temperature_from_calories()
var/body_temperature_difference = 310.15 - bodytemperature
if (abs(body_temperature_difference) < 0.01)
if (abs(body_temperature_difference) < 0.5)
return //fuck this precision
switch(bodytemperature)
if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
@@ -900,7 +901,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lit_value) - 5 //hardcapped so it's not abused by having a ton of flashlights
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
traumatic_shock -= light_amount
@@ -920,7 +921,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = T.lit_value
if(A.lighting_use_dynamic) light_amount = T.lighting_lumcount
else light_amount = 10
if(light_amount > 2) //if there's enough light, start dying
take_overall_damage(1,1)
@@ -997,8 +998,8 @@
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
if(!in_stasis)
handle_organs()
handle_blood()
handle_organs() //Optimized.
handle_blood()
if(health <= config.health_threshold_dead || brain_op_stage == 4.0)
death()
@@ -1075,7 +1076,7 @@
E = get_visible_implants(0)
if(!E.len)
embedded_flag = 0
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
@@ -1109,23 +1110,28 @@
if(stuttering)
stuttering = max(stuttering-1, 0)
if (src.slurring)
if (slurring)
slurring = max(slurring-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
/*
// Increase germ_level regularly
if(prob(40))
germ_level += 1
// If you're dirty, your gloves will become dirty, too.
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
*/
return 1
proc/handle_regular_hud_updates()
if(hud_updateflag)
handle_hud_list()
if(!client) return 0
if(hud_updateflag)
@@ -1136,7 +1142,7 @@
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
client.images.Remove(hud)
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg)
update_action_buttons()
@@ -1273,10 +1279,13 @@
var/obj/item/clothing/glasses/G = glasses
if(istype(G))
see_in_dark += G.darkness_view
if(G.vision_flags)
if(G.vision_flags) // MESONS
sight |= G.vision_flags
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
if(istype(G,/obj/item/clothing/glasses/night))
see_invisible = SEE_INVISIBLE_MINIMUM
client.screen += global_hud.nvg
/* HUD shit goes here, as long as it doesn't modify sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
@@ -1294,6 +1303,8 @@
else if(!seer)
see_invisible = SEE_INVISIBLE_LIVING
if(healths)
if (analgesic)
healths.icon_state = "health_health_numb"
@@ -1400,7 +1411,7 @@
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
var/turf/currentTurf = loc
if(!currentTurf.lit_value)
if(!currentTurf.lighting_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_virus_updates()
@@ -1412,30 +1423,35 @@
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/O in view(1,src))
if(istype(O,/obj/effect/decal/cleanable/blood))
var/obj/effect/decal/cleanable/blood/B = O
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
else if(istype(O,/obj/effect/decal/cleanable/mucus))
var/obj/effect/decal/cleanable/mucus/M = O
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
// check if we're immune
if(V.antigen & src.antibodies)
V.dead = 1
if(virus2.len)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
// check if we're immune
if(V.antigen & src.antibodies)
V.dead = 1
return
@@ -1587,7 +1603,7 @@
else if(status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
holder2.icon_state = "hudxeno"
else if(foundVirus)
else if(foundVirus)
holder.icon_state = "hudill"
else if(has_brain_worms())
var/mob/living/simple_animal/borer/B = has_brain_worms()
@@ -1628,7 +1644,7 @@
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
@@ -1649,7 +1665,7 @@
if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD)
var/image/holder1 = hud_list[IMPTRACK_HUD]
var/image/holder2 = hud_list[IMPLOYAL_HUD]
var/image/holder3 = hud_list[IMPCHEM_HUD]
var/image/holder3 = hud_list[IMPCHEM_HUD]
holder1.icon_state = "hudblank"
holder2.icon_state = "hudblank"
@@ -1671,26 +1687,27 @@
if(hud_updateflag & 1 << SPECIALROLE_HUD)
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
switch(mind.special_role)
if("traitor","Syndicate")
holder.icon_state = "hudsyndicate"
if("Revolutionary")
holder.icon_state = "hudrevolutionary"
if("Head Revolutionary")
holder.icon_state = "hudheadrevolutionary"
if("Cultist")
holder.icon_state = "hudcultist"
if("Changeling")
holder.icon_state = "hudchangeling"
if("Wizard","Fake Wizard")
holder.icon_state = "hudwizard"
if("Death Commando")
holder.icon_state = "huddeathsquad"
if("Ninja")
holder.icon_state = "hudninja"
if(mind)
hud_list[SPECIALROLE_HUD] = holder
switch(mind.special_role)
if("traitor","Syndicate")
holder.icon_state = "hudsyndicate"
if("Revolutionary")
holder.icon_state = "hudrevolutionary"
if("Head Revolutionary")
holder.icon_state = "hudheadrevolutionary"
if("Cultist")
holder.icon_state = "hudcultist"
if("Changeling")
holder.icon_state = "hudchangeling"
if("Wizard","Fake Wizard")
holder.icon_state = "hudwizard"
if("Death Commando")
holder.icon_state = "huddeathsquad"
if("Ninja")
holder.icon_state = "hudninja"
hud_list[SPECIALROLE_HUD] = holder
hud_updateflag = 0

View File

@@ -58,6 +58,8 @@
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
if("pockets")
message = text("\red <B>[] is trying to empty []'s pockets</B>",source, target)
else
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
@@ -233,4 +235,4 @@
W.layer = 20
return
return

View File

@@ -22,15 +22,16 @@
if(loc)
environment = loc.return_air()
if (stat != DEAD && !istype(src,/mob/living/carbon/monkey/diona)) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
if (stat != DEAD)
if(!istype(src,/mob/living/carbon/monkey/diona)) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Updates the number of stored chemicals for powers
@@ -77,6 +78,8 @@
if(prob(1))
emote(pick("scratch","jump","roll","tail"))
updatehealth()
/mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure)
..()
@@ -131,7 +134,6 @@
heal_overall_damage(rads,rads)
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
updatehealth()
return
if (radiation > 100)
@@ -145,7 +147,6 @@
radiation--
if(prob(25))
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
@@ -155,7 +156,6 @@
Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
radiation -= 3
@@ -165,7 +165,6 @@
randmutb(src)
domutcheck(src,null)
emote("gasp")
updatehealth()
proc/handle_virus_updates()
if(status_flags & GODMODE) return 0 //godmode
@@ -175,30 +174,36 @@
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
for(var/obj/effect/decal/cleanable/O in view(1,src))
if(istype(O,/obj/effect/decal/cleanable/blood))
var/obj/effect/decal/cleanable/blood/B = O
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
else if(istype(O,/obj/effect/decal/cleanable/mucus))
var/obj/effect/decal/cleanable/mucus/M = O
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
// check if we're immune
if(V.antigen & src.antibodies)
V.dead = 1
if(virus2.len)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
// check if we're immune
if(V.antigen & src.antibodies)
V.dead = 1
return
@@ -391,6 +396,10 @@
proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
if(abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE)
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
@@ -446,7 +455,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lit_value) - 5 //hardcapped so it's not abused by having a ton of flashlights
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
@@ -459,7 +468,8 @@
adjustToxLoss(-1)
adjustOxyLoss(-1)
if(reagents) reagents.metabolize(src,alien)
if(reagents && reagents.reagent_list.len)
reagents.metabolize(src,alien)
if (drowsyness)
drowsyness--
@@ -468,24 +478,23 @@
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(confused)
confused = max(0, confused - 1)
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
updatehealth()
return //TODO: DEFERRED
proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
updatehealth()
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
death()
blinded = 1

View File

@@ -359,8 +359,8 @@
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
log_debug("pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]")
log_debug("REPORT THIS")
/////
if(pulling && pulling.anchored)

View File

@@ -94,7 +94,7 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/toggle_camera_light)
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
@@ -116,6 +116,10 @@ var/list/ai_list = list()
job = "AI"
spawn(5)
new /obj/machinery/ai_powersupply(src)
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
@@ -135,6 +139,37 @@ var/list/ai_list = list()
..()
/*
The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
The alternative was to rewrite a bunch of AI code instead here we are.
*/
/obj/machinery/ai_powersupply
name="Power Supply"
active_power_usage=1000
use_power = 2
power_channel = EQUIP
var/mob/living/silicon/ai/powered_ai = null
invisibility = 100
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
powered_ai = ai
if(isnull(powered_ai))
Del()
loc = powered_ai.loc
use_power(1) // Just incase we need to wake up the power system.
..()
/obj/machinery/ai_powersupply/process()
if(!powered_ai || powered_ai.stat & DEAD)
Del()
if(!powered_ai.anchored)
loc = powered_ai.loc
use_power = 0
if(powered_ai.anchored)
use_power = 2
/mob/living/silicon/ai/verb/pick_icon()
set category = "AI Commands"
set name = "Set AI Core Display"

View File

@@ -58,10 +58,20 @@
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
//Congratulations! You've found a way for AI's to run without using power!
//Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior
// since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update
// the power usage.
//
// We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and
// be fine.
/*
var/area/home = get_area(src)
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)
*/
if (src:aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
@@ -168,4 +178,4 @@
if(fire_res_on_core)
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
else
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()

View File

@@ -164,7 +164,7 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
w_class = 1.0
w_class = 2.0
throw_speed = 5
throw_range = 10
m_amt = 200

View File

@@ -31,7 +31,7 @@
if(stat == CONSCIOUS)
//if we're strong enough, sting some people
var/mob/living/carbon/human/M = target_mob
var/sting_prob = 100 // Bees will always try to sting.
var/sting_prob = 40 // Bees will always try to sting.
if(M in view(src,1)) // Can I see my target?
if(prob(max(feral * 10, 0))) // Am I mad enough to want to sting? And yes, when I initially appear, I AM mad enough
var/obj/item/clothing/worn_suit = M.wear_suit
@@ -42,17 +42,17 @@
sting_prob -= min(worn_helmet.armor["bio"],30) // Is your helmet sealed? I can't get to 30% of your body.
if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) ) // Try to sting! If you're not moving, think about stinging.
M.apply_damage(min(strength,2)+mut, BRUTE) // Stinging. The more mutated I am, the harder I sting.
M.apply_damage((round(feral/5,1)*(max((round(strength/10,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
M.apply_damage((round(feral/10,1)*(max((round(strength/20,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
M << "\red You have been stung!"
M.flash_pain()
//if we're chasing someone, get a little bit angry
if(target_mob && prob(10))
if(target_mob && prob(5))
feral++
//calm down a little bit
if(feral > 0)
if(prob(feral * 10))
if(prob(feral * 20))
feral -= 1
else
//if feral is less than 0, we're becalmed by smoke or steam

View File

@@ -217,7 +217,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/datum/reagent/blood/injected = get_blood(container.reagents)
if (!injected)
return
src.virus2 |= virus_copylist(injected.data["virus2"])
var/list/sniffles = virus_copylist(injected.data["virus2"])
for(var/ID in sniffles)
var/datum/disease2/disease/sniffle = sniffles[ID]
infect_virus2(src,sniffle,1)
if (injected.data["antibodies"] && prob(5))
antibodies |= injected.data["antibodies"]
var/list/chems = list()

View File

@@ -69,54 +69,70 @@
/mob/living/carbon/human/proc/handle_organs()
number_wounds = 0
var/leg_tally = 2
for(var/datum/organ/external/E in organs)
var/force_process = 0
var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
if(damage_this_tick > last_dam)
force_process = 1
last_dam = damage_this_tick
if(!force_process && !bad_external_organs.len)
return
if(force_process)
bad_external_organs.Cut()
for(var/datum/organ/external/Ex in organs)
bad_external_organs += Ex
for(var/datum/organ/external/E in bad_external_organs)
if(!E)
continue
E.process()
number_wounds += E.number_wounds
if(!E.need_process())
bad_external_organs -= E
continue
else
E.process()
number_wounds += E.number_wounds
//Robotic limb malfunctions
var/malfunction = 0
if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
malfunction = 1
//Robotic limb malfunctions
var/malfunction = 0
if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
malfunction = 1
//Broken limbs hurt too
var/broken = 0
if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) )
broken = 1
//Broken limbs hurt too
var/broken = 0
if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) )
broken = 1
//Moving around with fractured ribs won't do you any good
if (broken && E.internal_organs && prob(15))
if (!lying && world.timeofday - l_move_time < 15)
var/datum/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
I.take_damage(rand(3,5))
//Moving around with fractured ribs won't do you any good
if (broken && E.internal_organs && prob(15))
if (!lying && world.timeofday - l_move_time < 15)
var/datum/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
I.take_damage(rand(3,5))
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
var/obj/item/c_hand //Getting what's in this hand
if(E.name == "l_hand" || E.name == "l_arm")
c_hand = l_hand
if(E.name == "r_hand" || E.name == "r_arm")
c_hand = r_hand
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
var/obj/item/c_hand //Getting what's in this hand
if(E.name == "l_hand" || E.name == "l_arm")
c_hand = l_hand
if(E.name == "r_hand" || E.name == "r_arm")
c_hand = r_hand
if (c_hand)
u_equip(c_hand)
if (c_hand)
u_equip(c_hand)
if(broken)
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
if(malfunction)
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
spark_system.start()
spawn(10)
del(spark_system)
if(broken)
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
if(malfunction)
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
spark_system.start()
spawn(10)
del(spark_system)
else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
leg_tally-- // let it fail even if just foot&leg
else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
leg_tally-- // let it fail even if just foot&leg
// standing is poor
if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5))
@@ -124,7 +140,7 @@
emote("scream")
emote("collapse")
paralysis = 10
//Check arms and legs for existence
can_stand = 2 //can stand on both legs
var/datum/organ/external/E = organs_by_name["l_foot"]

View File

@@ -12,6 +12,7 @@
var/burn_dam = 0
var/max_damage = 0
var/max_size = 0
var/last_dam = -1
var/display_name
var/list/wounds = list()
@@ -198,7 +199,10 @@ This function completely restores a damaged organ to perfect condition.
*/
/datum/organ/external/proc/rejuvenate()
damage_state = "00"
status = 0
if(status & 128) //Robotic organs stay robotic. Fix because right click rejuvinate makes IPC's organs organic.
status = 128
else
status = 0
perma_injury = 0
brute_dam = 0
burn_dam = 0
@@ -270,6 +274,19 @@ This function completely restores a damaged organ to perfect condition.
PROCESSING & UPDATING
****************************************************/
//Determines if we even need to process this organ.
/datum/organ/external/proc/need_process()
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
return 1
if(brute_dam || burn_dam)
return 1
if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up.
last_dam = brute_dam + burn_dam
return 1
last_dam = brute_dam + burn_dam
return 0
/datum/organ/external/process()
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
if(owner.life_tick % wound_update_accuracy == 0)

View File

@@ -26,6 +26,13 @@
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
if (user.hand)
temp = user:organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
return
if(amount >= 1)
amount--
if(amount==0)
@@ -104,4 +111,4 @@
user << "<span class='notice'>[src] is empty!</span>"
add_fingerprint(user)
return
return

View File

@@ -26,7 +26,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "paper"
w_class = 1.0
w_class = 2.0
var/icon/img //Big photo image
var/scribble //Scribble on the back.

View File

@@ -217,7 +217,7 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_icon()
if (!status_overlays)
status_overlays = 1
status_overlays_lock = new
@@ -235,9 +235,9 @@
status_overlays_lock[1] = image(icon, "apcox-0") // 0=blue 1=red
status_overlays_lock[2] = image(icon, "apcox-1")
status_overlays_charging[1] = image(icon, "apco3-0")
status_overlays_charging[1] = image(icon, "apco3-0")
status_overlays_charging[2] = image(icon, "apco3-1")
status_overlays_charging[3] = image(icon, "apco3-2")
status_overlays_charging[3] = image(icon, "apco3-2")
status_overlays_equipment[1] = image(icon, "apco0-0") // 0=red, 1=green, 2=blue
status_overlays_equipment[2] = image(icon, "apco0-1")
@@ -248,13 +248,13 @@
status_overlays_lighting[2] = image(icon, "apco1-1")
status_overlays_lighting[3] = image(icon, "apco1-2")
status_overlays_lighting[4] = image(icon, "apco1-3")
status_overlays_environ[1] = image(icon, "apco2-0")
status_overlays_environ[2] = image(icon, "apco2-1")
status_overlays_environ[3] = image(icon, "apco2-2")
status_overlays_environ[4] = image(icon, "apco2-3")
var/update = check_updates() //returns 0 if no need to update icons.
// 1 if we need to update the icon_state
@@ -280,7 +280,7 @@
icon_state = "apcemag"
else if(update_state & UPSTATE_WIREEXP)
icon_state = "apcewires"
if(!(update_state & UPSTATE_ALLGOOD))
@@ -291,7 +291,7 @@
if(update & 2)
if(overlays.len)
overlays = 0
@@ -306,7 +306,7 @@
/obj/machinery/power/apc/proc/check_updates()
var/last_update_state = update_state
var/last_update_state = update_state
var/last_update_overlay = update_overlay
update_state = 0
update_overlay = 0
@@ -349,7 +349,7 @@
update_overlay |= APC_UPOVERLAY_EQUIPMENT1
else if(equipment == 2)
update_overlay |= APC_UPOVERLAY_EQUIPMENT2
if(!lighting)
update_overlay |= APC_UPOVERLAY_LIGHTING0
else if(lighting == 1)
@@ -649,6 +649,7 @@
user << "\blue You slot your fingers into the APC interface and siphon off some of the stored charge for your own use."
if(src.cell.charge < 0) src.cell.charge = 0
if(H.nutrition > 500) H.nutrition = 500
src.charging = 1
else
user << "\blue You are already fully charged."
@@ -1163,6 +1164,7 @@
lastused_equip = area.usage(EQUIP)
lastused_environ = area.usage(ENVIRON)
if(area.powerupdate)
if(debug) log_debug("power update in [area.name] / [name]")
area.clear_usage()
lastused_total = lastused_light + lastused_equip + lastused_environ
@@ -1186,16 +1188,16 @@
if(terminal && terminal.powernet)
perapc = terminal.powernet.perapc
//if(debug)
//world << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light]"
if(debug)
log_debug( "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light]")
if(cell && !shorted)
var/cell_charge = cell.charge
//var/cell_charge = cell.charge
var/cell_maxcharge = cell.maxcharge
// draw power from cell as before
var/cellused = min(cell_charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
var/cellused = min(cell.charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
cell.use(cellused)
if(excess > 0 || perapc > lastused_total) // if power excess, or enough anyway, recharge the cell
@@ -1206,10 +1208,9 @@
else // no excess, and not enough per-apc
if( (cell_charge/CELLRATE+perapc) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
if( (cell.charge/CELLRATE+perapc) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
cell_charge = min(cell_maxcharge, cell_charge + CELLRATE * perapc) //recharge with what we can
cell.charge = cell_charge
cell.give(CELLRATE * perapc) //recharge with what we can
add_load(perapc) // so draw what we can from the grid
charging = 0
@@ -1232,30 +1233,30 @@
longtermpower -= 2
if(cell_charge >= 1250 || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
if(cell.charge >= 1250 || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
if(autoflag != 3)
equipment = autoset(equipment, 1)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
autoflag = 3
area.poweralert(1, src)
if(cell_charge >= 4000)
if(cell.charge >= 4000)
area.poweralert(1, src)
else if(cell_charge < 1250 && longtermpower < 0) // <30%, turn off equipment
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
if(autoflag != 2)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 2
else if(cell_charge < 750 && longtermpower < 0) // <15%, turn off lighting & equipment
else if(cell.charge < 750 && cell.charge > 10 && longtermpower < 0) // <15%, turn off lighting & equipment
if(autoflag != 1)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 1
else if(cell_charge <= 0) // zero charge, turn all off
else if(cell.charge <= 0) // zero charge, turn all off
if(autoflag != 0)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
@@ -1268,7 +1269,7 @@
if(chargemode && charging == 1 && operating)
if(excess > 0) // check to make sure we have enough to charge
// Max charge is perapc share, capped to cell capacity, or % per second constant (Whichever is smallest)
var/ch = min(perapc*CELLRATE, (cell_maxcharge - cell_charge), (cell_maxcharge*CHARGELEVEL))
var/ch = min(perapc*CELLRATE, (cell_maxcharge - cell.charge), (cell_maxcharge*CHARGELEVEL))
add_load(ch/CELLRATE) // Removes the power we're taking from the grid
cell.give(ch) // actually recharge the cell

View File

@@ -642,7 +642,7 @@
flags = FPRINT | TABLEPASS
force = 2
throwforce = 5
w_class = 1
w_class = 2
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched

View File

@@ -460,6 +460,7 @@ var/global/list/uneatable = list(
move_self = 1 //Do we move on our own?
grav_pull = 10 //How many tiles out do we pull?
consume_range = 3 //How many tiles out do we eat
var/last_boom = 0
/obj/machinery/singularity/narsie/large
name = "Nar-Sie"
@@ -490,9 +491,11 @@ var/global/list/uneatable = list(
return 0
if (istype(A,/mob/living))//Mobs get gibbed
A:gib()
else if(istype(A,/obj/))
A:ex_act(1.0)
if(A) del(A)
else if(istype(A,/obj))
var/obj/O = A
machines -= O
processing_objects -= O
O.loc = null
else if(isturf(A))
var/turf/T = A
if(T.intact)
@@ -502,6 +505,9 @@ var/global/list/uneatable = list(
if(O.invisibility == 101)
src.consume(O)
A:ChangeTurf(/turf/space)
if(last_boom + 100 < world.time && prob(5))
explosion(loc, -1, -1, -1, 1, 0) //Since we're not exploding everything in consume() toss out an explosion effect every now and again
last_boom = world.time
return
/obj/machinery/singularity/narsie/ex_act() //No throwing bombs at it either. --NEO

View File

@@ -218,6 +218,10 @@
if (!istype(src.loc, /turf) && !istype(usr, /mob/living/silicon/))
return 0 // Do not update ui
for(var/area/A in active_areas)
A.master.powerupdate = 3
if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)

View File

@@ -53,7 +53,7 @@
item_state = "syringe_kit"
m_amt = 50000
throwforce = 2
w_class = 1.0
w_class = 2.0
throw_speed = 4
throw_range = 10
var/list/stored_ammo = list()

View File

@@ -135,4 +135,18 @@
icon_state = "a762"
ammo_type = "/obj/item/ammo_casing/a762"
max_ammo = 0
multiple_sprites = 1
/obj/item/ammo_magazine/chameleon
name = "magazine (.45)"
icon_state = "45"
ammo_type = "/obj/item/ammo_casing/chameleon"
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_magazine/chameleon/empty
name = "magazine (.45)"
icon_state = "45"
ammo_type = "/obj/item/ammo_casing/chameleon"
max_ammo = 0
multiple_sprites = 1

View File

@@ -105,3 +105,9 @@
icon_state = "rocketshell"
projectile_type = "/obj/item/missile"
caliber = "rocket"
/obj/item/ammo_casing/chameleon
name = "chameleon bullets"
desc = "A set of bullets for the Chameleon Gun."
projectile_type = "/obj/item/projectile/bullet/chameleon"
caliber = ".45"

View File

@@ -58,4 +58,7 @@
embed = 0
/obj/item/projectile/bullet/a762
damage = 25
damage = 25
/obj/item/projectile/bullet/chameleon
damage = 1 // stop trying to murderbone with a fake gun dumbass!!!

View File

@@ -110,7 +110,7 @@ datum
continue
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
trans_data = current_reagent.data
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety checks on these so all chemicals are transferred
src.remove_reagent(current_reagent.id, current_reagent_transfer, safety = 1) // to the target container before handling reactions
@@ -183,7 +183,7 @@ datum
for (var/datum/reagent/current_reagent in src.reagent_list)
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
trans_data = current_reagent.data
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety check so all chemicals are transferred before reacting
src.update_total()
@@ -207,7 +207,7 @@ datum
for (var/datum/reagent/current_reagent in src.reagent_list)
if(current_reagent.id == reagent)
if(preserve_data)
trans_data = current_reagent.data
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, amount, trans_data)
src.remove_reagent(current_reagent.id, amount, 1)
break
@@ -600,6 +600,24 @@ datum
if(my_atom)
my_atom.reagents = null
copy_data(var/datum/reagent/current_reagent)
if (!current_reagent || !current_reagent.data) return null
if (!istype(current_reagent.data, /list)) return current_reagent.data
var/list/trans_data = current_reagent.data.Copy()
// We do this so that introducing a virus to a blood sample
// doesn't automagically infect all other blood samples from
// the same donor.
//
// Technically we should probably copy all data lists, but
// that could possibly eat up a lot of memory needlessly
// if most data lists are read-only.
if (trans_data["virus2"])
var/list/v = trans_data["virus2"]
trans_data["virus2"] = v.Copy()
return trans_data
///////////////////////////////////////////////////////////////////////////////////

View File

@@ -949,7 +949,7 @@ datum
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -1835,7 +1835,7 @@ datum
toxin/beer2 //disguised as normal beer for use by emagged brobots
name = "Beer"
id = "beer2"
description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be imcomplete." //If the players manage to analyze this, they deserve to know something is wrong.
description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong.
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
custom_metabolism = 0.15 // Sleep toxins should always be consumed pretty fast
@@ -3706,4 +3706,4 @@ datum
return
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM
#undef REM

View File

@@ -849,7 +849,7 @@ datum
var/list/flashers = list()
for(var/mob/living/carbon/human/M in viewers(TO, null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash) // flash dose faggots
flick("e_flash", M.flash)
flashers += M
var/y_distance = TO.y - FROM.y

View File

@@ -3,7 +3,7 @@
desc = "..."
icon = 'icons/obj/chemical.dmi'
icon_state = null
w_class = 1
w_class = 2
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,15,25,30)
var/volume = 30

View File

@@ -8,6 +8,7 @@
icon_state = "dropper0"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1,2,3,4,5)
w_class = 1
volume = 5
var/filled = 0

View File

@@ -11,7 +11,7 @@
attack(mob/M as mob, mob/user as mob, def_zone)
if (canopened == 0)
user << "<span class='notice'> You need to open the drink!</span>"
user << "<span class='notice'>You need to open the drink!</span>"
return
var/datum/reagents/R = src.reagents
var/fillevel = gulp_size
@@ -24,11 +24,18 @@
M << "\blue You swallow a gulp of [src]."
if(reagents.total_volume)
reagents.trans_to_ingest(M, gulp_size)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, gulp_size)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
else if( istype(M, /mob/living/carbon/human) )
if (canopened == 0)
user << "<span class='notice'> You need to open the drink!</span>"
return
else if (canopened == 1)
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] attempts to feed [M] [src].", 1)
if(!do_mob(user, M)) return
@@ -68,8 +75,10 @@
user << "\red [src] is full."
return
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
user << "\blue You fill [src] with [trans] units of the contents of [target]."
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
user << "\blue You fill [src] with [trans] units of the contents of [target]."
if (canopened == 0)
user << "<span class='notice'>You need to open the drink!</span>"
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
@@ -259,4 +268,4 @@
icon_state = "sodawater"
New()
..()
reagents.add_reagent("sodawater", 50)
reagents.add_reagent("sodawater", 50)

View File

@@ -668,10 +668,10 @@
reagents.add_reagent("nutriment", 3)
src.bitesize = 6
/obj/item/weapon/reagent_containers/food/snacks/faggot
name = "Faggot"
desc = "A great meal all round. Not a cord of wood."
icon_state = "faggot"
/obj/item/weapon/reagent_containers/food/snacks/meatball
name = "meatball"
desc = "A great meal all round."
icon_state = "meatball"
filling_color = "#DB0000"
New()
@@ -2835,7 +2835,7 @@
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob)
// Bun + meatball = burger
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/faggot))
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meatball))
new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src)
user << "You make a burger."
del(W)
@@ -2906,7 +2906,7 @@
..()
reagents.add_reagent("nutriment", 2)
/obj/item/weapon/reagent_containers/food/snacks/rawfaggot
/obj/item/weapon/reagent_containers/food/snacks/rawmeatball
name = "raw meatball"
desc = "A raw meatball."
icon = 'icons/obj/food_ingredients.dmi'

View File

@@ -38,7 +38,10 @@
/mob/living/simple_animal/hostile/retaliate/goat,
/obj/machinery/computer/centrifuge,
/obj/machinery/sleeper,
/obj/machinery/smartfridge/ )
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/machinery/hydroponics,
/obj/machinery/constructable_frame)
New()
..()

View File

@@ -8,6 +8,7 @@
icon_state = null
item_state = "pill"
possible_transfer_amounts = null
w_class = 1
volume = 50
New()

View File

@@ -15,6 +15,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = null //list(5,10,15)
volume = 15
w_class = 1
var/mode = SYRINGE_DRAW
on_reagent_change()

View File

@@ -165,7 +165,7 @@
//If you don't want to fuck up disposals, add to this list, and don't change the order.
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
w_class = 1
w_class = 2
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT

View File

@@ -1369,13 +1369,13 @@ datum/design/implant_free
build_path = "/obj/item/weapon/implant/freedom"
datum/design/chameleon
name = "Chameleon Jumpsuit"
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
name = "Chameleon Kit"
desc = "It's a set of clothes with dials on them."
id = "chameleon"
req_tech = list("syndicate" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 500)
build_path = "/obj/item/clothing/under/chameleon"
build_path = "/obj/item/weapon/storage/box/syndie_kit/chameleon"
datum/design/bluespacebeaker
@@ -1712,7 +1712,7 @@ datum/design/security_hud
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk2"
item_state = "card-id"
w_class = 1.0
w_class = 2.0
m_amt = 30
g_amt = 10
var/datum/design/blueprint

View File

@@ -262,7 +262,7 @@ datum/tech/robotics
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk2"
item_state = "card-id"
w_class = 1.0
w_class = 2.0
m_amt = 30
g_amt = 10
var/datum/tech/stored

View File

@@ -39,6 +39,7 @@
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
@@ -68,8 +69,14 @@
if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
user << "\red You start [P.drill_verb] [src]."
if(!do_after(user,P.digspeed))
return
@@ -97,3 +104,22 @@
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
del(src)
/obj/structure/boulder/Bumped(AM)
. = ..()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
attackby(H.l_hand,H)
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
attackby(H.r_hand,H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
if(istype(R.module_active,/obj/item/weapon/pickaxe))
attackby(R.module_active,R)
else if(istype(AM,/obj/mecha))
var/obj/mecha/M = AM
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)

View File

@@ -77,7 +77,7 @@ datum
icon_state = "solution_tray"
m_amt = 0
g_amt = 5
w_class = 1.0
w_class = 2.0
amount_per_transfer_from_this = 1
possible_transfer_amounts = list(1, 2)
volume = 2

View File

@@ -142,6 +142,7 @@ proc/SetupXenoarch()
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/box/excavation(src)
new /obj/item/device/flashlight/lantern(src)
new /obj/item/device/ano_scanner(src)
new /obj/item/device/depth_scanner(src)
new /obj/item/device/core_sampler(src)
new /obj/item/device/gps(src)

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "flashgun"
item_state = "lampgreen"
w_class = 1.0
w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/nearest_artifact_id = "unknown"

View File

@@ -9,7 +9,7 @@
icon = 'icons/obj/pda.dmi'
icon_state = "crap"
item_state = "analyzer"
w_class = 1.0
w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/list/positive_locations = list()

View File

@@ -10,7 +10,7 @@ client/verb/tcssave()
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
var/tcscode=winget(src, "tcscode", "text")
var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
diary << msg
log_misc(msg)
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[mob.x];Y=[mob.y];Z=[mob.z]'>JMP</a>)",0,1)
Server.setcode( tcscode ) // this actually saves the code from input to the server
src << output(null, "tcserror") // clear the errors
@@ -208,4 +208,4 @@ client/verb/tcsclearmem()
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")

View File

@@ -257,7 +257,7 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
var/list/dat = list()
while (i < lenh)
var/found = findtext(haystack, a, i, 0)
//diary << "findtext([haystack], [a], [i], 0)=[found]"
//log_misc("findtext([haystack], [a], [i], 0)=[found]")
if (found == 0) // Not found
break
else
@@ -265,9 +265,9 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
dat+=found
count+=1
else
//diary << "Script found [a] [count] times, aborted"
//log_misc("Script found [a] [count] times, aborted")
break
//diary << "Found [a] at [found]! Moving up..."
//log_misc("Found [a] at [found]! Moving up...")
i = found + lena
if (count == 0)
return haystack
@@ -281,11 +281,11 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
//CharCopy (dest + targetIndex, src + sourceIndex, count);
//CharCopy (dest + curPos, source + lastReadPos, precopy);
buf+=copytext(haystack,lastReadPos,precopy)
diary << "buf+=copytext([haystack],[lastReadPos],[precopy])"
diary<<"[buf]"
log_misc("buf+=copytext([haystack],[lastReadPos],[precopy])")
log_misc("[buf]")
lastReadPos = dat[i] + lena
//CharCopy (dest + curPos, replace, newValue.length);
buf+=b
diary<<"[buf]"
log_misc("[buf]")
buf+=copytext(haystack,lastReadPos, 0)
return buf
return buf

View File

@@ -5,7 +5,7 @@
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
icon = 'icons/obj/telescience.dmi'
icon_state = "bluespace_crystal"
w_class = 1
w_class = 2
origin_tech = "bluespace=4;materials=3"
var/blink_range = 8 // The teleport range when crushed/thrown at someone.

View File

@@ -10,43 +10,46 @@
var/obj/item/weapon/virusdish/dish = null
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
dish = I
c.drop_item()
I.loc = src
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3)
else
user << "There is already a dish inserted"
return
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/O as obj, var/mob/user as mob)
if(!istype(O,/obj/item/weapon/virusdish)) return
if(dish)
user << "\The [src] is already loaded."
return
dish = O
user.drop_item()
O.loc = src
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
/obj/machinery/disease2/diseaseanalyser/process()
if(stat & (NOPOWER|BROKEN))
return
//use_power(500)
if(scanning)
scanning -= 1
if(scanning == 0)
var/r = dish.virus2.get_info()
if (dish.virus2.addToDB())
ping("\The [src] pings, \"New pathogen added to data bank.\"")
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
P.info = r
P.name = "paper - [dish.virus2.name()]"
var/r = dish.virus2.get_info()
P.info = {"
[virology_letterhead("Post-Analysis Memo")]
[r]
<hr>
<u>Additional Notes:</u>&nbsp;
"}
dish.info = r
dish.analysed = 1
if (dish.virus2.addToDB())
src.state("\The [src.name] states, \"Added new pathogen to database.\"")
dish.loc = src.loc
dish = null
icon_state = "analyser"
src.state("\The [src.name] prints a sheet of paper")
icon_state = "analyser"
src.state("\The [src] prints a sheet of paper.")
else if(dish && !scanning && !pause)
if(dish.virus2 && dish.growth > 50)
@@ -58,6 +61,7 @@
spawn(25)
dish.loc = src.loc
dish = null
src.state("\The [src.name] buzzes")
src.state("\The [src] buzzes, \"Insufficient growth density to complete analysis.\"")
pause = 0
return

View File

@@ -9,19 +9,23 @@
var/obj/item/weapon/reagent_containers/glass/beaker/vial/sample = null
var/datum/disease2/disease/virus2 = null
/obj/machinery/computer/centrifuge/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
return ..(I,user)
/obj/machinery/computer/centrifuge/attackby(var/obj/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
return ..(O,user)
if(istype(I,/obj/item/weapon/reagent_containers/glass/beaker/vial))
var/mob/living/carbon/C = user
if(!sample)
sample = I
C.drop_item()
I.loc = src
if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial))
if(sample)
user << "\The [src] is already loaded."
return
sample = O
user.drop_item()
O.loc = src
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
nanomanager.update_uis(src)
src.attack_hand(user)
return
/obj/machinery/computer/centrifuge/update_icon()
..()
@@ -29,126 +33,181 @@
icon_state = "centrifuge_moving"
/obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob)
if(..())
return
user.set_machine(src)
var/dat= ""
if(curing)
dat = "Antibody isolation in progress"
else if(isolating)
dat = "Pathogen isolation in progress"
else
dat += "<BR>Blood sample:"
dat += "<br><table cellpadding='10'><tr><td>"
if(sample)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(B)
dat += "Sample inserted."
if (B.data["antibodies"])
dat += "</td></tr><tr><td>"
dat += "Antibodies: [antigens2string(B.data["antibodies"])]"
dat += "</td><td><A href='?src=\ref[src];action=antibody'>Isolate</a>"
if(..()) return
ui_interact(user)
/obj/machinery/computer/centrifuge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
var/data[0]
data["antibodies"] = null
data["pathogens"] = null
data["is_antibody_sample"] = null
if (curing)
data["busy"] = "Isolating antibodies..."
else if (isolating)
data["busy"] = "Isolating pathogens..."
else
data["sample_inserted"] = !!sample
if (sample)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (B)
data["antibodies"] = B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : null
var/list/pathogens[0]
var/list/virus = B.data["virus2"]
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
dat += " </td></tr><tr><td> pathogen [V.name()]"
dat += "</td><td><A href='?src=\ref[src];action=isolate;isolate=[V.uniqueID]'>Isolate</a>"
pathogens.Add(list(list("name" = V.name(), "spread_type" = V.spreadtype, "reference" = "\ref[V]")))
if (pathogens.len > 0)
data["pathogens"] = pathogens
else
dat += "Please check container contents."
dat += "</td></tr><tr><td><A href='?src=\ref[src];action=sample'>Eject container</a>"
else
dat = "Please insert a container."
dat += "</td></tr></table><br>"
var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
data["antibodies"] = A && A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : null
data["is_antibody_sample"] = 1
dat += "<hr>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "isolation_centrifuge.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
ui.open()
/obj/machinery/computer/centrifuge/process()
..()
if (stat & (NOPOWER|BROKEN)) return
if(stat & (NOPOWER|BROKEN))
return
//use_power(500)
if(curing)
if (curing)
curing -= 1
if(curing == 0)
if(sample)
cure()
update_icon()
if(isolating)
if (curing == 0)
cure()
if (isolating)
isolating -= 1
if(isolating == 0)
if(sample)
isolate()
update_icon()
src.updateUsrDialog()
return
isolate()
/obj/machinery/computer/centrifuge/Topic(href, href_list)
if(..())
return
if (..()) return 0
if(usr) usr.set_machine(src)
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
if (href_list["close"])
user.unset_machine()
ui.close()
return 0
if (href_list["print"])
print(user)
return 1
if(href_list["isolate"])
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (B)
var/datum/disease2/disease/virus = locate(href_list["isolate"])
virus2 = virus.getcopy()
isolating = 40
update_icon()
return 1
switch(href_list["action"])
if("antibody")
if ("antibody")
var/delay = 20
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (!B)
state("\The [src.name] buzzes, \"No antibody carrier detected.\"", "blue")
state("\The [src] buzzes, \"No antibody carrier detected.\"", "blue")
return 1
else if(sample.reagents.has_reagent("toxins"))
state("\The [src.name] beeps, \"Pathogen purging speed above nominal.\"", "blue")
delay = delay/2
var/has_toxins = locate(/datum/reagent/toxin) in sample.reagents.reagent_list
var/has_radium = sample.reagents.has_reagent("radium")
if (has_toxins || has_radium)
state("\The [src] beeps, \"Pathogen purging speed above nominal.\"", "blue")
if (has_toxins)
delay = delay/2
if (has_radium)
delay = delay/2
else
curing = delay
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
update_icon()
if("isolate")
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (B)
var/list/virus = virus_copylist(B.data["virus2"])
var/choice = href_list["isolate"]
if (choice in virus)
virus2 = virus[choice]
isolating = 40
update_icon()
else
state("\The [src.name] buzzes, \"No such pathogen detected.\"", "blue")
curing = round(delay)
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
update_icon()
return 1
if("sample")
if(sample)
sample.loc = src.loc
sample = null
return 1
src.add_fingerprint(usr)
src.updateUsrDialog()
attack_hand(usr)
return
return 0
/obj/machinery/computer/centrifuge/proc/cure()
if (!sample) return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (!B)
return
if (!B) return
var/list/data = list("antibodies" = B.data["antibodies"])
var/amt= sample.reagents.get_reagent_amount("blood")
sample.reagents.remove_reagent("blood",amt)
sample.reagents.add_reagent("antibodies",amt,data)
sample.reagents.remove_reagent("blood", amt)
sample.reagents.add_reagent("antibodies", amt, data)
state("\The [src.name] pings", "blue")
nanomanager.update_uis(src)
update_icon()
ping("\The [src] pings, \"Antibody isolated.\"")
/obj/machinery/computer/centrifuge/proc/isolate()
var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(src.loc)
if (!sample) return
var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(loc)
dish.virus2 = virus2
virus2 = null
state("\The [src.name] pings", "blue")
nanomanager.update_uis(src)
update_icon()
ping("\The [src] pings, \"Pathogen isolated.\"")
/obj/machinery/computer/centrifuge/proc/print(var/mob/user)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
P.name = "paper - Pathology Report"
P.info = {"
[virology_letterhead("Pathology Report")]
<large><u>Sample:</u></large> [sample.name]<br>
"}
if (user)
P.info += "<u>Generated By:</u> [user.name]<br>"
P.info += "<hr>"
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (B)
P.info += "<u>Antibodies:</u> "
P.info += B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : "None"
P.info += "<br>"
var/list/virus = B.data["virus2"]
P.info += "<u>Pathogens:</u> <br>"
if (virus.len > 0)
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
P.info += "[V.name()]<br>"
else
P.info += "None<br>"
else
var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
if (A)
P.info += "The following antibodies have been isolated from the blood sample: "
P.info += A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : "None"
P.info += "<br>"
P.info += {"
<hr>
<u>Additional Notes:</u> <field>
"}
state("The nearby computer prints out a pathology report.")

View File

@@ -10,6 +10,7 @@
var/list/datum/disease2/effectholder/effects = list()
var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
var/max_stage = 4
var/list/affected_species = list("Human","Unathi","Skrell","Tajaran")
/datum/disease2/disease/New()
uniqueID = rand(0,10000)
@@ -30,6 +31,24 @@
antigen |= text2num(pick(ANTIGENS))
spreadtype = prob(70) ? "Airborne" : "Contact"
if(all_species.len)
affected_species = get_infectable_species()
/proc/get_infectable_species()
var/list/meat = list()
var/list/res = list()
for (var/specie in all_species)
var/datum/species/S = all_species[specie]
if(!(S.flags & IS_SYNTHETIC))
meat += S.name
if(meat.len)
var/num = rand(1,meat.len)
for(var/i=0,i<num,i++)
var/picked = pick(meat)
meat -= picked
res += picked
return res
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
if(dead)
cure(mob)
@@ -45,8 +64,10 @@
if(prob(1))
majormutate()
//Space antibiotics stop disease completely (temporary)
//Space antibiotics stop disease completely
if(mob.reagents.has_reagent("spaceacillin"))
if(stage == 1 && prob(20))
src.cure()
return
//Virus food speeds up disease progress
@@ -94,6 +115,8 @@
if (prob(5))
antigen = text2num(pick(ANTIGENS))
antigen |= text2num(pick(ANTIGENS))
if (prob(5) && all_species.len)
affected_species = get_infectable_species()
/datum/disease2/disease/proc/getcopy()
var/datum/disease2/disease/disease = new /datum/disease2/disease
@@ -102,6 +125,7 @@
disease.stageprob = stageprob
disease.antigen = antigen
disease.uniqueID = uniqueID
disease.affected_species = affected_species.Copy()
for(var/datum/disease2/effectholder/holder in effects)
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
newholder.effect = new holder.effect.type
@@ -148,14 +172,21 @@ var/global/list/virusDB = list()
.= V.fields["name"]
/datum/disease2/disease/proc/get_info()
var/r = "GNAv2 based virus lifeform - [name()], #[add_zero("[uniqueID]", 4)]"
r += "<BR>Infection rate : [infectionchance * 10]"
r += "<BR>Spread form : [spreadtype]"
r += "<BR>Progress Speed : [stageprob * 10]"
for(var/datum/disease2/effectholder/E in effects)
r += "<BR>Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
var/r = {"
<small>Analysis determined the existence of a GNAv2-based viral lifeform.</small><br>
<u>Designation:</u> [name()]<br>
<u>Antigen:</u> [antigens2string(antigen)]<br>
<u>Transmitted By:</u> [spreadtype]<br>
<u>Rate of Progression:</u> [stageprob * 10]<br>
<u>Species Affected:</u> [list2text(affected_species, ", ")]<br>
"}
r += "<u>Symptoms:</u><br>"
for(var/datum/disease2/effectholder/E in effects)
r += "([E.stage]) [E.effect.name] "
r += "<small><u>Strength:</u> [E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"] "
r += "<u>Verosity:</u> [E.chance * 15]</small><br>"
r += "<BR>Antigen pattern: [antigens2string(antigen)]"
return r
/datum/disease2/disease/proc/addToDB()
@@ -194,3 +225,10 @@ proc/virus2_greater_infection()
candidates = shuffle(candidates)
infect_mob_random_greater(candidates[1])
proc/virology_letterhead(var/report_name)
return {"
<center><h1><b>[report_name]</b></h1></center>
<center><small><i>[station_name()] Virology Lab</i></small></center>
<hr>
"}

View File

@@ -4,144 +4,179 @@
icon_state = "crew"
var/datum/disease2/effectholder/memorybank = null
var/list/species_buffer = null
var/analysed = 0
var/obj/item/weapon/virusdish/dish = null
var/burning = 0
var/splicing = 0
var/scanning = 0
/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
return ..(I,user)
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
if (dish)
user << "\The [src] is already loaded."
return
dish = I
c.drop_item()
I.loc = src
dish = I
c.drop_item()
I.loc = src
if(istype(I,/obj/item/weapon/diseasedisk))
user << "You upload the contents of the disk into the buffer"
user << "You upload the contents of the disk onto the buffer."
memorybank = I:effect
species_buffer = I:species
analysed = I:analysed
src.attack_hand(user)
return
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
if(..())
return
if(..()) return
ui_interact(user)
/obj/machinery/computer/diseasesplicer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
var/dat
if(splicing)
dat = "Splicing in progress."
else if(scanning)
dat = "Splicing in progress."
else if(burning)
dat = "Data disk burning in progress."
var/data[0]
data["dish_inserted"] = !!dish
data["growth"] = 0
data["affected_species"] = null
if (memorybank)
data["buffer"] = list("name" = (analysed ? memorybank.effect.name : "Unknown Symptom"), "stage" = memorybank.stage)
if (species_buffer)
data["species_buffer"] = analysed ? list2text(species_buffer, ", ") : "Unknown Species"
if (splicing)
data["busy"] = "Splicing..."
else if (scanning)
data["busy"] = "Scanning..."
else if (burning)
data["busy"] = "Copying data to disk..."
else if (dish)
data["growth"] = min(dish.growth, 100)
if (dish.virus2)
if (dish.virus2.affected_species)
data["affected_species"] = dish.analysed ? list2text(dish.virus2.affected_species, ", ") : "Unknown"
if (dish.growth >= 50)
var/list/effects[0]
for (var/datum/disease2/effectholder/e in dish.virus2.effects)
effects.Add(list(list("name" = (dish.analysed ? e.effect.name : "Unknown"), "stage" = (e.stage), "reference" = "\ref[e]")))
data["effects"] = effects
else
data["info"] = "Insufficient cell growth for gene splicing."
else
data["info"] = "No virus detected."
else
if(dish)
dat = "Virus dish inserted."
data["info"] = "No dish loaded."
dat += "<BR>Current DNA strand : "
if(memorybank)
dat += "<A href='?src=\ref[src];splice=1'>"
if(analysed)
dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])"
else
dat += "Unknown DNA strand ([5-memorybank.effect.stage])"
dat += "</a>"
dat += "<BR><A href='?src=\ref[src];disk=1'>Burn DNA Sequence to data storage disk</a>"
else
dat += "Empty."
dat += "<BR><BR>"
if(dish)
if(dish.virus2)
if(dish.growth >= 50)
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
dat += "<BR><A href='?src=\ref[src];grab=\ref[e]'> DNA strand"
if(dish.analysed)
dat += ": [e.effect.name]"
dat += " (5-[e.effect.stage])</a>"
else
dat += "<BR>Insufficent cells to attempt gene splicing."
else
dat += "<BR>No virus found in dish."
dat += "<BR><BR><A href='?src=\ref[src];eject=1'>Eject disk</a>"
else
dat += "<BR>Please insert dish."
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "disease_splicer.tmpl", src.name, 400, 600)
ui.set_initial_data(data)
ui.open()
/obj/machinery/computer/diseasesplicer/process()
if(stat & (NOPOWER|BROKEN))
return
//use_power(500)
if(scanning)
scanning -= 1
if(!scanning)
state("The [src.name] beeps", "blue")
ping("\The [src] pings, \"Analysis complete.\"")
nanomanager.update_uis(src)
if(splicing)
splicing -= 1
if(!splicing)
state("The [src.name] pings", "blue")
ping("\The [src] pings, \"Splicing operation complete.\"")
nanomanager.update_uis(src)
if(burning)
burning -= 1
if(!burning)
var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
d.analysed = analysed
if(analysed)
d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])"
if (memorybank)
d.name = "[memorybank.effect.name] GNA disk (Stage: [memorybank.effect.stage])"
d.effect = memorybank
else if (species_buffer)
d.name = "[list2text(species_buffer, ", ")] GNA disk"
d.species = species_buffer
else
d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])"
d.effect = memorybank
state("The [src.name] zings", "blue")
if (memorybank)
d.name = "Unknown GNA disk (Stage: [memorybank.effect.stage])"
d.effect = memorybank
else if (species_buffer)
d.name = "Unknown Species GNA disk"
d.species = species_buffer
src.updateUsrDialog()
return
ping("\The [src] pings, \"Backup disk saved.\"")
nanomanager.update_uis(src)
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
if(..())
return
if(..()) return 0
if(usr) usr.set_machine(src)
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
if (href_list["close"])
user.unset_machine()
ui.close()
return 0
if (href_list["grab"])
memorybank = locate(href_list["grab"])
analysed = dish.analysed
del(dish)
dish = null
scanning = 10
if (dish)
memorybank = locate(href_list["grab"])
species_buffer = null
analysed = dish.analysed
dish = null
scanning = 10
return 1
else if(href_list["eject"])
dish.loc = src.loc
dish = null
if (href_list["affected_species"])
if (dish)
memorybank = null
species_buffer = dish.virus2.affected_species
analysed = dish.analysed
dish = null
scanning = 10
return 1
else if(href_list["splice"])
if(href_list["eject"])
if (dish)
dish.loc = src.loc
dish = null
return 1
if(href_list["splice"])
if(dish)
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
if(e.stage == memorybank.stage)
e.effect = memorybank.effect
if (memorybank)
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
if(e.stage == memorybank.stage)
e.effect = memorybank.effect
if (species_buffer)
dish.virus2.affected_species = species_buffer
splicing = 10
// dish.virus2.spreadtype = "Blood"
dish.virus2.uniqueID = rand(0,10000)
return 1
else if(href_list["disk"])
if(href_list["disk"])
burning = 10
return 1
src.add_fingerprint(usr)
src.updateUsrDialog()
return
return 0

View File

@@ -14,120 +14,79 @@
var/foodsupply = 0
var/toxins = 0
var/virusing
/obj/machinery/disease2/incubator/attackby(var/obj/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/syringe))
/obj/machinery/disease2/incubator/attackby(var/obj/B as obj, var/mob/user as mob)
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
if(src.beaker)
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
user << "A syringe is already loaded into the machine."
else
user << "A beaker is already loaded into the machine."
if(beaker)
user << "\The [src] is already loaded."
return
src.beaker = B
beaker = O
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
user << "You add the syringe to the machine!"
src.updateUsrDialog()
else
user << "You add the beaker to the machine!"
src.updateUsrDialog()
else
if(istype(B,/obj/item/weapon/virusdish))
if(src.dish)
user << "A dish is already loaded into the machine."
return
O.loc = src
src.dish = B
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/virusdish))
user << "You add the dish to the machine!"
src.updateUsrDialog()
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
nanomanager.update_uis(src)
/obj/machinery/disease2/incubator/Topic(href, href_list)
if(..()) return
if(usr) usr.set_machine(src)
if (href_list["ejectchem"])
if(beaker)
beaker.loc = src.loc
beaker = null
if(!dish)
src.attack_hand(user)
return
if (href_list["power"])
on = !on
if(on)
icon_state = "incubator_on"
else
icon_state = "incubator"
if (href_list["ejectdish"])
if(istype(O, /obj/item/weapon/virusdish))
if(dish)
dish.loc = src.loc
dish = null
if (href_list["rad"])
radiation += 10
if (href_list["flush"])
radiation = 0
toxins = 0
foodsupply = 0
user << "The dish tray is aleady full!"
return
if(href_list["virus"])
if (!dish)
state("\The [src.name] buzzes, \"No viral culture sample detected.\"", "blue")
else
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
if (!B)
state("\The [src.name] buzzes, \"No suitable breeding enviroment detected.\"", "blue")
else
if (!B.data["virus2"])
B.data["virus2"] = list()
var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
B.data["virus2"] = virus
dish = O
user.drop_item()
O.loc = src
state("\The [src.name] pings, \"Injection complete.\"", "blue")
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
nanomanager.update_uis(src)
src.add_fingerprint(usr)
src.updateUsrDialog()
src.attack_hand(user)
/obj/machinery/disease2/incubator/attack_hand(mob/user as mob)
if(stat & BROKEN)
return
if(stat & (NOPOWER|BROKEN)) return
ui_interact(user)
/obj/machinery/disease2/incubator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
var/dat = ""
if(!dish)
dat = "Please insert dish into the incubator.<BR>"
var/string = "Off"
if(on)
string = "On"
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
dat += "<BR>"
dat += "Food supply : [foodsupply]"
dat += "<BR>"
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
dat += "<BR>"
dat += "Toxins : [toxins]"
dat += "<BR><BR>"
if(beaker)
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
dat += "<BR>"
if(dish)
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
dat += "<BR>"
if(beaker)
dat += "Breed viral culture in beaker : <A href='?src=\ref[src];virus=1'> Start</a>"
dat += "<BR>"
dat += "<BR><BR>"
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a><BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
onclose(user, "incubator")
return
var/data[0]
data["chemicals_inserted"] = !!beaker
data["dish_inserted"] = !!dish
data["food_supply"] = foodsupply
data["radiation"] = radiation
data["toxins"] = min(toxins, 100)
data["on"] = on
data["system_in_use"] = foodsupply > 0 || radiation > 0 || toxins > 0
data["chemical_volume"] = beaker ? beaker.reagents.total_volume : 0
data["max_chemical_volume"] = beaker ? beaker.volume : 1
data["virus"] = dish ? dish.virus2 : null
data["growth"] = dish ? min(dish.growth, 100) : 0
data["infection_rate"] = dish && dish.virus2 ? dish.virus2.infectionchance * 10 : 0
data["analysed"] = dish && dish.analysed ? 1 : 0
data["can_breed_virus"] = null
data["blood_already_infected"] = null
if (beaker)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
data["can_breed_virus"] = dish && dish.virus2 && B
if (B)
if (!B.data["virus2"])
B.data["virus2"] = list()
var/list/virus = B.data["virus2"]
for (var/ID in virus)
data["blood_already_infected"] = virus[ID]
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "dish_incubator.tmpl", src.name, 400, 600)
ui.set_initial_data(data)
ui.open()
/obj/machinery/disease2/incubator/process()
if(dish && on && dish.virus2)
@@ -135,34 +94,105 @@
if(!powered(EQUIP))
on = 0
icon_state = "incubator"
if(foodsupply)
if(dish.growth + 3 >= 100 && dish.growth < 100)
ping("\The [src] pings, \"Sufficient viral growth density achieved.\"")
foodsupply -= 1
dish.growth += 3
if(dish.growth >= 100)
state("The [src.name] pings", "blue")
nanomanager.update_uis(src)
if(radiation)
if(radiation > 50 & prob(5))
dish.virus2.majormutate()
if(dish.info)
dish.info = "OUTDATED : [dish.info]"
dish.analysed = 0
state("The [src.name] beeps", "blue")
ping("\The [src] pings, \"Mutant viral strain detected.\"")
else if(prob(5))
dish.virus2.minormutate()
radiation -= 1
nanomanager.update_uis(src)
if(toxins && prob(5))
dish.virus2.infectionchance -= 1
nanomanager.update_uis(src)
if(toxins > 50)
dish.growth = 0
dish.virus2 = null
nanomanager.update_uis(src)
else if(!dish)
on = 0
icon_state = "incubator"
nanomanager.update_uis(src)
if(beaker)
if(!beaker.reagents.remove_reagent("virusfood",5))
foodsupply += 10
if(!beaker.reagents.remove_reagent("toxin",1))
toxins += 1
nanomanager.update_uis(src)
src.updateUsrDialog()
if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list)
for(var/datum/reagent/toxin/T in beaker.reagents.reagent_list)
toxins += max(T.toxpwr,1)
beaker.reagents.remove_reagent(T.id,1)
nanomanager.update_uis(src)
/obj/machinery/disease2/incubator/Topic(href, href_list)
if (..()) return 0
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
if (href_list["close"])
user.unset_machine()
ui.close()
return 0
if (href_list["ejectchem"])
if(beaker)
beaker.loc = src.loc
beaker = null
return 1
if (href_list["power"])
if (dish)
on = !on
icon_state = on ? "incubator_on" : "incubator"
return 1
if (href_list["ejectdish"])
if(dish)
dish.loc = src.loc
dish = null
return 1
if (href_list["rad"])
radiation += 10
return 1
if (href_list["flush"])
radiation = 0
toxins = 0
foodsupply = 0
return 1
if(href_list["virus"])
if (!dish)
return 1
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
if (!B)
return 1
if (!B.data["virus2"])
B.data["virus2"] = list()
var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
B.data["virus2"] += virus
ping("\The [src] pings, \"Injection complete.\"")
return 1
return 0

View File

@@ -22,7 +22,8 @@
if(f.stage == src.stage)
list += f
effect = pick(list)
chance = rand(1,6)
chance = rand(0,effect.chance_maxm)
multiplier = rand(1,effect.maxm)
/datum/disease2/effectholder/proc/minormutate()
switch(pick(1,2,3,4,5))
@@ -47,23 +48,6 @@
proc/activate(var/mob/living/carbon/mob,var/multiplier)
proc/deactivate(var/mob/living/carbon/mob)
////////////////////////SPECIAL/////////////////////////////////
/*/datum/disease2/effect/alien
name = "Unidentified Foreign Body"
stage = 4
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "\red You feel something tearing its way out of your stomach..."
mob.adjustToxLoss(10)
mob.updatehealth()
if(prob(40))
if(mob.client)
mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc)
else
new/mob/living/carbon/alien/larva(mob.loc)
var/datum/disease2/disease/D = mob:virus2
mob:gib()
del D*/
/datum/disease2/effect/invisible
name = "Waiting Syndrome"
stage = 1
@@ -219,7 +203,8 @@
if(istype(mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = mob
var/datum/organ/internal/brain/B = H.internal_organs["brain"]
B.take_damage(5)
if (B.damage < B.min_broken_damage)
B.take_damage(5)
else
mob.setBrainLoss(50)
@@ -334,7 +319,12 @@
name = "Coldingtons Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
if (prob(30))
mob << "<span class='warning'>You feel like you are about to sneeze!</span>"
sleep(5)
mob.say("*sneeze")
for(var/mob/living/carbon/M in get_step(mob,mob.dir))
mob.spread_disease_to(M)
if (prob(50))
var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
M.virus2 = virus_copylist(mob.virus2)

View File

@@ -13,14 +13,19 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
score += 5
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space)) score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood)) score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
score += 20
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
score += 30
if (vector == "Contact")
if(M:gloves) score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
score += 15
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
score += 15
// log_debug("[M]'s resistance to [vector] viruses: [score]")
@@ -47,7 +52,7 @@ proc/airborne_can_reach(turf/source, turf/target)
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
var/rval = (dummy.loc in range(1,target))
var/rval = dummy.Adjacent(target)
dummy.loc = null
dummy = null
return rval
@@ -65,10 +70,18 @@ proc/airborne_can_reach(turf/source, turf/target)
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
if(M.antibodies & disease.antigen != 0)
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (H.species.flags & IS_SYNTHETIC)
if(M.reagents.has_reagent("spaceacillin"))
return
if(istype(M,/mob/living/carbon/monkey))
var/mob/living/carbon/monkey/chimp = M
if (!(chimp.greaterform in disease.affected_species))
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/chump = M
if (!(chump.species.name in disease.affected_species))
return
// log_debug("Infecting [M]")
if(prob(disease.infectionchance) || forced)
@@ -87,14 +100,14 @@ proc/airborne_can_reach(turf/source, turf/target)
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom()
D.infectionchance = 1
M.virus2["[D.uniqueID]"] = D
infect_virus2(M,D,1)
M.hud_updateflag |= 1 << STATUS_HUD
//Infects mob M with random greated disease, if he doesn't have one
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom(1)
M.virus2["[D.uniqueID]"] = D
infect_virus2(M,D,1)
M.hud_updateflag |= 1 << STATUS_HUD
//Fancy prob() function.

View File

@@ -1,97 +1,233 @@
// UI menu navigation
#define HOME "home"
#define LIST "list"
#define ENTRY "entry"
/obj/machinery/disease2/isolator/
name = "Pathogenic Isolator"
density = 1
anchored = 1
icon = 'icons/obj/virology.dmi'
icon_state = "isolator"
var/datum/disease2/disease/virus2 = null
var/isolating = 0
var/beaker = null
var/state = HOME
var/datum/disease2/disease/virus2 = null
var/datum/data/record/entry = null
var/obj/item/weapon/reagent_containers/syringe/sample = null
/obj/machinery/disease2/isolator/attackby(var/W as obj, var/mob/user)
if(!istype(W,/obj/item/weapon/reagent_containers/syringe))
return
var/obj/item/weapon/reagent_containers/syringe/B = W
if(src.beaker)
user << "A syringe is already loaded into the machine."
return
src.beaker = B
user.drop_item()
B.loc = src
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
user << "You add the syringe to the machine!"
src.updateUsrDialog()
icon_state = "isolator_in"
/obj/machinery/disease2/isolator/Topic(href, href_list)
if(..()) return
usr.machine = src
if(!beaker) return
var/datum/reagents/R = beaker:reagents
if (href_list["isolate"])
var/datum/reagent/blood/Blood
for(var/datum/reagent/blood/B in R.reagent_list)
if(B)
Blood = B
break
var/list/virus = virus_copylist(Blood.data["virus2"])
var/choice = text2num(href_list["isolate"]);
for (var/datum/disease2/disease/V in virus)
if (V.uniqueID == choice)
virus2 = virus
isolating = 40
icon_state = "isolator_processing"
src.updateUsrDialog()
return
else if (href_list["main"])
attack_hand(usr)
return
else if (href_list["eject"])
beaker:loc = src.loc
beaker = null
/obj/machinery/disease2/isolator/update_icon()
if (stat & (BROKEN|NOPOWER))
icon_state = "isolator"
src.updateUsrDialog()
return
if (isolating)
icon_state = "isolator_processing"
else if (sample)
icon_state = "isolator_in"
else
icon_state = "isolator"
/obj/machinery/disease2/isolator/attackby(var/obj/O as obj, var/mob/user)
if(!istype(O,/obj/item/weapon/reagent_containers/syringe)) return
var/obj/item/weapon/reagent_containers/syringe/S = O
if(sample)
user << "\The [src] is already loaded."
return
sample = S
user.drop_item()
S.loc = src
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
nanomanager.update_uis(src)
update_icon()
src.attack_hand(user)
/obj/machinery/disease2/isolator/attack_hand(mob/user as mob)
if(stat & BROKEN)
return
user.machine = src
var/dat = ""
if(!beaker)
dat = "Please insert sample into the isolator.<BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
else if(isolating)
dat = "Isolating"
else
var/datum/reagents/R = beaker:reagents
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
if(!R.total_volume)
dat += "[beaker] is empty."
else
dat += "Contained reagents:<BR>"
for(var/datum/reagent/blood/G in R.reagent_list)
if(G.data["virus2"])
var/list/virus = G.data["virus2"]
for (var/datum/disease2/disease/V in virus)
dat += " <br> [G.name]: <A href='?src=\ref[src];isolate=[V.uniqueID]'>Isolate pathogen #[V.uniqueID]</a>"
else
dat += " <b>No pathogen</b>"
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]", "window=isolator;size=575x400")
onclose(user, "isolator")
return
if(stat & (NOPOWER|BROKEN)) return
ui_interact(user)
/obj/machinery/disease2/isolator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
var/data[0]
data["syringe_inserted"] = !!sample
data["isolating"] = isolating
data["pathogen_pool"] = null
data["state"] = state
data["entry"] = entry
data["can_print"] = (state != HOME || sample) && !isolating
switch (state)
if (HOME)
if (sample)
var/list/pathogen_pool[0]
for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
var/list/virus = B.data["virus2"]
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
var/datum/data/record/R = null
if (ID in virusDB)
R = virusDB[ID]
var/mob/living/carbon/human/D = B.data["donor"]
pathogen_pool.Add(list(list(\
"name" = "[D.get_species()] [B.name]", \
"dna" = B.data["blood_DNA"], \
"unique_id" = V.uniqueID, \
"reference" = "\ref[V]", \
"is_in_database" = !!R, \
"record" = "\ref[R]")))
if (pathogen_pool.len > 0)
data["pathogen_pool"] = pathogen_pool
if (LIST)
var/list/db[0]
for (var/ID in virusDB)
var/datum/data/record/r = virusDB[ID]
db.Add(list(list("name" = r.fields["name"], "record" = "\ref[r]")))
if (db.len > 0)
data["database"] = db
if (ENTRY)
if (entry)
var/desc = entry.fields["description"]
data["entry"] = list(\
"name" = entry.fields["name"], \
"description" = replacetext(desc, "\n", ""))
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "pathogenic_isolator.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
ui.open()
/obj/machinery/disease2/isolator/process()
if(isolating > 0)
if (isolating > 0)
isolating -= 1
if(isolating == 0)
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
d.virus2 = virus2.getcopy()
virus2 = null
icon_state = "isolator_in"
if (isolating == 0)
if (virus2)
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
d.virus2 = virus2.getcopy()
virus2 = null
ping("\The [src] pings, \"Viral strain isolated.\"")
nanomanager.update_uis(src)
update_icon()
/obj/machinery/disease2/isolator/Topic(href, href_list)
if (..()) return 0
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
if (href_list["close"])
user.unset_machine()
ui.close()
return 0
if (href_list[HOME])
state = HOME
return 1
if (href_list[LIST])
state = LIST
return 1
if (href_list[ENTRY])
if (istype(locate(href_list["view"]), /datum/data/record))
entry = locate(href_list["view"])
state = ENTRY
return 1
if (href_list["print"])
print(user)
return 1
if(!sample) return 1
if (href_list["isolate"])
var/datum/disease2/disease/V = locate(href_list["isolate"])
if (V)
virus2 = V
isolating = 20
update_icon()
return 1
if (href_list["eject"])
sample.loc = src.loc
sample = null
update_icon()
return 1
/obj/machinery/disease2/isolator/proc/print(var/mob/user)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
switch (state)
if (HOME)
if (!sample) return
P.name = "paper - Patient Diagnostic Report"
P.info = {"
[virology_letterhead("Patient Diagnostic Report")]
<center><small><font color='red'><b>CONFIDENTIAL MEDICAL REPORT</b></font></small></center><br>
<large><u>Sample:</u></large> [sample.name]<br>
"}
if (user)
P.info += "<u>Generated By:</u> [user.name]<br>"
P.info += "<hr>"
for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
var/mob/living/carbon/human/D = B.data["donor"]
P.info += "<large><u>[D.get_species()] [B.name]:</u></large><br>[B.data["blood_DNA"]]<br>"
var/list/virus = B.data["virus2"]
P.info += "<u>Pathogens:</u> <br>"
if (virus.len > 0)
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
P.info += "[V.name()]<br>"
else
P.info += "None<br>"
P.info += {"
<hr>
<u>Additional Notes:</u>&nbsp;
"}
if (LIST)
P.name = "paper - Virus List"
P.info = {"
[virology_letterhead("Virus List")]
"}
var/i = 0
for (var/ID in virusDB)
i++
var/datum/data/record/r = virusDB[ID]
P.info += "[i]. " + r.fields["name"]
P.info += "<br>"
P.info += {"
<hr>
<u>Additional Notes:</u>&nbsp;
"}
if (ENTRY)
P.name = "paper - Viral Profile"
P.info = {"
[virology_letterhead("Viral Profile")]
[entry.fields["description"]]
<hr>
<u>Additional Notes:</u>&nbsp;
"}
state("The nearby computer prints out a report.")

View File

@@ -1,33 +1,42 @@
/obj/machinery/proc/state(var/msg)
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] <span class = 'notice'>[msg]</span>", 2)
///////////////ANTIBODY SCANNER///////////////
/obj/item/device/antibody_scanner
name = "Antibody Scanner"
desc = "Used to scan living beings for antibodies in their blood."
name = "\improper Antibody Scanner"
desc = "Scans living beings for antibodies in their blood."
icon_state = "health"
w_class = 2.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT
/obj/item/device/antibody_scanner/attack(mob/M as mob, mob/user as mob)
if(!istype(M,/mob/living/carbon/))
report("Scan aborted: Incompatible target.", user)
return
/obj/item/device/antibody_scanner/attack(mob/living/carbon/M as mob, mob/user as mob)
if(!istype(M))
user << "<span class='notice'>Incompatible object, scan aborted.</span>"
return
var/mob/living/carbon/C = M
if (istype(C,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = C
if(H.species && H.species.flags & NO_BLOOD)
report("Scan aborted: The target does not have blood.", user)
return
if(!C.antibodies)
user << "<span class='notice'>Unable to detect antibodies.</span>"
report("Scan Complete: No antibodies detected.", user)
return
var/code = antigens2string(M.antibodies)
user << "<span class='notice'>[src] The antibody scanner displays a cryptic set of data: [code]</span>"
if (CLUMSY in user.mutations && prob(50))
// I was tempted to be really evil and rot13 the output.
report("Antibodies detected: [reverse_text(antigens2string(C.antibodies))]", user)
else
report("Antibodies detected: [antigens2string(C.antibodies)]", user)
/obj/item/device/antibody_scanner/proc/report(var/text, mob/user as mob)
user << "\blue \icon[src] \The [src] beeps, \"[text]\""
///////////////VIRUS DISH///////////////
/obj/item/weapon/virusdish
name = "Virus containment/growth dish"
name = "virus containment/growth dish"
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
var/datum/disease2/disease/virus2 = null
@@ -35,10 +44,8 @@
var/info = 0
var/analysed = 0
reagents = list()
/obj/item/weapon/virusdish/random
name = "Virus Sample"
name = "virus sample"
/obj/item/weapon/virusdish/random/New()
..()
@@ -51,7 +58,7 @@
return
..()
if(prob(50))
user << "The dish shatters"
user << "\The [src] shatters!"
if(virus2.infectionchance > 0)
for(var/mob/living/carbon/target in view(1, get_turf(src)))
if(airborne_can_reach(get_turf(src), get_turf(target)))
@@ -60,22 +67,38 @@
del src
/obj/item/weapon/virusdish/examine()
usr << "This is a virus containment dish"
usr << "This is a virus containment dish."
if(src.info)
usr << "It has the following information about its contents"
usr << "It has the following information about its contents:"
usr << src.info
/obj/item/weapon/ruinedvirusdish
name = "ruined virus sample"
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
desc = "The bacteria in the dish are completely dead."
/obj/item/weapon/ruinedvirusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
return ..()
if(prob(50))
user << "\The [src] shatters!"
del src
///////////////GNA DISK///////////////
/obj/item/weapon/diseasedisk
name = "Blank GNA disk"
name = "blank GNA disk"
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk0"
var/datum/disease2/effectholder/effect = null
var/list/species = null
var/stage = 1
var/analysed = 1
/obj/item/weapon/diseasedisk/premade/New()
name = "Blank GNA disk (stage: [5-stage])"
name = "blank GNA disk (stage: [stage])"
effect = new /datum/disease2/effectholder
effect.effect = new /datum/disease2/effect/invisible
effect.stage = stage
effect.stage = stage