diff --git a/baystation12.dme b/baystation12.dme index 8eac216fe6..cc4c98ac73 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -404,6 +404,7 @@ #include "code\game\events\EventProcs\ninja_equipment.dm" #include "code\game\events\EventProcs\space_ninja.dm" #include "code\game\events\EventProcs\spacevines.dm" +#include "code\game\events\EventProcs\wormholes.dm" #include "code\game\events\Events\AlienInfestation.dm" #include "code\game\events\Events\Appendicitis.dm" #include "code\game\events\Events\ElectricalStorm.dm" diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 3cef703980..59c5c6543d 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -2,9 +2,6 @@ var/server_name = null // server name (for world name / status) var/server_suffix = 0 // generate numeric suffix based on server port - var/medal_hub = null // medal hub name - var/medal_password = null // medal hub password - var/log_ooc = 0 // log OOC channek var/log_access = 0 // log login/logout var/log_say = 0 // log client say @@ -211,12 +208,6 @@ if ("serversuffix") config.server_suffix = 1 - if ("medalhub") - config.medal_hub = value - - if ("medalpass") - config.medal_password = value - if ("hostedby") config.hostedby = value @@ -381,8 +372,8 @@ sqllogging = 1 else diary << "Unknown setting in configuration: '[name]'" - -/*/datum/configuration/proc/loadforumsql(filename) // -- TLE +/* +/datum/configuration/proc/loadforumsql(filename) // -- TLE var/text = file2text(filename) if (!text) @@ -433,8 +424,8 @@ if ("authenticatedgroup") forum_authenticated_group = value else - diary << "Unknown setting in configuration: '[name]'"*/ - + diary << "Unknown setting in configuration: '[name]'" +*/ /datum/configuration/proc/pick_mode(mode_name) // I wish I didn't have to instance the game modes in order to look up // their information, but it is the only way (at least that I know of). diff --git a/code/defines/client.dm b/code/defines/client.dm index d803c6a9e4..499e7b3dbf 100644 --- a/code/defines/client.dm +++ b/code/defines/client.dm @@ -14,6 +14,11 @@ //END Admin Things + //Key auth things +// authenticate = 0 +// var/authenticated = 0 +// var/authenticating = 0 + var/listen_ooc = 1 var/move_delay = 1 var/moving = null diff --git a/code/defines/global.dm b/code/defines/global.dm index 1fa0b55e9f..24e128d0f9 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -151,9 +151,7 @@ var shuttlecoming = 0 join_motd = null - auth_motd = null rules = null - no_auth_motd = null forceblob = 0 custom_event_msg = null diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm index 1c10c5abdd..be2e9bc8bd 100644 --- a/code/defines/obj/storage.dm +++ b/code/defines/obj/storage.dm @@ -332,7 +332,7 @@ /obj/item/weapon/storage/flashbang_kit name = "flashbangs (WARNING)" - desc = "WARNING: Do not use without reading these preautions!\nThese devices are extremely dangerous and can cause blindness or deafness if used incorrectly.\nThe chemicals contained in these devices have been tuned for maximal effectiveness and due to\nextreme safety precuaiotn shave been incased in a tamper-proof pack. DO NOT ATTEMPT TO OPEN\nFLASH WARNING: Do not use continually. Excercise extreme care when detonating in closed spaces.\n\tMake attemtps not to detonate withing range of 2 meters of the intended target. It is imperative\n\tthat the targets visit a medical professional after usage. Damage to eyes increases extremely per\n\tuse and according to range. Glasses with flash resistant filters DO NOT always work on high powered\n\tflash devices such as this. EXERCISE CAUTION REGARDLESS OF CIRCUMSTANCES\nSOUND WARNING: Do not use continually. Visit a medical professional if hearing is lost.\n\tThere is a slight chance per use of complete deafness. Exercise caution and restraint.\nSTUN WARNING: If the intended or unintended target is too close to detonation the resulting sound\n\tand flash have been known to cause extreme sensory overload resulting in temporary\n\tincapacitation.\nDO NOT USE CONTINUALLY\nOperating Directions:\n\t1. Pull detonnation pin. ONCE THE PIN IS PULLED THE GRENADE CAN NOT BE DISARMED!\n\t2. Throw grenade. NEVER HOLD A LIVE FLASHBANG\n\t3. The grenade will detonste 10 seconds hafter being primed. EXCERCISE CAUTION\n\t-Never prime another grenade until after the first is detonated\nNote: Usage of this pyrotechnic device without authorization is an extreme offense and can\nresult in severe punishment upwards of 10 years in prison per use.\n\nDefault 3 second wait till from prime to detonation. This can be switched with a screwdriver\nto 10 seconds.\n\nCopyright of Nanotrasen Industries- Military Armnaments Division\nThis device was created by Nanotrasen Labs a member of the Expert Advisor Corporation" + desc = "" icon_state = "flashbang" item_state = "syringe_kit" foldable = /obj/item/stack/sheet/cardboard //BubbleWrap diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index 5bf3b888a5..b05d22e526 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -19,8 +19,6 @@ /world/proc/load_motd() join_motd = file2text("config/motd.txt") - auth_motd = file2text("config/motd-auth.txt") - no_auth_motd = file2text("config/motd-noauth.txt") /world/proc/load_rules() rules = file2text("config/rules.html") diff --git a/code/game/events/EventProcs/black_hole.dm b/code/game/events/EventProcs/black_hole.dm index 12d0a20f7d..bc69352df5 100644 --- a/code/game/events/EventProcs/black_hole.dm +++ b/code/game/events/EventProcs/black_hole.dm @@ -2,86 +2,87 @@ name = "black hole" icon = 'objects.dmi' desc = "FUCK FUCK FUCK AAAHHH" - icon_state = "bhole2" - opacity = 0 + icon_state = "bhole3" + opacity = 1 unacidable = 1 density = 0 anchored = 1 - var/datum/effect/effect/system/harmless_smoke_spread/smoke - /obj/effect/bhole/New() - src.smoke = new /datum/effect/effect/system/harmless_smoke_spread() - src.smoke.set_up(5, 0, src) - src.smoke.attach(src) - src:life() + spawn(4) + controller() + +/obj/effect/bhole/proc/controller() + while(src) + + if(!isturf(loc)) + del(src) + return + + //DESTROYING STUFF AT THE EPICENTER + for(var/mob/living/M in orange(1,src)) + del(M) + for(var/obj/O in orange(1,src)) + del(O) + for(var/turf/simulated/ST in orange(1,src)) + ST.ReplaceWithSpace() + + sleep(6) + grav(10, 4, 10, 0 ) + sleep(6) + grav( 8, 4, 10, 0 ) + sleep(6) + grav( 9, 4, 10, 0 ) + sleep(6) + grav( 7, 3, 40, 1 ) + sleep(6) + grav( 5, 3, 40, 1 ) + sleep(6) + grav( 6, 3, 40, 1 ) + sleep(6) + grav( 4, 2, 50, 6 ) + sleep(6) + grav( 3, 2, 50, 6 ) + sleep(6) + grav( 2, 2, 75,25 ) + sleep(6) -/obj/effect/bhole/Bumped(atom/A) - if (istype(A,/mob/living)) - del(A) - else - A:ex_act(1.0) - -/obj/effect/bhole/proc/life() //Oh man , this will LAG - - if (prob(10)) - src.anchored = 0 - step(src,pick(alldirs)) - if (prob(30)) + //MOVEMENT + if( prob(50) ) + src.anchored = 0 step(src,pick(alldirs)) - src.anchored = 1 + src.anchored = 1 - for (var/atom/X in orange(9,src)) - if ((istype(X,/obj) || istype(X,/mob/living)) && prob(7)) - if (!X:anchored) - step_towards(X,src) +/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance) + if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen + del(src) + return + for(var/t = -r, t < r, t++) + affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance) + affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance) + affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance) + affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance) + return - for (var/atom/B in orange(7,src)) - if (istype(B,/obj)) - if (!B:anchored && prob(50)) - step_towards(B,src) - if(prob(10)) B:ex_act(3.0) +/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance) + //Get turf at coordinate + var/turf/T = locate(x, y, z) + if(isnull(T)) return + + //Pulling and/or ex_act-ing movable atoms in that turf + if( prob(pull_chance) ) + for(var/obj/O in T.contents) + if(O.anchored) + O.ex_act(ex_act_force) else - B:anchored = 0 - //step_towards(B,src) - //B:anchored = 1 - if(prob(10)) B:ex_act(3.0) - else if (istype(B,/turf)) - if (istype(B,/turf/simulated) && (prob(1) && prob(75))) - src.smoke.start() - B:ReplaceWithSpace() - else if (istype(B,/mob/living)) - step_towards(B,src) + step_towards(O,src) + for(var/mob/living/M in T.contents) + step_towards(M,src) - - for (var/atom/A in orange(4,src)) - if (istype(A,/obj)) - if (!A:anchored && prob(90)) - step_towards(A,src) - if(prob(30)) A:ex_act(2.0) - else - A:anchored = 0 - //step_towards(A,src) - //A:anchored = 1 - if(prob(30)) A:ex_act(2.0) - else if (istype(A,/turf)) - if (istype(A,/turf/simulated) && prob(1)) - src.smoke.start() - A:ReplaceWithSpace() - else if (istype(A,/mob/living)) - step_towards(A,src) - - - for (var/atom/D in orange(1,src)) - //if (hascall(D,"blackholed")) - // call(D,"blackholed")(null) - // continue - if (istype(D,/mob/living)) - del(D) - else - D:ex_act(1.0) - - spawn(17) - life() \ No newline at end of file + //Destroying the turf + if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) ) + var/turf/simulated/ST = T + ST.ReplaceWithSpace() + return \ No newline at end of file diff --git a/code/game/events/EventProcs/wormholes.dm b/code/game/events/EventProcs/wormholes.dm new file mode 100644 index 0000000000..31a9b28200 --- /dev/null +++ b/code/game/events/EventProcs/wormholes.dm @@ -0,0 +1,63 @@ +/proc/wormhole_event() + spawn() + var/list/pick_turfs = list() + for(var/turf/simulated/floor/T in world) + if(T.z == 1) + pick_turfs += T + + if(pick_turfs.len) + //All ready. Announce that bad juju is afoot. + command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") + world << sound('spanomalies.ogg') + + //prob(20) can be approximated to 1 wormhole every 5 turfs! + //admittedly less random but totally worth it >_< + var/event_duration = 3000 //~5 minutes in ticks + var/number_of_selections = (pick_turfs.len/5)+1 //+1 to avoid division by zero! + var/sleep_duration = round( event_duration / number_of_selections ) + var/end_time = world.time + event_duration //the time by which the event should have ended + + var/increment = max(1,round(number_of_selections/50)) +// world << "DEBUG: number_of_selections: [number_of_selections] | sleep_duration: [sleep_duration]" + + var/i = 1 + while( 1 ) + + //we've run into overtime. End the event + if( end_time < world.time ) +// world << "DEBUG: we've run into overtime. End the event" + return + if( !pick_turfs.len ) +// world << "DEBUG: we've run out of turfs to pick. End the event" + return + + //loop it round + i += increment + i %= pick_turfs.len + i++ + + //get our enter and exit locations + var/turf/simulated/floor/enter = pick_turfs[i] + pick_turfs -= enter //remove it from pickable turfs list + if( !enter || !istype(enter) ) continue //sanity + + var/turf/simulated/floor/exit = pick(pick_turfs) + pick_turfs -= exit + if( !exit || !istype(exit) ) continue //sanity + + create_wormhole(enter,exit) + + sleep(sleep_duration) //have a well deserved nap! + + +//maybe this proc can even be used as an admin tool for teleporting players without ruining immulsions? +/proc/create_wormhole(var/turf/enter as turf, var/turf/exit as turf) + var/obj/effect/portal/P = new /obj/effect/portal( enter ) + P.target = exit + P.creator = null + P.icon = 'objects.dmi' + P.failchance = 0 + P.icon_state = "anom" + P.name = "wormhole" + spawn(rand(300,600)) + del(P) \ No newline at end of file diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index eb4135f410..8db9eabe4a 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -792,15 +792,6 @@ src.visible_message("\red [src] drives over [H]!") playsound(src.loc, 'splat.ogg', 50, 1) - /* - if(ismob(load)) - var/mob/M = load - if(M.reagents.has_reagent("beer")) - M.unlock_medal("DUI", 1) - if(M.reagents.has_reagent("space_drugs") && istype(H) && H.wear_id.assignment == "Security Officer") - M.unlock_medel("Ridin' Dirty",1) - */ - var/damage = rand(5,15) H.apply_damage(2*damage, BRUTE, "head") H.apply_damage(2*damage, BRUTE, "chest") diff --git a/code/game/verbs/authorize.dm b/code/game/verbs/authorize.dm index 5e2d59a603..2129eb67d4 100644 --- a/code/game/verbs/authorize.dm +++ b/code/game/verbs/authorize.dm @@ -1,7 +1,4 @@ /* - -The old goon auth/beta code is here: - /client/proc/authorize() set name = "Authorize" @@ -45,8 +42,9 @@ The old goon auth/beta code is here: src << "Try again using the Authorize command, sometimes the server will hiccup and not correctly authorize." src << "\blue[no_auth_motd]" src.authenticating = 0 +*/ - +/* The old goon auth/beta code is here /client/proc/beta_tester_auth() set name = "Tester?" /*if(istester(src)) @@ -167,4 +165,4 @@ var/list/beta_tester_keylist goon_savefile() return 1 return 0 -*/ +*/ \ No newline at end of file diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 4f8a60a2f9..9060defb32 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -12,7 +12,9 @@ /mob/verb/ooc(msg as text) set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite set category = "OOC" - + if (IsGuestKey(src.key)) + src << "You are not authorized to communicate over these channels." + return msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) if(!msg) return @@ -36,17 +38,15 @@ for (var/client/C) if (src.client.holder && (!src.client.stealth || C.holder)) -// C << "OOC: [src.key]: " if (src.client.holder.rank == "Admin Observer") - C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " else if (src.client.holder.rank == "Retired Admin") - C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " else - C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " else if (C.listen_ooc) - C << "OOC: [src.client.stealth ? src.client.fakekey : src.key]: " - + C << "OOC: [src.client.stealth ? src.client.fakekey : src.key]: " /* /mob/verb/goonsay(msg as text) set name = "Goonsay" diff --git a/code/game/vote.dm b/code/game/vote.dm index f475c37f7a..0c87858e84 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -408,7 +408,7 @@ for(var/mob/CM in world) if(CM.client) - if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2)) + if( config.vote_no_default || (config.vote_no_dead && CM.stat == 2) ) CM.client.vote = "none" else CM.client.vote = "default" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 71811b312d..5897f2cded 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1049,6 +1049,16 @@ var/global/BSACooldown = 0 log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1) +// if (href_list["adminauth"]) +// if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) +// var/mob/M = locate(href_list["adminauth"]) +// if (ismob(M) && !M.client.authenticated && !M.client.authenticating) +// M.client.verbs -= /client/proc/authorize +// M.client.authenticated = text("admin/[]", usr.client.authenticated) +// log_admin("[key_name(usr)] authorized [key_name(M)]") +// message_admins("\blue [key_name_admin(usr)] authorized [key_name_admin(M)]", 1) +// M.client << text("You have been authorized by []", usr.key) + if (href_list["revive"]) if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/mob/living/M = locate(href_list["revive"]) @@ -1904,30 +1914,16 @@ var/global/BSACooldown = 0 world << sound('granomalies.ogg') var/turf/T = pick(blobstart) var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 ) - spawn(rand(50, 300)) + spawn(rand(100, 600)) del(bh) - if("timeanomalies") - command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") - world << sound('spanomalies.ogg') - var/list/turfs = list( ) - var/turf/picked - for(var/turf/T in world) - if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space)) - turfs += T - for(var/turf/T in world) - set background = 1 - if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor)) - spawn(50+rand(0,3000)) - picked = pick(turfs) - var/obj/effect/portal/P = new /obj/effect/portal( T ) - P.target = picked - P.creator = null - P.icon = 'objects.dmi' - P.failchance = 0 - P.icon_state = "anom" - P.name = "wormhole" - spawn(rand(300,600)) - del(P) + + if("timeanomalies") //dear god this code was awful :P Still needs further optimisation + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","STA") + //moved to its own dm so I could split it up and prevent the spawns copying variables over and over + //can be found in code\game\game_modes\events\wormholes.dm + wormhole_event() + if("goblob") //feedback_inc("admin_secrets_fun_used",1) //feedback_add_details("admin_secrets_fun_used","BL") @@ -2354,6 +2350,10 @@ var/global/BSACooldown = 0 var/dat = "