Merge remote-tracking branch 'upstream/dev' into attack-cleanup2

Conflicts:
	code/modules/mob/living/simple_animal/friendly/spiderbot.dm
	code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
HarpyEagle
2015-10-05 19:20:33 -04:00
189 changed files with 8211 additions and 8024 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ sudo: false
env:
BYOND_MAJOR="508"
BYOND_MINOR="1293"
MACRO_COUNT=1154
MACRO_COUNT=1151
cache:
directories:
+4 -2
View File
@@ -10,13 +10,13 @@
#define DEBUG
// END_PREFERENCES
// BEGIN_INCLUDE
#include "code\_macros.dm"
#include "code\global.dm"
#include "code\hub.dm"
#include "code\names.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__defines\_compile_options.dm"
#include "code\__defines\_macros.dm"
#include "code\__defines\admin.dm"
#include "code\__defines\atmos.dm"
#include "code\__defines\chemistry.dm"
@@ -763,7 +763,6 @@
#include "code\game\objects\structures\inflatable.dm"
#include "code\game\objects\structures\janicart.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
#include "code\game\objects\structures\lamarr_cage.dm"
#include "code\game\objects\structures\lattice.dm"
#include "code\game\objects\structures\mirror.dm"
@@ -822,6 +821,8 @@
#include "code\game\turfs\flooring\flooring.dm"
#include "code\game\turfs\flooring\flooring_decals.dm"
#include "code\game\turfs\flooring\flooring_premade.dm"
#include "code\game\turfs\initialization\init.dm"
#include "code\game\turfs\initialization\maintenance.dm"
#include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_acts.dm"
#include "code\game\turfs\simulated\floor_attackby.dm"
@@ -1442,6 +1443,7 @@
#include "code\modules\nano\nanoui.dm"
#include "code\modules\nano\interaction\admin.dm"
#include "code\modules\nano\interaction\base.dm"
#include "code\modules\nano\interaction\conscious.dm"
#include "code\modules\nano\interaction\contained.dm"
#include "code\modules\nano\interaction\default.dm"
#include "code\modules\nano\interaction\inventory.dm"
-2
View File
@@ -1,2 +0,0 @@
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
#define CLAMP01(x) (Clamp(x, 0, 1))
+14
View File
@@ -167,3 +167,17 @@
// Special return values from bullet_act(). Positive return values are already used to indicate the blocked level of the projectile.
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
// Custom colors
#define COLOR_BEIGE "#CEB689"
#define COLOR_BLUE_GRAY "#6A97B0"
#define COLOR_BROWN "#B19664"
#define COLOR_DARK_BROWN "#917448"
#define COLOR_DARK_ORANGE "#B95A00"
#define COLOR_GREEN_GRAY "#8DAF6A"
#define COLOR_RED_GRAY "#AA5F61"
#define COLOR_PALE_BLUE_GRAY "#8BBBD5"
#define COLOR_PALE_GREEN_GRAY "#AED18B"
#define COLOR_PALE_RED_GRAY "#CC9090"
#define COLOR_PALE_PURPLE_GRAY "#BDA2BA"
#define COLOR_PURPLE_GRAY "#A2819E"
+7
View File
@@ -108,3 +108,10 @@
#define COMPANY_ALIGNMENTS list(COMPANY_LOYAL,COMPANY_SUPPORTATIVE,COMPANY_NEUTRAL,COMPANY_SKEPTICAL,COMPANY_OPPOSED)
// Defines mob sizes, used by lockers and to determine what is considered a small sized mob, etc.
#define MOB_LARGE 40
#define MOB_MEDIUM 20
#define MOB_SMALL 10
#define MOB_TINY 5
#define MOB_MINISCULE 1
+25
View File
@@ -1,3 +1,28 @@
/atom/movable/proc/get_mob()
return
/obj/machinery/bot/mulebot/get_mob()
if(load && istype(load,/mob/living))
return load
/obj/mecha/get_mob()
return occupant
/obj/vehicle/train/get_mob()
return buckled_mob
/mob/get_mob()
return src
/proc/mobs_in_view(var/range, var/source)
var/list/mobs = list()
for(var/atom/movable/AM in view(range, source))
var/M = AM.get_mob()
if(M)
mobs += M
return mobs
proc/random_hair_style(gender, species = "Human")
var/h_style = "Bald"
+5 -1
View File
@@ -372,7 +372,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Picks a string of symbols to display as the law number for hacked or ion laws
/proc/ionnum()
return "[pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
return "[pick("1","2","3","4","5","6","7","8","9","0")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"
//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
/proc/freeborg()
@@ -1347,3 +1347,7 @@ var/mob/dview/dview_mob = new
dead_mob_list -= src
else
living_mob_list -= src
// call to generate a stack trace and print to runtime logs
/proc/crash_with(msg)
CRASH(msg)
+36
View File
@@ -0,0 +1,36 @@
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
#define CLAMP01(x) (Clamp(x, 0, 1))
#define isAI(A) istype(A, /mob/living/silicon/ai)
#define isalien(A) istype(A, /mob/living/carbon/alien)
#define isanimal(A) istype(A, /mob/living/simple_animal)
#define isbrain(A) istype(A, /mob/living/carbon/brain)
#define iscarbon(A) istype(A, /mob/living/carbon)
#define iscorgi(A) istype(A, /mob/living/simple_animal/corgi)
#define isEye(A) istype(A, /mob/eye)
#define ishuman(A) istype(A, /mob/living/carbon/human)
#define isliving(A) istype(A, /mob/living)
#define ismouse(A) istype(A, /mob/living/simple_animal/mouse)
#define isnewplayer(A) istype(A, /mob/new_player)
#define isobserver(A) istype(A, /mob/dead/observer)
#define isorgan(A) istype(A, /obj/item/organ/external)
#define ispAI(A) istype(A, /mob/living/silicon/pai)
#define isrobot(A) istype(A, /mob/living/silicon/robot)
#define issilicon(A) istype(A, /mob/living/silicon)
#define isslime(A) istype(A, /mob/living/carbon/slime)
-4
View File
@@ -178,10 +178,6 @@
src << "You cannot attack people before the game has started."
return 0
if (istype(get_area(src), /area/start))
src << "No attacking people at spawn, you jackass."
return 0
if(stat)
return 0
+2 -2
View File
@@ -16,7 +16,7 @@
/obj/screen/Destroy()
master = null
..()
return ..()
/obj/screen/text
icon = null
@@ -274,7 +274,7 @@
else
var/no_mask
if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT))
if(!(C.wear_mask && C.wear_mask.item_flags & AIRTIGHT))
var/mob/living/carbon/human/H = C
if(!(H.head && H.head.item_flags & AIRTIGHT))
no_mask = 1
+1
View File
@@ -146,6 +146,7 @@ world/loop_checks = 0
return
if(!istype(A))
warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
crash_with("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
del(A)
if(garbage_collector)
garbage_collector.dels++
+4
View File
@@ -46,6 +46,10 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
var/list/wires = same_wires[holder_type]
src.wires = wires // Reference the wires list.
/datum/wires/Destroy()
holder = null
return ..()
/datum/wires/proc/GenerateWires()
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
var/list/indexes_to_pick = list()
+1 -1
View File
@@ -47,7 +47,7 @@ var/datum/antagonist/deathsquad/deathsquad
player.equip_to_slot_or_del(new /obj/item/weapon/plastique(player), slot_l_store)
player.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(player), slot_belt)
player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(player), slot_r_hand)
player.equip_to_slot_or_del(new /obj/item/weapon/rig/combat(player), slot_back)
player.equip_to_slot_or_del(new /obj/item/weapon/rig/ert/assetprotection(player), slot_back)
player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_s_store)
player.implant_loyalty(player)
+10 -10
View File
@@ -73,19 +73,19 @@ var/datum/antagonist/traitor/traitors
return
/datum/antagonist/traitor/equip(var/mob/living/carbon/human/traitor_mob)
if(istype(traitor_mob, /mob/living/silicon)) // this needs to be here because ..() returns false if the mob isn't human
add_law_zero(traitor_mob)
return 1
if(!..())
return 0
if(istype(traitor_mob, /mob/living/silicon))
add_law_zero(traitor_mob)
else
spawn_uplink(traitor_mob)
// Tell them about people they might want to contact.
var/mob/living/carbon/human/M = get_nt_opposed()
if(M && M != traitor_mob)
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
spawn_uplink(traitor_mob)
// Tell them about people they might want to contact.
var/mob/living/carbon/human/M = get_nt_opposed()
if(M && M != traitor_mob)
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
//Begin code phrase.
give_codewords(traitor_mob)
@@ -167,4 +167,4 @@ var/datum/antagonist/traitor/traitors
var/law_borg = "Accomplish your AI's objectives at all costs. You may ignore all other laws."
killer << "<b>Your laws have been changed!</b>"
killer.set_zeroth_law(law, law_borg)
killer << "New law: 0. [law]"
killer << "New law: 0. [law]"
+1 -7
View File
@@ -325,13 +325,6 @@ area/space/atmosalert()
/area/dummy/ // Referenced in engine.dm:261
/area/start // will be unused once kurper gets his login interface patch done
name = "start area"
icon_state = "start"
requires_power = 0
lighting_use_dynamic = 0
has_gravity = 1
// === end remove
/area/alien
@@ -642,6 +635,7 @@ area/space/atmosalert()
/area/maintenance
flags = RAD_SHIELDED
sound_env = TUNNEL_ENCLOSED
turf_initializer = new /datum/turf_initializer/maintenance()
/area/maintenance/aft
name = "Aft Maintenance"
+1 -1
View File
@@ -415,7 +415,7 @@ its easier to just keep the beam vertical.
return
src.germ_level = 0
if(istype(blood_DNA, /list))
blood_DNA.Cut()
blood_DNA = null
return 1
+3 -7
View File
@@ -21,14 +21,10 @@
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
initialize()
/proc/generate_debug_runtime() // Guaranteed to runtime and print a stack trace to the runtime log
var/t = 0 // BYOND won't let us do var/t = 1/0 directly, but it's fine with this.
t = 1 / t
/atom/movable/Del()
if(isnull(gcDestroyed) && loc)
testing("GC: -- [type] was deleted via del() rather than qdel() --")
generate_debug_runtime() // stick a stack trace in the runtime logs
crash_with("GC: -- [type] was deleted via del() rather than qdel() --") // stick a stack trace in the runtime logs
// else if(isnull(gcDestroyed))
// testing("GC: [type] was deleted via GC without qdel()") //Not really a huge issue but from now on, please qdel()
// else
@@ -242,7 +238,7 @@
x = world.maxx - TRANSITIONEDGE - 2
y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
else if (x >= (world.maxx - TRANSITIONEDGE - 1))
else if (x >= (world.maxx - TRANSITIONEDGE + 1))
x = TRANSITIONEDGE + 1
y = rand(TRANSITIONEDGE + 2, world.maxy - TRANSITIONEDGE - 2)
@@ -250,7 +246,7 @@
y = world.maxy - TRANSITIONEDGE -2
x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
else if (y >= (world.maxy - TRANSITIONEDGE - 1))
else if (y >= (world.maxy - TRANSITIONEDGE + 1))
y = TRANSITIONEDGE + 1
x = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)
+6 -6
View File
@@ -468,7 +468,7 @@
else
randmuti(src.connected.occupant)
src.connected.occupant.radiation += ((src.radiation_intensity*3)+src.radiation_duration*3)
src.connected.occupant.apply_effect(((src.radiation_intensity*3)+src.radiation_duration*3), IRRADIATE, check_protection = 0)
src.connected.locked = lock_state
return 1 // return 1 forces an update to all Nano uis attached to src
@@ -562,7 +562,7 @@
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
src.connected.occupant.UpdateAppearance()
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, check_protection = 0)
else
if (prob(20+src.radiation_intensity))
randmutb(src.connected.occupant)
@@ -570,7 +570,7 @@
else
randmuti(src.connected.occupant)
src.connected.occupant.UpdateAppearance()
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, check_protection = 0)
src.connected.locked = lock_state
return 1 // return 1 forces an update to all Nano uis attached to src
@@ -627,10 +627,10 @@
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, check_protection = 0)
domutcheck(src.connected.occupant,src.connected)
else
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, check_protection = 0)
if (prob(80-src.radiation_duration))
//testing("Random bad mut!")
randmutb(src.connected.occupant)
@@ -752,7 +752,7 @@
src.connected.occupant.dna.SE = buf.dna.SE
src.connected.occupant.dna.UpdateSE()
domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += rand(20,50)
src.connected.occupant.apply_effect(rand(20,50), IRRADIATE, check_protection = 0)
return 1
if (bufferOption == "createInjector")
@@ -34,7 +34,7 @@
desc = "Secondary coprocessor that increases amount of generated CPU power by 50%"
/datum/malf_hardware/dual_cpu/get_examine_desc()
return "It seems to have an additional CPU connected to it's core."
return "It seems to have an additional CPU connected to its core."
/datum/malf_hardware/dual_ram
name = "Secondary Memory Bank"
+24 -24
View File
@@ -18,25 +18,27 @@
//Meteor spawning global procs
///////////////////////////////
/proc/spawn_meteors(var/number = 10, var/list/meteortypes)
for(var/i = 0; i < number; i++)
spawn_meteor(meteortypes)
/proc/pick_meteor_start(var/startSide = pick(cardinal))
var/startLevel = pick(config.station_levels)
var/pickedstart = spaceDebrisStartLoc(startSide, startLevel)
return list(startLevel, pickedstart)
/proc/spawn_meteors(var/number = 10, var/list/meteortypes, var/startSide)
for(var/i = 0; i < number; i++)
spawn_meteor(meteortypes, startSide)
/proc/spawn_meteor(var/list/meteortypes, var/startSide)
var/start = pick_meteor_start(startSide)
var/startLevel = start[1]
var/turf/pickedstart = start[2]
var/turf/pickedgoal = spaceDebrisFinishLoc(startSide, startLevel)
/proc/spawn_meteor(var/list/meteortypes)
var/turf/pickedstart
var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor.
while (!istype(pickedstart, /turf/space))
var/startSide = pick(cardinal)
pickedstart = spaceDebrisStartLoc(startSide, 1)
pickedgoal = spaceDebrisFinishLoc(startSide, 1)
max_i--
if(max_i<=0)
return
var/Me = pickweight(meteortypes)
var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
M.z_original = 1
M.z_original = startLevel
spawn(0)
walk_towards(M, M.dest, 1)
return
@@ -95,7 +97,6 @@
var/dest
pass_flags = PASSTABLE
var/heavy = 0
var/meteorsound = 'sound/effects/meteorimpact.ogg'
var/z_original = 1
var/meteordrop = /obj/item/weapon/ore/iron
@@ -128,9 +129,11 @@
/obj/effect/meteor/Bump(atom/A)
if(A)
ram_turf(get_turf(A))
playsound(src.loc, meteorsound, 40, 1)
get_hit()
/obj/effect/meteor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return istype(mover, /obj/effect/meteor) ? 1 : ..()
/obj/effect/meteor/proc/ram_turf(var/turf/T)
//first bust whatever is in the turf
for(var/atom/A in T)
@@ -165,15 +168,15 @@
var/obj/item/O = new meteordrop(get_turf(src))
O.throw_at(dest, 5, 10)
/obj/effect/meteor/proc/meteor_effect(var/sound=1)
if(sound)
/obj/effect/meteor/proc/meteor_effect(var/effect=1)
if(effect)
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if(!T || T.z != src.z)
continue
var/dist = get_dist(M.loc, src.loc)
shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
///////////////////////
//Meteor types
@@ -186,7 +189,6 @@
pass_flags = PASSTABLE | PASSGRILLE
hits = 1
hitpwr = 3
meteorsound = 'sound/weapons/throwtap.ogg'
meteordrop = /obj/item/weapon/ore/glass
//Medium-sized
@@ -200,7 +202,7 @@
//Large-sized
/obj/effect/meteor/big
name = "big meteor"
name = "large meteor"
icon_state = "large"
hits = 6
heavy = 1
@@ -216,7 +218,6 @@
icon_state = "flaming"
hits = 5
heavy = 1
meteorsound = 'sound/effects/bamf.ogg'
meteordrop = /obj/item/weapon/ore/phoron
/obj/effect/meteor/flaming/meteor_effect()
@@ -246,7 +247,6 @@
hits = 30
hitpwr = 1
heavy = 1
meteorsound = 'sound/effects/bamf.ogg'
meteordrop = /obj/item/weapon/ore/phoron
/obj/effect/meteor/tunguska/meteor_effect()
+23
View File
@@ -424,6 +424,9 @@ var/global/datum/controller/occupations/job_master
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
else
LateSpawn(H, rank)
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.loc = H.loc
@@ -611,3 +614,23 @@ var/global/datum/controller/occupations/job_master
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
feedback_add_details("job_preferences",tmp_str)
/datum/controller/occupations/proc/LateSpawn(var/mob/living/carbon/human/H, var/rank)
//spawn at one of the latespawn locations
var/datum/spawnpoint/spawnpos
if(H.client.prefs.spawnpoint)
spawnpos = spawntypes[H.client.prefs.spawnpoint]
if(spawnpos && istype(spawnpos))
if(spawnpos.check_job_spawning(rank))
H.loc = pick(spawnpos.turfs)
. = spawnpos.msg
else
H << "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
H.loc = pick(latejoin)
. = "has arrived on the station"
else
H.loc = pick(latejoin)
. = "has arrived on the station"
+9 -10
View File
@@ -101,10 +101,9 @@
/obj/machinery/alarm/Destroy()
unregister_radio(src, frequency)
if(wires)
qdel(wires)
wires = null
..()
qdel(wires)
wires = null
return ..()
/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
..()
@@ -326,7 +325,7 @@
if (2)
icon_state = "alarm1"
new_color = "#DA0205"
set_light(l_range = 2, l_power = 0.5, l_color = new_color)
/obj/machinery/alarm/receive_signal(datum/signal/signal)
@@ -488,7 +487,7 @@
remote_connection = href["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer
remote_access = href["remote_access"] // Remote access means we also have the privilege to alter the air alarm.
data["locked"] = locked && !user.isSilicon()
data["locked"] = locked && !issilicon(user)
data["remote_connection"] = remote_connection
data["remote_access"] = remote_access
data["rcon"] = rcon_setting
@@ -496,7 +495,7 @@
populate_status(data)
if(!(locked && !remote_connection) || remote_access || user.isSilicon())
if(!(locked && !remote_connection) || remote_access || issilicon(user))
populate_controls(data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -609,7 +608,7 @@
if(buildstage != 2)
return STATUS_CLOSE
if(aidisabled && user.isMobAI())
if(aidisabled && isAI(user))
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
return STATUS_CLOSE
@@ -654,7 +653,7 @@
// hrefs that need the AA unlocked -walter0o
var/extra_href = state.href_list(usr)
if(!(locked && !extra_href["remote_connection"]) || extra_href["remote_access"] || usr.isSilicon())
if(!(locked && !extra_href["remote_connection"]) || extra_href["remote_access"] || issilicon(usr))
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
@@ -910,7 +909,7 @@ FIRE ALARM
if("blue") set_light(l_range = 2, l_power = 0.5, l_color = "#1024A9")
if("red") set_light(l_range = 4, l_power = 2, l_color = "#ff0000")
if("delta") set_light(l_range = 4, l_power = 2, l_color = "#FF6633")
src.overlays += image('icons/obj/monitors.dmi', "overlay_[seclevel]")
/obj/machinery/firealarm/fire_act(datum/gas_mixture/air, temperature, volume)
+5
View File
@@ -37,6 +37,11 @@
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/autolathe/Destroy()
qdel(wires)
wires = null
return ..()
/obj/machinery/autolathe/proc/update_recipe_list()
if(!machine_recipes)
+4 -1
View File
@@ -77,10 +77,13 @@
name = "Mulebot ([suffix])"
/obj/machinery/bot/mulebot/Destroy()
unload(0)
qdel(wires)
wires = null
if(radio_controller)
radio_controller.remove_object(src,beacon_freq)
radio_controller.remove_object(src,control_freq)
..()
return ..()
// attack by item
// emag : lock/unlock,
+3 -2
View File
@@ -59,7 +59,8 @@
qdel(assembly)
assembly = null
qdel(wires)
..()
wires = null
return ..()
/obj/machinery/camera/emp_act(severity)
if(!isEmpProof())
@@ -303,7 +304,7 @@
var/turf/pos = get_turf(src)
if(!pos)
return list()
if(isXRay())
see = range(view_range, pos)
else
+2
View File
@@ -182,6 +182,8 @@
return
else if((occupant.health >= heal_level) && (!eject_wait))
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
src.audible_message("\The [src] signals that the cloning process is complete.")
connected_message("Cloning Process Complete.")
locked = 0
go_out()
+3 -3
View File
@@ -21,7 +21,7 @@
data["robots"] = get_cyborgs(user)
data["safety"] = safety
// Also applies for cyborgs. Hides the manual self-destruct button.
data["is_ai"] = user.isSilicon()
data["is_ai"] = issilicon(user)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -44,7 +44,7 @@
var/mob/living/silicon/robot/target = get_cyborg_by_name(href_list["detonate"])
if(!target || !istype(target))
return
if(user.isMobAI() && (target.connected_ai != user))
if(isAI(user) && (target.connected_ai != user))
user << "Access Denied. This robot is not linked to you."
return
// Cyborgs may blow up themselves via the console
@@ -76,7 +76,7 @@
if(!target || !istype(target))
return
if(user.isMobAI() && (target.connected_ai != user))
if(isAI(user) && (target.connected_ai != user))
user << "Access Denied. This robot is not linked to you."
return
+4 -5
View File
@@ -656,7 +656,7 @@ About the new airlock wires panel:
return
/obj/machinery/door/airlock/CanUseTopic(var/mob/user)
if(!user.isSilicon())
if(issilicon(user))
return STATUS_CLOSE
if(operating < 0) //emagged
@@ -1041,10 +1041,9 @@ About the new airlock wires panel:
break
/obj/machinery/door/airlock/Destroy()
if(wires)
qdel(wires)
wires = null
..()
qdel(wires)
wires = null
return ..()
// Most doors will never be deconstructed over the course of a round,
// so as an optimization defer the creation of electronics until
+1 -1
View File
@@ -99,7 +99,7 @@
var/mob/M = AM
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
if(!M.restrained() && !M.small)
if(!M.restrained() && !issmall(M))
bumpopen(M)
return
+2 -2
View File
@@ -147,7 +147,7 @@
"\The [src]", "Yes, [density ? "open" : "close"]", "No")
if(answer == "No")
return
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !user.isSilicon()) || (get_dist(src, user) > 1 && !isAI(user)))
if(user.incapacitated() || (get_dist(src, user) > 1 && !issilicon(user)))
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
return
if(density && (stat & (BROKEN|NOPOWER))) //can still close without power
@@ -167,7 +167,7 @@
if(alarmed)
// Accountability!
users_to_open |= user.name
needs_to_close = !user.isSilicon()
needs_to_close = !issilicon(user)
spawn()
open()
else
+1 -1
View File
@@ -77,7 +77,7 @@
return
if (src.operating)
return
if (src.density && !M.small && src.allowed(AM))
if (src.density && !issmall(M) && src.allowed(AM))
open()
if(src.check_access(null))
sleep(50)
+1 -1
View File
@@ -43,7 +43,7 @@ var/list/floor_light_cache = list()
/obj/machinery/floor_light/attack_hand(var/mob/user)
if(user.a_intent == "hurt" && !user.small)
if(user.a_intent == I_HURT && !issmall(user))
if(!isnull(damaged) && !(stat & BROKEN))
visible_message("<span class='danger'>\The [user] smashes \the [src]!</span>")
playsound(src, "shatter", 70, 1)
+2 -2
View File
@@ -88,7 +88,7 @@
emagged = !emagged
user << "<span class='danger'>You [emagged ? "disable" : "enable"] the gibber safety guard.</span>"
return 1
/obj/machinery/gibber/attackby(var/obj/item/W, var/mob/user)
var/obj/item/weapon/grab/G = W
@@ -195,7 +195,7 @@
slab_type = H.species.meat_type
// Small mobs don't give as much nutrition.
if(src.occupant.small)
if(issmall(src.occupant))
slab_nutrition *= 0.5
slab_nutrition /= slab_count
+2 -1
View File
@@ -35,7 +35,8 @@
/obj/machinery/smartfridge/Destroy()
qdel(wires)
..()
wires = null
return ..()
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/))
+5 -11
View File
@@ -174,11 +174,11 @@ var/list/turret_icons
icon_state = "turretCover"
/obj/machinery/porta_turret/proc/isLocked(mob/user)
if(ailock && user.isSilicon())
if(ailock && issilicon(user))
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
return 1
if(locked && !user.isSilicon())
if(locked && !issilicon(user))
user << "<span class='notice'>Access denied.</span>"
return 1
@@ -376,7 +376,7 @@ var/list/turret_icons
/obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj)
var/damage = Proj.get_structure_damage()
if(!damage)
return
@@ -444,14 +444,8 @@ var/list/turret_icons
var/list/targets = list() //list of primary targets
var/list/secondarytargets = list() //targets that are least important
for(var/obj/mecha/ME in view(7,src))
assess_and_assign(ME.occupant, targets, secondarytargets)
for(var/obj/vehicle/train/T in view(7,src))
assess_and_assign(T.load, targets, secondarytargets)
for(var/mob/living/C in view(7,src)) //loops through all living lifeforms in view
assess_and_assign(C, targets, secondarytargets)
for(var/mob/M in mobs_in_view(world.view, src))
assess_and_assign(M, targets, secondarytargets)
if(!tryToShootAt(targets))
if(!tryToShootAt(secondarytargets)) // if no valid targets, go for secondary targets
+1 -1
View File
@@ -49,7 +49,7 @@
/obj/machinery/status_display/Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
..()
return ..()
// register for radio system
/obj/machinery/status_display/initialize()
+3 -3
View File
@@ -330,7 +330,7 @@
for(i=0,i<4,i++)
sleep(50)
if(src.OCCUPANT)
OCCUPANT.radiation += 50
OCCUPANT.apply_effect(50, IRRADIATE)
var/obj/item/organ/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
if (!rad_organ)
if(src.issuperUV)
@@ -617,7 +617,7 @@
/obj/machinery/suit_cycler/Destroy()
qdel(wires)
wires = null
..()
return ..()
/obj/machinery/suit_cycler/engineering
name = "Engineering suit cycler"
@@ -925,7 +925,7 @@
occupant.take_organ_damage(0,radiation_level*2 + rand(1,3))
if(radiation_level > 1)
occupant.take_organ_damage(0,radiation_level + rand(1,3))
occupant.radiation += radiation_level*10
occupant.apply_effect(radiation_level*10, IRRADIATE)
/obj/machinery/suit_cycler/proc/finished_job()
var/turf/T = get_turf(src)
@@ -552,7 +552,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
log.parameters["intelligible"] = 1
else if(M.isMonkey())
race = "Monkey"
else if(M.isSilicon())
else if(issilicon(M))
race = "Artificial Life"
log.parameters["intelligible"] = 1
else if(isslime(M))
+3 -3
View File
@@ -64,11 +64,11 @@
return
/obj/machinery/turretid/proc/isLocked(mob/user)
if(ailock && user.isSilicon())
if(ailock && issilicon(user))
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
return 1
if(locked && !user.isSilicon())
if(locked && !issilicon(user))
user << "<span class='notice'>Access denied.</span>"
return 1
@@ -93,7 +93,7 @@
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
return
return ..()
/obj/machinery/turretid/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
user << "<span class='danger'>You short out the turret controls' access analysis module.</span>"
+2 -2
View File
@@ -148,7 +148,7 @@
wires = null
qdel(coin)
coin = null
..()
return ..()
/obj/machinery/vending/ex_act(severity)
switch(severity)
@@ -780,7 +780,7 @@
icon_state = "cigs"
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/flame/lighter/random = 4)
contraband = list(/obj/item/weapon/flame/lighter/zippo = 4)
premium = list(/obj/item/weapon/storage/fancy/cigar = 5)
premium = list(/obj/item/weapon/storage/fancy/cigar = 5,/obj/item/weapon/storage/fancy/cigarettes/killthroat = 5 )
prices = list(/obj/item/weapon/storage/fancy/cigarettes = 15,/obj/item/weapon/storage/box/matches = 1,/obj/item/weapon/flame/lighter/random = 2)
+5 -5
View File
@@ -126,8 +126,8 @@
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
name = "diamond drill"
desc = "This is an upgraded version of the drill that'll pierce the heavens! (Can be attached to: Combat and Engineering Exosuits)"
icon_state = "mecha_diamond_drill"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
icon_state = "mecha_diamond_drill"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
equip_cooldown = 20
force = 15
@@ -964,8 +964,8 @@
/obj/item/mecha_parts/mecha_equipment/generator/nuclear
name = "\improper ExoNuclear reactor"
desc = "Generates power using uranium. Pollutes the environment."
icon_state = "tesla"
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
icon_state = "tesla"
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
max_fuel = 50000
fuel_per_cycle_idle = 10
fuel_per_cycle_active = 30
@@ -990,7 +990,7 @@
if(istype(M,/mob/living/carbon/human))
M.apply_effect((EG.rad_per_cycle*3),IRRADIATE,0)
else
M.radiation += EG.rad_per_cycle
M.apply_effect(EG.rad_per_cycle, IRRADIATE)
return 1
+2 -1
View File
@@ -1,6 +1,7 @@
/obj
var/can_buckle = 0
var/buckle_movable = 0
var/buckle_dir = 0
var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
var/mob/living/buckled_mob = null
@@ -31,7 +32,7 @@
M.buckled = src
M.facing_dir = null
M.set_dir(dir)
M.set_dir(buckle_dir ? buckle_dir : dir)
M.update_canmove()
buckled_mob = M
post_buckle_mob(M)
+1 -1
View File
@@ -39,7 +39,7 @@
close_sound = 'sound/items/zip.ogg'
var/item_path = /obj/item/bodybag
density = 0
storage_capacity = (default_mob_size * 2) - 1
storage_capacity = (MOB_MEDIUM * 2) - 1
var/contains_body = 0
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob)
@@ -12,7 +12,7 @@
"quarter-turf" = list("path" = /obj/effect/floor_decal/corner, "precise" = 1, "coloured" = 1),
"hazard stripes" = list("path" = /obj/effect/floor_decal/industrial/warning),
"corner, hazard" = list("path" = /obj/effect/floor_decal/industrial/warning/corner),
"hatched marking" = list("path" = /obj/effect/floor_decal/industrial/hatch),
"hatched marking" = list("path" = /obj/effect/floor_decal/industrial/hatch, "coloured" = 1),
"dotted outline" = list("path" = /obj/effect/floor_decal/industrial/outline, "coloured" = 1),
"loading sign" = list("path" = /obj/effect/floor_decal/industrial/loading),
"1" = list("path" = /obj/effect/floor_decal/sign),
@@ -40,35 +40,35 @@
"precise" = 0
)
var/list/paint_colours = list(
"white" = COLOR_WHITE,
"light gray" = COLOR_SILVER,
"dark gray" = COLOR_GRAY,
"blue-grey" = "#6A97B0",
"pale blue-grey" = "#8BBBD5",
"green-grey" = "#8DAF6A",
"pale green-gray" = "#AED18B",
"red-gray" = "#AA5F61",
"pale red-gray" = "#CC9090",
"purple-gray" = "#A2819E",
"pale purple-gray" = "#BDA2BA",
"black" = COLOR_BLACK,
"red" = COLOR_RED,
"dark red" = COLOR_MAROON,
"yellow" = COLOR_YELLOW,
"dark yellow" = COLOR_OLIVE,
"green" = COLOR_LIME,
"dark green" = COLOR_GREEN,
"cyan" = COLOR_CYAN,
"teal" = COLOR_TEAL,
"blue" = COLOR_BLUE,
"dark blue" = COLOR_NAVY,
"magenta" = COLOR_PINK,
"purple" = COLOR_PURPLE,
"orange" = COLOR_ORANGE,
"dark orange" = "#B95A00",
"dark brown" = "#917448",
"brown" = "#B19664",
"pale brown" = "#CEB689"
"white" = COLOR_WHITE,
"light gray" = COLOR_SILVER,
"dark gray" = COLOR_GRAY,
"blue-gray" = COLOR_BLUE_GRAY,
"pale blue-gray" = COLOR_PALE_BLUE_GRAY,
"green-gray" = COLOR_GREEN_GRAY,
"pale green-gray" = COLOR_PALE_GREEN_GRAY,
"red-gray" = COLOR_RED_GRAY,
"pale red-gray" = COLOR_PALE_RED_GRAY,
"purple-gray" = COLOR_PURPLE_GRAY,
"pale purple-gray" = COLOR_PALE_PURPLE_GRAY,
"black" = COLOR_BLACK,
"red" = COLOR_RED,
"dark red" = COLOR_MAROON,
"yellow" = COLOR_YELLOW,
"dark yellow" = COLOR_OLIVE,
"green" = COLOR_LIME,
"dark green" = COLOR_GREEN,
"cyan" = COLOR_CYAN,
"teal" = COLOR_TEAL,
"blue" = COLOR_BLUE,
"dark blue" = COLOR_NAVY,
"magenta" = COLOR_PINK,
"purple" = COLOR_PURPLE,
"orange" = COLOR_ORANGE,
"dark orange" = COLOR_DARK_ORANGE,
"dark brown" = COLOR_DARK_BROWN,
"brown" = COLOR_BROWN,
"pale brown" = COLOR_BEIGE
)
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
@@ -33,7 +33,7 @@
qdel(keyslot2)
keyslot1 = null
keyslot2 = null
..()
return ..()
/obj/item/device/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
@@ -125,6 +125,8 @@
/obj/item/device/radio/intercom/locked/ai_private
name = "\improper AI intercom"
frequency = AI_FREQ
broadcasting = 1
listening = 1
/obj/item/device/radio/intercom/locked/confessional
name = "confessional intercom"
@@ -32,7 +32,6 @@ var/global/list/default_medbay_channels = list(
var/frequency = PUB_FREQ //common chat
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
var/canhear_range = 3 // the range which mobs can hear this radio from
var/obj/item/device/radio/patch_link = null
var/datum/wires/radio/wires = null
var/b_stat = 0
var/broadcasting = 0
@@ -71,7 +70,7 @@ var/global/list/default_medbay_channels = list(
radio_controller.remove_object(src, frequency)
for (var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
..()
return ..()
/obj/item/device/radio/initialize()
@@ -85,7 +85,8 @@
/obj/item/stack/tile/floor_red
name = "red floor tile"
singular_name = "red floor tile"
icon_state = "tile_red"
color = COLOR_RED_GRAY
icon_state = "tile_white"
/obj/item/stack/tile/floor_steel
name = "steel floor tile"
@@ -102,7 +103,8 @@
/obj/item/stack/tile/floor_yellow
name = "yellow floor tile"
singular_name = "yellow floor tile"
icon_state = "tile_yellow"
color = COLOR_BROWN
icon_state = "tile_white"
/obj/item/stack/tile/floor_dark
name = "dark floor tile"
@@ -2,6 +2,7 @@ var/global/list/syndicate_ids = list()
/obj/item/weapon/card/id/syndicate
name = "agent card"
icon_state = "syndicate"
assignment = "Agent"
origin_tech = list(TECH_ILLEGAL = 3)
var/electronic_warfare = 1
@@ -33,7 +34,7 @@ var/global/list/syndicate_ids = list()
var/obj/item/weapon/card/id/I = O
src.access |= I.access
if(player_is_antag(user))
user << "<span class='notice'>The microscanner activate as you pass it over the ID, copying its access.</span>"
user << "<span class='notice'>The microscanner activates as you pass it over the ID, copying its access.</span>"
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!registered_user)
@@ -65,7 +65,8 @@
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living))
M.radiation += rand(5,20)
var/mob/living/L = M
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
if (buf.types & DNA2_BUF_UI)
@@ -18,6 +18,11 @@
wires = new(src)
image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2")
..()
/obj/item/weapon/plastique/Destroy()
qdel(wires)
wires = null
return ..()
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
@@ -1,6 +1,6 @@
/obj/item/weapon/grenade/anti_photon
desc = "An experimental device for temporarily removing light in a limited area."
name = "pgoton disruption grenade"
name = "photon disruption grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "emp"
item_state = "emp"
@@ -8,27 +8,32 @@
slot_flags = SLOT_BELT
var/datum/effect/effect/system/smoke_spread/bad/smoke
New()
..()
src.smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread/bad)
src.smoke.attach(src)
/obj/item/weapon/grenade/smokebomb/New()
..()
src.smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread/bad)
src.smoke.attach(src)
prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
/obj/item/weapon/grenade/smokebomb/Destroy()
qdel(smoke)
smoke = null
return ..()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
qdel(src)
return
/obj/item/weapon/grenade/smokebomb/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
qdel(src)
return
@@ -92,7 +92,7 @@
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
if(issmall(H))
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
else
@@ -175,7 +175,7 @@
else if(istype(A,/obj/effect/plant))
var/obj/effect/plant/P = A
P.die_off()
//spears, bay edition
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
+14 -8
View File
@@ -12,7 +12,7 @@
attack_dir = get_dir(get_turf(user), get_turf(attacker))
else if(damage_source)
attack_dir = get_dir(get_turf(user), get_turf(damage_source))
if(!(attack_dir && (attack_dir & bad_arc)))
return 1
return 0
@@ -21,12 +21,12 @@
//parry only melee attacks
if(istype(damage_source, /obj/item/projectile) || (attacker && get_dist(user, attacker) > 1) || user.incapacitated())
return 0
//block as long as they are not directly behind us
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
if(!check_shield_arc(user, bad_arc, damage_source, attacker))
return 0
return 1
/obj/item/weapon/shield
@@ -109,13 +109,13 @@
if(!active)
return 0 //turn it on first!
. = ..()
if(.)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread)
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
/obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
@@ -130,14 +130,14 @@
active = !active
if (active)
force = 10
icon_state = "eshield[active]"
update_icon()
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
user << "<span class='notice'>\The [src] is now active.</span>"
else
force = 3
icon_state = "eshield[active]"
update_icon()
w_class = 1
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "<span class='notice'>\The [src] can now be concealed.</span>"
@@ -150,6 +150,12 @@
add_fingerprint(user)
return
/obj/item/weapon/shield/energy/update_icon()
icon_state = "eshield[active]"
if(active)
set_light(1.5, 1.5, "#006AFF")
else
set_light(0)
/obj/item/weapon/cloaking_device
name = "cloaking device"
@@ -8,6 +8,18 @@
attack_verb = list("whipped", "lashed", "disciplined")
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/belt.dmi')
var/show_above_suit = 0
/obj/item/weapon/storage/belt/verb/toggle_layer()
set name = "Switch Belt Layer"
set category = "Object"
if(show_above_suit == -1)
usr << "<span class='notice'>\The [src] cannot be worn above your suit!</span>"
return
show_above_suit = !show_above_suit
update_icon()
/obj/item/weapon/storage/update_icon()
if (ismob(src.loc))
var/mob/M = src.loc
@@ -316,7 +316,7 @@
desc = "A box containing 5 experimental photon disruption grenades."
icon_state = "flashbang"
/obj/item/weapon/storage/box/anti_photon/New()
/obj/item/weapon/storage/box/anti_photons/New()
..()
new /obj/item/weapon/grenade/anti_photon(src)
new /obj/item/weapon/grenade/anti_photon(src)
@@ -177,6 +177,16 @@
icon_state = "Dpacket"
item_state = "Dpacket"
/obj/item/weapon/storage/fancy/cigarettes/killthroat
name = "\improper AcmeCo packet"
desc = "A packet of six AcmeCo cigarettes. For those who somehow want to obtain the record for the most amount of cancerous tumors."
icon_state = "Bpacket"
item_state = "Bpacket" //Doesn't have an inhand state, but neither does dromedary, so, ya know..
New()
..()
fill_cigarre_package(src,list("fuel" = 15))
/obj/item/weapon/storage/fancy/cigar
name = "cigar case"
desc = "A case for holding your cigars when you are not smoking them."
@@ -9,7 +9,7 @@
name = master_item.name
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
..()
/obj/item/weapon/storage/internal/Destroy()
master_item = null
..()
@@ -151,11 +151,6 @@
throw_range = 4
w_class = 4.0
New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
@@ -51,6 +51,11 @@
else
icon_state = "[initial(name)]"
if(icon_state == "[initial(name)]_active")
set_light(1.5, 1, "#FF6A00")
else
set_light(0)
/obj/item/weapon/melee/baton/examine(mob/user)
if(!..(user, 1))
return
@@ -18,12 +18,14 @@
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/examine(mob/user)
if(!..(user, 0))
return
/obj/item/weapon/tank/jetpack/Destroy()
qdel(ion_trail)
..()
if(air_contents.gas["oxygen"] < 10)
user << text("<span class='danger'>The meter on \the [src] indicates you are almost out of air!</span>")
/obj/item/weapon/tank/jetpack/examine(mob/user)
. = ..()
if(air_contents.total_moles < 5)
user << "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
@@ -102,21 +104,9 @@
/obj/item/weapon/tank/jetpack/carbondioxide/New()
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
if(!..(0))
return
if(air_contents.gas["carbon_dioxide"] < 10)
user << text("<span class='danger'>The meter on \the [src] indicates you are almost out of carbon dioxide!</span>")
playsound(user, 'sound/effects/alert.ogg', 50, 1)
return
/obj/item/weapon/tank/jetpack/rig
name = "jetpack"
var/obj/item/weapon/rig/holder
+18 -33
View File
@@ -44,39 +44,24 @@
..()
/obj/item/weapon/tank/examine(mob/user)
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, user))
if (icon == src) user << "<span class='notice'>It's \a \icon[icon][src]! If you want any more information you'll need to get closer.</span>"
return
var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive
var/status
if (celsius_temperature < 20)
descriptive = "cold"
status = "warning"
else if (celsius_temperature < 40)
descriptive = "room temperature"
status = "notice"
else if (celsius_temperature < 80)
descriptive = "lukewarm"
status = "warning"
else if (celsius_temperature < 100)
descriptive = "warm"
status = "warning"
else if (celsius_temperature < 300)
descriptive = "hot"
status = "danger"
else
descriptive = "furiously hot"
status = "danger"
user << "<span class='[status]'>\The \icon[icon][src] feels [descriptive]</span>"
return
. = ..(user, 0)
if(.)
var/celsius_temperature = air_contents.temperature - T0C
var/descriptive
switch(celsius_temperature)
if(300 to INFINITY)
descriptive = "furiously hot"
if(100 to 300)
descriptive = "hot"
if(80 to 100)
descriptive = "warm"
if(40 to 80)
descriptive = "lukewarm"
if(20 to 40)
descriptive = "room temperature"
else
descriptive = "cold"
user << "<span class='notice'>\The [src] feels [descriptive].</span>"
/obj/item/weapon/tank/blob_act()
if(prob(50))
@@ -11,7 +11,7 @@
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
var/breakout = 0 //if someone is currently breaking out. mutex
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
var/storage_capacity = 2 * MOB_MEDIUM //This is so that someone can't pack hundreds of items in a locker/crate
//then open it in a populated area to crash clients.
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
@@ -20,14 +20,12 @@
var/store_items = 1
var/store_mobs = 1
var/const/default_mob_size = 15
/obj/structure/closet/initialize()
if(!opened) // if closed, any item at the crate's loc is put in the contents
var/obj/item/I
for(I in src.loc)
if(I.density || I.anchored || I == src) continue
I.loc = src
I.forceMove(src)
// adjust locker size to hold all items with 5 units of free store room
var/content_size = 0
for(I in src.contents)
@@ -71,13 +69,13 @@
/obj/structure/closet/proc/dump_contents()
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src)
AD.loc = src.loc
AD.forceMove(src.loc)
for(var/obj/I in src)
I.loc = src.loc
I.forceMove(src.loc)
for(var/mob/M in src)
M.loc = src.loc
M.forceMove(src.loc)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
@@ -125,7 +123,7 @@
for(var/obj/effect/dummy/chameleon/AD in src.loc)
if((stored_units + added_units) > storage_capacity)
break
AD.loc = src
AD.forceMove(src)
added_units++
return added_units
@@ -136,7 +134,7 @@
if(stored_units + added_units + item_size > storage_capacity)
continue
if(!I.anchored)
I.loc = src
I.forceMove(src)
added_units += item_size
return added_units
@@ -145,14 +143,13 @@
for(var/mob/living/M in src.loc)
if(M.buckled || M.pinned.len)
continue
var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
if(stored_units + added_units + current_mob_size > storage_capacity)
if(stored_units + added_units + M.mob_size > storage_capacity)
break
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
added_units += current_mob_size
M.forceMove(src)
added_units += M.mob_size
return added_units
/obj/structure/closet/proc/toggle(mob/user as mob)
@@ -166,19 +163,19 @@
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.loc = src.loc
A.forceMove(src.loc)
A.ex_act(severity++)
qdel(src)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
A.ex_act(severity++)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
A.ex_act(severity++)
qdel(src)
@@ -186,7 +183,7 @@
health -= damage
if(health <= 0)
for(var/atom/movable/A in src)
A.loc = src.loc
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
@@ -203,7 +200,7 @@
/obj/structure/closet/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -233,7 +230,7 @@
return
usr.drop_item()
if(W)
W.loc = src.loc
W.forceMove(src.loc)
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/weldingtool))
@@ -146,7 +146,7 @@
attack_tk(mob/user as mob)
if(localopened && fireaxe)
fireaxe.loc = loc
fireaxe.forceMove(loc)
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
fireaxe = null
update_icon()
@@ -65,7 +65,7 @@
if (istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
user.drop_item()
if (W) W.loc = src.loc
if (W) W.forceMove(src.loc)
else if(istype(W, /obj/item/weapon/card/id))
if(src.broken)
user << "<span class='warning'>It appears to be broken.</span>"
@@ -77,7 +77,7 @@
return
user.drop_item()
if(W)
W.loc = src.loc
W.forceMove(src.loc)
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
@@ -35,7 +35,7 @@
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
O.loc = get_turf(src)
O.forceMove(get_turf(src))
icon_state = icon_opened
src.opened = 1
@@ -60,7 +60,7 @@
var/obj/structure/bed/B = O
if(B.buckled_mob)
continue
O.loc = src
O.forceMove(src)
itemcount++
icon_state = icon_closed
@@ -75,7 +75,7 @@
return
user.drop_item()
if(W)
W.loc = src.loc
W.forceMove(src.loc)
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/stack/cable_coil))
@@ -91,7 +91,7 @@
if(rigged)
user << "<span class='notice'>You attach [W] to [src].</span>"
user.drop_item()
W.loc = src
W.forceMove(src)
return
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
@@ -160,7 +160,7 @@
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
if(locked == newlocked) return
locked = newlocked
if(user)
for(var/mob/O in viewers(user, 3))
@@ -437,12 +437,12 @@
continue
if(!S.anchored)
found = 1
S.loc = src
S.forceMove(src)
break
if(!found)
for(var/obj/machinery/M in src.loc)
if(!M.anchored)
M.loc = src
M.forceMove(src)
break
return
@@ -465,12 +465,12 @@
continue
if(!S.anchored)
found = 1
S.loc = src
S.forceMove(src)
break
if(!found)
for(var/obj/machinery/M in src.loc)
if(!M.anchored)
M.loc = src
M.forceMove(src)
break
return
@@ -32,7 +32,7 @@
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
if(!H.species.is_small)
if(!issmall(H))
return 0
meat_type = H.species.meat_type
icon_state = "spikebloody"
-70
View File
@@ -1,70 +0,0 @@
/obj/structure/ladder
name = "ladder"
desc = "A sturdy metal ladder."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder11"
var/id = null
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
/obj/structure/ladder/New()
spawn(8)
for(var/obj/structure/ladder/L in world)
if(L.id == id)
if(L.height == (height - 1))
down = L
continue
if(L.height == (height + 1))
up = L
continue
if(up && down) //if both our connections are filled
break
update_icon()
/obj/structure/ladder/update_icon()
if(up && down)
icon_state = "ladder11"
else if(up)
icon_state = "ladder10"
else if(down)
icon_state = "ladder01"
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/attack_hand(mob/user as mob)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if("Up")
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
"<span class='notice'>You climb up \the [src]!</span>")
user.loc = get_turf(up)
up.add_fingerprint(user)
if("Down")
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
"<span class='notice'>You climb down \the [src]!</span>")
user.loc = get_turf(down)
down.add_fingerprint(user)
if("Cancel")
return
else if(up)
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
"<span class='notice'>You climb up \the [src]!</span>")
user.loc = get_turf(up)
up.add_fingerprint(user)
else if(down)
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
"<span class='notice'>You climb down \the [src]!</span>")
user.loc = get_turf(down)
down.add_fingerprint(user)
add_fingerprint(user)
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
return attack_hand(user)
@@ -15,6 +15,7 @@
pressure_resistance = 15
anchored = 1
can_buckle = 1
buckle_dir = SOUTH
buckle_lying = 1
var/material/material
var/material/padding_material
@@ -131,14 +132,18 @@
remove_padding()
else if(istype(W, /obj/item/weapon/grab))
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
var/obj/item/weapon/grab/G = W
var/mob/living/affecting = G.affecting
user.visible_message("<span class='notice'>[user] attempts to buckle [affecting] into \the [src]!</span>")
if(do_after(user, 20))
W:affecting.loc = loc
if(buckle_mob(W:affecting))
W:affecting.visible_message(\
"<span class='danger'>[W:affecting.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
affecting.loc = loc
spawn(0)
if(buckle_mob(affecting))
affecting.visible_message(\
"<span class='danger'>[affecting.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
qdel(W)
else
..()
@@ -4,6 +4,7 @@
icon_state = "chair_preview"
color = "#666666"
base_icon = "chair"
buckle_dir = 0
buckle_lying = 0 //force people to sit up in chairs when buckled
var/propelled = 0 // Check for fire-extinguisher-driven chairs
@@ -75,7 +75,7 @@
set_dir(direction)
if(pulling) // Driver
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
pulling.loc = T
pulling.forceMove(T)
else
spawn(0)
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
@@ -107,7 +107,7 @@
pulling = null
else
if (occupant && (src.loc != occupant.loc))
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
if (pulling)
+1 -5
View File
@@ -70,11 +70,7 @@ var/list/mechtoys = list(
for(var/mob_type in mobs_can_pass)
if(istype(A, mob_type))
return ..()
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.is_small)
return ..()
return 0
return issmall(M)
return ..()
+2 -2
View File
@@ -91,7 +91,7 @@ var/list/flooring_types
/decl/flooring/tiling/red
name = "floor"
icon_base = "red"
icon_base = "white"
has_damage_range = null
flags = TURF_REMOVE_CROWBAR
build_type = /obj/item/stack/tile/floor_red
@@ -113,7 +113,7 @@ var/list/flooring_types
/decl/flooring/tiling/yellow
name = "floor"
icon_base = "yellow"
icon_base = "white"
has_damage_range = null
flags = TURF_REMOVE_CROWBAR
build_type = /obj/item/stack/tile/floor_yellow
+17 -12
View File
@@ -56,7 +56,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/blue
name = "blue corner"
color = "#6A97B0"
color = COLOR_BLUE_GRAY
/obj/effect/floor_decal/corner/blue/diagonal
icon_state = "corner_white_diagonal"
@@ -66,7 +66,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/paleblue
name = "pale blue corner"
color = "#8BBBD5"
color = COLOR_PALE_BLUE_GRAY
/obj/effect/floor_decal/corner/paleblue/diagonal
icon_state = "corner_white_diagonal"
@@ -76,7 +76,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/green
name = "green corner"
color = "#8DAF6A"
color = COLOR_GREEN_GRAY
/obj/effect/floor_decal/corner/green/diagonal
icon_state = "corner_white_diagonal"
@@ -86,7 +86,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/lime
name = "lime corner"
color = "#AED18B"
color = COLOR_PALE_GREEN_GRAY
/obj/effect/floor_decal/corner/lime/diagonal
icon_state = "corner_white_diagonal"
@@ -96,7 +96,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/yellow
name = "yellow corner"
color = "#B19664"
color = COLOR_BROWN
/obj/effect/floor_decal/corner/yellow/diagonal
icon_state = "corner_white_diagonal"
@@ -106,7 +106,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/beige
name = "beige corner"
color = "#CEB689"
color = COLOR_BEIGE
/obj/effect/floor_decal/corner/beige/diagonal
icon_state = "corner_white_diagonal"
@@ -116,7 +116,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/red
name = "red corner"
color = "#AA5F61"
color = COLOR_RED_GRAY
/obj/effect/floor_decal/corner/red/diagonal
icon_state = "corner_white_diagonal"
@@ -126,7 +126,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/pink
name = "pink corner"
color = "#CC9090"
color = COLOR_PALE_RED_GRAY
/obj/effect/floor_decal/corner/pink/diagonal
icon_state = "corner_white_diagonal"
@@ -136,7 +136,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/purple
name = "purple corner"
color = "#A2819E"
color = COLOR_PURPLE_GRAY
/obj/effect/floor_decal/corner/purple/diagonal
icon_state = "corner_white_diagonal"
@@ -146,7 +146,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/mauve
name = "mauve corner"
color = "#BDA2BA"
color = COLOR_PALE_PURPLE_GRAY
/obj/effect/floor_decal/corner/mauve/diagonal
icon_state = "corner_white_diagonal"
@@ -156,7 +156,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/orange
name = "orange corner"
color = "#B95A00"
color = COLOR_DARK_ORANGE
/obj/effect/floor_decal/corner/orange/diagonal
icon_state = "corner_white_diagonal"
@@ -166,7 +166,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal/corner/brown
name = "brown corner"
color = "#917448"
color = COLOR_DARK_BROWN
/obj/effect/floor_decal/corner/brown/diagonal
icon_state = "corner_white_diagonal"
@@ -272,6 +272,11 @@ var/list/floor_decals = list()
icon = 'icons/turf/flooring/carpet.dmi'
icon_state = "carpet_edges"
/obj/effect/floor_decal/carpet/blue
name = "carpet"
icon = 'icons/turf/flooring/carpet.dmi'
icon_state = "bcarpet_edges"
/obj/effect/floor_decal/carpet/corners
name = "carpet"
icon = 'icons/turf/flooring/carpet.dmi'
+9 -2
View File
@@ -97,7 +97,8 @@
/turf/simulated/floor/tiled/red
name = "red floor"
icon_state = "red"
color = COLOR_RED_GRAY
icon_state = "white"
initial_flooring = /decl/flooring/tiling/red
/turf/simulated/floor/tiled/steel
@@ -105,6 +106,11 @@
icon_state = "steel_dirty"
initial_flooring = /decl/flooring/tiling/steel
/turf/simulated/floor/tiled/steel/airless
oxygen = 0
nitrogen = 0
/turf/simulated/floor/tiled/white
name = "white floor"
icon_state = "white"
@@ -112,7 +118,8 @@
/turf/simulated/floor/tiled/yellow
name = "yellow floor"
icon_state = "yellow"
color = COLOR_BROWN
icon_state = "white"
initial_flooring = /decl/flooring/tiling/yellow
/turf/simulated/floor/tiled/freezer
+12
View File
@@ -0,0 +1,12 @@
/datum/turf_initializer/proc/initialize(var/turf/T)
return
/area
var/datum/turf_initializer/turf_initializer = null
/area/initialize()
..()
for(var/turf/simulated/T in src)
T.initialize()
if(turf_initializer)
turf_initializer.initialize(T)
@@ -0,0 +1,60 @@
/datum/turf_initializer/maintenance/initialize(var/turf/simulated/T)
if(T.density)
return
// Quick and dirty check to avoid placing things inside windows
if(locate(/obj/structure/grille, T))
return
var/cardinal_turfs = T.CardinalTurfs()
T.dirt = rand(10, 50) + rand(0, 50)
// If a neighbor is dirty, then we get dirtier.
var/how_dirty = dirty_neighbors(cardinal_turfs)
for(var/i = 0; i < how_dirty; i++)
T.dirt += rand(0,10)
T.update_dirt()
if(prob(2))
PoolOrNew(junk(), T)
if(prob(2))
PoolOrNew(/obj/effect/decal/cleanable/blood/oil, T)
if(prob(25)) // Keep in mind that only "corners" get any sort of web
attempt_web(T, cardinal_turfs)
var/global/list/random_junk
/datum/turf_initializer/maintenance/proc/junk()
if(prob(25))
return /obj/effect/decal/cleanable/generic
if(!random_junk)
random_junk = subtypes(/obj/item/trash)
random_junk += typesof(/obj/item/weapon/cigbutt)
random_junk += /obj/effect/decal/cleanable/spiderling_remains
random_junk += /obj/effect/decal/remains/mouse
random_junk += /obj/effect/decal/remains/robot
random_junk -= /obj/item/trash/plate
random_junk -= /obj/item/trash/snack_bowl
random_junk -= /obj/item/trash/syndi_cakes
random_junk -= /obj/item/trash/tray
return pick(random_junk)
/datum/turf_initializer/maintenance/proc/dirty_neighbors(var/list/cardinal_turfs)
var/how_dirty = 0
for(var/turf/simulated/T in cardinal_turfs)
// Considered dirty if more than halfway to visible dirt
if(T.dirt > 25)
how_dirty++
return how_dirty
/datum/turf_initializer/maintenance/proc/attempt_web(var/turf/simulated/T)
var/turf/north_turf = get_step(T, NORTH)
if(!north_turf || !north_turf.density)
return
for(var/dir in list(WEST, EAST)) // For the sake of efficiency, west wins over east in the case of 1-tile valid spots, rather than doing pick()
var/turf/neighbour = get_step(T, dir)
if(neighbour && neighbour.density)
if(dir == WEST)
PoolOrNew(/obj/effect/decal/cleanable/cobweb, T)
if(dir == EAST)
PoolOrNew(/obj/effect/decal/cleanable/cobweb2, T)
return
+12 -8
View File
@@ -20,12 +20,23 @@
holy = 1
levelupdate()
/turf/simulated/proc/initialize()
return
/turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808")
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
if(!tracks)
tracks = new typepath(src)
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
/turf/simulated/proc/update_dirt()
dirt = min(dirt++, 101)
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
if (dirt > 50)
if (!dirtoverlay)
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
/turf/simulated/Entered(atom/A, atom/OL)
if(movement_disabled && usr.ckey != movement_disabled_exception)
usr << "<span class='danger'>Movement is admin-disabled.</span>" //This is to identify lag problems
@@ -41,14 +52,7 @@
if(plant) plant.trodden_on(M)
// Dirt overlays.
dirt++
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
if (dirt >= 50)
if (!dirtoverlay)
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
dirtoverlay.alpha = 15
else if (dirt > 50)
dirtoverlay.alpha = min(dirtoverlay.alpha+5, 255)
update_dirt()
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
+1 -1
View File
@@ -74,7 +74,7 @@
// Okay, so let's make it so that people can travel z levels but not nuke disks!
// if(ticker.mode.name == "mercenary") return
if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1))
if (A.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE + 1) || A.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE + 1))
A.touch_map_edge()
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
+8
View File
@@ -183,6 +183,13 @@ var/const/enterloopsanity = 100
L.Add(t)
return L
/turf/proc/CardinalTurfs()
var/L[] = new()
for(var/turf/simulated/T in AdjacentTurfs())
if(T.x == src.x || T.y == src.y)
L.Add(T)
return L
/turf/proc/Distance(turf/t)
if(get_dist(src,t) == 1)
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
@@ -190,6 +197,7 @@ var/const/enterloopsanity = 100
return cost
else
return get_dist(src,t)
/turf/proc/AdjacentTurfsSpace()
var/L[] = new()
for(var/turf/t in oview(src,1))
-6
View File
@@ -10,11 +10,5 @@
icon_state = "fakewindows"
opacity = 0
turf/unsimulated/wall/splashscreen
name = "Space Station 13"
icon = 'icons/misc/fullscreen.dmi'
icon_state = "title"
layer = FLY_LAYER
/turf/unsimulated/wall/other
icon_state = "r_wall"
+18 -4
View File
@@ -349,6 +349,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/bdcolor = "#ffdddd" //banned dark
var/ulcolor = "#eeffee" //unbanned light
var/udcolor = "#ddffdd" //unbanned dark
var/alcolor = "#eeeeff" // auto-unbanned light
var/adcolor = "#ddddff" // auto-unbanned dark
output += "<table width='90%' bgcolor='#e3e3e3' cellpadding='5' cellspacing='0' align='center'>"
output += "<tr>"
@@ -400,6 +402,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
select_query.Execute()
var/now = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") // MUST BE the same format as SQL gives us the dates in, and MUST be least to most specific (i.e. year, month, day not day, month, year)
while(select_query.NextRow())
var/banid = select_query.item[1]
var/bantime = select_query.item[2]
@@ -417,18 +421,24 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
var/ip = select_query.item[14]
var/cid = select_query.item[15]
// true if this ban has expired
var/auto = (bantype in list("TEMPBAN", "JOB_TEMPBAN")) && now > expiration // oh how I love ISO 8601 (ish) date strings
var/lcolor = blcolor
var/dcolor = bdcolor
if(unbanned)
lcolor = ulcolor
dcolor = udcolor
else if(auto)
lcolor = alcolor
dcolor = adcolor
var/typedesc =""
switch(bantype)
if("PERMABAN")
typedesc = "<font color='red'><b>PERMABAN</b></font>"
if("TEMPBAN")
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]</font>"
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes) [(unbanned || auto) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>)"]<br>Expires [expiration]</font>"
if("JOB_PERMABAN")
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])</font>"
if("JOB_TEMPBAN")
@@ -439,14 +449,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<td align='center'><b>[ckey]</b></td>"
output += "<td align='center'>[bantime]</td>"
output += "<td align='center'><b>[ackey]</b></td>"
output += "<td align='center'>[(unbanned) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
output += "<td align='center'>[(unbanned || auto) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
output += "</tr>"
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='2' bgcolor=''><b>IP:</b> [ip]</td>"
output += "<td align='center' colspan='3' bgcolor=''><b>CIP:</b> [cid]</td>"
output += "</tr>"
output += "<tr bgcolor='[lcolor]'>"
output += "<td align='center' colspan='5'><b>Reason: [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=reason;dbbanid=[banid]\">Edit</a>)"]</b> <cite>\"[reason]\"</cite></td>"
output += "<td align='center' colspan='5'><b>Reason: [(unbanned || auto) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=reason;dbbanid=[banid]\">Edit</a>)"]</b> <cite>\"[reason]\"</cite></td>"
output += "</tr>"
if(edits)
output += "<tr bgcolor='[dcolor]'>"
@@ -459,10 +469,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='5' bgcolor=''><b>UNBANNED by admin [unbanckey] on [unbantime]</b></td>"
output += "</tr>"
else if(auto)
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center' colspan='5' bgcolor=''><b>EXPIRED at [expiration]</b></td>"
output += "</tr>"
output += "<tr>"
output += "<td colspan='5' bgcolor='white'>&nbsp</td>"
output += "</tr>"
output += "</table></div>"
usr << browse(output,"window=lookupbans;size=900x700")
usr << browse(output,"window=lookupbans;size=900x700")
+1 -1
View File
@@ -411,7 +411,7 @@ var/list/admin_verbs_mentor = list(
var/mob/dead/observer/ghost = body.ghostize(1)
ghost.admin_ghosted = 1
if(body)
body.aghosted = ghost
body.teleop = ghost
if(!body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -106,7 +106,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
log_admin("[key_name(user)] has edited [key]'s notes.")
qdel(info)
del(info) // savefile, so NOT qdel
//Updating list of keys with notes on them
var/savefile/note_list = new("data/player_notes.sav")
@@ -115,7 +115,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
if(!note_keys) note_keys = list()
if(!note_keys.Find(key)) note_keys += key
note_list << note_keys
qdel(note_list)
del(note_list) // savefile, so NOT qdel
/proc/notes_del(var/key, var/index)
+2 -2
View File
@@ -85,7 +85,7 @@
banreason = "[banreason] (CUSTOM CID)"
else
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
notes_add(playermob.ckey,banreason,usr)
notes_add(banckey,banreason,usr)
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
@@ -1334,7 +1334,7 @@
src.owner << "You sent [input] to [L] via a secure channel."
log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].")
message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"")
if(!L.isMobAI())
if(!isAI(L))
L << "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>"
L << "<span class='info'>Please stand by for a message from Central Command.</span>"
L << "<span class='info'>Message as follows.</span>"
+1 -1
View File
@@ -536,7 +536,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(src)] has created a command report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in world)
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view())
set category = "Admin"
set name = "Delete"
+23 -19
View File
@@ -404,7 +404,7 @@ datum/preferences
dat += "- [species] cannot choose secondary languages.<br>"
dat += "<b>Language Keys</b><br>"
dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] <a href='byond://?src=\ref[user];preference=language_prefix'>Change</a><br>"
dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] <a href='byond://?src=\ref[user];preference=language_prefix;add=1'>Change</a> <a href='byond://?src=\ref[user];preference=language_prefix;reset=1'>Reset</a><br>"
dat += "<br><br>"
var/list/undies = gender == MALE ? underwear_m : underwear_f
@@ -1180,25 +1180,29 @@ datum/preferences
alternate_languages |= new_lang
else if(href_list["preference"] == "language_prefix")
var/char
var/keys[0]
do
char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! *", "Enter Character - [3 - keys.len] remaining") as null|text
if(char)
if(length(char) > 1)
alert("Only single characters allowed.", "Error", "Ok")
else if(char in list(";", ":", "."))
alert("Radio character. Rejected.", "Error", "Ok")
else if(char in list("!","*"))
alert("Say character. Rejected.", "Error", "Ok")
else if(contains_az09(char))
alert("Non-special character. Rejected.", "Error", "Ok")
else
keys.Add(char)
while(char && keys.len < 3)
if(href_list["add"])
var/char
var/keys[0]
do
char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text
if(char)
if(length(char) > 1)
alert("Only single characters allowed.", "Error", "Ok")
else if(char in list(";", ":", "."))
alert("Radio character. Rejected.", "Error", "Ok")
else if(char in list("!","*", "^"))
alert("Say character. Rejected.", "Error", "Ok")
else if(contains_az09(char))
alert("Non-special character. Rejected.", "Error", "Ok")
else
keys.Add(char)
while(char && keys.len < 3)
if(keys.len == 3)
language_prefixes = keys
else if(href_list["reset"])
language_prefixes = config.language_prefixes.Copy()
if(keys.len == 3)
language_prefixes = keys
switch(href_list["task"])
if("change")
if(href_list["preference"] == "species")
@@ -234,7 +234,7 @@
if(target)
var/obj/item/firing = new fabrication_type()
firing.loc = get_turf(src)
firing.forceMove(get_turf(src))
H.visible_message("<span class='danger'>[H] launches \a [firing]!</span>")
firing.throw_at(target,fire_force,fire_distance)
else
@@ -242,7 +242,7 @@
H << "<span class='danger'>Your hands are full.</span>"
else
var/obj/item/new_weapon = new fabrication_type()
new_weapon.loc = H
new_weapon.forceMove(H)
H << "<font color='blue'><b>You quickly fabricate \a [new_weapon].</b></font>"
H.put_in_hands(new_weapon)
@@ -68,9 +68,9 @@
if(!verb_holder)
verb_holder = new(src)
if(integrated_ai)
verb_holder.loc = integrated_ai
verb_holder.forceMove(integrated_ai)
else
verb_holder.loc = src
verb_holder.forceMove(src)
/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user)
@@ -179,7 +179,7 @@
else if(user)
user.put_in_hands(ai_card)
else
ai_card.loc = get_turf(src)
ai_card.forceMove(get_turf(src))
ai_card = null
integrated_ai = null
update_verb_holder()
@@ -209,7 +209,7 @@
return 0
else
user.drop_from_inventory(ai)
ai.loc = src
ai.forceMove(src)
ai_card = ai
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
@@ -123,13 +123,13 @@
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
phase_out(H,get_turf(H))
H.loc = T
H.forceMove(T)
phase_in(H,get_turf(H))
for(var/obj/item/weapon/grab/G in H.contents)
if(G.affecting)
phase_out(G.affecting,get_turf(G.affecting))
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)
G.affecting.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z))
phase_in(G.affecting,get_turf(G.affecting))
return 1
+10 -2
View File
@@ -160,7 +160,11 @@
M.drop_from_inventory(piece)
qdel(piece)
processing_objects -= src
..()
qdel(wires)
wires = null
qdel(spark_system)
spark_system = null
return ..()
/obj/item/weapon/rig/proc/suit_is_deployed()
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
@@ -629,7 +633,11 @@
if(check_slot)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
else
H << "<span class='notice'>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</span>"
use_obj.forceMove(H)
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
use_obj.forceMove(src)
else
H << "<span class='notice'>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -58,7 +58,7 @@
user.drop_from_inventory(W)
air_supply = W
W.loc = src
W.forceMove(src)
user << "You slot [W] into [src] and tighten the connecting valve."
return
@@ -87,7 +87,7 @@
user << "You install \the [mod] into \the [src]."
user.drop_from_inventory(mod)
installed_modules |= mod
mod.loc = src
mod.forceMove(src)
mod.installed(src)
update_icon()
return 1
@@ -96,7 +96,7 @@
user << "You jack \the [W] into \the [src]'s battery mount."
user.drop_from_inventory(W)
W.loc = src
W.forceMove(src)
src.cell = W
return
@@ -107,7 +107,7 @@
return
if(user.r_hand && user.l_hand)
air_supply.loc = get_turf(user)
air_supply.forceMove(get_turf(user))
else
user.put_in_hands(air_supply)
user << "You detach and remove \the [air_supply]."
@@ -139,9 +139,9 @@
for(var/obj/item/rig_module/module in installed_modules)
module.deactivate()
if(user.r_hand && user.l_hand)
cell.loc = get_turf(user)
cell.forceMove(get_turf(user))
else
cell.loc = user.put_in_hands(cell)
cell.forceMove(user.put_in_hands(cell))
cell = null
else
user << "There is nothing loaded in that mount."
@@ -164,7 +164,7 @@
var/obj/item/rig_module/removed = possible_removals[removal_choice]
user << "You detatch \the [removed] from \the [src]."
removed.loc = get_turf(src)
removed.forceMove(get_turf(src))
removed.removed()
installed_modules -= removed
update_icon()
+3 -4
View File
@@ -80,7 +80,7 @@
for(var/datum/money_account/D in all_money_accounts)
if(D.account_number == attempt_account_number && !D.suspended)
D.money += amount
//create a transaction log entry
var/datum/transaction/T = new()
T.target_name = source_name
@@ -93,10 +93,9 @@
T.time = worldtime2text()
T.source_terminal = terminal_id
D.transaction_log.Add(T)
return 1
break
return 0
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
+10 -3
View File
@@ -3,9 +3,12 @@
endWhen = 7
var/next_meteor = 6
var/waves = 1
var/start_side
/datum/event/meteor_wave/setup()
waves = severity * rand(1,3)
start_side = pick(cardinal)
endWhen = worst_case_end()
/datum/event/meteor_wave/announce()
switch(severity)
@@ -14,13 +17,17 @@
else
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
/datum/event/meteor_wave/tick()
if(waves && activeFor >= next_meteor)
spawn() spawn_meteors(severity * rand(1,2), get_meteors())
var/pick_side = prob(80) ? start_side : (prob(50) ? turn(start_side, 90) : turn(start_side, -90))
spawn() spawn_meteors(severity * rand(1,2), get_meteors(), pick_side)
next_meteor += rand(15, 30) / severity
waves--
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
endWhen = worst_case_end()
/datum/event/meteor_wave/proc/worst_case_end()
return activeFor + ((30 / severity) * waves) + 10
/datum/event/meteor_wave/end()
switch(severity)
@@ -7,7 +7,7 @@
if(!istype(M))
return
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
if(!buckled_mob && !M.buckled && !M.anchored && (issmall(M) || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
spawn(1)
@@ -36,7 +36,9 @@
if(age >= seed.get_trait(TRAIT_MATURATION))
overlay_stage = seed.growth_stages
else
var/maturation = round(seed.get_trait(TRAIT_MATURATION)/seed.growth_stages)
var/maturation = seed.get_trait(TRAIT_MATURATION)/seed.growth_stages
if(maturation < 1)
maturation = 1
overlay_stage = maturation ? max(1,round(age/maturation)) : 1
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-[overlay_stage]"
var/image/plant_overlay = plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
+29 -19
View File
@@ -1,3 +1,5 @@
//So much copypasta in this file, supposedly in the name of performance. If you change anything make sure to consider other places where the code may have been copied.
/datum/light_source
var/atom/top_atom
var/atom/source_atom
@@ -11,9 +13,10 @@
var/lum_g
var/lum_b
var/tmp/old_lum_r
var/tmp/old_lum_g
var/tmp/old_lum_b
//hold onto the actual applied lum values so we can undo them when the lighting changes
var/tmp/applied_lum_r
var/tmp/applied_lum_g
var/tmp/applied_lum_b
var/list/effect_str
var/list/effect_turf
@@ -107,11 +110,6 @@
if(light_range && light_power && !applied)
. = 1
if(. || source_atom.light_color != light_color)//Save the old lumcounts if we need to update, if the colour changed DO IT BEFORE we parse the colour and LOSE the old lumcounts!
old_lum_r = lum_r
old_lum_g = lum_g
old_lum_b = lum_b
if(source_atom.light_color != light_color)
light_color = source_atom.light_color
parse_light_color()
@@ -149,6 +147,12 @@
/datum/light_source/proc/apply_lum()
applied = 1
//Keep track of the last applied lum values so that the lighting can be reversed
applied_lum_r = lum_r
applied_lum_g = lum_g
applied_lum_b = lum_b
if(istype(source_turf))
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
if(T.lighting_overlay)
@@ -164,9 +168,9 @@
effect_str += strength
T.lighting_overlay.update_lumcount(
lum_r * strength,
lum_g * strength,
lum_b * strength
applied_lum_r * strength,
applied_lum_g * strength,
applied_lum_b * strength
)
else
@@ -188,7 +192,11 @@
if(T.lighting_overlay)
var/str = effect_str[i]
T.lighting_overlay.update_lumcount(-str * old_lum_r, -str * old_lum_g, -str * old_lum_b)
T.lighting_overlay.update_lumcount(
-str * applied_lum_r,
-str * applied_lum_g,
-str * applied_lum_b
)
i++
@@ -218,9 +226,9 @@
effect_str += .
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
else
@@ -241,7 +249,7 @@
if(T.lighting_overlay)
var/str = effect_str[idx]
T.lighting_overlay.update_lumcount(-str * lum_r, -str * lum_g, -str * lum_b)
T.lighting_overlay.update_lumcount(-str * applied_lum_r, -str * applied_lum_g, -str * applied_lum_b)
effect_turf.Cut(idx, idx + 1)
effect_str.Cut(idx, idx + 1)
@@ -279,10 +287,12 @@
effect_str[idx] = .
//Since the applied_lum values are what are (later) removed by remove_lum.
//Anything we apply to the lighting overlays HAS to match what remove_lum uses.
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
applied_lum_r * .,
applied_lum_g * .,
applied_lum_b * .
)
#undef LUM_FALLOFF
+10 -3
View File
@@ -141,6 +141,8 @@ Works together with spawning an observer, noted above.
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
for(var/mob/living/silicon/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
return 1
/mob/proc/ghostize(var/can_reenter_corpse = 1)
@@ -215,7 +217,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
mind.current.key = key
mind.current.aghosted = null
mind.current.teleop = null
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
@@ -460,6 +462,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in config.admin_levels))
src << "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>"
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
@@ -475,8 +482,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
if(!v.welded && v.z == T.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)

Some files were not shown because too many files have changed in this diff Show More