Continual updates until merged
This commit is contained in:
@@ -61,7 +61,9 @@ GLOBAL_PROTECT(Banlist)
|
||||
return 1
|
||||
|
||||
/proc/LoadBans()
|
||||
|
||||
if(!CONFIG_GET(flag/ban_legacy_system))
|
||||
return
|
||||
|
||||
GLOB.Banlist = new("data/banlist.bdb")
|
||||
log_admin("Loading Banlist")
|
||||
|
||||
|
||||
@@ -554,6 +554,9 @@
|
||||
#define NOTESFILE "data/player_notes.sav"
|
||||
//if the AUTOCONVERT_NOTES is turned on, anytime a player connects this will be run to try and add all their notes to the databas
|
||||
/proc/convert_notes_sql(ckey)
|
||||
if(!fexists(NOTESFILE))
|
||||
return
|
||||
|
||||
var/savefile/notesfile = new(NOTESFILE)
|
||||
if(!notesfile)
|
||||
log_game("Error: Cannot access [NOTESFILE]")
|
||||
|
||||
@@ -147,10 +147,9 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
|
||||
/obj/effect/rune/proc/do_invoke_glow()
|
||||
set waitfor = FALSE
|
||||
var/oldtransform = transform
|
||||
animate(src, transform = matrix()*2, alpha = 0, time = 5, flags = ANIMATION_END_NOW) //fade out
|
||||
sleep(5)
|
||||
animate(src, transform = oldtransform, alpha = 255, time = 0, flags = ANIMATION_END_NOW)
|
||||
animate(src, transform = matrix(), alpha = 255, time = 0, flags = ANIMATION_END_NOW)
|
||||
|
||||
/obj/effect/rune/proc/fail_invoke()
|
||||
//This proc contains the effects of a rune if it is not invoked correctly, through either invalid wording or not enough cultists. By default, it's just a basic fizzle.
|
||||
|
||||
@@ -3,7 +3,7 @@ For the main html chat area
|
||||
*********************************/
|
||||
|
||||
//Precaching a bunch of shit
|
||||
GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of icons for the browser output
|
||||
GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of icons for the browser output
|
||||
|
||||
//On client, created on login
|
||||
/datum/chatOutput
|
||||
|
||||
@@ -916,6 +916,9 @@
|
||||
/mob/living/carbon/human/species/dullahan
|
||||
race = /datum/species/dullahan
|
||||
|
||||
/mob/living/carbon/human/species/felinid
|
||||
race = /datum/species/human/felinid
|
||||
|
||||
/mob/living/carbon/human/species/fly
|
||||
race = /datum/species/fly
|
||||
|
||||
|
||||
@@ -209,13 +209,22 @@
|
||||
|
||||
/datum/emote/living/laugh/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna.species.id == "human" && (!H.mind || !H.mind.miming))
|
||||
if(. && iscarbon(user)) //Citadel Edit because this is hilarious
|
||||
var/mob/living/carbon/C = user
|
||||
if(!C.mind || C.mind.miming)
|
||||
return
|
||||
if(iscatperson(C)) //we ask for is cat first because they're a subtype that tests true for ishumanbasic because HERESY
|
||||
playsound(C, pick('sound/voice/catpeople/nyahaha1.ogg',
|
||||
'sound/voice/catpeople/nyahaha2.ogg',
|
||||
'sound/voice/catpeople/nyaha.ogg',
|
||||
'sound/voice/catpeople/nyahehe.ogg'),
|
||||
50, 1)
|
||||
return
|
||||
if(ishumanbasic(C))
|
||||
if(user.gender == FEMALE)
|
||||
playsound(H, 'sound/voice/human/womanlaugh.ogg', 50, 1)
|
||||
playsound(C, 'sound/voice/human/womanlaugh.ogg', 50, 1)
|
||||
else
|
||||
playsound(H, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1)
|
||||
playsound(C, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1)
|
||||
|
||||
/datum/emote/living/look
|
||||
key = "look"
|
||||
|
||||
@@ -169,8 +169,8 @@ They *could* go in their appropriate files, but this is supposed to be modular
|
||||
drain = (round((rand(G.mindrain, G.maxdrain))/2))
|
||||
var/drained = 0
|
||||
if(PN && do_after(H,10, target = src))
|
||||
drained = min(drain, PN.avail)
|
||||
PN.load += drained
|
||||
drained = min(drain, delayed_surplus())
|
||||
add_delayedload(drained)
|
||||
if(drained < drain)//if no power on net, drain apcs
|
||||
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
|
||||
@@ -1104,7 +1104,7 @@
|
||||
|
||||
/obj/machinery/power/apc/add_load(amount)
|
||||
if(terminal && terminal.powernet)
|
||||
terminal.powernet.load += amount
|
||||
terminal.add_load(amount)
|
||||
|
||||
/obj/machinery/power/apc/avail()
|
||||
if(terminal)
|
||||
|
||||
@@ -199,6 +199,10 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
// Power related
|
||||
///////////////////////////////////////////
|
||||
|
||||
// All power generation handled in add_avail()
|
||||
// Machines should use add_load(), surplus(), avail()
|
||||
// Non-machines should use add_delayedload(), delayed_surplus(), newavail()
|
||||
|
||||
/obj/structure/cable/proc/add_avail(amount)
|
||||
if(powernet)
|
||||
powernet.newavail += amount
|
||||
@@ -209,7 +213,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
|
||||
/obj/structure/cable/proc/surplus()
|
||||
if(powernet)
|
||||
return powernet.avail-powernet.load
|
||||
return CLAMP(powernet.avail-powernet.load, 0, powernet.avail)
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -219,6 +223,22 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/cable/proc/add_delayedload(amount)
|
||||
if(powernet)
|
||||
powernet.delayedload += amount
|
||||
|
||||
/obj/structure/cable/proc/delayed_surplus()
|
||||
if(powernet)
|
||||
return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/cable/proc/newavail()
|
||||
if(powernet)
|
||||
return powernet.newavail
|
||||
else
|
||||
return 0
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Cable laying helpers
|
||||
////////////////////////////////////////////////
|
||||
@@ -828,4 +848,4 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
|
||||
/obj/item/stack/cable_coil/cut/random
|
||||
item_color = null
|
||||
color = "#ffffff"
|
||||
color = "#ffffff"
|
||||
@@ -25,6 +25,10 @@
|
||||
//////////////////////////////
|
||||
|
||||
// common helper procs for all power machines
|
||||
// All power generation handled in add_avail()
|
||||
// Machines should use add_load(), surplus(), avail()
|
||||
// Non-machines should use add_delayedload(), delayed_surplus(), newavail()
|
||||
|
||||
/obj/machinery/power/proc/add_avail(amount)
|
||||
if(powernet)
|
||||
powernet.newavail += amount
|
||||
@@ -38,7 +42,7 @@
|
||||
|
||||
/obj/machinery/power/proc/surplus()
|
||||
if(powernet)
|
||||
return powernet.avail - powernet.load
|
||||
return CLAMP(powernet.avail-powernet.load, 0, powernet.avail)
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -48,6 +52,22 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/proc/add_delayedload(amount)
|
||||
if(powernet)
|
||||
powernet.delayedload += amount
|
||||
|
||||
/obj/machinery/power/proc/delayed_surplus()
|
||||
if(powernet)
|
||||
return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/proc/newavail()
|
||||
if(powernet)
|
||||
return powernet.newavail
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/proc/disconnect_terminal() // machines without a terminal will just return, no harm no fowl.
|
||||
return
|
||||
|
||||
@@ -341,7 +361,7 @@
|
||||
source_area.use_power(drained_energy/GLOB.CELLRATE)
|
||||
else if (istype(power_source, /datum/powernet))
|
||||
var/drained_power = drained_energy/GLOB.CELLRATE //convert from "joules" to "watts"
|
||||
PN.load+=drained_power
|
||||
PN.delayedload += (min(drained_power, max(PN.newavail - PN.delayedload, 0)))
|
||||
else if (istype(power_source, /obj/item/stock_parts/cell))
|
||||
cell.use(drained_energy)
|
||||
return drained_energy
|
||||
@@ -364,4 +384,4 @@
|
||||
/area/proc/get_apc()
|
||||
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
|
||||
if(APC.area == src)
|
||||
return APC
|
||||
return APC
|
||||
@@ -13,6 +13,7 @@
|
||||
var/viewavail = 0 // the available power as it appears on the power console (gradually updated)
|
||||
var/viewload = 0 // the load as it appears on the power console (gradually updated)
|
||||
var/netexcess = 0 // excess power on the powernet (typically avail-load)///////
|
||||
var/delayedload = 0 // load applied to powernet between power ticks.
|
||||
|
||||
/datum/powernet/New()
|
||||
SSmachines.powernets += src
|
||||
@@ -88,7 +89,8 @@
|
||||
viewload = round(0.8 * viewload + 0.2 * load)
|
||||
|
||||
// reset the powernet
|
||||
load = 0
|
||||
load = delayedload
|
||||
delayedload = 0
|
||||
avail = newavail
|
||||
newavail = 0
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(active == TRUE)
|
||||
if(!active_power_usage || avail(active_power_usage))
|
||||
if(!active_power_usage || surplus() >= active_power_usage)
|
||||
add_load(active_power_usage)
|
||||
if(!powered)
|
||||
powered = TRUE
|
||||
@@ -189,7 +189,7 @@
|
||||
return FALSE
|
||||
if(state != EMITTER_WELDED)
|
||||
return FALSE
|
||||
if(avail(active_power_usage))
|
||||
if(surplus() >= active_power_usage)
|
||||
add_load(active_power_usage)
|
||||
fire_beam()
|
||||
|
||||
@@ -495,4 +495,4 @@
|
||||
|
||||
#undef EMITTER_UNWRENCHED
|
||||
#undef EMITTER_WRENCHED
|
||||
#undef EMITTER_WELDED
|
||||
#undef EMITTER_WELDED
|
||||
@@ -16,7 +16,7 @@
|
||||
var/list/obj/machinery/computer/rdconsole/consoles_accessing = list()
|
||||
var/id = "generic"
|
||||
var/list/research_logs = list() //IC logs.
|
||||
var/max_bomb_value = 0
|
||||
var/largest_bomb_value = 0
|
||||
var/organization = "Third-Party" //Organization name, used for display.
|
||||
var/list/last_bitcoins = list() //Current per-second production, used for display only.
|
||||
var/list/tiers = list() //Assoc list, datum = number, 1 is available, 2 is all reqs are 1, so on
|
||||
|
||||
Reference in New Issue
Block a user