The wizard now has a voice, and plantbags can now feed plants directly into the biogenerator.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2059 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
LastBattaWolf@hotmail.com
2011-08-29 00:41:37 +00:00
parent e2fee5fd71
commit 0d5948fdea
16 changed files with 183 additions and 30 deletions
+9 -9
View File
@@ -76,15 +76,15 @@ var/list/spells = typesof(/obj/proc_holder/spell) //needed for the badmin verb f
/obj/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
switch(invocation_type)
if("shout")
usr.say(invocation)
if(usr.gender=="male")
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
else
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
if("whisper")
usr.whisper(invocation)
// switch(invocation_type)
// if("shout")
// usr.say(invocation)
// if(usr.gender=="male")
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// else
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// if("whisper")
// usr.whisper(invocation)
/obj/proc_holder/spell/New()
..()
+12 -12
View File
@@ -49,15 +49,15 @@
/obj/proc_holder/spell/targeted/area_teleport/invocation(area/chosenarea = null)
if(!invocation_area || !chosenarea)
..()
else
switch(invocation_type)
if("shout")
usr.say("[invocation] [uppertext(chosenarea.name)]")
if(usr.gender=="male")
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
else
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
if("whisper")
usr.whisper("[invocation] [uppertext(chosenarea.name)]")
return
// else
// switch(invocation_type)
// if("shout")
// usr.say("[invocation] [uppertext(chosenarea.name)]")
// if(usr.gender=="male")
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// else
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// if("whisper")
// usr.whisper("[invocation] [uppertext(chosenarea.name)]")
//
// return
+8
View File
@@ -20,6 +20,7 @@
usr.verbs += /client/proc/blind
usr.whisper("STI KALY")
playsound(usr.loc,'stikaly.ogg', 100,1)
// usr.spellvoice()
var/obj/overlay/B = new /obj/overlay( M.loc )
@@ -53,6 +54,7 @@
if(!usr.casting()) return
usr.say("FORTI GY AMA")
playsound(usr.loc,'fortigyama.ogg', 100.1)
usr.spellvoice()
for (var/mob/living/M as mob in oview())
@@ -155,6 +157,7 @@
var/forcefield
usr.whisper("TARCOL MINTI ZHERI")
playsound(usr.loc,'tarcolminti.ogg', 100,1)
// usr.spellvoice()
forcefield = new /obj/forcefield(locate(usr.x,usr.y,usr.z))
@@ -178,6 +181,7 @@
usr.verbs += /client/proc/fireball
usr.say("ONI SOMA")
playsound(usr.loc,'onisoma.ogg', 100,1)
// usr.spellvoice()
var/obj/overlay/A = new /obj/overlay( usr.loc )
@@ -235,6 +239,7 @@
usr.verbs += /mob/proc/kill
usr.say("EI NATH")
playsound('einath.ogg')
usr.spellvoice()
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
@@ -258,6 +263,7 @@
usr.verbs += /mob/proc/tech
usr.say("NEC CANTIO")
playsound(usr.loc,'neccantio.ogg', 100,1)
usr.spellvoice()
empulse(src, 6, 10)
return
@@ -321,6 +327,7 @@
var/area/thearea = teleportlocs[A]
usr.say("SCYAR NILA [uppertext(A)]")
playsound(usr.loc,'scyarnila.ogg', 100,1)
usr.spellvoice()
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
@@ -475,6 +482,7 @@
usr.verbs += /client/proc/mutate
usr.say("BIRUZ BENNAR")
playsound(usr.loc,'brucebanner.ogg', 100,1)
usr.spellvoice()
usr << text("\blue You feel strong! Your mind expands!")
+4 -4
View File
@@ -662,10 +662,10 @@ Outputs the appropriate voice if the user is not a mime.
Made a proc here so it's not repeated several times.*/
/mob/proc/spellvoice()
// if(!usr.miming)No longer necessary.
if(usr.gender=="male")
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
else
playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// if(usr.gender=="male")
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
// else
// playsound(usr.loc, pick('null.ogg','null.ogg'), 100, 1)
+19 -2
View File
@@ -40,10 +40,27 @@
O.loc = src
beaker = O
updateUsrDialog()
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "\red You cannot put this in [src.name]"
else if(processing)
user << "\red The biogenerator is currently processing."
else if(istype(O, /obj/item/weapon/plantbag))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "\red The biogenerator is already full! Activate it."
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
G.loc = src
i++
if(i >= 10)
user << "\blue You fill the biogenerator to its capacity."
break
if(i<10)
user << "\blue You empty the plant bag into the biogenerator."
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "\red You cannot put this in [src.name]"
else
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
+130 -3
View File
@@ -1,5 +1,3 @@
// Todo: Allow harvesting from crops, and emptying into the bioprocessor
// Eventually make the new refrigerator-vender, allow emptying into it.
/**********************Plant Bag**************************/
@@ -8,7 +6,7 @@
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
var/capacity = 10; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS | ONBELT
w_class = 1
@@ -60,3 +58,132 @@
else
user << "\blue The plant bag is full."
return
/* SmartFridge. Much todo
*/
/obj/machinery/smartfridge
name = "SmartFridge"
icon = 'vending.dmi'
icon_state = "smartfridge"
layer = 2.9
density = 1
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
var/global/max_n_of_items = 200
var/item_quants = list()
var/ispowered = 1 //starts powered
var/isbroken = 0
/obj/machinery/smartfridge/power_change()
if( powered() )
src.ispowered = 1
stat &= ~NOPOWER
if(!isbroken)
icon_state = "smartfridge"
else
spawn(rand(0, 15))
src.ispowered = 0
stat |= NOPOWER
if(!isbroken)
icon_state = "smartfridge-off"
/*******************
* Item Adding
********************/
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(!src.ispowered)
user << "\red The [src] is unpowered and useless."
return
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/))
if (contents.len>=max_n_of_items)
user << "\red This [src] is full of ingredients, you cannot put more."
return 1
/*todo: plantbag*/
else
user.before_take_item(O)
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
else
item_quants[O.name]=1
user.visible_message( \
"\blue [user] has added \the [O] to \the [src].", \
"\blue You add \the [O] to \the [src].")
else if (istype(O, /obj/item/weapon/plantbag))
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
O.contents -= G
G.loc = src
if(item_quants[G.name])
item_quants[G.name]++
else
item_quants[G.name]=1
user.visible_message( \
"\blue [user] loads \the [src] with \the [O].", \
"\blue You load \the [src] with \the [O].")
else
user << "\red The [src] smartly refuses [O]."
return 1
src.updateUsrDialog()
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
user.machine = src
interact(user)
/*******************
* SmartFridge Menu
********************/
/obj/machinery/smartfridge/proc/interact(mob/user as mob)
if(!src.ispowered)
return
var/dat = "<TT><b>Select an item:</b><br>"
if (contents.len == 0)
dat += "<font color = 'red'>No product loaded!</font>"
else
for (var/O in item_quants)
if(item_quants[O] > 0)
var/N = item_quants[O]
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
dat += " [N] </font>"
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
dat += "<br>"
dat += "</TT>"
user << browse("<HEAD><TITLE>SmartFridge Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
onclose(user, "smartfridge")
return
/obj/machinery/smartfridge/Topic(href, href_list)
if(..())
return
usr.machine = src
var/N = href_list["vend"]
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
return
item_quants[N] -= 1
for(var/obj/O in contents)
if(O.name == N)
O.loc = src.loc
break
src.updateUsrDialog()
return
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -151,6 +151,7 @@
#define FILE_DIR "sound/machines"
#define FILE_DIR "sound/misc"
#define FILE_DIR "sound/piano"
#define FILE_DIR "sound/spells"
#define FILE_DIR "sound/voice"
#define FILE_DIR "sound/weapons"
// END_FILE_DIR