From 99321389f27b42982bd173ca857852c4b46430a8 Mon Sep 17 00:00:00 2001 From: Kilakk Date: Thu, 14 Nov 2013 21:45:25 -0500 Subject: [PATCH 1/7] Fixes #3886, ATMs no longer log you in automagically Silly security level 0 ruined everything Added a tiny sanity check as well to avoid runtimes --- code/modules/economy/ATM.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 32dc6cbc9d3..398d311c189 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -97,8 +97,6 @@ log transactions user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005." return if(get_dist(src,user) <= 1) - //check to see if the user has low security enabled - scan_user(user) //js replicated from obj/machinery/computer/card var/dat = "

NanoTrasen Automatic Teller Machine

" @@ -223,7 +221,11 @@ log transactions var/new_sec_level = max( min(text2num(href_list["new_security_level"]), 2), 0) authenticated_account.security_level = new_sec_level if("attempt_auth") - if(!ticks_left_locked_down) + + // check if they have low security enabled + scan_user(usr) + + if(!ticks_left_locked_down && held_card) var/tried_account_num = text2num(href_list["account_num"]) if(!tried_account_num) tried_account_num = held_card.associated_account_number @@ -363,3 +365,5 @@ log transactions T.date = current_date_string T.time = worldtime2text() authenticated_account.transaction_log.Add(T) + + view_screen = NO_SCREEN \ No newline at end of file From 734d89c669e1f078e40a589b91a8dabd5250ab64 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 15 Nov 2013 01:00:25 -0600 Subject: [PATCH 2/7] BugFix: Cult Ghosts...after a bit of professional advise from chinsky. Problem: Cult members can't use the rune to see ghosts, then beat ghosts over the head. it was being intercepted by _onclick and processed there and only displaying an angry red notice that you hit that ghost. Ghost didn't become visible, it disappeared soon after moving off the rune. Solution: Made an attackby for ghosts to check when they are being beat up by cultist with books, now they appear. Minor feature change: Now if a visible ghost gets hit it will give a different message than the standard "Ghost is pulled through from the other side". --- code/modules/mob/dead/observer/observer.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ae544c43d54..e06d7ed2633 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -63,6 +63,23 @@ real_name = name ..() + +/mob/dead/attackby(obj/item/W, mob/user) + if(istype(W,/obj/item/weapon/tome)) + var/mob/dead/M = src + if(src.invisibility != 0) + M.invisibility = 0 + user.visible_message( \ + "\red [user] drags ghost, [M], to our plan of reality!", \ + "\red You drag [M] to our plan of reality!" \ + ) + else + user.visible_message ( \ + "\red [user] just tried to smash his book into that ghost! It's not very effective", \ + "\red You get the feeling that the ghost can't become any more visible." \ + ) + + /mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 1 /* From 4ccf7d0a08c9429065e6c0512ca61ef96a6fba9f Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 15 Nov 2013 22:01:35 -0600 Subject: [PATCH 3/7] Bugfix (3778) Power cells in exosuits have the same amount of power as a highcap cell Issue: Mechs are created/spawned with a high-capaciter cell that is named "Power cell" and confuses some of the less bright roboticists and their beards. Solution: Shave the roboticist, and also renamed the cell that spawns to properly reflect it's higher capacity. --- code/game/mecha/mecha.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 1b47d6f9a90..65284a054d1 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -115,6 +115,7 @@ cell = C return cell = new(src) + cell.name = "high-capacity power cell" cell.charge = 15000 cell.maxcharge = 15000 From ab06251c32a489d5705778e5afc5ada22e534a36 Mon Sep 17 00:00:00 2001 From: Nanai Date: Sat, 16 Nov 2013 02:01:16 -0500 Subject: [PATCH 4/7] Event Rebalance! As per request, events have been rebalanced to be a bit more even and vastly less appendicitis. Event timers have been increased from 15-25 minutes to 20-40 minutes. --- code/modules/events/event_dynamic.dm | 30 ++++++++++++++-------------- code/modules/events/event_manager.dm | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 93142e02614..8a5b3b61b26 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -44,39 +44,39 @@ var/list/event_last_fired = list() //see: // Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm // Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm - possibleEvents[/datum/event/economic_event] = 200 - possibleEvents[/datum/event/trivial_news] = 300 - possibleEvents[/datum/event/mundane_news] = 200 + possibleEvents[/datum/event/economic_event] = 300 + possibleEvents[/datum/event/trivial_news] = 400 + possibleEvents[/datum/event/mundane_news] = 300 possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200) possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50) if(account_hack_attempted) possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200) - possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"] - possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"] + possibleEvents[/datum/event/carp_migration] = 20 + 10 * active_with_role["Engineer"] + possibleEvents[/datum/event/brand_intelligence] = 20 + 25 * active_with_role["Janitor"] - possibleEvents[/datum/event/rogue_drone] = 25 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"] - possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"] + possibleEvents[/datum/event/rogue_drone] = 5 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"] + possibleEvents[/datum/event/infestation] = 100 + 100 * active_with_role["Janitor"] possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25 possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5 - possibleEvents[/datum/event/grid_check] = 25 + 20 * active_with_role["Engineer"] - possibleEvents[/datum/event/electrical_storm] = 10 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"] + possibleEvents[/datum/event/electrical_storm] = 15 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"] if(!spacevines_spawned) - possibleEvents[/datum/event/spacevine] = 5 + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"] if(minutes_passed >= 30) // Give engineers time to set up engine possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"] - possibleEvents[/datum/event/meteor_shower] = 40 * active_with_role["Engineer"] + possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"] possibleEvents[/datum/event/blob] = 20 * active_with_role["Engineer"] - possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100 + possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 15 if(active_with_role["Medical"] > 0) - possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 50 - possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150 - possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 20 possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50 possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50 diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 89347a299d9..52fbc8220a8 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event //var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation -var/eventTimeLower = 9000 //15 minutes -var/eventTimeUpper = 15000 //25 minutes +var/eventTimeLower = 12000 //20 minutes +var/eventTimeUpper = 24000 //40 minutes var/scheduledEvent = null From 08a3226f0794405984e74c522b67ab0b86d1a675 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Sun, 17 Nov 2013 15:03:50 +0000 Subject: [PATCH 5/7] Fix for the config .gitignore. Signed-off-by: Mloc-Argent --- .gitignore | 6 ------ config/.gitignore | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 config/.gitignore diff --git a/.gitignore b/.gitignore index 0dc17248d0c..7daab156185 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,3 @@ *.rsc *.dmb *.lk - -#ignore any files in config/, except those in subdirectories. -/config/* -!/config/*/* - -/baystation12.int diff --git a/config/.gitignore b/config/.gitignore new file mode 100644 index 00000000000..ec7ed9b452e --- /dev/null +++ b/config/.gitignore @@ -0,0 +1,3 @@ +#ignore everything here, except subdirectories. +* +!*/ From b75380985e273f172653cd9115b77a31e216c62e Mon Sep 17 00:00:00 2001 From: DJSnapshot Date: Sun, 17 Nov 2013 11:54:43 -0800 Subject: [PATCH 6/7] Using a better method to handle autotransfers. Old method was silly. --- baystation12.dme | 1 + code/controllers/voting.dm | 1 - code/game/gamemodes/gameticker.dm | 14 -------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index a5cf03ea1e6..aaf9eab8aff 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -75,6 +75,7 @@ #include "code\ATMOSPHERICS\components\unary\vent_pump.dm" #include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm" #include "code\controllers\_DynamicAreaLighting_TG.dm" +#include "code\controllers\autotransfer.dm" #include "code\controllers\configuration.dm" #include "code\controllers\failsafe.dm" #include "code\controllers\lighting_controller.dm" diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 452c174b356..92f55a3fd64 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -50,7 +50,6 @@ datum/controller/vote initiate_vote("crew_transfer","the server") log_debug("The server has called an Autotransfer") - proc/reset() initiator = null time_remaining = 0 diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index a03068371f0..ea9fbaec4a7 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -36,8 +36,6 @@ var/global/datum/controller/gameticker/ticker var/triai = 0//Global holder for Triumvirate - var/initialtpass = 0 //holder for inital autotransfer vote timer - /datum/controller/gameticker/proc/pregame() login_music = pick(\ /*'sound/music/halloween/skeletons.ogg',\ @@ -63,17 +61,6 @@ var/global/datum/controller/gameticker/ticker current_state = GAME_STATE_SETTING_UP while (!setup()) -/datum/controller/gameticker/proc/votetimer() - var/timerbuffer = 0 - if (initialtpass == 0) - timerbuffer = config.vote_autotransfer_initial - else - timerbuffer = config.vote_autotransfer_interval - spawn(timerbuffer) - vote.autotransfer() - initialtpass = 1 - votetimer() - /datum/controller/gameticker/proc/setup() //Create and announce mode @@ -166,7 +153,6 @@ var/global/datum/controller/gameticker/ticker spawn(3000) statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE - votetimer() return 1 /datum/controller/gameticker From 9936a9251facf2a923c0f5a53984bf6450488f0a Mon Sep 17 00:00:00 2001 From: DJSnapshot Date: Sun, 17 Nov 2013 11:55:57 -0800 Subject: [PATCH 7/7] Helps to add the actual new file. --- code/controllers/autotransfer.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 code/controllers/autotransfer.dm diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm new file mode 100644 index 00000000000..c69290c7bd8 --- /dev/null +++ b/code/controllers/autotransfer.dm @@ -0,0 +1,13 @@ +var/datum/controller/transfer_controller = new /transfer_controller() +var/timerbuffer = 0 //buffer for time check +/transfer_controller/New() + timerbuffer = config.vote_autotransfer_initial + processing_objects += src + +/transfer_controller/Del() + processing_objects -= src + +/transfer_controller/proc/process() + if (world.time >= timerbuffer - 600) + vote.autotransfer() + timerbuffer = timerbuffer + config.vote_autotransfer_interval \ No newline at end of file