From 82b3e77d83dedea1ce4527e848a8f486bf368bab Mon Sep 17 00:00:00 2001 From: "morikou@gmail.com" Date: Sun, 2 Jan 2011 00:18:44 +0000 Subject: [PATCH] RL in IRC Update: - The soymilk + enzyme reaction to create tofu will now make multiple pieces of tofu depending on how much you are mixing together instead of just 1 no matter how much you mix together. - Deleted some garbage code that I'm no longer going to implement (at least not any time soon). - Candy Corn nutriment value reduced to something sensible rather then AUTO FAT - By popular admin request, Guest accounts are not allowed to be any head of staff, the AI, or any security position. Unfortunately, that means if your BYOND name begins with "Guest-", you can't be those positions either. However, that's your own problem. I'll enable the config.txt setup for it later. - Napalm actually works now. It's Aluminum + Plasma + Sulfuric Acid. It creates a relatively short but intense fire over an area and will spread like a normal toxin's fire. - Incendiary grenades redone into a normal chem grenade that makes napalm. Old style incendiary grenade code removed since it didn't work anyway. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@750 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/Chemistry-Reagents.dm | 63 ++------------- code/WorkInProgress/Chemistry-Recipes.dm | 23 ++---- code/WorkInProgress/Chemistry-Tools.dm | 26 ++++++- code/datums/configuration.dm | 4 + code/defines/obj/supplypacks.dm | 8 +- code/game/chemistry.dm | 95 ----------------------- code/modules/admin/banjob.dm | 3 + config/config.txt | 5 ++ 8 files changed, 51 insertions(+), 176 deletions(-) diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index b827512125..b226285b2d 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -554,6 +554,12 @@ datum description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol." reagent_state = LIQUID + napalm + name = "Napalm RG-218" + id = "napalm" + description = "A plasma based variant of napalm that burns violently upon exposure to oxygen." + reagent_state = LIQUID + radium name = "Radium" id = "radium" @@ -1112,64 +1118,7 @@ datum data++ ..() return - /* - addiction //Is a generic "addiction" reagent that is produced by any chemical that is addictive. - name = "Addiction" // It should never be seen by the player since it only exists inside the body. - id = "addiction" - description = "Raw addiction. Patented by the Robust Softdrinks Corporation." - reagent_state = SOLID - on_mob_life(var/mob/M) - if(!M) M = holder.my_atom - if(M.reagents.has_reagent("opium") || M.reagents.has_reagent("morphine")) //Addictive substances goes here. - M.reagents.add_reagent("addiction", 1) //If you if have the substance, it adds another to balance out metabolism - else //If you don't, you start stuffering withdrawls. - if(!M:stuttering) - M:stuttering = 1 - M:stuttering += 2 - M:confused += 2 - if(!data) data = 1 - switch(data) - if(10 to 30) - M:toxloss++ - M.make_jittery(2) - if(31 to INFINITY) - M:toxloss++ - M.make_jittery(10) - ..() //It also starts working out of your system. - return - opium - name = "Opium" - id = "opium" - description = "A mildly addictive narcotic analgesic." - reagent_state = SOLID - on_mob_life(var/mob/M) - if(!M) M = holder.my_atom - if(prob(50)) M:fireloss -= 2 - if(prob(50)) M:bruteloss -= 2 - M.reagents.add_reagent("addiction", 1) //It's addictive? A shock! - ..() - return - - morphine - name = "Morphine" - id = "morphine" - description = "A refined form of opium. It is a powerful narcotic analgesic." - reagent_state = LIQUID - on_mob_life(var/mob/M) - if(!M) M = holder.my_atom - if(prob(50)) M:fireloss -= 5 - if(prob(50)) M:bruteloss -= 5 - M.reagents.add_reagent("addiction", 2) //2x addictive for 3x the effect. - var/overdose = 0 - if(!data) data = 1 - if(data > 100) overdose = 1 //Oh no! An overdose - if(overdose == 1) - M:toxloss += 50 - data = 0 - ..() - return -*/ /////////////////////////Food Reagents//////////////////////////// // Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food diff --git a/code/WorkInProgress/Chemistry-Recipes.dm b/code/WorkInProgress/Chemistry-Recipes.dm index 8ab6f278f7..d7ad6f5899 100644 --- a/code/WorkInProgress/Chemistry-Recipes.dm +++ b/code/WorkInProgress/Chemistry-Recipes.dm @@ -285,25 +285,22 @@ datum napalm name = "Napalm" id = "napalm" - result = null + result = "napalm" required_reagents = list("aluminium" = 1, "plasma" = 1, "acid" = 1 ) - result_amount = null + result_amount = 1 on_reaction(var/datum/reagents/holder, var/created_volume) - var/location = get_turf(holder.my_atom) + var/location = get_turf(holder.my_atom.loc) for(var/turf/simulated/floor/target_tile in range(1,location)) if(target_tile.parent && target_tile.parent.group_processing) target_tile.parent.suspend_group_processing() var/datum/gas_mixture/napalm = new - var/datum/gas/volatile_fuel/fuel = new - fuel.moles = 15 - napalm.trace_gases += fuel + napalm.toxins = 2 * created_volume target_tile.assume_air(napalm) - spawn (0) target_tile.hotspot_expose(700, 400) - + holder.del_reagent("napalm") return smoke @@ -337,13 +334,6 @@ datum required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1) result_amount = 1 - morphine - name = "Morphine" - id = "morphine" - result = "morphine" - required_reagents = list("opium" = 10, "enzyme" = 2) - result_amount = 5 - /////////////////////////////////////////////////////////////////////////////////// // foam and foam precursor @@ -468,7 +458,8 @@ datum result_amount = 1 on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) - new /obj/item/weapon/reagent_containers/food/snacks/tofu(location) + for(var/i = 1, i <= created_volume, i++) + new /obj/item/weapon/reagent_containers/food/snacks/tofu(location) return soysauce diff --git a/code/WorkInProgress/Chemistry-Tools.dm b/code/WorkInProgress/Chemistry-Tools.dm index 2bd850d874..5f455da533 100644 --- a/code/WorkInProgress/Chemistry-Tools.dm +++ b/code/WorkInProgress/Chemistry-Tools.dm @@ -117,7 +117,7 @@ /obj/item/weapon/chem_grenade/metalfoam - name = "metal foam grenade" + name = "Metal-Foam Grenade" desc = "Used for emergency sealing of air breaches." icon_state = "chemg3" stage = 2 @@ -134,8 +134,26 @@ beakers += B1 beakers += B2 +/obj/item/weapon/chem_grenade/incendiary + name = "Incendiary Grenade" + desc = "Used for clearing rooms of living things." + icon_state = "chemg3" + stage = 2 + + New() + ..() + var/obj/item/weapon/reagent_containers/glass/B1 = new(src) + var/obj/item/weapon/reagent_containers/glass/B2 = new(src) + + B1.reagents.add_reagent("aluminium", 25) + B2.reagents.add_reagent("plasma", 25) + B2.reagents.add_reagent("acid", 25) + + beakers += B1 + beakers += B2 + /obj/item/weapon/chem_grenade/cleaner - name = "cleaner grenade" + name = "Cleaner Grenade" desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas." icon_state = "chemg3" stage = 2 @@ -755,7 +773,7 @@ if(target.reagents.total_volume >= target.reagents.maximum_volume) user << "\red you can't add anymore to [target]." return - var/trans = src.reagents.trans_to(target, 1) + var/trans = src.reagents.trans_to(target, 5) user << "\blue You transfer [trans] units of the condiment to [target]." @@ -1388,7 +1406,7 @@ icon_state = "candy_corn" New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("nutriment", 4) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/chips diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 874a88d9fc..ecaaccc19c 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -30,6 +30,7 @@ var/allow_ai = 1 // allow ai job var/hostedby = null var/respawn = 1 + var/guest_jobban = 1 var/server var/banappeals @@ -165,6 +166,9 @@ if ("banappeals") config.banappeals = value + if ("guest_jobban") + config.guest_jobban = text2num(value) + if ("probability") var/prob_pos = findtext(value, " ") var/prob_name = null diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index ea5e5a526f..a7c066ea4d 100644 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -9,7 +9,7 @@ "/obj/item/weapon/smokebomb", "/obj/item/weapon/smokebomb", "/obj/item/weapon/pen/sleepypen", - "/obj/item/weapon/incendiarygrenade") + "/obj/item/weapon/chem_grenade/incendiary") cost = 20 containertype = "/obj/crate" containername = "Special Ops crate" @@ -217,9 +217,9 @@ "/obj/item/weapon/tank/plasma", "/obj/item/weapon/tank/plasma", "/obj/item/weapon/tank/plasma", - "/obj/item/weapon/incendiarygrenade", - "/obj/item/weapon/incendiarygrenade", - "/obj/item/weapon/incendiarygrenade", + "/obj/item/weapon/chem_grenade/incendiary", + "/obj/item/weapon/chem_grenade/incendiary", + "/obj/item/weapon/chem_grenade/incendiary", "/obj/item/clothing/gloves/stungloves") cost = 25 containertype = "/obj/crate/secure/weapon" diff --git a/code/game/chemistry.dm b/code/game/chemistry.dm index 134d2782e4..d1370637b9 100644 --- a/code/game/chemistry.dm +++ b/code/game/chemistry.dm @@ -14,20 +14,6 @@ flags = FPRINT | TABLEPASS | ONBELT | USEDELAY var/datum/effects/system/bad_smoke_spread/smoke -/obj/item/weapon/incendiarygrenade - desc = "It is set to detonate in 3 seconds." - name = "incendiary grenade" - icon = 'grenade.dmi' - icon_state = "flashbang" - var/state = null - var/firestrength = 100 - var/det_time = 20.0 - w_class = 2.0 - item_state = "flashbang" - throw_speed = 4 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT - /obj/item/weapon/mustardbomb desc = "It is set to detonate in 4 seconds." name = "mustard gas bomb" @@ -67,19 +53,6 @@ src.add_fingerprint(user) return -/obj/item/weapon/incendiarygrenade/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.det_time == 60) - src.det_time = 30 - user.show_message("\blue You set the incendiary grenade for a 3 second detonation time.") - src.desc = "It is set to detonate in 3 seconds." - else - src.det_time = 60 - user.show_message("\blue You set the incendiary grenade for a 6 second detonation time.") - src.desc = "It is set to detonate in 6 seconds." - src.add_fingerprint(user) - return - /obj/item/weapon/smokebomb/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (user.equipped() == src) if (!( src.state )) @@ -97,31 +70,6 @@ src.add_fingerprint(user) return -/obj/item/weapon/incendiarygrenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) - if (user.equipped() == src) - if (!( src.state )) - user << "\red You prime the incendiary grenade! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'armbomb.ogg', 75, 1, -3) - spawn( src.det_time ) - prime() - return - user.dir = get_dir(user, target) - user.drop_item() - var/t = (isturf(target) ? target : target.loc) - walk_towards(src, t, 3) - src.add_fingerprint(user) - return - -/obj/item/weapon/incendiarygrenade/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/incendiarygrenade/attack_hand() - walk(src, null, null) - ..() - return - /obj/item/weapon/smokebomb/attack_paw(mob/user as mob) return src.attack_hand(user) @@ -149,37 +97,6 @@ del(src) return -/obj/item/weapon/incendiarygrenade/proc/prime() - playsound(src.loc, 'bamf.ogg', 75, 1, -2) - var/turf/T = src.loc - var/turf/Tx1 = src.x + 1 - var/turf/Txm1 = src.x - 1 - var/turf/Ty1 = src.y + 1 - var/turf/Tym1 = src.y - 1 - for(var/turf/simulated/floor/target_tile in list(T,Tx1,Txm1,Ty1,Tym1)) - if(target_tile.parent && target_tile.parent.group_processing) - target_tile.parent.suspend_group_processing() - - var/datum/gas_mixture/napalm = new - var/datum/gas/volatile_fuel/fuel = new - - fuel.moles = 15 - napalm.trace_gases += fuel - - target_tile.assume_air(napalm) - - spawn target_tile.hotspot_expose(700, 400) - - for(var/obj/blob/B in view(8,src)) - var/damage = round(30/(get_dist(B,src)+1)) - B.health -= damage - B.update() - - sleep(10) - del(src) - return - - /obj/item/weapon/smokebomb/attack_self(mob/user as mob) if (!src.state) user << "\red You prime the smoke bomb! [det_time/10] seconds!" @@ -191,18 +108,6 @@ return return -/obj/item/weapon/incendiarygrenade/attack_self(mob/user as mob) - if (!src.state) - user << "\red You prime the incendiary grenade! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - add_fingerprint(user) - spawn( src.det_time ) - prime() - return - return - - /obj/item/weapon/mustardbomb/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/screwdriver)) if (src.det_time == 80) diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 9d51e12e9d..cb4db232b7 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -9,6 +9,9 @@ var /proc/jobban_isbanned(mob/M, rank) if(M) + if (rank == "Captain" || rank == "AI" || rank == "Head of Personnel" || rank == "Head of Security" || rank == "Chief Engineer" || rank == "Research Director" || rank == "Warden" || rank == "Detective" || rank == "Chief Medical Officer") + if(IsGuestKey(M.key)/* && config.guest_jobban*/) + return 1 if (jobban_keylist.Find(text("[M.ckey] - [rank]"))) return 1 else diff --git a/config/config.txt b/config/config.txt index 0d1c659ad4..310b444a12 100644 --- a/config/config.txt +++ b/config/config.txt @@ -68,8 +68,13 @@ NORESPAWN # set a hosted by name for unix platforms HOSTEDBY Yournamehere +# Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. +# Set to 1 to jobban them from those positions, set to 0 to allow them. +GUEST_JOBBAN 1 + # set a server location for world reboot. Don't include the byond://, just give the address and port. # SERVER ss13.example.com:2506 #Ban appeals URL - usually for a forum or wherever people should go to contact your admins. #BANAPPEALS http://justanotherday.example.com +