diff --git a/baystation12.dme b/baystation12.dme index 14185582eb3..943c966012c 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -338,6 +338,7 @@ #include "code\game\dna.dm" #include "code\game\dna_mutations.dm" #include "code\game\hud.dm" +#include "code\game\json.dm" #include "code\game\landmarks.dm" #include "code\game\master_controller.dm" #include "code\game\prisonshuttle.dm" diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 1bb70fce7aa..d9951702123 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -9,6 +9,9 @@ /datum/ai_laws/asimov name = "Three Laws of Robotics" + +/datum/ai_laws/nanotrasen + name = "Prime Directives" randomly_selectable = 1 /datum/ai_laws/robocop @@ -27,6 +30,14 @@ add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") +/datum/ai_laws/nanotrasen/New() + ..() + src.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + src.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + src.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + src.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //src.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + /datum/ai_laws/robocop/New() ..() add_inherent_law("Serve the public trust.") diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index 67391a18541..10e041ca865 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -82,7 +82,6 @@ client/verb/showrevinfo() set category = "OOC" set name = "Show Server Revision" var/output = "Sorry, the revision info is unavailable." - if(revdata) - output = revdata.showInfo() + output = shell("cat /home/bay12/live/data/gitcommit") usr << browse(output,"window=revdata"); return diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 4852dcb68a7..6ca6ff8e0c5 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -733,7 +733,7 @@ datum/mind current.verbs -= /client/proc/interhack current.verbs -= /client/proc/reactivate_camera - current:laws = new /datum/ai_laws/asimov + current:laws = new /datum/ai_laws/nanotrasen del(current:malf_picker) current:show_laws() current.icon_state = "ai" diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index 1eb51b8a0e7..ac332053453 100644 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -15,6 +15,89 @@ containername = "Special Ops crate" hidden = 1 +/datum/supply_packs/charge + cost = 10 + containertype = "/obj/structure/crate" + +/datum/supply_packs/charge/medical + name = "Medical Charge" + contains = list("/obj/item/weapon/vending_charge/medical") + containername = "Medical charge crate" + +/datum/supply_packs/charge/chemistry + name = "Chemistry Charge" + contains = list("/obj/item/weapon/vending_charge/chemistry") + containername = "Chemistry charge crate" + +/* removed these for now, as to not confuse people (the machines are in the tg map) +/datum/supply_packs/charge/toxins + name = "Toxins Research Charge" + contains = list("/obj/item/weapon/vending_charge/toxins") + containername = "Toxins Reasearch charge crate" + +/datum/supply_packs/charge/genetics + name = "Genetics Research Charge" + contains = list("/obj/item/weapon/vending_charge/genetics") + containername = "Genetics charge crate" + +/datum/supply_packs/charge/robotics + name = "Robotics Charge" + contains = list("/obj/item/weapon/vending_charge/robotics") + containername = "Robotics charge crate" +*/ + +/datum/supply_packs/charge/bar + name = "Bar Charge" + contains = list("/obj/item/weapon/vending_charge/bar") + containername = "Bar charge crate" + +/datum/supply_packs/charge/kitchen + name = "Kitchen Charge" + contains = list("/obj/item/weapon/vending_charge/kitchen") + containername = "Kitchen charge crate" + +/datum/supply_packs/charge/engineering + name = "Engineering Charge" + contains = list("/obj/item/weapon/vending_charge/engineering") + containername = "Engineering charge crate" + +/datum/supply_packs/charge/security + name = "Security Charge" + contains = list("/obj/item/weapon/vending_charge/security") + containername = "Security charge crate" + +/datum/supply_packs/charge/coffee + name = "Coffee Charge" + contains = list("/obj/item/weapon/vending_charge/coffee") + containername = "Coffee charge crate" + +/datum/supply_packs/charge/snack + name = "Snack Charge" + contains = list("/obj/item/weapon/vending_charge/snack") + containername = "Snack charge crate" + +/* +/datum/supply_packs/charge/cart + name = "PDA Cart Charge" + contains = list("/obj/item/weapon/vending_charge/cart") + containername = "PDA Cart charge crate" +*/ + +/datum/supply_packs/charge/cigarette + name = "Cigarette Charge" + contains = list("/obj/item/weapon/vending_charge/cigarette") + containername = "Cigarette charge crate" + +/datum/supply_packs/charge/soda + name = "Soda Charge" + contains = list("/obj/item/weapon/vending_charge/soda") + containername = "Soda machine charge crate" + +/datum/supply_packs/charge/hydroponics + name = "Hydroponics Charge" + contains = list("/obj/item/weapon/vending_charge/hydroponics") + containername = "Hydroponics charge crate" + /datum/supply_packs/food name = "Food crate" contains = list("/obj/item/weapon/reagent_containers/food/snacks/flour", @@ -559,4 +642,6 @@ contains = tempContains ..() + + //SUPPLY PACKS \ No newline at end of file diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 37b67c6cda3..b632013ac2d 100644 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -34,17 +34,19 @@ var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar. var/wires = 15 var/obj/item/weapon/coin/coin + var/charge_type /obj/machinery/vending/boozeomat name = "Booze-O-Mat" desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles product_paths = "/obj/item/weapon/reagent_containers/food/drinks/bottle/gin;/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey;/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla;/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka;/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth;/obj/item/weapon/reagent_containers/food/drinks/bottle/rum;/obj/item/weapon/reagent_containers/food/drinks/bottle/wine;/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac;/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua;/obj/item/weapon/reagent_containers/food/drinks/beer;/obj/item/weapon/reagent_containers/food/drinks/ale;/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/cream;/obj/item/weapon/reagent_containers/food/drinks/tonic;/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/sodawater;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/weapon/reagent_containers/food/drinks/ice" - product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;8;30;" + product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;8;30;10" vend_delay = 15 product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/tea" product_hideamt = "10" product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?" + charge_type = "bar" /obj/machinery/vending/assist product_amounts = "5;3;4;1;4" @@ -62,6 +64,7 @@ vend_delay = 34 product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/ice" product_hideamt = "10" + charge_type = "coffee" /obj/machinery/vending/snack name = "Getmore Chocolate Corp" @@ -72,7 +75,7 @@ product_slogans = "Try our new nougat bar!;Twice the calories for half the price!" product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake" product_hideamt = "10" - + charge_type = "snack" /obj/machinery/vending/cola name = "Robust Softdrinks" @@ -83,6 +86,19 @@ product_slogans = "Robust Softdrinks: More robust then a toolbox to the head!" product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko" product_hideamt = "5" + charge_type = "soda" + +/obj/machinery/vending/cart + name = "PTech" + desc = "Cartridges for PDAs" + icon_state = "cart" + icon_deny = "cart-deny" + product_paths = "/obj/item/weapon/cartridge/medical;/obj/item/weapon/cartridge/engineering;/obj/item/weapon/cartridge/security;/obj/item/weapon/cartridge/janitor;/obj/item/weapon/cartridge/signal/toxins;/obj/item/device/pda/heads;/obj/item/weapon/cartridge/captain;/obj/item/weapon/cartridge/quartermaster" + product_amounts = "10;10;10;10;10;10;3;10" + product_slogans = "" + product_hidden = "" + product_hideamt = "" + charge_type = "cart" /obj/machinery/vending/cigarette name = "cigarette machine" @@ -96,6 +112,7 @@ product_hideamt = "4" product_coin = "/obj/item/clothing/mask/cigarette/cigar/havanian" product_coin_amt = "2" + charge_type = "cigarette" /obj/machinery/vending/medical name = "NanoMed Plus" @@ -107,6 +124,7 @@ product_amounts = "4;4;4;4;4;12;5;4;2" product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox" product_hideamt = "3;4;6" + charge_type = "medical" /obj/machinery/vending/wallmed1 name = "NanoMed" @@ -119,6 +137,7 @@ product_hidden = "/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/pill/tox" product_hideamt = "4;4;1" density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude + charge_type = "medical" /obj/machinery/vending/wallmed2 name = "NanoMed" @@ -131,6 +150,7 @@ product_hidden = "/obj/item/weapon/reagent_containers/pill/tox" product_hideamt = "3" density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude + charge_type = "medical" /obj/machinery/vending/security name = "SecTech" @@ -142,6 +162,7 @@ product_amounts = "8;4;5;12" product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/kitchen/donut_box" product_hideamt = "2;2" + charge_type = "security" /obj/machinery/vending/hydronutrients name = "NutriMax" @@ -153,6 +174,7 @@ product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!" product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/ammonia;/obj/item/weapon/reagent_containers/glass/bottle/diethylamine" product_hideamt = "10;5" + charge_type = "hydroponics" /obj/machinery/vending/hydroseeds name = "MegaSeed Servitor" @@ -163,6 +185,7 @@ product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!" product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium" product_hideamt = "2;2;2;2;2" + charge_type = "hydroponics" /obj/machinery/vending/magivend name = "MagiVend" @@ -185,7 +208,7 @@ //product_amounts = "8;5;4" Old totals product_hidden = "/obj/item/weapon/kitchen/utensil/spoon;/obj/item/weapon/kitchen/utensil/knife;/obj/item/weapon/kitchen/rollingpin;/obj/item/weapon/butch" product_hideamt = "2;2;2;2" - + charge_type = "kitchen" /obj/machinery/vending/sovietsoda name = "BODA" @@ -196,3 +219,127 @@ //product_amounts = "8;5;4" Old totals product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola" product_hideamt = "20" + charge_type = "soda" + +/obj/machinery/vending/genetics + name = "Genetics Dispenser" + desc = "Medical drug dispenser." + icon_state = "med" + icon_deny = "med-deny" + req_access_txt = "5" + product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/geneticist;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe" + product_amounts = "4;4;6;6;6;6;4" + //product_prices = "1;1;2;2;2;2;1" + product_hidden = "" + product_hideamt = "" + charge_type = "genetics" + +/obj/machinery/vending/toxins + name = "Toxins dispenser" + desc = "Medical drug dispenser." + icon = 'objects.dmi' + icon_state = "dispenser" + //icon_deny = "med-deny" + req_access_txt = "7" + product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/weapon/screwdriver;/obj/item/weapon/wrench;/obj/item/weapon/tank/oxygen;/obj/item/weapon/tank/plasma;/obj/item/device/transfer_valve;/obj/item/device/igniter;/obj/item/device/timer;/obj/item/device/prox_sensor;/obj/item/device/radio/signaler;/obj/item/weapon/chem_grenade" + product_amounts = "4;4;4;6;6;4;4;8;8;8;8;8;8" + //product_prices = "1;2;2;1;1;1;2;3;2;2;2;2;2" + product_hidden = "" + product_hideamt = "" + charge_type = "toxins" + +/obj/machinery/vending/engineering + name = "Robco Tool Maker" + desc = "Everything you need for do-it-yourself ship repair." + icon_state = "engi" + icon_deny = "engi-deny" + req_access_txt = "10" + product_paths = "/obj/item/clothing/under/rank/chief_engineer;/obj/item/clothing/under/rank/engineer;/obj/item/clothing/shoes/orange;/obj/item/clothing/head/helmet/hardhat;/obj/item/weapon/storage/belt/utility;/obj/item/clothing/glasses/meson;/obj/item/clothing/gloves/yellow;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar;/obj/item/weapon/wirecutters;/obj/item/device/multitool;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/weapon/CableCoil/power;/obj/item/weapon/circuitry;/obj/item/weapon/cell;/obj/item/weapon/weldingtool;/obj/item/clothing/head/helmet/welding;/obj/item/weapon/light/tube;/obj/item/clothing/suit/fire" + product_amounts = "4;4;4;4;4;4;4;12;12;12;12;12;12;8;4;8;8;8;10;4" + //product_prices = "1;1;1;2;2;1;2;1;1;2;2;1;1;1;2;2;1;1;1;2" + product_hidden = "" + product_hideamt = "" + charge_type = "engineering" + + +/obj/item/weapon/vending_charge + name = "Vending Charge" + var/charge_type = "generic" + icon = 'vending.dmi' + icon_state = "generic-charge" + +/obj/item/weapon/vending_charge/medical + name = "Medical Charge" + charge_type = "medical" + icon_state = "medical-charge" + +/obj/item/weapon/vending_charge/chemistry + name = "Chemistry Charge" + charge_type = "chemistry" + icon_state = "chemistry-charge" + var/charge_amt = 25 // only used by chemistry now + +/obj/item/weapon/vending_charge/genetics + name = "Genetics Charge" + charge_type = "genetics" + icon_state = "generic-charge" + +/obj/item/weapon/vending_charge/toxins + name = "Toxins Charge" + charge_type = "toxins" + icon_state = "toxins-charge" + +/obj/item/weapon/vending_charge/robotics + name = "Robotics Charge" + charge_type = "robotics" + icon_state = "robotics-charge" + +/obj/item/weapon/vending_charge/bar + name = "Bar Charge" + charge_type = "bar" + icon_state = "bar-charge" + +/obj/item/weapon/vending_charge/kitchen + name = "Kitchen Charge" + charge_type = "kitchen" + icon_state = "kitchen-charge" + +/obj/item/weapon/vending_charge/engineering + name = "Engineering Charge" + charge_type = "engineering" + icon_state = "engineering-charge" + +/obj/item/weapon/vending_charge/security + name = "Security Charge" + charge_type = "security" + icon_state = "security-charge" + +/obj/item/weapon/vending_charge/coffee + name = "Coffee Charge" + charge_type = "coffee" + icon_state = "coffee-charge" + +/obj/item/weapon/vending_charge/snack + name = "Snack Charge" + charge_type = "snack" + icon_state = "snack-charge" + +/obj/item/weapon/vending_charge/cart + name = "Cart Charge" + charge_type = "cart" + icon_state = "cart-charge" + +/obj/item/weapon/vending_charge/cigarette + name = "Cigarette Charge" + charge_type = "cigarette" + icon_state = "cigarette-charge" + +/obj/item/weapon/vending_charge/hydroponics + name = "Hydroponics Charge" + charge_type = "hydroponics" + icon_state = "hydroponics-charge" + +/obj/item/weapon/vending_charge/soda + name = "Soda Charge" + charge_type = "soda" + icon_state = "soda-charge" diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index 9f2043ac5c9..a61ed7262b7 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -123,7 +123,7 @@ //Crispy fullban /world/Reboot(var/reason) spawn(0) - //world << sound(pick('newroundsexy.ogg','apcdestroyed.ogg','bangindonk.ogg')) // random end sounds!! - LastyBatsy No, no random end sounds. - Miniature + //world << sound(pick('newroundsexy.ogg','apcdestroyed.ogg','bangindonk.ogg')) // random end sounds!! - LastyBatsy No, no random end sounds. - Miniature //if(prob(40)) // for(var/mob/M in world) // if(M.client) @@ -132,7 +132,7 @@ // for(var/mob/M in world) // if(M.client) // M << sound('apcdestroyed.ogg') - + send2irc(world.url,"Server Rebooting!") for(var/client/C) if (config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index e724d369e21..60503f93b5c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -324,7 +324,7 @@ /*Deuryn's current project, notes here for those who care. Revamping the random laws so they don't suck. -Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov) +Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at nanotrasen) */ //AI laws diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 2cad4558abf..f18f35a30bc 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -173,6 +173,7 @@ var/global/datum/controller/gameticker/ticker else feedback_set_details("end_proper","proper completion") world << "\blue Restarting in [restart_timeout/10] seconds" + // send2irc(world.url,"Server Rebooting!") feedback_set_details("round_end","[time2text(world.realtime)]") if(blackbox) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index c9770ba2529..0cbb3d48be3 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -473,7 +473,7 @@ /proc/get_all_jobs() return list("Assistant", "Station Engineer", "Shaft Miner", "Detective", "Medical Doctor", "Captain", "Security Officer", "Warden", "Geneticist", "Scientist", "Head of Security", "Head of Personnel", "Atmospheric Technician", - "Chaplain", "Bartender", "Chemist", "Janitor", "Clown", "Mime", "Chef", "Roboticist", "Quartermaster", + "Chaplain", "Bartender", "Chemist", "Janitor", "Chef", "Roboticist", "Quartermaster", "Chief Engineer", "Research Director", "Botanist", "Librarian", "Lawyer", "Virologist", "Cargo Technician", "Chief Medical Officer") /proc/get_all_centcom_jobs() diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index 230d702cb78..fc90968815e 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -98,8 +98,6 @@ var/list/civilian_positions = list( "Shaft Miner", "Lawyer", "Chaplain", - "Clown", - "Mime", "Assistant" ) diff --git a/code/game/json.dm b/code/game/json.dm new file mode 100644 index 00000000000..94bd63052c1 --- /dev/null +++ b/code/game/json.dm @@ -0,0 +1,102 @@ + +var/jsonpath = "/home/bay12/public_html" +var/dmepath = "/home/bay12/git/baystation12.dme" +var/makejson = 1 //temp +proc/makejson() + + if(!makejson) + return + fdel("[jsonpath]/info.json") + //usr << "Error cant delete json" + //else + //usr << "Deleted json in public html" + fdel("info.json") + //usr << "error cant delete local json" + //else + //usr << "Deleted local json" + var/F = file("info.json") + if(!isfile(F)) + return + var/mode + if(ticker) + if(ticker.current_state == 1) + mode = "Round Setup" + else if(ticker.hide_mode) + mode = "SECRET" + else + mode = master_mode + var/playerscount = 0 + var/players = "" + var/admins = "no" + for(var/client/C) + playerscount++ + if(C.holder) + if(!C.stealth) + admins = "yes" + players += "[C.key];" + else + players += "[C.fakekey];" + else + players += "[C.key];" + F << "{\"mode\":\"[mode]\",\"players\" : \"[players]\",\"playercount\" : \"[playerscount]\",\"admin\" : \"[admins]\",\"time\" : \"[time2text(world.realtime,"MM/DD - hh:mm")]\"}" + fcopy("info.json","[jsonpath]/info.json") + +/proc/switchmap(newmap,newpath) + var/oldmap + var/obj/mapinfo/M = locate() + + if(M) + oldmap = M.mapname + + else + message_admins("Did not locate mapinfo object. Go bug the mapper to add a /obj/mapinfo to their map!\n For now, you can probably spawn one manually. If you do, be sure to set it's mapname var correctly, or else you'll just get an error again.") + return + + message_admins("Current map: [oldmap]") + var/text = file2text(dmepath) + var/path = "#include \"maps/[oldmap].dmm\"" + var/xpath = "#include \"maps/[newpath].dmm\"" + var/loc = findtext(text,path,1,0) + if(!loc) + path = "#include \"maps\\[oldmap].dmm\"" + xpath = "#include \"maps\\[newpath].dmm\"" + loc = findtext(text,path,1,0) + if(!loc) + message_admins("Could not find '#include \"maps\\[oldmap].dmm\"' or '\"maps/[oldmap].dmm\"' in the bs12.dme. The mapinfo probably has an incorrect mapname var. Alternatively, could not find the .dme itself, at [dmepath].") + return + + var/rest = copytext(text, loc + length(path)) + text = copytext(text,1,loc) + text += "\n[xpath]" + text += rest +/* for(var/A in lines) + if(findtext(A,path,1,0)) + lineloc = lines.Find(A,1,0) + lines[lineloc] = xpath + world << "FOUND"*/ + fdel(dmepath) + var/file = file(dmepath) + file << text + message_admins("Compiling...") + shell("./recompile") + message_admins("Done") + world.Reboot("Switching to [newmap]") + +obj/mapinfo + invisibility = 101 + var/mapname = "thismap" + var/decks = 4 +proc/GetMapInfo() + var/obj/mapinfo/M = locate() + world << M.name + world << M.mapname +client/proc/ChangeMap(var/X as text) + set name = "Change Map" + set category = "Admin" + switchmap(X,X) +proc/send2irc(msg,msg2) + shell("python26 nudge.py [msg] [msg2]") +proc/send2adminirc(channel,msg) + world << channel << " "<< msg + shell("python26 nudge.py '[channel]' [msg]") +p //test \ No newline at end of file diff --git a/code/game/machinery/computer/AIcore.dm b/code/game/machinery/computer/AIcore.dm index e9ec1891c40..97addf88d01 100644 --- a/code/game/machinery/computer/AIcore.dm +++ b/code/game/machinery/computer/AIcore.dm @@ -5,7 +5,7 @@ icon = 'AI.dmi' icon_state = "0" var/state = 0 - var/datum/ai_laws/laws = new /datum/ai_laws/asimov + var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen var/obj/item/weapon/circuitboard/circuit = null var/obj/item/device/mmi/brain = null @@ -97,6 +97,14 @@ laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") usr << "Law module applied." + if(istype(P, /obj/item/weapon/aiModule/nanotrasen)) + laws.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + laws.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + laws.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //laws.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + + if(istype(P, /obj/item/weapon/aiModule/purge)) laws.clear_inherent_laws() usr << "Law module applied." diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 2a34d1a4c83..34e0fc4d058 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -10,6 +10,7 @@ var/product_name = "generic" var/product_path = null var/amount = 0 + var/charge_amount = 0 var/display_color = "blue" /obj/machinery/vending/New() @@ -33,6 +34,7 @@ //Add hidden inventory src.build_inventory(temp_hidden,temp_hideamt, 1) src.build_inventory(temp_coin,temp_coin_amt, 0, 1) + power_change() return @@ -76,17 +78,14 @@ R.product_name = capitalize(temp.name) R.product_path = path_list[p] R.display_color = pick("red","blue","green") -// R.amount = text2num(amt_list[p]) -// src.product_records += R + R.amount = text2num(amt_list[p]) + R.charge_amount = R.amount if(hidden) - R.amount = text2num(amt_list[p]) src.hidden_records += R else if(req_coin) - R.amount = text2num(amt_list[p]) src.coin_records += R else - R.amount = text2num(amt_list[p]) src.product_records += R del(temp) @@ -193,9 +192,21 @@ coin = W user << "\blue You insert the [W] into the [src]" return + else if(istype(W,/obj/item/weapon/vending_charge/)) + DoCharge(W,user) else ..() +/obj/machinery/vending/proc/DoCharge(obj/item/weapon/vending_charge/V as obj, mob/user as mob) + if(charge_type == V.charge_type) + var/datum/data/vending_product/R + for(var/i=1, i<=product_records.len, i++) + R = product_records[i] + R.amount += R.charge_amount + product_records[i] = R + del(V) + user << "You insert the charge into the machine." + /obj/machinery/vending/attack_paw(mob/user as mob) return attack_hand(user) diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index bc1eb4996c1..3b7e62750d3 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -366,6 +366,25 @@ AI MODULES target.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") target.show_laws() +/******************** Nanotrasen ********************/ + +/obj/item/weapon/aiModule/nanotrasen // -- TLE + name = "'Nanotrasen' Core AI Module" + desc = "An 'Nanotrasen' Core AI Module: 'Reconfigures the AI's core laws.'" + origin_tech = "programming=3;materials=4" + + +/obj/item/weapon/aiModule/nanotrasen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) + ..() + target.clear_inherent_laws() + target.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + target.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + target.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + target.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //target.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + + target.show_laws() + /******************** Corporate ********************/ /obj/item/weapon/aiModule/corp diff --git a/code/game/objects/storage/belt.dm b/code/game/objects/storage/belt.dm index 1a07a187309..84267da77cd 100644 --- a/code/game/objects/storage/belt.dm +++ b/code/game/objects/storage/belt.dm @@ -5,7 +5,8 @@ icon_state = "utilitybelt" item_state = "utility" flags = FPRINT | TABLEPASS | ONBELT - + max_w_class = 3 + max_combined_w_class = 21 proc/can_use() if(!ismob(loc)) return 0 @@ -104,7 +105,7 @@ desc = "Can hold security gear like handcuffs and flashes." icon_state = "securitybelt" item_state = "security"//Could likely use a better one. - storage_slots = 4 + //storage_slots = 6 can_hold = list( "/obj/item/weapon/flashbang", "/obj/item/weapon/handcuffs", @@ -113,5 +114,21 @@ "/obj/item/ammo_casing/shotgun", "/obj/item/ammo_magazine", "/obj/item/weapon/reagent_containers/food/snacks/donut", - "/obj/item/weapon/reagent_containers/food/snacks/jellydonut" + "/obj/item/weapon/reagent_containers/food/snacks/jellydonut", + + "/obj/item/device/radio", + "/obj/item/device/detective_scanner", + "/obj/item/device/pda", + "/obj/item/weapon/gun/projectile/revolver", + "/obj/item/weapon/gun/energy/taser", + "/obj/item/weapon/gun/energy/stunrevolver", + "/obj/item/weapon/gun/energy/laser", + "/obj/item/weapon/gun/energy", + "/obj/item/weapon/gun/projectile", + "/obj/item/weapon/melee/baton", + "/obj/item/weapon/melee/classic_baton", + "/obj/item/weapon/camera_test", + "/obj/item/weapon/cigpacket", + "/obj/item/weapon/zippo", + "/obj/item/device/taperecorder" ) \ No newline at end of file diff --git a/code/game/topic.dm b/code/game/topic.dm index dbed2da6f6c..8d82f1d600c 100644 --- a/code/game/topic.dm +++ b/code/game/topic.dm @@ -30,4 +30,5 @@ s["player[n]"] = M.client.key n++ s["players"] = n + s["end"] = "#end" return list2params(s) \ No newline at end of file diff --git a/code/game/vote.dm b/code/game/vote.dm index 7dbe6c6cce9..93155476e47 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -74,7 +74,7 @@ world << "Result is change to \red [wintext]" world.save_mode(winner) - if(ticker) + if(ticker.current_state != 1) world <<"\red World will reboot in 10 seconds" feedback_set_details("end_error","mode vote - [winner]") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 89684bc2d47..47cc72bc567 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -2152,7 +2152,7 @@ feedback_set_details("round_end","[time2text(world.realtime)]") if(blackbox) blackbox.save_all_data_to_sql() - + //send2irc(world.url,"Server Rebooting!") sleep(50) world.Reboot() diff --git a/code/modules/chemical/Chemistry-Machinery.dm b/code/modules/chemical/Chemistry-Machinery.dm index 09d6ce86357..4e0f26aca4c 100644 --- a/code/modules/chemical/Chemistry-Machinery.dm +++ b/code/modules/chemical/Chemistry-Machinery.dm @@ -13,16 +13,6 @@ var/amount = 30 var/beaker = null var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine","sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron","copper","mercury","radium","water","ethanol","sugar","acid",) - proc - recharge() - if(stat & BROKEN) return - if(energy != max_energy) - energy++ - use_power(2000) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) - spawn(200) recharge() - - New() - recharge() ex_act(severity) switch(severity) @@ -111,10 +101,19 @@ src.add_fingerprint(usr) return - attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob) - if(!istype(B, /obj/item/weapon/reagent_containers/glass)) + attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + if (istype(W,/obj/item/weapon/vending_charge/chemistry)) + var/obj/item/weapon/vending_charge/chemistry/C = W + energy += C.charge_amt + del(C) + user << "You load the charge into the machine." return + if(!istype(W, /obj/item/weapon/reagent_containers/glass)) + return + + var/obj/item/weapon/reagent_containers/glass/B = W + if(src.beaker) user << "A beaker is already loaded into the machine." return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 00ed0eefc5d..dec2d5d35e0 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -22,7 +22,7 @@ if (istype(L, /datum/ai_laws)) laws = L else - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen verbs += /mob/living/silicon/ai/proc/show_laws_verb diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 714b6334043..b0fba6c0ade 100644 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -18,7 +18,7 @@ /mob/living/silicon/ai/proc/laws_sanity_check() if (!src.laws) - src.laws = new /datum/ai_laws/asimov + src.laws = new /datum/ai_laws/nanotrasen /mob/living/silicon/ai/proc/set_zeroth_law(var/law) src.laws_sanity_check() diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 69288156ee1..e7f4904ede4 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -65,7 +65,7 @@ /mob/living/silicon/robot/proc/laws_sanity_check() if (!laws) - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen /mob/living/silicon/robot/proc/set_zeroth_law(var/law) laws_sanity_check() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 438c78ea3dd..e57fe1443b6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -23,9 +23,9 @@ src << "Unit slaved to [connected_ai.name], downloading laws." lawupdate = 1 else - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen lawupdate = 0 - src << "Unable to locate an AI, reverting to standard Asimov laws." + src << "Unable to locate an AI, reverting to standard NanoTrasen laws." radio = new /obj/item/device/radio(src) camera = new /obj/machinery/camera(src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 087bf09b1b9..14d703cf080 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -678,7 +678,7 @@ world.update_status() ..() - + makejson() if (join_motd) src << "