Committed Rolan7's patch to add more convenience to Hydroponics. The feature list includes:

* Makes grass auto-stack when harvested
* Allows seeds to be extracted from grass
* Allows the smart-fridge and plant bags to accept seeds.
* Lays the groundwork for a seeds-only version of the smart fridge, to eventually replace the existing seed vender (not yet hackable, though)

-Fixed window doors not opening when you click on them.
-Added a reset button for the job selection screen.
-Fixed a bug with the traitor panel which leaves ex-changelings with the evolution menu.
-I re-added the variables for the intercept report but commented them out.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5276 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-12-07 13:27:33 +00:00
parent d0ad3e0570
commit 69fcf61ed3
9 changed files with 117 additions and 26 deletions

View File

@@ -221,7 +221,7 @@ datum/preferences
var/HTML = "<body>"
HTML += "<tt><center>"
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br><br>"
HTML += "<a align='center' href='?_src_=prefs;preference=job;task=close'>\[Done\]</a><br><br>" // Easier to press up here.
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>\[Reset\]</a> - <a href='?_src_=prefs;preference=job;task=close'>\[Done\]</a></center><br><br>" // Easier to press up here.
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
var/index = -1
@@ -317,6 +317,20 @@ datum/preferences
SetChoices(user)
return 1
proc/ResetJobs()
job_civilian_high = 0
job_civilian_med = 0
job_civilian_low = 0
job_medsci_high = 0
job_medsci_med = 0
job_medsci_low = 0
job_engsec_high = 0
job_engsec_med = 0
job_engsec_low = 0
proc/GetJobDepartment(var/datum/job/job, var/level)
if(!job || !level) return 0
@@ -407,6 +421,9 @@ datum/preferences
if("close")
user << browse(null, "window=mob_occupation")
ShowChoices(user)
if("reset")
ResetJobs()
SetChoices(user)
if("random")
userandomjob = !userandomjob
SetChoices(user)

View File

@@ -52,13 +52,33 @@
if (istype(O, /obj/item/weapon/plantbag))
var/obj/item/weapon/plantbag/S = O
if (S.mode == 1)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
return
user << "\blue You pick up all the plants."
for(var/obj/item/G in get_turf(src))
if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown))
if (S.contents.len < S.capacity)
S.contents += G
else
user << "\blue The plant bag is full."
return
user << "\blue You pick up all the plants and seeds."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The plant bag is full."
return
/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/weapon/plantbag))
var/obj/item/weapon/plantbag/S = O
if (S.mode == 1)
for(var/obj/item/G in get_turf(src))
if(istype(G, /obj/item/seeds) || istype(G, /obj/item/weapon/reagent_containers/food/snacks/grown))
if (S.contents.len < S.capacity)
S.contents += G
else
user << "\blue The plant bag is full."
return
user << "\blue You pick up all the plants and seeds."
else
if (S.contents.len < S.capacity)
S.contents += src;
@@ -852,6 +872,7 @@
// Putting these at the bottom so they don't clutter the list up. -Cheridan
// *************************************
/*
//This object is just a transition object. All it does is make a grass tile and delete itself.
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
seed = "/obj/item/seeds/grassseed"
@@ -863,6 +884,7 @@
new/obj/item/stack/tile/grass(src.loc)
spawn(5) //Workaround to keep harvesting from working weirdly.
del(src)
*/
//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan
/obj/item/weapon/reagent_containers/food/snacks/grown/money