Merge branch 'master' of https://github.com/tgstation/-tg-station into warnstandardization

Conflicts:
	code/_onclick/telekinesis.dm
This commit is contained in:
Miauw
2014-04-08 14:29:58 +02:00
172 changed files with 15844 additions and 4189 deletions
+1 -5
View File
@@ -566,11 +566,7 @@ var/global/floorIsLava = 0
set category = "Server"
set desc="Toggle dis bitch"
set name="Toggle OOC"
ooc_allowed = !( ooc_allowed )
if (ooc_allowed)
world << "<B>The OOC channel has been globally enabled!</B>"
else
world << "<B>The OOC channel has been globally disabled!</B>"
toggle_ooc()
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+22 -19
View File
@@ -3,7 +3,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
/datum/admin_rank
var/name = "NoRank"
var/rights = 0
var/list/adds
var/list/adds
var/list/subs
/datum/admin_rank/New(init_name, init_rights, list/init_adds, list/init_subs)
@@ -74,7 +74,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
next = findchar(line, "+-", prev+1, 0)
R.process_keyword(copytext(line, prev, next), previous_rights)
prev = next
previous_rights = R.rights
else
establish_db_connection()
@@ -117,7 +117,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/list/rank_names = list()
for(var/datum/admin_rank/R in admin_ranks)
rank_names[R.name] = R
if(config.admin_legacy_system)
//load text from file
var/list/Lines = file2list("config/admins.txt")
@@ -158,7 +158,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
while(query.NextRow())
var/ckey = ckey(query.item[1])
var/rank = ckeyEx(query.item[2])
var/datum/admins/D = new(rank, ckey) //create the admin datum and store it for later use
if(rank_names[rank] == null)
error("Admin rank ([rank]) does not exist.")
continue
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D) continue //will occur if an invalid rank is provided
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
@@ -214,7 +217,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
return
var/datum/admins/D = admin_datums[adm_ckey]
switch(task)
if("remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
@@ -228,57 +231,57 @@ var/list/admin_ranks = list() //list of all admin_rank datums
if("rank")
var/datum/admin_rank/R
var/list/rank_names = list("*New Rank*")
for(R in admin_ranks)
rank_names[R.name] = R
var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names
switch(new_rank)
if(null) return
if("*New Rank*")
new_rank = ckeyEx(input("Please input a new rank", "New custom rank", null, null) as null|text)
if(!new_rank) return
R = rank_names[new_rank]
if(!R) //rank with that name doesn't exist yet - make it
if(D) R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
else R = new(new_rank) //blank new admin_rank
admin_ranks += R
if(D) //they were previously an admin
D.disassociate() //existing admin needs to be disassociated
D.rank = R //set the admin_rank as our rank
else
D = new(R,adm_ckey) //new admin
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin_rank_modification(adm_ckey, new_rank)
if("permissions")
if(!D) return //they're not an admin!
var/keyword = input("Input permission keyword (one at a time):\ne.g. +BAN or -FUN or +/client/proc/someverb", "Permission toggle", null, null) as null|text
if(!keyword) return
D.disassociate()
if(!findtext(D.rank.name, "([adm_ckey])")) //not a modified subrank, need to duplicate the admin_rank datum to prevent modifying others too
D.rank = new("[D.rank.name]([adm_ckey])", D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
//we don't add this clone to the admin_ranks list, as it is unique to that ckey
D.rank.process_keyword(keyword)
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
log_admin("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
log_admin_permission_modification(adm_ckey, D.rank.rights)
edit_admin_permissions()
+24
View File
@@ -626,6 +626,8 @@ var/global/list/g_fancy_list_of_safe_types = null
"tournament gangster",
"tournament chef",
"tournament janitor",
"lasertag red",
"lasertag blue",
"pirate",
"space pirate",
"soviet admiral",
@@ -745,6 +747,28 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
if ("lasertag red")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/red(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/red(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/redtaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/redtag(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/redtag(M), slot_s_store)
if ("lasertag blue")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/blue(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/blue(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/bluetaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/bluetag(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/bluetag(M), slot_s_store)
if ("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
+15 -51
View File
@@ -1,17 +1,28 @@
#define SOUND_CHANNEL_ADMIN 777
var/sound/admin_sound
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
if(!check_rights(R_SOUNDS)) return
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
uploaded_sound.priority = 250
admin_sound = sound(S, repeat = 0, wait = 1, channel = SOUND_CHANNEL_ADMIN)
admin_sound.priority = 250
admin_sound.status = SOUND_UPDATE|SOUND_STREAM
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
if(events.holiday == "April Fool's Day")
admin_sound.frequency = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
src << "You feel the Honkmother messing with your song..."
for(var/mob/M in player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
M << uploaded_sound
M << admin_sound
admin_sound.frequency = 1 //Remove this line when the AFD stuff above is gone
admin_sound.wait = 0
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -39,51 +50,4 @@
else
return
/*
/client/proc/cuban_pete()
set category = "Fun"
set name = "Cuban Pete Time"
message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'cubanpetetime.ogg'
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
CP.gib()
/client/proc/bananaphone()
set category = "Fun"
set name = "Banana Phone"
message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'bananaphone.ogg'
client/proc/space_asshole()
set category = "Fun"
set name = "Space Asshole"
message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'space_asshole.ogg'
client/proc/honk_theme()
set category = "Fun"
set name = "Honk"
message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'honk_theme.ogg'*/
#undef SOUND_CHANNEL_ADMIN
+6 -3
View File
@@ -79,11 +79,14 @@
prefs.save_preferences()
if(prefs.toggles & SOUND_MIDI)
src << "You will now hear any sounds uploaded by admins."
if(admin_sound)
src << admin_sound
else
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
break_sound.priority = 250
src << break_sound //breaks the client's sound output on channel 777
src << "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
if(admin_sound && !(admin_sound.status & SOUND_PAUSED))
admin_sound.status |= SOUND_PAUSED
src << admin_sound
admin_sound.status ^= SOUND_PAUSED
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/listen_ooc()
+1
View File
@@ -76,6 +76,7 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/masks.dmi'
body_parts_covered = HEAD
slot_flags = SLOT_MASK
var/alloweat = 0
//Override this to modify speech like luchador masks.
+3 -3
View File
@@ -46,9 +46,9 @@
icon_state = "nursehat"
/obj/item/clothing/head/syndicatefake
name = "red space-helmet replica"
icon_state = "syndicate"
item_state = "syndicate"
name = "black space-helmet replica"
icon_state = "syndicate-helm-black-red"
item_state = "syndicate-helm-black-red"
desc = "A plastic replica of a syndicate agent's space helmet, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!"
flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
+22
View File
@@ -224,30 +224,51 @@
/obj/item/clothing/mask/gas/clown_hat
name = "clown wig and mask"
desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask."
alloweat = 1
icon_state = "clown"
item_state = "clown_hat"
obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user)
var/mob/M = usr
var/list/options = list()
options["True Form"] = "clown"
options["The Feminist"] = "sexyclown"
options["The Madman"] = "joker"
options["The Rainbow Color"] ="rainbow"
var/choice = input(M,"To what form do you wish to Morph this mask?","Morph Mask") in options
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
M << "Your Clown Mask has now morphed into [choice], all praise the Honk Mother!"
return 1
/obj/item/clothing/mask/gas/sexyclown
name = "sexy-clown wig and mask"
desc = "A feminine clown mask for the dabbling crossdressers or female entertainers."
alloweat = 1
icon_state = "sexyclown"
item_state = "sexyclown"
/obj/item/clothing/mask/gas/mime
name = "mime mask"
desc = "The traditional mime's mask. It has an eerie facial posture."
alloweat = 1
icon_state = "mime"
item_state = "mime"
/obj/item/clothing/mask/gas/monkeymask
name = "monkey mask"
desc = "A mask used when acting as a monkey."
alloweat = 1
icon_state = "monkeymask"
item_state = "monkeymask"
/obj/item/clothing/mask/gas/sexymime
name = "sexy mime mask"
desc = "A traditional female mime's mask."
alloweat = 1
icon_state = "sexymime"
item_state = "sexymime"
@@ -264,4 +285,5 @@
/obj/item/clothing/mask/gas/owl_mask
name = "owl mask"
desc = "Twoooo!"
alloweat = 1
icon_state = "owl"
+22 -22
View File
@@ -20,131 +20,131 @@
//Green syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/green
name = "Green Space Helmet"
name = "green space helmet"
icon_state = "syndicate-helm-green"
item_state = "syndicate-helm-green"
/obj/item/clothing/suit/space/syndicate/green
name = "Green Space Suit"
name = "green space suit"
icon_state = "syndicate-green"
item_state = "syndicate-green"
//Dark green syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/green/dark
name = "Dark Green Space Helmet"
name = "dark green space helmet"
icon_state = "syndicate-helm-green-dark"
item_state = "syndicate-helm-green-dark"
/obj/item/clothing/suit/space/syndicate/green/dark
name = "Dark Green Space Suit"
name = "dark green space suit"
icon_state = "syndicate-green-dark"
item_state = "syndicate-green-dark"
//Orange syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/orange
name = "Orange Space Helmet"
name = "orange space helmet"
icon_state = "syndicate-helm-orange"
item_state = "syndicate-helm-orange"
/obj/item/clothing/suit/space/syndicate/orange
name = "Orange Space Suit"
name = "orange space suit"
icon_state = "syndicate-orange"
item_state = "syndicate-orange"
//Blue syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/blue
name = "Blue Space Helmet"
name = "blue space helmet"
icon_state = "syndicate-helm-blue"
item_state = "syndicate-helm-blue"
/obj/item/clothing/suit/space/syndicate/blue
name = "Blue Space Suit"
name = "blue space suit"
icon_state = "syndicate-blue"
item_state = "syndicate-blue"
//Black syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black"
item_state = "syndicate-helm-black"
/obj/item/clothing/suit/space/syndicate/black
name = "Black Space Suit"
name = "black space suit"
icon_state = "syndicate-black"
item_state = "syndicate-black"
//Black-green syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/green
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-green"
item_state = "syndicate-helm-black-green"
/obj/item/clothing/suit/space/syndicate/black/green
name = "Black and Green Space Suit"
name = "black and green space suit"
icon_state = "syndicate-black-green"
item_state = "syndicate-black-green"
//Black-blue syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/blue
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-blue"
item_state = "syndicate-helm-black-blue"
/obj/item/clothing/suit/space/syndicate/black/blue
name = "Black and Blue Space Suit"
name = "black and blue space suit"
icon_state = "syndicate-black-blue"
item_state = "syndicate-black-blue"
//Black medical syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/med
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-med"
item_state = "syndicate-helm-black"
/obj/item/clothing/suit/space/syndicate/black/med
name = "Green Space Suit"
name = "green space suit"
icon_state = "syndicate-black-med"
item_state = "syndicate-black"
//Black-orange syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/orange
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-orange"
item_state = "syndicate-helm-black"
/obj/item/clothing/suit/space/syndicate/black/orange
name = "Black and Orange Space Suit"
name = "black and orange space suit"
icon_state = "syndicate-black-orange"
item_state = "syndicate-black"
//Black-red syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/red
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-red"
item_state = "syndicate-helm-black-red"
/obj/item/clothing/suit/space/syndicate/black/red
name = "Black and Red Space Suit"
name = "black and red space suit"
icon_state = "syndicate-black-red"
item_state = "syndicate-black-red"
//Black with yellow/red engineering syndicate space suit
/obj/item/clothing/head/helmet/space/syndicate/black/engie
name = "Black Space Helmet"
name = "black space helmet"
icon_state = "syndicate-helm-black-engie"
item_state = "syndicate-helm-black"
/obj/item/clothing/suit/space/syndicate/black/engie
name = "Black Engineering Space Suit"
name = "black engineering space suit"
icon_state = "syndicate-black-engie"
item_state = "syndicate-black"
+1 -1
View File
@@ -1,6 +1,6 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight/seclite)
body_parts_covered = CHEST
cold_protection = CHEST|GROIN
+3 -3
View File
@@ -95,9 +95,9 @@
/obj/item/clothing/suit/syndicatefake
name = "red space suit replica"
icon_state = "syndicate"
item_state = "space_suit_syndicate"
name = "black and red space suit replica"
icon_state = "syndicate-black-red"
item_state = "syndicate-black-red"
desc = "A plastic replica of the syndicate space suit, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!"
w_class = 3
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy)
+7 -4
View File
@@ -60,15 +60,18 @@
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)
return
if(usr.stat != CONSCIOUS)
return
if(icon_state == "psyche")
usr << "\red Your suit is malfunctioning"
return
desc = null
permeability_coefficient = 0.90
-1
View File
@@ -51,7 +51,6 @@
desc = "It looks highly unstable; It could close at any moment."
icon = 'icons/obj/objects.dmi'
icon_state = "anom"
failchance = 0
/obj/effect/portal/wormhole/attack_hand(mob/user)
teleport(user)
+1
View File
@@ -54,6 +54,7 @@
var/obj/item/weapon/reagent_containers/food/snacks/burger/human/HB = ..(container)
HB.name = human_name+HB.name
HB.job = human_job
return HB
reagents = list("flour" = 5)
items = list(
+4 -3
View File
@@ -52,11 +52,12 @@
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass) && !panel_open)
if(beaker)
user << "<span class='warning'>The biogenerator already occuped.</span>"
user << "<span class='warning'>A container is already loaded into the machine.</span>"
else
user.unEquip(O)
O.loc = src
beaker = O
user << "<span class='notice'>You add the container to the machine.</span>"
updateUsrDialog()
else if(processing)
user << "<span class='warning'>The biogenerator is currently processing.</span>"
@@ -152,7 +153,7 @@
dat += "Leather Satchel: <A href='?src=\ref[src];action=create;item=satchel'>Make</A> ([400/efficiency])<BR>"
dat += "</div>"
else
dat += "<div class='statusDisplay'>No beaker inside, please insert beaker.</div>"
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
var/datum/browser/popup = new(user, "biogen", name, 350, 520)
popup.set_content(dat)
@@ -293,4 +294,4 @@
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
updateUsrDialog()
File diff suppressed because it is too large Load Diff
+25 -17
View File
@@ -16,12 +16,11 @@
var/potency = 20
var/plant_type = 0
/obj/item/weapon/grown/New(newloc,newpotency)
if (!isnull(newpotency))
potency = newpotency
/obj/item/weapon/grown/New(newloc, potency = 50)
..()
pixel_x = rand(-5.0, 5)
pixel_y = rand(-5.0, 5)
src.potency = potency
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
transform *= TransformUsingVariable(potency, 100, 0.5)
@@ -53,7 +52,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat)
New(var/loc, var/potency = 10)
..()
/obj/item/weapon/grown/log/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -96,7 +97,10 @@
throw_speed = 1
throw_range = 3
plant_type = 0
seed = "/obj/item/seeds/sunflower"
seed = "/obj/item/seeds/sunflowerseed"
New(var/loc, var/potency = 10)
..()
/obj/item/weapon/grown/novaflower
name = "novaflower"
@@ -111,14 +115,14 @@
throw_speed = 1
throw_range = 3
plant_type = 0
seed = "/obj/item/seeds/novaflower"
seed = "/obj/item/seeds/novaflowerseed"
attack_verb = list("seared", "heated", "whacked", "steamed")
New()
New(var/loc, var/potency = 10)
..()
spawn(5) //So potency can be set in the proc that creates these crops
if(reagents)
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("capsaicin", round(potency, 1))
force = round((5+potency/5), 1)
force = round((5+potency/5), 1)
/obj/item/weapon/grown/nettle // -- Skie
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
@@ -135,12 +139,12 @@
plant_type = 1
origin_tech = "combat=1"
seed = "/obj/item/seeds/nettleseed"
New()
New(var/loc, var/potency = 10)
..()
spawn(5) //So potency can be set in the proc that creates these crops
if(reagents)
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("sacid", round(potency, 1))
force = round((5+potency/5), 1)
force = round((5+potency/5), 1)
/obj/item/weapon/grown/deathnettle // -- Skie
desc = "The \red glowing \black nettle incites \red<B> rage</B>\black in you just from looking at it!"
@@ -158,12 +162,12 @@
seed = "/obj/item/seeds/deathnettleseed"
origin_tech = "combat=3"
attack_verb = list("stung")
New()
New(var/loc, var/potency = 10)
..()
spawn(5) //So potency can be set in the proc that creates these crops
if(reagents)
reagents.add_reagent("nutriment", 1)
reagents.add_reagent("pacid", round(potency, 1))
force = round((5+potency/2.5), 1)
force = round((5+potency/2.5), 1)
suicide_act(mob/user)
viewers(user) << "<span class='suicide'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>"
@@ -179,6 +183,8 @@
throwforce = 0
throw_speed = 3
throw_range = 7
New(var/loc, var/potency = 10)
..()
/obj/item/weapon/grown/corncob
name = "corn cob"
@@ -190,3 +196,5 @@
throwforce = 0
throw_speed = 3
throw_range = 7
New(var/loc, var/potency = 10)
..()
+3 -5
View File
@@ -96,7 +96,7 @@
icon_state = "bottle16"
New()
..()
reagents.add_reagent("nutriment", 30)
reagents.add_reagent("eznutriment", 30)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z
name = "bottle of Left 4 Zed"
@@ -104,8 +104,7 @@
icon_state = "bottle18"
New()
..()
reagents.add_reagent("nutriment", 28)
reagents.add_reagent("radium", 2)
reagents.add_reagent("left4zednutriment", 30)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh
name = "bottle of Robust Harvest"
@@ -113,5 +112,4 @@
icon_state = "bottle15"
New()
..()
reagents.add_reagent("nutriment", 20)
reagents.add_reagent("diethylamine", 10)
reagents.add_reagent("robustharvestnutriment", 30)
+219 -198
View File
@@ -10,6 +10,8 @@
var/maxnutri = 10 //The maximum nutrient of water in the tray
var/pestlevel = 0 //The amount of pests in the tray (max 10)
var/weedlevel = 0 //The amount of weeds in the tray (max 10)
var/yieldmod = 1 //Nutriment's effect on yield
var/mutmod = 1 //Nutriment's effect on mutations
var/toxic = 0 //Toxicity in the tray?
var/age = 0 //Current age
var/dead = 0 //Is it dead?
@@ -178,13 +180,7 @@ obj/machinery/hydroponics/process()
// Harvest code
if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead))
if(prob(85))
mutate()
else if(prob(30))
hardmutate()
else if(prob(5))
mutatespecie()
nutrimentMutation()
if(myseed && myseed.yield != -1) // Unharvestable shouldn't be harvested
harvest = 1
else
@@ -208,7 +204,24 @@ obj/machinery/hydroponics/process()
update_icon()
return
obj/machinery/hydroponics/proc/nutrimentMutation()
if (mutmod == 0)
return
if (mutmod == 1)
if(prob(80)) //80%
mutate()
else if(prob(75)) //15%
hardmutate()
return
if (mutmod == 2)
if(prob(50)) //50%
mutate()
else if(prob(75)) //37.5%
hardmutate()
else if(prob(10)) //1/80
mutatespecie()
return
return
obj/machinery/hydroponics/update_icon()
@@ -386,6 +399,176 @@ obj/machinery/hydroponics/proc/mutatepest()
else
usr << "The pests seem to behave oddly, but quickly settle down..."
obj/machinery/hydroponics/proc/applyChemicals(var/datum/reagents/S)
// Requires 5 mutagen to possibly change species.// Poor man's mutagen.
if(S.has_reagent("mutagen", 5) || S.has_reagent("radium", 10) || S.has_reagent("uranium", 10))
switch(rand(100))
if(91 to 100) plantdies()
if(81 to 90) mutatespecie()
if(66 to 80) hardmutate()
if(41 to 65) mutate()
if(21 to 41) usr << "The plants don't seem to react..."
if(11 to 20) mutateweed()
if(1 to 10) mutatepest()
else usr << "Nothing happens..."
// 2 or 1 units is enough to change the yield and other stats.// Can change the yield and other stats, but requires more than mutagen
else if(S.has_reagent("mutagen", 2) || S.has_reagent("radium", 5) || S.has_reagent("uranium", 5))
hardmutate()
else if(S.has_reagent("mutagen", 1) || S.has_reagent("radium", 2) || S.has_reagent("uranium", 2))
mutate()
// After handling the mutating, we now handle the damage from adding crude radioactives...
if(S.has_reagent("uranium", 1))
adjustHealth(-round(S.get_reagent_amount("uranium")*1))
adjustToxic(round(S.get_reagent_amount("uranium")*2))
if(S.has_reagent("radium", 1))
adjustHealth(-round(S.get_reagent_amount("radium")*1))
adjustToxic(round(S.get_reagent_amount("radium")*3)) // Radium is harsher (OOC: also easier to produce)
// Nutriments
if(S.has_reagent("eznutriment", 1))
yieldmod = 1
mutmod = 1
adjustNutri(round(S.get_reagent_amount("eznutriment")*1))
if(S.has_reagent("left4zednutriment", 1))
yieldmod = 0
mutmod = 2
adjustNutri(round(S.get_reagent_amount("left4zednutriment")*1))
if(S.has_reagent("robustharvestnutriment", 1))
yieldmod = 2
mutmod = 0
adjustNutri(round(S.get_reagent_amount("robustharvestnutriment")*1))
// Antitoxin binds shit pretty well. So the tox goes significantly down
if(S.has_reagent("anti_toxin", 1))
adjustToxic(-round(S.get_reagent_amount("anti_toxin")*2))
// NIGGA, YOU JUST WENT ON FULL RETARD.
if(S.has_reagent("toxin", 1))
adjustToxic(round(S.get_reagent_amount("toxin")*2))
// Milk is good for humans, but bad for plants. The sugars canot be used by plants, and the milk fat fucks up growth. Not shrooms though. I can't deal with this now...
if(S.has_reagent("milk", 1))
adjustNutri(round(S.get_reagent_amount("milk")*0.1))
adjustWater(round(S.get_reagent_amount("milk")*0.9))
// Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay?
if(S.has_reagent("beer", 1))
adjustHealth(-round(S.get_reagent_amount("beer")*0.05))
adjustNutri(round(S.get_reagent_amount("beer")*0.25))
adjustWater(round(S.get_reagent_amount("beer")*0.7))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("fluorine", 1))
adjustHealth(-round(S.get_reagent_amount("fluorine")*2))
adjustToxic(round(S.get_reagent_amount("flourine")*2.5))
adjustWater(-round(S.get_reagent_amount("flourine")*0.5))
adjustWeeds(-rand(1,4))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("chlorine", 1))
adjustHealth(-round(S.get_reagent_amount("chlorine")*1))
adjustToxic(round(S.get_reagent_amount("chlorine")*1.5))
adjustWater(-round(S.get_reagent_amount("chlorine")*0.5))
adjustWeeds(-rand(1,3))
// White Phosphorous + water -> phosphoric acid. That's not a good thing really. Phosphoric salts are beneficial though. And even if the plant suffers, in the long run the tray gets some nutrients. The benefit isn't worth that much.
if(S.has_reagent("phosphorus", 1))
adjustHealth(-round(S.get_reagent_amount("phosphorus")*0.75))
adjustNutri(round(S.get_reagent_amount("phosphorus")*0.1))
adjustWater(-round(S.get_reagent_amount("phosphorus")*0.5))
adjustWeeds(-rand(1,2))
// Plants should not have sugar, they can't use it and it prevents them getting water/ nutients, it is good for mold though...
if(S.has_reagent("sugar", 1))
adjustWeeds(rand(1,2))
adjustPests(rand(1,2))
adjustNutri(round(S.get_reagent_amount("sugar")*0.1))
// It is water!
if(S.has_reagent("water", 1))
adjustWater(round(S.get_reagent_amount("water")*1))
// Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits~
if(S.has_reagent("holywater", 1))
adjustWater(round(S.get_reagent_amount("holywater")*1))
adjustHealth(round(S.get_reagent_amount("holywater")*0.1))
// A variety of nutrients are dissolved in club soda, without sugar. These nutrients include carbon, oxygen, hydrogen, phosphorous, potassium, sulfur and sodium, all of which are needed for healthy plant growth.
if(S.has_reagent("sodawater", 1))
adjustWater(round(S.get_reagent_amount("sodawater")*1))
adjustHealth(round(S.get_reagent_amount("sodawater")*0.1))
adjustNutri(round(S.get_reagent_amount("sodawater")*0.1))
// Man, you guys are retards
if(S.has_reagent("sacid", 1))
adjustHealth(-round(S.get_reagent_amount("sacid")*1))
adjustToxic(round(S.get_reagent_amount("sacid")*1.5))
adjustWeeds(-rand(1,2))
// SERIOUSLY
if(S.has_reagent("pacid", 1))
adjustHealth(-round(S.get_reagent_amount("pacid")*2))
adjustToxic(round(S.get_reagent_amount("pacid")*3))
adjustWeeds(-rand(1,4))
// Plant-B-Gone is just as bad
if(S.has_reagent("plantbgone", 1))
adjustHealth(-round(S.get_reagent_amount("plantbgone")*2))
adjustToxic(-round(S.get_reagent_amount("plantbgone")*3))
adjustWeeds(-rand(4,8))
//Weed Spray
if(S.has_reagent("weedkiller", 1))
adjustToxic(round(S.get_reagent_amount("weedkiller")*0.5))
//old toxicity was 4, each spray is default 10 (minimal of 5) so 5 and 2.5 are the new ammounts
adjustWeeds(-rand(1,2))
//Pest Spray
if(S.has_reagent("pestkiller", 1))
adjustToxic(round(S.get_reagent_amount("pestkiller")*0.5))
adjustPests(-rand(1,2))
// Healing
if(S.has_reagent("cryoxadone", 1))
adjustHealth(round(S.get_reagent_amount("cryoxadone")*3))
adjustToxic(-round(S.get_reagent_amount("cryoxadone")*3))
// Ammonia is bad ass.
if(S.has_reagent("ammonia", 1))
adjustHealth(round(S.get_reagent_amount("ammonia")*0.5))
adjustNutri(round(S.get_reagent_amount("ammonia")*1))
adjustSYield(round(S.get_reagent_amount("ammonia")*0.01))
// This is more bad ass, and pests get hurt by the corrosive nature of it, not the plant.
if(S.has_reagent("diethylamine", 1))
adjustHealth(round(S.get_reagent_amount("diethylamine")*1))
adjustNutri(round(S.get_reagent_amount("diethylamine")*2))
adjustSYield(round(S.get_reagent_amount("diethylamine")*0.02))
adjustPests(-rand(1,2))
// Compost, effectively
if(S.has_reagent("nutriment", 1))
adjustHealth(round(S.get_reagent_amount("nutriment")*0.5))
adjustNutri(round(S.get_reagent_amount("nutriment")*1))
// The best stuff there is. For testing/debugging.
if(S.has_reagent("adminordrazine", 1))
adjustWater(round(S.get_reagent_amount("adminordrazine")*1))
adjustHealth(round(S.get_reagent_amount("adminordrazine")*1))
adjustNutri(round(S.get_reagent_amount("adminordrazine")*1))
adjustPests(-rand(1,5))
adjustWeeds(-rand(1,5))
if(S.has_reagent("adminordrazine", 5))
switch(rand(100))
if(66 to 100) mutatespecie()
if(33 to 65) mutateweed()
if(1 to 32) mutatepest()
else usr << "Nothing happens..."
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -396,7 +579,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(reagent_source, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/syr = reagent_source
if(syr.mode != 1)
user << "You can't get any extract out of this plant."
user << "You can't get any extract out of this plant." //That. Gives me an idea...
return
if(!reagent_source.reagents.total_volume)
@@ -406,6 +589,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/list/trays = list(src)//makes the list just this in cases of syringes and compost etc
var/target = myseed ? myseed.plantname : src
var/visi_msg = ""
var/irrigate = 0 //How am I supposed to irrigate pill contents?
if(istype(reagent_source, /obj/item/weapon/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/weapon/reagent_containers/pill))
visi_msg="[user] composts [reagent_source], spreading it through [target]"
@@ -419,15 +603,18 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else if(istype(reagent_source, /obj/item/weapon/reagent_containers/spray/))
visi_msg="[user] sprays [target] with [reagent_source]"
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
irrigate = 1
else if(reagent_source.amount_per_transfer_from_this) // Droppers, cans, beakers, what have you.
visi_msg="[user] uses [reagent_source] on [target]"
irrigate = 1
// Beakers, bottles, buckets, etc. Can't use is_open_container though.
if(istype(reagent_source, /obj/item/weapon/reagent_containers/glass/))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
if(reagent_source.amount_per_transfer_from_this>30 && reagent_source.reagents.total_volume>=reagent_source.amount_per_transfer_from_this)
trays=FindConnected()
visi_msg+=" setting off the irrigation system"
if(irrigate && reagent_source.amount_per_transfer_from_this > 30 && reagent_source.reagents.total_volume >= reagent_source.amount_per_transfer_from_this)
trays = FindConnected()
if (trays.len > 1)
visi_msg += " setting off the irrigation system"
if(visi_msg)
visible_message("<span class='notice'>[visi_msg].</span>")
@@ -444,185 +631,14 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(reagent_source, /obj/item/weapon/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/weapon/reagent_containers/pill))
qdel(reagent_source)
// Requires 5 mutagen to possibly change species.
if(S.has_reagent("mutagen", 5))
switch(rand(100))
if(91 to 100) H.plantdies()
if(81 to 90) H.mutatespecie()
if(66 to 80) H.hardmutate()
if(41 to 65) H.mutate()
if(21 to 41) user << "The plants don't seem to react..."
if(11 to 20) H.mutateweed()
if(1 to 10) H.mutatepest()
else user << "Nothing happens..."
// 2 or 1 units is enough to change the yield and other stats.
else if(S.has_reagent("mutagen", 2))
H.hardmutate()
else if(S.has_reagent("mutagen", 1))
H.mutate()
// Antitoxin binds shit pretty well. So the tox goes significantly down
if(S.has_reagent("anti_toxin", 1))
H.adjustToxic(-round(S.get_reagent_amount("anti_toxin")*2))
// NIGGA, YOU JUST WENT ON FULL RETARD.
if(S.has_reagent("toxin", 1))
H.adjustToxic(round(S.get_reagent_amount("toxin")*2))
// Milk is good for humans, but bad for plants. The sugars canot be used by plants, and the milk fat fucks up growth. Not shrooms though. I can't deal with this now...
if(S.has_reagent("milk", 1))
H.adjustNutri(round(S.get_reagent_amount("milk")*0.1))
H.adjustWater(round(S.get_reagent_amount("milk")*0.9))
// Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay?
if(S.has_reagent("beer", 1))
H.adjustHealth(-round(S.get_reagent_amount("beer")*0.05))
H.adjustNutri(round(S.get_reagent_amount("beer")*0.25))
H.adjustWater(round(S.get_reagent_amount("beer")*0.7))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("fluorine", 1))
H.adjustHealth(-round(S.get_reagent_amount("fluorine")*2))
H.adjustToxic(round(S.get_reagent_amount("flourine")*2.5))
H.adjustWater(-round(S.get_reagent_amount("flourine")*0.5))
H.adjustWeeds(-rand(1,4))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("chlorine", 1))
H.adjustHealth(-round(S.get_reagent_amount("chlorine")*1))
H.adjustToxic(round(S.get_reagent_amount("chlorine")*1.5))
H.adjustWater(-round(S.get_reagent_amount("chlorine")*0.5))
H.adjustWeeds(-rand(1,3))
// White Phosphorous + water -> phosphoric acid. That's not a good thing really. Phosphoric salts are beneficial though. And even if the plant suffers, in the long run the tray gets some nutrients. The benefit isn't worth that much.
if(S.has_reagent("phosphorus", 1))
H.adjustHealth(-round(S.get_reagent_amount("phosphorus")*0.75))
H.adjustNutri(round(S.get_reagent_amount("phosphorus")*0.1))
H.adjustWater(-round(S.get_reagent_amount("phosphorus")*0.5))
H.adjustWeeds(-rand(1,2))
// Plants should not have sugar, they can't use it and it prevents them getting water/ nutients, it is good for mold though...
if(S.has_reagent("sugar", 1))
H.adjustWeeds(rand(1,2))
H.adjustPests(rand(1,2))
H.adjustNutri(round(S.get_reagent_amount("sugar")*0.1))
// It is water!
if(S.has_reagent("water", 1))
H.adjustWater(round(S.get_reagent_amount("water")*1))
// Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits~
if(S.has_reagent("holywater", 1))
H.adjustWater(round(S.get_reagent_amount("holywater")*1))
H.adjustHealth(round(S.get_reagent_amount("holywater")*0.1))
// A variety of nutrients are dissolved in club soda, without sugar. These nutrients include carbon, oxygen, hydrogen, phosphorous, potassium, sulfur and sodium, all of which are needed for healthy plant growth.
if(S.has_reagent("sodawater", 1))
H.adjustWater(round(S.get_reagent_amount("sodawater")*1))
H.adjustHealth(round(S.get_reagent_amount("sodawater")*0.1))
H.adjustNutri(round(S.get_reagent_amount("sodawater")*0.1))
// Man, you guys are retards
if(S.has_reagent("sacid", 1))
H.adjustHealth(-round(S.get_reagent_amount("sacid")*1))
H.adjustToxic(round(S.get_reagent_amount("sacid")*1.5))
H.adjustWeeds(-rand(1,2))
// SERIOUSLY
if(S.has_reagent("pacid", 1))
H.adjustHealth(-round(S.get_reagent_amount("pacid")*2))
H.adjustToxic(round(S.get_reagent_amount("pacid")*3))
H.adjustWeeds(-rand(1,4))
// Plant-B-Gone is just as bad
if(S.has_reagent("plantbgone", 1))
H.adjustHealth(-round(S.get_reagent_amount("plantbgone")*2))
H.adjustToxic(-round(S.get_reagent_amount("plantbgone")*3))
H.adjustWeeds(-rand(4,8))
//Weed Spray
if(S.has_reagent("weedkiller", 1))
H.adjustToxic(round(S.get_reagent_amount("weedkiller")*0.5))
//old toxicity was 4, each spray is default 10 (minimal of 5) so 5 and 2.5 are the new ammounts
H.adjustWeeds(-rand(1,2))
//Pest Spray
if(S.has_reagent("pestkiller", 1))
H.adjustToxic(round(S.get_reagent_amount("pestkiller")*0.5))
H.adjustPests(-rand(1,2))
// Healing
if(S.has_reagent("cryoxadone", 1))
H.adjustHealth(round(S.get_reagent_amount("cryoxadone")*3))
H.adjustToxic(-round(S.get_reagent_amount("cryoxadone")*3))
// Ammonia is bad ass.
if(S.has_reagent("ammonia", 1))
H.adjustHealth(round(S.get_reagent_amount("ammonia")*0.5))
H.adjustNutri(round(S.get_reagent_amount("ammonia")*1))
H.adjustSYield(round(S.get_reagent_amount("ammonia")*0.01))
// This is more bad ass, and pests get hurt by the corrosive nature of it, not the plant.
if(S.has_reagent("diethylamine", 1))
H.adjustHealth(round(S.get_reagent_amount("diethylamine")*1))
H.adjustNutri(round(S.get_reagent_amount("diethylamine")*2))
H.adjustSYield(round(S.get_reagent_amount("diethylamine")*0.02))
H.adjustPests(-rand(1,2))
// Compost, effectively
if(S.has_reagent("nutriment", 1))
H.adjustHealth(round(S.get_reagent_amount("nutriment")*0.5))
H.adjustNutri(round(S.get_reagent_amount("nutriment")*1))
// Poor man's mutagen.
if(S.has_reagent("radium", 10) || S.has_reagent("uranium", 10))
switch(rand(100))
if(91 to 100) H.plantdies()
if(81 to 90) H.mutatespecie()
if(66 to 80) H.hardmutate()
if(41 to 65) H.mutate()
if(21 to 41) user << "The plants don't seem to react..."
if(11 to 20) H.mutateweed()
if(1 to 10) H.mutatepest()
else user << "Nothing happens..."
// Can change the yield and other stats, but requires more than mutagen
else if(S.has_reagent("radium", 5) || S.has_reagent("uranium", 5))
H.hardmutate()
else if(S.has_reagent("radium", 2) || S.has_reagent("uranium", 2))
H.mutate()
// After handling the mutating, we now handle the damage from adding crude radioactives...
if(S.has_reagent("uranium", 1))
H.adjustHealth(-round(S.get_reagent_amount("uranium")*1))
H.adjustToxic(round(S.get_reagent_amount("uranium")*2))
if(S.has_reagent("radium", 1))
H.adjustHealth(-round(S.get_reagent_amount("radium")*1))
H.adjustToxic(round(S.get_reagent_amount("radium")*3)) // Radium is harsher (OOC: also easier to produce)
// The best stuff there is. For testing/debugging.
if(S.has_reagent("adminordrazine", 1))
H.adjustWater(round(S.get_reagent_amount("adminordrazine")*1))
H.adjustHealth(round(S.get_reagent_amount("adminordrazine")*1))
H.adjustNutri(round(S.get_reagent_amount("adminordrazine")*1))
H.adjustPests(-rand(1,5))
H.adjustWeeds(-rand(1,5))
if(S.has_reagent("adminordrazine", 5))
switch(rand(100))
if(66 to 100) H.mutatespecie()
if(33 to 65) H.mutateweed()
if(1 to 32) H.mutatepest()
else user << "Nothing happens..."
H.applyChemicals(S)
S.clear_reagents()
qdel(S)
del(S)
H.update_icon()
return 1
else if( istype(O, /obj/item/seeds/) )
else if(istype(O, /obj/item/seeds/))
if(!planted)
user.unEquip(O)
user << "You plant [O]."
@@ -684,7 +700,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
S.handle_item_insertion(G, 1)
else if(istype(O, /obj/item/weapon/wrench) && unwrenchable)
if(anchored==2)
if(anchored == 2)
user << "Unscrew the hoses first!"
return
@@ -698,14 +714,13 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
user << "You unwrench [src]."
else if(istype(O, /obj/item/weapon/screwdriver) && unwrenchable) //THIS NEED TO BE DONE DIFFERENTLY, SOMEONE REFACTOR THE TRAY CODE ALREADY
if(anchored)
if(anchored==2)
if(anchored == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
anchored = 1
user << "You unscrew the [src]'s hoses."
else if(anchored==1)
else if(anchored == 1)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
anchored = 2
user << "You screw in the [src]'s hoses."
@@ -744,11 +759,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
user << "[src] is filled with tiny worms!"
user << "" // Empty line for readability.
/obj/item/seeds/proc/getYield()
var/obj/machinery/hydroponics/parent = loc
if (parent.yieldmod == 0)
return min(yield, 1)//1 if above zero, 0 otherwise
return (yield * parent.yieldmod)
/obj/item/seeds/proc/harvest(mob/user = usr)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
while(t_amount < yield)
while(t_amount < getYield())
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new product(user.loc, potency) // User gets a consumable
if(!t_prod) return
t_prod.seed = type
@@ -777,7 +798,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
while ( t_amount < (yield * parent.yieldmod ))
while (t_amount < getYield())
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new product(user.loc, potency) // User gets a consumable
t_prod.seed = type
@@ -796,7 +817,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
while(t_amount < yield)
while(t_amount < getYield())
var/obj/item/weapon/grown/t_prod = new product(user.loc, potency) // User gets a consumable -QualityVan
t_prod.seed = type
t_prod.lifespan = lifespan
@@ -814,7 +835,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
while(t_amount < yield)
while(t_amount < getYield())
var/obj/item/weapon/grown/t_prod = new product(user.loc, potency) // User gets a consumable -QualityVan
t_prod.seed = type
t_prod.lifespan = lifespan
@@ -832,7 +853,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
while(t_amount < yield)
while(t_amount < getYield())
new product(user.loc)
t_amount++
@@ -888,7 +909,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else //else, one packet of seeds. maybe two
var/seed_count = 1
if(prob(yield * 20))
if(prob(getYield() * 20))
seed_count++
for(var/i=0,i<seed_count,i++)
var/obj/item/seeds/replicapod/harvestseeds = new /obj/item/seeds/replicapod(user.loc)
@@ -934,10 +955,10 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
lastproduce = age
if(istype(myseed,/obj/item/seeds/replicapod/))
user << "You harvest from the [myseed.plantname]."
else if(myseed.yield <= 0)
else if(myseed.getYield() <= 0)
user << "<span class='warning'>You fail to harvest anything useful.</span>"
else
user << "You harvest [myseed.yield] items from the [myseed.plantname]."
user << "You harvest [myseed.getYield()] items from the [myseed.plantname]."
if(myseed.oneharvest)
qdel(myseed)
planted = 0
+1 -1
View File
@@ -328,10 +328,10 @@
product = /obj/item/weapon/reagent_containers/food/snacks/grown/poppy
lifespan = 25
endurance = 10
potency = 20
maturation = 8
production = 6
yield = 6
potency = 20
plant_type = 0
oneharvest = 1
growthstages = 3
+17 -19
View File
@@ -248,9 +248,9 @@
return
..()
/obj/machinery/mineral/equipment_locker/proc/RedeemVoucher(voucher, redeemer)
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") in list("Resonator", "Kinetic Accelerator", "Mining Drone", "Cancel")
if(!selection || !Adjacent(redeemer) || !voucher)
/obj/machinery/mineral/equipment_locker/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Resonator", "Kinetic Accelerator", "Mining Drone")
if(!selection || !Adjacent(redeemer) || voucher.gc_destroyed || voucher.loc != redeemer)
return
switch(selection)
if("Resonator")
@@ -260,8 +260,6 @@
if("Mining Drone")
new /mob/living/simple_animal/hostile/mining_drone(src.loc)
new /obj/item/weapon/weldingtool/hugetank(src.loc)
if("Cancel")
return
qdel(voucher)
/obj/machinery/mineral/equipment_locker/ex_act()
@@ -347,20 +345,20 @@
if(istype(M, /obj/effect))
return
if(istype(M, /atom/movable))
do_teleport(M, target, 6)
if(isliving(M))
var/mob/living/L = M
L.Weaken(3)
if(ishuman(L))
shake_camera(L, 20, 1)
spawn(20)
if(L)
L.visible_message("<span class='danger'>[L.name] vomits from travelling through the [src.name]!</span>")
L.nutrition -= 20
L.adjustToxLoss(-3)
var/turf/T = get_turf(L)
T.add_vomit_floor(L)
playsound(L, 'sound/effects/splat.ogg', 50, 1)
if(do_teleport(M, target, 6))
if(isliving(M))
var/mob/living/L = M
L.Weaken(3)
if(ishuman(L))
shake_camera(L, 20, 1)
spawn(20)
if(L)
L.visible_message("<span class='danger'>[L.name] vomits from travelling through the [src.name]!</span>")
L.nutrition -= 20
L.adjustToxLoss(-3)
var/turf/T = get_turf(L)
T.add_vomit_floor(L)
playsound(L, 'sound/effects/splat.ogg', 50, 1)
/**********************Resonator**********************/
@@ -1,9 +1,7 @@
/mob/living/carbon/human/movement_delay()
if(!has_gravity(src))
return -1 //It's hard to be slowed down in space by... anything
if(reagents.has_reagent("hyperzine"))
return -1
if(reagents.has_reagent("nuka_cola"))
else if(status_flags & GOTTAGOFAST)
return -1
. = 0
@@ -314,9 +314,10 @@ Please contact me on #coderbus IRC. ~Carnie x
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
w_uniform.screen_loc = ui_iclothing
client.screen += w_uniform
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
w_uniform.screen_loc = ui_iclothing //...draw the item in the inventory screen
client.screen += w_uniform //Either way, add the item to the HUD
var/t_color = w_uniform.item_color
if(!t_color) t_color = icon_state
@@ -362,9 +363,10 @@ Please contact me on #coderbus IRC. ~Carnie x
/mob/living/carbon/human/update_inv_gloves()
remove_overlay(GLOVES_LAYER)
if(gloves)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
gloves.screen_loc = ui_gloves
client.screen += gloves
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
gloves.screen_loc = ui_gloves //...draw the item in the inventory screen
client.screen += gloves //Either way, add the item to the HUD
var/t_state = gloves.item_state
if(!t_state) t_state = gloves.icon_state
@@ -385,9 +387,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(GLASSES_LAYER)
if(glasses)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
glasses.screen_loc = ui_glasses
client.screen += glasses
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
client.screen += glasses //Either way, add the item to the HUD
overlays_standing[GLASSES_LAYER] = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]", "layer"=-GLASSES_LAYER)
@@ -398,9 +401,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(EARS_LAYER)
if(ears)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
ears.screen_loc = ui_ears
client.screen += ears
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
ears.screen_loc = ui_ears //...draw the item in the inventory screen
client.screen += ears //Either way, add the item to the HUD
overlays_standing[EARS_LAYER] = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]", "layer"=-EARS_LAYER)
@@ -411,9 +415,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(SHOES_LAYER)
if(shoes)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
shoes.screen_loc = ui_shoes
client.screen += shoes
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
shoes.screen_loc = ui_shoes //...draw the item in the inventory screen
client.screen += shoes //Either way, add the item to the HUD
var/image/standing = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]", "layer"=-SHOES_LAYER)
overlays_standing[SHOES_LAYER] = standing
@@ -444,9 +449,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(HEAD_LAYER)
if(head)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
head.screen_loc = ui_head //TODO
client.screen += head
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
head.screen_loc = ui_head //TODO //...draw the item in the inventory screen
client.screen += head //Either way, add the item to the HUD
var/image/standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
standing.color = head.color // For now, this is here solely for kitty ears, but everything should do this eventually
@@ -480,9 +486,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(SUIT_LAYER)
if(istype(wear_suit, /obj/item/clothing/suit))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_suit.screen_loc = ui_oclothing //TODO
client.screen += wear_suit
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
wear_suit.screen_loc = ui_oclothing //TODO //...draw the item in the inventory screen
client.screen += wear_suit //Either way, add the item to the HUD
var/image/standing = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]", "layer"=-SUIT_LAYER)
overlays_standing[SUIT_LAYER] = standing
@@ -514,9 +521,10 @@ Please contact me on #coderbus IRC. ~Carnie x
remove_overlay(FACEMASK_LAYER)
if(istype(wear_mask, /obj/item/clothing/mask))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_mask.screen_loc = ui_mask //TODO
client.screen += wear_mask
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
wear_mask.screen_loc = ui_mask //TODO //...draw the item in the inventory screen
client.screen += wear_mask //Either way, add the item to the HUD
var/image/standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
overlays_standing[FACEMASK_LAYER] = standing
@@ -370,7 +370,5 @@
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
if(!ticker) return 0
if(!ticker.mode.name == "monkey") return 0
return 1
return 0
+4
View File
@@ -18,6 +18,10 @@
if("nuclear emergency")
if(mind in ticker.mode:syndicates)
ticker.mode.update_all_synd_icons()
if(ventcrawler)
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
return .
//This stuff needs to be merged from cloning.dm but I'm not in the mood to be shouted at for breaking all the things :< ~Carn
@@ -1,6 +1,11 @@
/mob/living/silicon/robot/Login()
..()
regenerate_icons()
show_laws(0)
if(mind) ticker.mode.remove_revolutionary(mind)
winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
return
@@ -125,6 +125,7 @@
mmi = null
..()
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
@@ -209,7 +210,9 @@
overlays -= "eyes" //Takes off the eyes that it started with
transform_animation(animation_length)
notify_ai(2)
updateicon()
SetEmagged(emagged) // Update emag status and give/take emag modules.
/mob/living/silicon/robot/proc/transform_animation(animation_length)
if(!animation_length)
@@ -240,6 +243,18 @@
set name = "Show Alerts"
robot_alerts()
//for borg hotkeys, here module refers to borg inv slot, not core module
/mob/living/silicon/robot/verb/cmd_toggle_module(module as num)
set name = "Toggle Module"
set hidden = 1
toggle_module(module)
/mob/living/silicon/robot/verb/cmd_unequip_module()
set name = "Unequip Module"
set hidden = 1
uneq_active()
/mob/living/silicon/robot/proc/robot_alerts()
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[src];mach_close=robotalerts'>Close</A><BR><BR>"
@@ -1078,3 +1093,14 @@
radio = new /obj/item/device/radio/borg/syndicate(src)
module = new /obj/item/weapon/robot_module/syndicate(src)
laws = new /datum/ai_laws/syndicate_override()
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
if(!connected_ai)
return
switch(notifytype)
if(1) //New Cyborg
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='byond://?src=\ref[connected_ai];track2=\ref[connected_ai];track=\ref[src]'>[name]</a></span><br>"
if(2) //New Module
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
+1 -1
View File
@@ -31,7 +31,7 @@
alarm_types_clear[type] += 1
if(!in_cooldown)
spawn(10 * 10) // 10 seconds
spawn(3 * 10) // 10 seconds
if(alarms_to_show.len < 5)
for(var/msg in alarms_to_show)
@@ -29,6 +29,12 @@
..()
regenerate_icons()
/mob/living/simple_animal/corgi/sac_act(var/obj/effect/rune/R, victim)
usr << "<span class='warning'>Even dark gods from another plane have standards, sicko.</span>"
usr.reagents.add_reagent("hell_water", 2)
R.stone_or_gib(victim)
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
user.set_machine(src)
if(user.stat) return
+2
View File
@@ -47,4 +47,6 @@
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
//set macro to normal incase it was overriden (like cyborg currently does)
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
+806 -801
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -414,3 +414,7 @@ proc/is_special_character(mob/M) // returns 1 for special characters and 2 for h
/mob/proc/has_mutation(var/mutation)
return mutation in src.mutations ? 1 : 0
/proc/get_both_hands(mob/living/carbon/M)
var/list/hands = list(M.l_hand, M.r_hand)
return hands
@@ -282,9 +282,9 @@
name = "Side Part"
icon_state = "hair_part"
braid
braided
name = "Braided"
icon_state = "hair_braid"
icon_state = "hair_braided"
bun
name = "Bun Head"
+1
View File
@@ -304,6 +304,7 @@
O.loc = loc
O.job = "Cyborg"
O.notify_ai(1)
O.mmi = new /obj/item/device/mmi(O)
O.mmi.transfer_identity(src)//Does not transfer key/client.
+1 -1
View File
@@ -86,7 +86,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
can_hold = list(/obj/item/weapon/photo)
/*
+2 -2
View File
@@ -353,7 +353,7 @@
update_overlay |= APC_UPOVERLAY_ENVIRON1
else if(environ==2)
update_overlay |= APC_UPOVERLAY_ENVIRON2
var/results = 0
if(last_update_state == update_state && last_update_overlay == update_overlay)
@@ -773,7 +773,7 @@
return 0
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
istype(user, /mob/living/carbon/monkey)) )
user << "\red You don't have the dexterity to use this [src]!"
return 0
if(user.restrained())
@@ -54,21 +54,22 @@ var/global/list/uneatable = list(
/obj/machinery/singularity/blob_act(severity)
return
/obj/machinery/singularity/ex_act(severity)
switch(severity)
if(1.0)
if(prob(25))
investigate_log("has been destroyed by an explosion.","singulo")
if(current_size <= 3)
investigate_log("has been destroyed by a heavy explosion.","singulo")
qdel(src)
return
else
energy += 50
if(2.0 to 3.0)
energy += round((rand(20,60)/2),1)
return
energy -= round(((energy+1)/2),1)
if(2.0)
energy -= round(((energy+1)/3),1)
if(3.0)
energy -= round(((energy+1)/4),1)
return
/obj/machinery/singularity/bullet_act(obj/item/projectile/P)
return 0 //Will there be an impact? Who knows. Will we see it? No.
@@ -12,6 +12,11 @@
projectile_type = /obj/item/projectile/beam
select_name = "kill"
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/item/projectile/beam
e_cost = 83
select_name = "kill"
/obj/item/ammo_casing/energy/laser/practice
projectile_type = /obj/item/projectile/practice
select_name = "practice"
@@ -6,7 +6,7 @@
w_class = 3.0
m_amt = 2000
origin_tech = "combat=3;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/laser)
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
/obj/item/weapon/gun/energy/laser/practice
@@ -117,6 +117,7 @@ proc/wabbajack(mob/living/M)
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi) qdel(Robot.mmi)
Robot.notify_ai(1)
else
for(var/obj/item/W in M)
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
@@ -312,11 +312,19 @@ datum
del(A)
update_total()
my_atom.on_reagent_change()
check_gofast(my_atom)
return 0
return 1
check_gofast(var/mob/M)
if(istype(M, /mob))
if(M.reagents.has_reagent("hyperzine")||M.reagents.has_reagent("unholywater")||M.reagents.has_reagent("nuka_cola"))
return 1
else
M.status_flags &= ~GOTTAGOFAST
update_total()
total_volume = 0
for(var/datum/reagent/R in reagent_list)
+88 -6
View File
@@ -263,14 +263,22 @@ datum
if(!data) data = 1
data++
M.jitteriness = max(M.jitteriness-5,0)
if(data >= 30)
if(data >= 30) // 12 units, 54 seconds @ metabolism 0.4 units & tick rate 1.8 sec
if (!M.stuttering) M.stuttering = 1
M.stuttering += 4
M.Dizzy(5)
if(data >= 30*2.5 && prob(33))
if(iscultist(M) && prob(5))
M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu"))
if(data >= 75 && prob(33)) // 30 units, 135 seconds
if (!M.confused) M.confused = 1
M.confused += 3
..()
if(iscultist(M))
ticker.mode.remove_cultist(M.mind)
holder.remove_reagent(src.id, src.volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
M.jitteriness = 0
M.stuttering = 0
M.confused = 0
holder.remove_reagent(src.id, 0.4) //fixed consumption to prevent balancing going out of whack
return
reaction_turf(var/turf/simulated/T, var/volume)
@@ -281,6 +289,39 @@ datum
qdel(R)
T.Bless()
fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke
name = "Unholy Water"
id = "unholywater"
description = "Something that shouldn't exist on this plane of existance."
on_mob_life(var/mob/living/M as mob)
M.adjustBrainLoss(3)
if(iscultist(M))
M.status_flags |= GOTTAGOFAST
M.drowsyness = max(M.drowsyness-5, 0)
M.AdjustParalysis(-2)
M.AdjustStunned(-2)
M.AdjustWeakened(-2)
else
M.adjustToxLoss(2)
M.adjustFireLoss(2)
M.adjustOxyLoss(2)
M.adjustBruteLoss(2)
holder.remove_reagent(src.id, 1)
plasma/hellwater //if someone has this in their system they've really pissed off an eldrich god
name = "Hell Water"
id = "hell_water"
description = "YOUR FLESH! IT BURNS!"
on_mob_life(var/mob/living/M as mob)
M.fire_stacks = min(5,M.fire_stacks + 3)
M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire
M.adjustToxLoss(1)
M.adjustFireLoss(1) //Hence the other damages... ain't I a bastard?
M.adjustBrainLoss(5)
holder.remove_reagent(src.id, 1)
lube
name = "Space Lube"
id = "lube"
@@ -1091,8 +1132,9 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(5)) M.emote(pick("twitch","blink_r","shiver"))
M.status_flags |= GOTTAGOFAST
holder.remove_reagent(src.id, 0.5 * REAGENTS_METABOLISM)
..()
// ..() //this was causing hyperzine to be consumed twice...
return
cryoxadone
@@ -1310,12 +1352,12 @@ datum
if (egg.grown)
egg.Hatch()*/
if((!O) || (!volume)) return 0
O.atmos_spawn_air(SPAWN_TOXINS, volume)
O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume)
reaction_turf(var/turf/simulated/T, var/volume)
src = null
if(istype(T))
T.atmos_spawn_air(SPAWN_TOXINS, volume)
T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume)
return
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel!
@@ -2484,6 +2526,7 @@ datum
M.dizziness +=5
M.drowsyness = 0
M.sleeping = max(0,M.sleeping-2)
M.status_flags |= GOTTAGOFAST
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.nutrition += 1
@@ -2652,6 +2695,45 @@ datum
..()
return
//////////////////////////////////Hydroponics stuff///////////////////////////////
plantnutriment
name = "Generic nutriment"
id = "plantnutriment"
description = "Some kind of nutriment. You can't really tell what it is. You should probably report it, along with how you obtained it."
reagent_state = LIQUID
color = "#000000" // RBG: 0, 0, 0
var/tox_prob = 0
on_mob_life(var/mob/living/M as mob)
if(prob(tox_prob)) M.adjustToxLoss(1*REM)
..()
return
plantnutriment/eznutriment
name = "E-Z-Nutrient"
id = "eznutriment"
description = "Cheap and extremely common type of plant nutriment."
reagent_state = LIQUID
color = "#376400" // RBG: 50, 100, 0
tox_prob = 10
plantnutriment/left4zednutriment
name = "Left 4 Zed"
id = "left4zednutriment"
description = "Unstable nutriment that makes plants mutate more often than usual."
reagent_state = LIQUID
color = "#1A1E4D" // RBG: 26, 30, 77
tox_prob = 25
plantnutriment/robustharvestnutriment
name = "Robust Harvest"
id = "robustharvestnutriment"
description = "Very potent nutriment that prevents plants from mutating."
reagent_state = LIQUID
color = "#9D9D00" // RBG: 157, 157, 0
tox_prob = 15
//////////////////////////////////////////////The ten friggen million reagents that get you drunk//////////////////////////////////////////////
atomicbomb
+24 -1
View File
@@ -44,4 +44,27 @@
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
return data
else return "No reagents"
else return "No reagents"
/obj/item/weapon/reagent_containers/proc/canconsume(mob/eater, mob/user)
//Check for covering mask
var/obj/item/clothing/cover = eater.get_item_by_slot(slot_wear_mask)
if(isnull(cover)) // No mask, do we have any helmet?
cover = eater.get_item_by_slot(slot_head)
else
var/obj/item/clothing/mask/covermask = cover
if(covermask.alloweat) // Specific cases, clownmask for example.
return 1
if(!isnull(cover))
if((cover.flags & HEADCOVERSMOUTH) || (cover.flags & MASKCOVERSMOUTH))
var/who = (isnull(user) || eater == user) ? "your" : "their"
if(istype(cover, /obj/item/clothing/mask/))
user << "<span class='notice'>You have to remove [who] mask first!</span>"
else
user << "<span class='notice'>You have to remove [who] helmet first!</span>"
return 0
return 1
@@ -29,6 +29,9 @@
user << "<span class='warning'>None of [src] left, oh no!</span>"
return 0
if(!canconsume(M, user))
return 0
if(M == user)
M << "<span class='notice'>You swallow some of contents of the [src].</span>"
if(reagents.total_volume)
@@ -26,6 +26,9 @@
user << "<span class='alert'> None of [src] left, oh no!</span>"
return 0
if(!canconsume(M, user))
return 0
if(M == user)
M << "<span class='notice'>You swallow a gulp of [src].</span>"
if(reagents.total_volume)
@@ -46,6 +46,9 @@
qdel(src)
return 0
if(istype(M, /mob/living/carbon))
if(!canconsume(M, user))
return 0
if(M == user) //If you're eating it yourself.
var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
if(wrapped)
@@ -26,6 +26,8 @@
/obj/machinery/computer/pandemic,
/obj/item/weapon/storage/secure/safe,
/obj/machinery/disposal,
/obj/machinery/hydroponics,
/obj/machinery/biogenerator,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/hostile/retaliate/goat
)
@@ -19,6 +19,9 @@
return
attack(mob/M, mob/user, def_zone)
if(!canconsume(M, user))
return 0
if(M == user)
M << "<span class='notice'>You swallow [src].</span>"
M.unEquip(src) //icon update
+19 -18
View File
@@ -85,6 +85,7 @@
// flip and rotate verbs
verb/rotate()
set name = "Rotate Pipe"
set category = "Object"
set src in view(1)
if(usr.stat)
@@ -99,6 +100,7 @@
verb/flip()
set name = "Flip Pipe"
set category = "Object"
set src in view(1)
if(usr.stat)
return
@@ -169,24 +171,6 @@
return
var/obj/structure/disposalpipe/CP = locate() in T
if(ptype>=6 && ptype <= 8) // Disposal or outlet
if(CP) // There's something there
if(!istype(CP,/obj/structure/disposalpipe/trunk))
user << "The [nicetype] requires a trunk underneath it in order to work."
return
else // Nothing under, fuck.
user << "The [nicetype] requires a trunk underneath it in order to work."
return
else
if(CP)
update()
var/pdir = CP.dpdir
if(istype(CP, /obj/structure/disposalpipe/broken))
pdir = CP.dir
if(pdir & dpdir)
user << "There is already a [nicetype] at that location."
return
if(istype(I, /obj/item/weapon/wrench))
if(anchored)
@@ -198,6 +182,23 @@
density = 1
user << "You detach the [nicetype] from the underfloor."
else
if(ptype>=6 && ptype <= 8) // Disposal or outlet
if(CP) // There's something there
if(!istype(CP,/obj/structure/disposalpipe/trunk))
user << "The [nicetype] requires a trunk underneath it in order to work."
return
else // Nothing under, fuck.
user << "The [nicetype] requires a trunk underneath it in order to work."
return
else
if(CP)
update()
var/pdir = CP.dpdir
if(istype(CP, /obj/structure/disposalpipe/broken))
pdir = CP.dir
if(pdir & dpdir)
user << "There is already a [nicetype] at that location."
return
anchored = 1
if(ispipe)
level = 1 // We don't want disposal bins to disappear under the floors
+38 -48
View File
@@ -69,30 +69,30 @@
if(mode<=0) // It's off
if(istype(I, /obj/item/weapon/screwdriver))
if(contents.len > 0)
user << "Eject the items first!"
user << "<span class='notice'>Eject the items first!</span>"
return
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You remove the screws around the power connection."
user << "<span class='notice'>You remove the screws around the power connection.</span>"
return
else if(mode==-1)
mode=0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You attach the screws around the power connection."
user << "<span class='notice'>You attach the screws around the power connection.</span>"
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1)
if(contents.len > 0)
user << "Eject the items first!"
user << "<span class='notice'>Eject the items first!</span>"
return
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "You start slicing the floorweld off \the [src]."
user << "<span class='notice'>You start slicing the floorweld off \the [src].</span>"
if(do_after(user,20))
if(!src || !W.isOn()) return
user << "You slice the floorweld off \the [src]."
user << "<span class='notice'>You've sliced the floorweld off \the [src].</span>"
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 6 // 6 = disposal unit
@@ -102,16 +102,16 @@
qdel(src)
return
else
user << "You need more welding fuel to complete this task."
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
if(istype(I, /obj/item/weapon/melee/energy/blade))
user << "You can't place \the [I] into \the [src]."
user << "<span class='notice'>You can't place \the [I] into \the [src].</span>"
return
if(istype(I, /obj/item/weapon/storage/bag/trash))
var/obj/item/weapon/storage/bag/trash/T = I
user << "\blue You empty the bag."
user << "<span class='warning'> You empty the bag.</span>"
for(var/obj/item/O in T.contents)
T.remove_from_storage(O,src)
T.update_icon()
@@ -140,7 +140,7 @@
if(I)
I.loc = src
user << "You place \the [I] into \the [src]."
user << "<span class='notice'>You place \the [I] into \the [src].</span>"
for(var/mob/M in viewers(src))
if(M == user)
continue
@@ -170,10 +170,10 @@
if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) // if drop self, then climbed in
// must be awake, not stunned or whatever
msg = "[user.name] climbs into \the [src]."
user << "You climb into \the [src]."
user << "<span class='notice'>You climb into \the [src].</span>"
else if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
msg = "[user.name] stuffs [target.name] into \the [src]!"
user << "You stuff [target.name] into \the [src]!"
user << "<span class='notice'>You stuff [target.name] into \the [src]!</span>"
else
return
if (target.client)
@@ -496,7 +496,12 @@
var/tomail = 0 //changes if contains wrapped package
var/hasmob = 0 //If it contains a mob
/obj/structure/disposalholder/Destroy()
qdel(gas)
active = 0
..()
/obj/structure/disposalholder
// initialize a holder from the contents of a disposal unit
proc/init(var/obj/machinery/disposal/D)
gas = D.air_contents// transfer gas resv. into holder object
@@ -550,20 +555,13 @@
proc/move()
var/obj/structure/disposalpipe/last
while(active)
if(has_fat_guy && prob(2)) // chance of becoming stuck per segment if contains a fat guy
active = 0
// find the fat guys
for(var/mob/living/carbon/human/H in src)
break
sleep(1) // was 1
var/obj/structure/disposalpipe/curr = loc
last = curr
curr = curr.transfer(src)
if(!curr)
if(!curr && active)
last.expel(src, loc, dir)
//
sleep(1)
if(!(count--))
active = 0
return
@@ -615,6 +613,7 @@
// called to vent all gas in holder to a location
proc/vent_gas(var/atom/location)
location.assume_air(gas) // vent all gas to turf
air_update_turf()
return
// Disposal pipes
@@ -726,7 +725,7 @@
if(istype(T, /turf/simulated/floor)) //intact floor, pop the tile
var/turf/simulated/floor/F = T
if(F.floor_tile)
F.floor_tile.loc = H //It took me a day to figure out this was the right way to do it. ¯\_(;_;)_/¯
F.floor_tile.loc = H //It took me a day to figure out this was the right way to do it.
F.floor_tile = null //So it doesn't get deleted in make_plating()
F.make_plating()
@@ -835,18 +834,14 @@
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "<span class='notice'>You start slicing the disposal pipe.</span>"
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
user << "Slicing the disposal pipe."
sleep(30)
if(!W.isOn()) return
if(user.loc == uloc && wloc == W.loc)
if(do_after(user,30))
if(!src || !W.isOn()) return
welded()
else
user << "You must stay still while welding the pipe."
user << "<span class='notice'>You've sliced the disposal pipe.</span>"
else
user << "You need more welding fuel to cut the pipe."
user << "<span class='notice'>You need more welding fuel to cut the pipe.</span>"
return
// called when pipe is cut with welder
@@ -989,7 +984,7 @@
sortType = O.currTag
playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1)
var/tag = uppertext(TAGGERLOCATIONS[O.currTag])
user << "\blue Changed filter to [tag]"
user << "<span class='warning'> Changed filter to [tag].</span>"
updatedesc()
@@ -1152,23 +1147,18 @@
var/obj/item/weapon/weldingtool/W = I
if(linked)
user << "You need to deconstruct disposal machinery above this pipe."
user << "<span class='notice'>You need to deconstruct disposal machinery above this pipe.</span>"
return
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
user << "Slicing the disposal pipe."
sleep(30)
if(!W.isOn()) return
if(user.loc == uloc && wloc == W.loc)
user << "<span class='notice'>You start slicing the disposal pipe.</span>"
if(do_after(user,30))
if(!src || !W.isOn()) return
welded()
else
user << "You must stay still while welding the pipe."
user << "<span class='notice'>You've sliced the disposal pipe.</span>"
else
user << "You need more welding fuel to cut the pipe."
user << "<span class='notice'>You need more welding fuel to cut the pipe.</span>"
return
@@ -1279,21 +1269,21 @@
if(mode==0)
mode=1
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You remove the screws around the power connection."
user << "<span class='notice'>You remove the screws around the power connection.</span>"
return
else if(mode==1)
mode=0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You attach the screws around the power connection."
user << "<span class='notice'>You attach the screws around the power connection.</span>"
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "You start slicing the floorweld off \the [src]."
user << "<span class='notice'>You start slicing the floorweld off \the [src].</span>"
if(do_after(user,20))
if(!src || !W.isOn()) return
user << "You slice the floorweld off \the [src]."
user << "<span class='notice'>You've sliced the floorweld off \the [src].</span>"
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 7 // 7 = outlet
@@ -1303,7 +1293,7 @@
qdel(src)
return
else
user << "You need more welding fuel to complete this task."
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
+15 -18
View File
@@ -90,7 +90,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
default_deconstruction_crowbar(O)
return
else
user << "\red You can't load the [src.name] while it's opened."
user << "<span class='warning'>You can't load the [src.name] while it's opened.</span>"
return
if (disabled)
return
@@ -100,36 +100,33 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
if (O.is_open_container())
return
if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond))
user << "\red You cannot insert this item into the [name]!"
user << "<span class='warning'>You cannot insert this item into the [name]!</span>"
return
if (stat)
return
if (busy)
user << "\red The [name] is busy. Please wait for completion of previous operation."
user << "<span class='warning'>The [name] is busy. Please wait for completion of previous operation.</span>"
return
var/obj/item/stack/sheet/stack = O
if ((TotalMaterials() + stack.perunit) > max_material_amount)
user << "\red The [name] is full. Please remove glass from the protolathe in order to insert more."
user << "<span class='warning'>The [name] is full. Please remove glass from the protolathe in order to insert more.</span>"
return
var/amount = round(input("How many sheets do you want to add?") as num)
if(amount < 0)
amount = 0
if(amount == 0)
if(amount <= 0 || stack.amount <= 0)
return
if(amount > stack.amount)
amount = min(stack.amount, round((max_material_amount-TotalMaterials())/stack.perunit))
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
user << "\blue You add [amount] sheets to the [src.name]."
if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
user << "<span class='notice'>You add [amount] sheets to the [src.name].</span>"
if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
+50 -13
View File
@@ -257,7 +257,7 @@ datum/design/orion_trail
datum/design/powermonitor
name = "Circuit Design (Power Monitor)"
desc = "Allows for the construction of circuit boards used to build a new power monitor"
desc = "Allows for the construction of circuit boards used to build a new power monitor."
id = "powermonitor"
req_tech = list("programming" = 2)
build_type = IMPRINTER
@@ -266,7 +266,7 @@ datum/design/powermonitor
datum/design/solarcontrol
name = "Circuit Design (Solar Control)"
desc = "Allows for the construction of circuit boards used to build a solar control console"
desc = "Allows for the construction of circuit boards used to build a solar control console."
id = "solarcontrol"
req_tech = list("programming" = 2, "powerstorage" = 2)
build_type = IMPRINTER
@@ -363,6 +363,24 @@ datum/design/message_monitor
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/message_monitor
datum/design/comm_traffic
name = "Circuit Design (Telecommunications Traffic Control Console)"
desc = "Allows for the construction of circuit boards used to build a telecommunications traffic control console."
id = "comm_traffic"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/comm_traffic
datum/design/telesci_console
name = "Circuit Design (Telepad Control Console Board)"
desc = "Allows for the construction of circuit boards used to build a telescience console."
id = "telesci_console"
req_tech = list("programming" = 3, "bluespace" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/telesci_console
datum/design/aifixer
name = "Circuit Design (AI Integrity Restorer)"
desc = "Allows for the construction of circuit boards used to build an AI Integrity Restorer."
@@ -592,7 +610,7 @@ datum/design/intellicard
datum/design/paicard
name = "Personal Artificial Intelligence Card"
desc = "Allows for the construction of a pAI Card"
desc = "Allows for the construction of a pAI Card."
id = "paicard"
req_tech = list("programming" = 2)
build_type = PROTOLATHE
@@ -879,7 +897,7 @@ datum/design/mech_syringe_gun
datum/design/mech_diamond_drill
name = "Exosuit Module Design (Diamond Mining Drill)"
desc = "An upgraded version of the standard drill"
desc = "An upgraded version of the standard drill."
id = "mech_diamond_drill"
build_type = MECHFAB
req_tech = list("materials" = 4, "engineering" = 3)
@@ -888,7 +906,7 @@ datum/design/mech_diamond_drill
datum/design/mech_generator_nuclear
name = "Exosuit Module Design (ExoNuclear Reactor)"
desc = "Compact nuclear reactor module"
desc = "Compact nuclear reactor module."
id = "mech_generator_nuclear"
build_type = MECHFAB
req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3)
@@ -1151,7 +1169,7 @@ datum/design/subspace_transmitter
datum/design/basic_cell
name = "Basic Power Cell"
desc = "A basic power cell that holds 1000 units of energy"
desc = "A basic power cell that holds 1000 units of energy."
id = "basic_cell"
req_tech = list("powerstorage" = 1)
build_type = PROTOLATHE | AUTOLATHE |MECHFAB
@@ -1161,7 +1179,7 @@ datum/design/basic_cell
datum/design/high_cell
name = "High-Capacity Power Cell"
desc = "A power cell that holds 10000 units of energy"
desc = "A power cell that holds 10000 units of energy."
id = "high_cell"
req_tech = list("powerstorage" = 2)
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
@@ -1171,7 +1189,7 @@ datum/design/high_cell
datum/design/super_cell
name = "Super-Capacity Power Cell"
desc = "A power cell that holds 20000 units of energy"
desc = "A power cell that holds 20000 units of energy."
id = "super_cell"
req_tech = list("powerstorage" = 3, "materials" = 2)
reliability = 75
@@ -1182,7 +1200,7 @@ datum/design/super_cell
datum/design/hyper_cell
name = "Hyper-Capacity Power Cell"
desc = "A power cell that holds 30000 units of energy"
desc = "A power cell that holds 30000 units of energy."
id = "hyper_cell"
req_tech = list("powerstorage" = 5, "materials" = 4)
reliability = 70
@@ -1368,7 +1386,7 @@ datum/design/autolathe
datum/design/rdservercontrol
name = "R&D Server Control Console Board"
desc = "The circuit board for an R&D Server Control Console"
desc = "The circuit board for an R&D Server Control Console."
id = "rdservercontrol"
req_tech = list("programming" = 3)
build_type = IMPRINTER
@@ -1377,7 +1395,7 @@ datum/design/rdservercontrol
datum/design/rdserver
name = "R&D Server Board"
desc = "The circuit board for an R&D Server"
desc = "The circuit board for an R&D Server."
id = "rdserver"
req_tech = list("programming" = 3)
build_type = IMPRINTER
@@ -1386,7 +1404,7 @@ datum/design/rdserver
datum/design/mechfab
name = "Exosuit Fabricator Board"
desc = "The circuit board for an Exosuit Fabricator"
desc = "The circuit board for an Exosuit Fabricator."
id = "mechfab"
req_tech = list("programming" = 3, "engineering" = 3)
build_type = IMPRINTER
@@ -1396,13 +1414,32 @@ datum/design/mechfab
datum/design/cyborgrecharger
name = "Cyborg Recharger Board"
desc = "The circuit board for a Cyborg Recharger"
desc = "The circuit board for a Cyborg Recharger."
id = "cyborgrecharger"
req_tech = list("powerstorage" = 3, "engineering" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/cyborgrecharger
datum/design/mech_recharger
name = "Mechbay Recharger Board"
desc = "The circuit board for a Mechbay Recharger."
id = "mech_recharger"
req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/mech_recharger
datum/design/vendor
name = "Vendor Board"
desc = "The circuit board for a Vendor."
id = "vendor"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/vendor
/////////////////////////////////////////
////////////Power Stuff//////////////////
/////////////////////////////////////////
+32 -36
View File
@@ -122,7 +122,7 @@ Note: Must be placed west/left of and R&D console to function.
default_deconstruction_crowbar(O)
return 1
else
user << "\red You can't load the [src.name] while it's opened."
user << "<span class='warning'>You can't load the [src.name] while it's opened.</span>"
return 1
if (disabled)
return
@@ -130,63 +130,59 @@ Note: Must be placed west/left of and R&D console to function.
user << "\The protolathe must be linked to an R&D console first!"
return 1
if (busy)
user << "\red The protolathe is busy. Please wait for completion of previous operation."
user << "<span class='warning'>The protolathe is busy. Please wait for completion of previous operation.</span>"
return 1
if (O.is_open_container())
return
if (!istype(O, /obj/item/stack/sheet))
user << "\red You cannot insert this item into the protolathe!"
user << "<span class='warning'>You cannot insert this item into the protolathe!</span>"
return 1
if (stat)
return 1
if(istype(O,/obj/item/stack/sheet))
var/obj/item/stack/sheet/S = O
if (TotalMaterials() + S.perunit > max_material_storage)
user << "\red The protolathe's material bin is full. Please remove material before adding more."
user << "<span class='warning'>The protolathe's material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/sheet/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return
if(amount < 0)//No negative numbers
amount = 0
if(amount == 0)
if(!stack || stack.amount <= 0 || amount <= 0)
return
if(amount > stack.amount)
amount = stack.amount
if(max_material_storage - TotalMaterials() < (amount*stack.perunit))//Can't overfill
amount = min(stack.amount, round((max_material_storage-TotalMaterials())/stack.perunit))
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750*amount/10)))
user << "<span class='notice'>You add [amount] sheets to the [src.name].</span>"
icon_state = "protolathe"
if(istype(stack, /obj/item/stack/sheet/metal))
m_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/silver))
silver_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/plasma))
plasma_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
clown_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine))
adamantine_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
src.overlays += "protolathe_[stack.name]"
sleep(10)
src.overlays -= "protolathe_[stack.name]"
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
user << "\blue You add [amount] sheets to the [src.name]."
icon_state = "protolathe"
if(istype(stack, /obj/item/stack/sheet/metal))
m_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/mineral/gold))
gold_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/silver))
silver_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/plasma))
plasma_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/uranium))
uranium_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
clown_amount += amount * 2000
else if(istype(stack, /obj/item/stack/sheet/mineral/adamantine))
adamantine_amount += amount * 2000
stack.use(amount)
busy = 0
src.updateUsrDialog()
return