This commit is contained in:
Zuhayr
2015-08-18 11:59:50 -07:00
27 changed files with 243 additions and 182 deletions
+11 -10
View File
@@ -118,30 +118,31 @@
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_MENTOR))
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>[key_name(C, X, 0)]</span>: <span class='message'>[msg]</span></span></span>"
/client/proc/cmd_admin_irc_pm()
/client/proc/cmd_admin_irc_pm(sender)
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
return
var/msg = input(src,"Message:", "Private message to admins on IRC / 400 character limit") as text|null
var/msg = input(src,"Message:", "Reply private message to [sender] on IRC / 400 character limit") as text|null
if(!msg)
return
sanitize(msg)
if(length(msg) > 400) // TODO: if message length is over 400, divide it up into seperate messages, the message length restriction is based on IRC limitations. Probably easier to do this on the bots ends.
src << "\red Your message was not sent because it was more then 400 characters find your message below for ease of copy/pasting"
src << "\blue [msg]"
return
// Handled on Bot32's end, unsure about other bots
// if(length(msg) > 400) // TODO: if message length is over 400, divide it up into seperate messages, the message length restriction is based on IRC limitations. Probably easier to do this on the bots ends.
// src << "<span class='warning'>Your message was not sent because it was more then 400 characters find your message below for ease of copy/pasting</span>"
// src << "<span class='notice'>[msg]</span>"
// return
send2adminirc("PlayerPM from [key_name(src)]: [html_decode(msg)]")
send2adminirc("PlayerPM to [sender] from [key_name(src)]: [html_decode(msg)]")
src << "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "", src) + " to <span class='name'>Admin IRC</span>: <span class='message'>[msg]</span></span></span>"
src << "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "", src) + " to <span class='name'>IRC-[sender]</span>: <span class='message'>[msg]</span></span></span>"
log_admin("PM: [key_name(src)]->IRC: [msg]")
log_admin("PM: [key_name(src)]->IRC-[sender]: [msg]")
for(var/client/X in admins)
if(X == src)
continue
if(X.holder.rights & R_ADMIN|R_MOD)
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>Admin IRC</span>: <span class='message'>[msg]</span></span></span>"
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>IRC-[sender]</span>: <span class='message'>[msg]</span></span></span>"
+1 -1
View File
@@ -52,7 +52,7 @@
if(mute_irc)
usr << "<span class='warning'You cannot use this as your client has been muted from sending messages to the admins on IRC</span>"
return
cmd_admin_irc_pm()
cmd_admin_irc_pm(href_list["irc_msg"])
return
@@ -10,14 +10,14 @@
var/open
var/obj/item/held //Item inside locket.
/obj/item/clothing/accessory/locket/heart
name = "heart-shaped locket"
desc = " A silver, heart-shaped locket. It flips open to reveal two pictures, one of a young red-headed woman and one of a brunette of similar age. Small writing is etched onto the back, reading 'M+L'. Some may regard it as cheesy."
icon_state = "heartlocket"
/obj/item/clothing/accessory/locket/attack_self(mob/user as mob)
if(!base_icon)
base_icon = icon_state
if(!("[base_icon]_open" in icon_states(icon)))
user << "\The [src] doesn't seem to open."
return
open = !open
user << "You flip \the [src] [open?"open":"closed"]."
if(open)
@@ -36,11 +36,11 @@
if(istype(O,/obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
if(held)
usr << "[src] already has something inside it."
usr << "\The [src] already has something inside it."
else
usr << "You slip [O] into [src]."
user.drop_item()
O.loc = src
src.held = O
return
..()
..()
+1 -1
View File
@@ -51,7 +51,7 @@ turf: (lighting_turf.dm)
- proc/lighting_clear_overlays():
- Delete (manual GC) all light overlays on this turf, used when changing turf to space
- proc/lighting_build_overlays():
- Create lighting overlays for this turf
- Create lighting overlays for this turf. Called by ChangeTurf in case the turf is being changed to use dynamic lighting.
atom/movable/lighting_overlay: (lighting_overlay.dm)
+39
View File
@@ -246,6 +246,45 @@
effect_turf.Cut(idx, idx + 1)
effect_str.Cut(idx, idx + 1)
//Whoop yet not another copy pasta because speed ~~~~BYOND.
//Calculates and applies lighting for a single turf. This is intended for when a turf switches to
//using dynamic lighting when it was not doing so previously (when constructing a floor on space, for example).
//Assumes the turf is visible and such.
//For the love of god don't call this proc when it's not needed! Lighting artifacts WILL happen!
/datum/light_source/proc/calc_turf(var/turf/T)
var/idx = effect_turf.Find(T)
if(!idx)
return //WHY.
if(T.lighting_overlay)
#if LIGHTING_FALLOFF == 1 // circular
. = (T.lighting_overlay.x - source_turf.x)**2 + (T.lighting_overlay.y - source_turf.y)**2 + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
. = CLAMP01((1 - CLAMP01(sqrt(.) / light_range)) * (1 / (sqrt(. + 1))))
#else
. = 1 - CLAMP01(sqrt(.) / light_range)
#endif
#elif LIGHTING_FALLOFF == 2 // square
. = abs(T.lighting_overlay.x - source_turf.x) + abs(T.lighting_overlay.y - source_turf.y) + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
. = CLAMP01((1 - CLAMP01(. / light_range)) * (1 / (sqrt(.)**2 + )))
#else
. = 1 - CLAMP01(. / light_range)
#endif
#endif
. *= light_power
. = round(., LIGHTING_ROUND_VALUE)
effect_str[idx] = .
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
)
#undef LUM_FALLOFF
#undef LUM_DISTANCE
#undef LUM_ATTENUATION
+4
View File
@@ -17,6 +17,10 @@
var/atom/movable/lighting_overlay/O = PoolOrNew(/atom/movable/lighting_overlay, src)
lighting_overlay = O
//Make the light sources recalculate us so the lighting overlay updates immediately
for(var/datum/light_source/L in affecting_lights)
L.calc_turf(src)
/turf/Entered(atom/movable/obj)
. = ..()
if(obj && obj.opacity)
+2 -2
View File
@@ -46,7 +46,7 @@
for (var/specie in all_species)
var/datum/species/S = all_species[specie]
if(!S.virus_immune)
meat += S.name
meat += S
if(meat.len)
var/num = rand(1,meat.len)
for(var/i=0,i<num,i++)
@@ -270,4 +270,4 @@ proc/virology_letterhead(var/report_name)
if(H.effect.type == type)
return 0
return 1
return 1