diff --git a/code/datums/spell.dm b/code/datums/spell.dm index b267cc140ed..c624fe259ec 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -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() ..() diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index fba4af6b7cf..a9d6a43c2c6 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -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 \ No newline at end of file +// 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 \ No newline at end of file diff --git a/code/game/gamemodes/wizard/spells.dm b/code/game/gamemodes/wizard/spells.dm index 28a90bdbfe4..740e8481eca 100644 --- a/code/game/gamemodes/wizard/spells.dm +++ b/code/game/gamemodes/wizard/spells.dm @@ -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!") diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index a8beb92759b..3e65250885d 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -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) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index bebb2ce2979..9fd3a2d6e5c 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -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) diff --git a/code/game/objects/items/weapons/plant_bag.dm b/code/game/objects/items/weapons/plant_bag.dm index 3dd30a36fc3..b4cda59a166 100644 --- a/code/game/objects/items/weapons/plant_bag.dm +++ b/code/game/objects/items/weapons/plant_bag.dm @@ -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 = "Select an item:
" + + if (contents.len == 0) + dat += "No product loaded!" + else + for (var/O in item_quants) + if(item_quants[O] > 0) + var/N = item_quants[O] + dat += "[capitalize(O)]:" + dat += " [N] " + dat += "Vend" + dat += "
" + + dat += "
" + user << browse("SmartFridge Supplies[dat]", "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 diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi index 34743db59a7..17e0b96c571 100644 Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ diff --git a/sound/spells/brucebanner.ogg b/sound/spells/brucebanner.ogg new file mode 100644 index 00000000000..e981ea28ca2 Binary files /dev/null and b/sound/spells/brucebanner.ogg differ diff --git a/sound/spells/einath.ogg b/sound/spells/einath.ogg new file mode 100644 index 00000000000..cfb9149efa2 Binary files /dev/null and b/sound/spells/einath.ogg differ diff --git a/sound/spells/fortigyama.ogg b/sound/spells/fortigyama.ogg new file mode 100644 index 00000000000..74c470ab2e8 Binary files /dev/null and b/sound/spells/fortigyama.ogg differ diff --git a/sound/spells/neccantio.ogg b/sound/spells/neccantio.ogg new file mode 100644 index 00000000000..cf805cf462a Binary files /dev/null and b/sound/spells/neccantio.ogg differ diff --git a/sound/spells/onisoma.ogg b/sound/spells/onisoma.ogg new file mode 100644 index 00000000000..e1bcf39419d Binary files /dev/null and b/sound/spells/onisoma.ogg differ diff --git a/sound/spells/scyarnila.ogg b/sound/spells/scyarnila.ogg new file mode 100644 index 00000000000..cfdd0b5c608 Binary files /dev/null and b/sound/spells/scyarnila.ogg differ diff --git a/sound/spells/stikaly.ogg b/sound/spells/stikaly.ogg new file mode 100644 index 00000000000..7bb706e169e Binary files /dev/null and b/sound/spells/stikaly.ogg differ diff --git a/sound/spells/tarcolminti.ogg b/sound/spells/tarcolminti.ogg new file mode 100644 index 00000000000..4e1cc3f8855 Binary files /dev/null and b/sound/spells/tarcolminti.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 5266d00a823..56753f681bf 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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