diff --git a/.travis.yml b/.travis.yml index 80e0a0bf21..f47db96174 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ sudo: false env: BYOND_MAJOR="508" BYOND_MINOR="1293" - MACRO_COUNT=1154 + MACRO_COUNT=1151 cache: directories: diff --git a/baystation12.dme b/baystation12.dme index 4a902dd743..656004d7d0 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -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" diff --git a/code/__defines/_macros.dm b/code/__defines/_macros.dm deleted file mode 100644 index affbf2086d..0000000000 --- a/code/__defines/_macros.dm +++ /dev/null @@ -1,2 +0,0 @@ -#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x)) -#define CLAMP01(x) (Clamp(x, 0, 1)) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 29042ea8df..96e3d26a98 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -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" diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 055ec9920f..99bf596c3a 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -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 diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 8b112a07b3..cb6cd511a5 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -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" diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 986c8c448a..fb79b29cb9 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -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) diff --git a/code/_macros.dm b/code/_macros.dm new file mode 100644 index 0000000000..b6ddf4f12c --- /dev/null +++ b/code/_macros.dm @@ -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) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 2261ceb368..797f0385d4 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -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 diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 62df4c26c8..1f30726c07 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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 diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm index 8106320fbf..20e866c315 100644 --- a/code/controllers/Processes/garbage.dm +++ b/code/controllers/Processes/garbage.dm @@ -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++ diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 8932175126..066c357a22 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -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() diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm index 1f8c11ecb0..4cc8afff6c 100644 --- a/code/game/antagonist/outsider/deathsquad.dm +++ b/code/game/antagonist/outsider/deathsquad.dm @@ -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) diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm index 6e9ed32b9a..743593b490 100644 --- a/code/game/antagonist/station/traitor.dm +++ b/code/game/antagonist/station/traitor.dm @@ -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("Potential Collaborator: [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("Potential Collaborator: [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 << "Your laws have been changed!" killer.set_zeroth_law(law, law_borg) - killer << "New law: 0. [law]" \ No newline at end of file + killer << "New law: 0. [law]" diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index dee038821e..7cd0a708d8 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -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" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index a660b6c589..bce75e2abf 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -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 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 6859b27632..cd36a5ab0b 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -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) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 2e5b0001d3..9b396396a8 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -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") diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm index fab329ff58..b33a5e49d8 100644 --- a/code/game/gamemodes/malfunction/malf_hardware.dm +++ b/code/game/gamemodes/malfunction/malf_hardware.dm @@ -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" diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 6f5e6ab732..7205d0e850 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -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() diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index f375755982..37f00428dd 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -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" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index f6c47c16bc..d3603fe96e 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -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 << "AI control for \the [src] interface has been disabled." 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) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 0956486b69..972d9a717b 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -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) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 54f3d2a07f..9e9571b177 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -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, diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index c2510bbde4..a24a79ac12 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -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 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index af33673a1f..42b4f937a2 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -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() diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 5c09c08e21..636701fc07 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -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 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 911c89ce03..a434f6c780 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 692cda28bd..daa2123d1c 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -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 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index bc5b2f1b56..6bedde46b3 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -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 diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index e50af2bcf0..88eda4c774 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -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) diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 0eff1a3e3c..9267f1edbe 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -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("\The [user] smashes \the [src]!") playsound(src, "shatter", 70, 1) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 3d18d80a1e..9a950cc023 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -88,7 +88,7 @@ emagged = !emagged user << "You [emagged ? "disable" : "enable"] the gibber safety guard." 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 diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index bc52c276c3..b1b2cf27f3 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -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/)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 7d2a1bbe0f..553cf612d5 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -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 << "There seems to be a firewall preventing you from accessing this device." return 1 - if(locked && !user.isSilicon()) + if(locked && !issilicon(user)) user << "Access denied." 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 diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 2c72743bd2..dd862a7754 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -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() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 63f13ebf75..28126b3d3b 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -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) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index d1ac6df4c5..8797e7af8b 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -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)) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 2ea1424522..967b7799ed 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -64,11 +64,11 @@ return /obj/machinery/turretid/proc/isLocked(mob/user) - if(ailock && user.isSilicon()) + if(ailock && issilicon(user)) user << "There seems to be a firewall preventing you from accessing this device." return 1 - if(locked && !user.isSilicon()) + if(locked && !issilicon(user)) user << "Access denied." return 1 @@ -93,7 +93,7 @@ user << "You [ locked ? "lock" : "unlock"] the panel." return return ..() - + /obj/machinery/turretid/emag_act(var/remaining_charges, var/mob/user) if(!emagged) user << "You short out the turret controls' access analysis module." diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index a14b5d2e9a..b55a034fe1 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -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) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index ca51d1e1b3..7139a52cb3 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -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 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 6b79db8f5b..93c2fd57bb 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -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) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 68084ff5c9..081767fe6f 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -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) diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index f49a2df9c7..1b087f1791 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -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) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 7b9f046443..5315942aab 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -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() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 2a0341a77e..9d7bcf8812 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -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" diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 54ebfa85af..b88f34ef51 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -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() diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index a03b88c0dd..f86ecbade9 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -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" diff --git a/code/game/objects/items/weapons/cards_ids_syndicate.dm b/code/game/objects/items/weapons/cards_ids_syndicate.dm index 3496607ffa..f86489c100 100644 --- a/code/game/objects/items/weapons/cards_ids_syndicate.dm +++ b/code/game/objects/items/weapons/cards_ids_syndicate.dm @@ -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 << "The microscanner activate as you pass it over the ID, copying its access." + user << "The microscanner activates as you pass it over the ID, copying its access." /obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) if(!registered_user) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index bfb7501c76..24f6ad53b3 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -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) diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 43202c3da5..6f5e2d3d53 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -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)) diff --git a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm index 1613ff8800..4a05109925 100644 --- a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm +++ b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm @@ -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" diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index e1e58b62ac..704df83db8 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -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 diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 6102c76026..aac0b98679 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -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 << "It's too heavy for you to wield fully." 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" diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 8b807e803f..c8f76aca0c 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -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 << "\The [src] is now active." else force = 3 - icon_state = "eshield[active]" + update_icon() w_class = 1 playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) user << "\The [src] can now be concealed." @@ -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" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 6870d2f13d..d9bf95dd72 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -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 << "\The [src] cannot be worn above your suit!" + return + show_above_suit = !show_above_suit + update_icon() + /obj/item/weapon/storage/update_icon() if (ismob(src.loc)) var/mob/M = src.loc diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index abc9a39b76..9207710778 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -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) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 0ed8ad7b7b..40185d6a09 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -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." diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 89f058ba47..b135c439b6 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -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 ..() diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 8b11055d40..73e3fb0108 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -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 << "[src] is locked and cannot be opened!" diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index be236de637..bbe6e8890a 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -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 diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 470fd21ee3..1389e9b17d 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -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("The meter on \the [src] indicates you are almost out of air!") +/obj/item/weapon/tank/jetpack/examine(mob/user) + . = ..() + if(air_contents.total_moles < 5) + user << "The meter on \the [src] indicates you are almost out of gas!" 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("The meter on \the [src] indicates you are almost out of carbon dioxide!") - playsound(user, 'sound/effects/alert.ogg', 50, 1) - return - /obj/item/weapon/tank/jetpack/rig name = "jetpack" var/obj/item/weapon/rig/holder diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 43f40b4c23..b8e6fc6ecb 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -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 << "It's \a \icon[icon][src]! If you want any more information you'll need to get closer." - 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 << "\The \icon[icon][src] feels [descriptive]" - - 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 << "\The [src] feels [descriptive]." /obj/item/weapon/tank/blob_act() if(prob(50)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 8d2b09eb0f..b680002df8 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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)) diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index 5b315654d5..e93721c53f 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -146,7 +146,7 @@ attack_tk(mob/user as mob) if(localopened && fireaxe) - fireaxe.loc = loc + fireaxe.forceMove(loc) user << "You telekinetically remove the fire axe." fireaxe = null update_icon() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index c732faeeea..8c49fc0d9f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -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 << "It appears to be broken." diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 3bc5dfc393..7401aac67b 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -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, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying.")) var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 23892a0550..d3e795edc3 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -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 << "You attach [W] to [src]." 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 diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index e865805991..8596ce037d 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -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" diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm deleted file mode 100644 index fc57ac4f8e..0000000000 --- a/code/game/objects/structures/ladders.dm +++ /dev/null @@ -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("[user] climbs up \the [src]!", \ - "You climb up \the [src]!") - user.loc = get_turf(up) - up.add_fingerprint(user) - if("Down") - user.visible_message("[user] climbs down \the [src]!", \ - "You climb down \the [src]!") - user.loc = get_turf(down) - down.add_fingerprint(user) - if("Cancel") - return - - else if(up) - user.visible_message("[user] climbs up \the [src]!", \ - "You climb up \the [src]!") - user.loc = get_turf(up) - up.add_fingerprint(user) - - else if(down) - user.visible_message("[user] climbs down \the [src]!", \ - "You climb down \the [src]!") - 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) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index bab8e44cd9..29c504edd3 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -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("[user] attempts to buckle [W:affecting] into \the [src]!") + var/obj/item/weapon/grab/G = W + var/mob/living/affecting = G.affecting + user.visible_message("[user] attempts to buckle [affecting] into \the [src]!") if(do_after(user, 20)) - W:affecting.loc = loc - if(buckle_mob(W:affecting)) - W:affecting.visible_message(\ - "[W:affecting.name] is buckled to [src] by [user.name]!",\ - "You are buckled to [src] by [user.name]!",\ - "You hear metal clanking.") + affecting.loc = loc + spawn(0) + if(buckle_mob(affecting)) + affecting.visible_message(\ + "[affecting.name] is buckled to [src] by [user.name]!",\ + "You are buckled to [src] by [user.name]!",\ + "You hear metal clanking.") + qdel(W) else ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 1d6ae5ed58..ae4fe4d740 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -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 diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 9086453be2..ffa143a9f5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -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) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 523a83a080..5825c32d48 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -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 ..() diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index 319b34fa43..0932ae560f 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -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 diff --git a/code/game/turfs/flooring/flooring_decals.dm b/code/game/turfs/flooring/flooring_decals.dm index a3a0d3c95e..7989442c90 100644 --- a/code/game/turfs/flooring/flooring_decals.dm +++ b/code/game/turfs/flooring/flooring_decals.dm @@ -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' diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm index 7b0d833c63..488597f845 100644 --- a/code/game/turfs/flooring/flooring_premade.dm +++ b/code/game/turfs/flooring/flooring_premade.dm @@ -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 diff --git a/code/game/turfs/initialization/init.dm b/code/game/turfs/initialization/init.dm new file mode 100644 index 0000000000..eda55c47ae --- /dev/null +++ b/code/game/turfs/initialization/init.dm @@ -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) diff --git a/code/game/turfs/initialization/maintenance.dm b/code/game/turfs/initialization/maintenance.dm new file mode 100644 index 0000000000..5a9574810b --- /dev/null +++ b/code/game/turfs/initialization/maintenance.dm @@ -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 diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index e35426e174..e1e65e6b2d 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -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 << "Movement is admin-disabled." //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 diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 8e51528989..9ab3828587 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -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) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2069d06283..ef83dd5364 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -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)) diff --git a/code/game/turfs/unsimulated/walls.dm b/code/game/turfs/unsimulated/walls.dm index ca422c46cd..12d4d3fadc 100644 --- a/code/game/turfs/unsimulated/walls.dm +++ b/code/game/turfs/unsimulated/walls.dm @@ -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" \ No newline at end of file diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 9a2d6192af..4b47cf2602 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -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 += "" output += "" @@ -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 = "PERMABAN" if("TEMPBAN") - typedesc = "TEMPBAN
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]
" + typedesc = "TEMPBAN
([duration] minutes) [(unbanned || auto) ? "" : "(Edit)"]
Expires [expiration]
" if("JOB_PERMABAN") typedesc = "JOBBAN
([job])" if("JOB_TEMPBAN") @@ -439,14 +449,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "" output += "" output += "" - output += "" + output += "" output += "" output += "" output += "" output += "" output += "" output += "" - output += "" + output += "" output += "" if(edits) output += "" @@ -459,10 +469,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "" output += "" output += "" + else if(auto) + output += "" + output += "" + output += "" output += "" output += "" output += "" output += "
[ckey][bantime][ackey][(unbanned) ? "" : "Unban"][(unbanned || auto) ? "" : "Unban"]
IP: [ip]CIP: [cid]
Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\"Reason: [(unbanned || auto) ? "" : "(Edit)"] \"[reason]\"
UNBANNED by admin [unbanckey] on [unbantime]
EXPIRED at [expiration]
 
" - usr << browse(output,"window=lookupbans;size=900x700") \ No newline at end of file + usr << browse(output,"window=lookupbans;size=900x700") diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a4f2bf4a69..977e79bd28 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -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! diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm index 4a28ece915..b6293e7941 100644 --- a/code/modules/admin/player_notes.dm +++ b/code/modules/admin/player_notes.dm @@ -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) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e3a2a83aab..a76565bf75 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -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 << "You hear something crackle in your headset for a moment before a voice speaks." L << "Please stand by for a message from Central Command." L << "Message as follows." diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 50d02edca6..ba00a930b3 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -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" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cbe59cad11..dd0ea5cc2f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -404,7 +404,7 @@ datum/preferences dat += "- [species] cannot choose secondary languages.
" dat += "Language Keys
" - dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] Change
" + dat += " [english_list(language_prefixes, and_text = " ", comma_text = " ")] Change Reset
" dat += "

" 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") diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index 533a5d616e..ed6ea15852 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -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("[H] launches \a [firing]!") firing.throw_at(target,fire_force,fire_distance) else @@ -242,7 +242,7 @@ H << "Your hands are full." else var/obj/item/new_weapon = new fabrication_type() - new_weapon.loc = H + new_weapon.forceMove(H) H << "You quickly fabricate \a [new_weapon]." H.put_in_hands(new_weapon) diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 975f6dfc7c..11d551ace0 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -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 << "You have been transferred to \the [holder]'s [src]." user << "You load [ai_mob] into \the [holder]'s [src]." diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index 778c30dede..b8244a0a8a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -123,13 +123,13 @@ H << "You cannot teleport to a location with solid objects." 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 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index a47f38d3d9..13d48df5cc 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -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 << "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way." else - H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." + use_obj.forceMove(H) + if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0)) + use_obj.forceMove(src) + else + H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." if(piece == "helmet" && helmet) helmet.update_light(H) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 0017c45f9e..8faff35a29 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -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() diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index ab5a5e6034..712c591741 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -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 diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index ae2adeef32..74de2a0d15 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -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) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index c9ed2ee79e..2b9407aecd 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -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) diff --git a/code/modules/hydroponics/trays/tray_update_icons.dm b/code/modules/hydroponics/trays/tray_update_icons.dm index 7f31a06477..dc69e5448e 100644 --- a/code/modules/hydroponics/trays/tray_update_icons.dm +++ b/code/modules/hydroponics/trays/tray_update_icons.dm @@ -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)]"] diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index 2acddb4d29..3675cd945c 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -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 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 58881d28db..5d3915c7fd 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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 << "You may not spawn as a mouse on this Z-level." + 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) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 250350bf46..7924bd2129 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -78,13 +78,13 @@ var/list/slot_equipment_priority = list( \ if(istype(src.back,/obj/item/weapon/storage)) var/obj/item/weapon/storage/backpack = src.back if(backpack.contents.len < backpack.storage_slots) - newitem.loc = src.back + newitem.forceMove(src.back) return 1 // Try to place it in any item that can store stuff, on the mob. for(var/obj/item/weapon/storage/S in src.contents) if (S.contents.len < S.storage_slots) - newitem.loc = S + newitem.forceMove(S) return 1 return 0 @@ -106,7 +106,7 @@ var/list/slot_equipment_priority = list( \ if(lying) return 0 if(!istype(W)) return 0 if(!l_hand) - W.loc = src //TODO: move to equipped? + W.forceMove(src) //TODO: move to equipped? l_hand = W W.layer = 20 //TODO: move to equipped? // l_hand.screen_loc = ui_lhand @@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \ if(lying) return 0 if(!istype(W)) return 0 if(!r_hand) - W.loc = src + W.forceMove(src) r_hand = W W.layer = 20 // r_hand.screen_loc = ui_rhand @@ -157,7 +157,7 @@ var/list/slot_equipment_priority = list( \ update_inv_r_hand() return 1 else - W.loc = get_turf(src) + W.forceMove(get_turf(src)) W.layer = initial(W.layer) W.dropped() return 0 @@ -250,7 +250,7 @@ var/list/slot_equipment_priority = list( \ O.screen_loc = null if(istype(O, /obj/item)) var/obj/item/I = O - I.loc = src.loc + I.forceMove(src.loc) I.dropped(src) return 1 diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index a6f479f704..6b58028576 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -70,6 +70,11 @@ else icon_state = "secbot[on]" + if(on) + set_light(2, 1, "#FF6A00") + else + set_light(0) + /mob/living/bot/secbot/attack_hand(var/mob/user) user.set_machine(src) var/dat diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6592732277..812d27d125 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -262,7 +262,7 @@ var/show_ssd var/mob/living/carbon/human/H = src if(istype(H)) show_ssd = H.species.show_ssd - if(show_ssd && !client && !aghosted) + if(show_ssd && !client && !teleop) M.visible_message("[M] shakes [src] trying to wake [t_him] up!", \ "You shake [src], but they do not respond... Maybe they have S.S.D?") else if(lying || src.sleeping) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 91248854b9..bcec368d7d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -238,7 +238,7 @@ // Other incidentals. if(istype(suit) && suit.has_sensor == 1) - dat += "
Set sensors." + dat += "
Set sensors" if(handcuffed) dat += "
Handcuffed" if(legcuffed) @@ -701,21 +701,21 @@ /mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain") if(!species.has_organ[brain_tag]) return 0 - + var/obj/item/organ/affecting = internal_organs_by_name[brain_tag] - + target_zone = check_zone(target_zone) if(!affecting || affecting.parent_organ != target_zone) return 0 - + //if the parent organ is significantly larger than the brain organ, then hitting it is not guaranteed var/obj/item/organ/parent = get_organ(target_zone) if(!parent) return 0 - + if(parent.w_class > affecting.w_class + 1) return prob(100 / 2**(parent.w_class - affecting.w_class - 1)) - + return 1 /mob/living/carbon/human/IsAdvancedToolUser(var/silent) @@ -1177,10 +1177,6 @@ else return 0 - mob_bump_flag = species.bump_flag - mob_swap_flags = species.swap_flags - mob_push_flags = species.push_flags - /mob/living/carbon/human/proc/bloody_doodle() set category = "IC" set name = "Write in blood" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d327812328..795fb17fc3 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -920,11 +920,7 @@ if(status_flags & GODMODE) return 0 //SSD check, if a logged player is awake put them back to sleep! - if(species.show_ssd && !client && !aghosted) - sleeping = 2 - - //SSD check, if a logged player is awake put them back to sleep! - if(species.show_ssd && !client && !aghosted) + if(species.show_ssd && !client && !teleop) Sleeping(2) if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index e711fec2e3..d77493b0b3 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -28,7 +28,7 @@ var/tail_hair var/race_key = 0 // Used for mob icon cache string. var/icon/icon_template // Used for mob icon generation for non-32x32 species. - var/is_small + var/mob_size = MOB_MEDIUM var/show_ssd = "fast asleep" var/virus_immune var/short_sighted @@ -150,6 +150,8 @@ var/push_flags = ~HEAVY // What can we push? var/swap_flags = ~HEAVY // What can we swap place with? + var/pass_flags = 0 + /datum/species/New() if(hud_type) hud = new hud_type() @@ -279,6 +281,11 @@ /datum/species/proc/handle_post_spawn(var/mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment. add_inherent_verbs(H) + H.mob_bump_flag = bump_flag + H.mob_swap_flags = swap_flags + H.mob_push_flags = push_flags + H.pass_flags = pass_flags + H.mob_size = mob_size /datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). return diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 74293d1176..d9d8347550 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -11,7 +11,7 @@ language = null default_language = "Chimpanzee" greater_form = "Human" - is_small = 1 + mob_size = MOB_SMALL has_fine_manipulation = 0 show_ssd = null @@ -38,6 +38,8 @@ swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN + pass_flags = PASSTABLE + /datum/species/monkey/handle_npc(var/mob/living/carbon/human/H) if(H.stat != CONSCIOUS) return diff --git a/code/modules/mob/living/carbon/human/species/station/resomi.dm b/code/modules/mob/living/carbon/human/species/station/resomi.dm index e8a853c399..238f022aab 100644 --- a/code/modules/mob/living/carbon/human/species/station/resomi.dm +++ b/code/modules/mob/living/carbon/human/species/station/resomi.dm @@ -27,7 +27,7 @@ total_health = 50 brute_mod = 1.35 burn_mod = 1.35 - is_small = 1 + mob_size = MOB_SMALL holder_type = /obj/item/weapon/holder/human short_sighted = 1 gluttonous = 1 diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index bb5b921710..38db954932 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -1,7 +1,7 @@ /datum/species/slime name = "Slime" name_plural = "slimes" - is_small = 1 + mob_size = MOB_SMALL icobase = 'icons/mob/human_races/r_slime.dmi' deform = 'icons/mob/human_races/r_slime.dmi' diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index bec3833f91..6fb02ee4d5 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -113,24 +113,25 @@ Please contact me on #coderbus IRC. ~Carn x #define ID_LAYER 5 #define SHOES_LAYER 6 #define GLOVES_LAYER 7 -#define SUIT_LAYER 8 -#define TAIL_LAYER 9 //bs12 specific. this hack is probably gonna come back to haunt me -#define GLASSES_LAYER 10 -#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 12 -#define BACK_LAYER 13 -#define HAIR_LAYER 14 //TODO: make part of head layer? -#define EARS_LAYER 15 -#define FACEMASK_LAYER 16 -#define HEAD_LAYER 17 -#define COLLAR_LAYER 18 -#define HANDCUFF_LAYER 19 -#define LEGCUFF_LAYER 20 -#define L_HAND_LAYER 21 -#define R_HAND_LAYER 22 -#define FIRE_LAYER 23 //If you're on fire -#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system -#define TOTAL_LAYERS 24 +#define BELT_LAYER 8 +#define SUIT_LAYER 9 +#define TAIL_LAYER 10 //bs12 specific. this hack is probably gonna come back to haunt me +#define GLASSES_LAYER 11 +#define BELT_LAYER_ALT 12 +#define SUIT_STORE_LAYER 13 +#define BACK_LAYER 14 +#define HAIR_LAYER 15 //TODO: make part of head layer? +#define EARS_LAYER 16 +#define FACEMASK_LAYER 17 +#define HEAD_LAYER 18 +#define COLLAR_LAYER 19 +#define HANDCUFF_LAYER 20 +#define LEGCUFF_LAYER 21 +#define L_HAND_LAYER 22 +#define R_HAND_LAYER 23 +#define FIRE_LAYER 24 //If you're on fire +#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system +#define TOTAL_LAYERS 25 ////////////////////////////////// /mob/living/carbon/human @@ -718,15 +719,24 @@ var/global/list/damage_icon_parts = list() else standing.icon = 'icons/mob/belt.dmi' - if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt)) - for(var/obj/item/i in belt.contents) - var/i_state = i.item_state - if(!i_state) i_state = i.icon_state - standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]") + var/belt_layer = BELT_LAYER + if(istype(belt, /obj/item/weapon/storage/belt)) + var/obj/item/weapon/storage/belt/ubelt = belt + if(ubelt.show_above_suit) + overlays_standing[BELT_LAYER] = null + belt_layer = BELT_LAYER_ALT + else + overlays_standing[BELT_LAYER_ALT] = null + if(belt.contents.len) + for(var/obj/item/i in belt.contents) + var/i_state = i.item_state + if(!i_state) i_state = i.icon_state + standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]") - overlays_standing[BELT_LAYER] = standing + overlays_standing[belt_layer] = standing else overlays_standing[BELT_LAYER] = null + overlays_standing[BELT_LAYER_ALT] = null if(update_icons) update_icons() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 2f0d30ce2c..f8ab31807b 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -41,7 +41,7 @@ -/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0) +/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1) if(!effect || (blocked >= 2)) return 0 switch(effecttype) if(STUN) @@ -53,7 +53,7 @@ if(AGONY) halloss += effect // Useful for objects that cause "subdual" damage. PAIN! if(IRRADIATE) - var/rad_protection = getarmor(null, "rad")/100 + var/rad_protection = check_protection ? getarmor(null, "rad")/100 : 0 radiation += max((1-rad_protection)*effect/(blocked+1),0)//Rads auto check armor if(STUTTER) if(status_flags & CANSTUN) // stun is usually associated with stutter diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d34d5cceea..97f4842b29 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -87,8 +87,8 @@ default behaviour is: if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around! var/turf/oldloc = loc - loc = tmob.loc - tmob.loc = oldloc + forceMove(tmob.loc) + tmob.forceMove(oldloc) now_pushing = 0 for(var/mob/living/carbon/slime/slime in view(1,tmob)) if(slime.Victim == tmob) @@ -605,7 +605,7 @@ default behaviour is: src << "You wriggle out of [M]'s grip!" else if(istype(H.loc,/obj/item)) src << "You struggle free of [H.loc]." - H.loc = get_turf(H) + H.forceMove(get_turf(H)) if(istype(M)) for(var/atom/A in M.contents) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index bc441e665f..5a671afe99 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -39,10 +39,7 @@ var/tod = null // Time of death var/update_slimes = 1 var/silent = null // Can't talk. Value goes down every life proc. - var/mob_size // Used by lockers. var/on_fire = 0 //The "Are we on fire?" var var/fire_stacks var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. - - diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 8ff4a10652..5d3cf1a74c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -128,8 +128,8 @@ var/list/ai_verbs_default = list( aiRadio = new(src) common_radio = aiRadio aiRadio.myAi = src - additional_law_channels += "Binary" - additional_law_channels += "Holopad" + additional_law_channels["Binary"] = ":b" + additional_law_channels["Holopad"] = ":h" aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src) diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm index 5c2068abdf..5f7b07489b 100644 --- a/code/modules/mob/living/silicon/laws.dm +++ b/code/modules/mob/living/silicon/laws.dm @@ -1,6 +1,6 @@ /mob/living/silicon var/datum/ai_laws/laws = null - var/list/additional_law_channels = list("State") + var/list/additional_law_channels = list("State" = "") /mob/living/silicon/proc/laws_sanity_check() if (!src.laws) @@ -59,11 +59,12 @@ /mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws) var/prefix = "" - switch(lawchannel) - if(MAIN_CHANNEL) prefix = ";" - if("Binary") prefix = ":b " - else - prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " " + if(MAIN_CHANNEL == lawchannel) + prefix = ";" + else if(lawchannel in additional_law_channels) + prefix = additional_law_channels[lawchannel] + else + prefix = get_radio_key_from_channel(lawchannel) dostatelaws(lawchannel, prefix, laws) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 10446ba8fa..cb90cd176b 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -4,8 +4,8 @@ icon_state = "repairbot" emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person) - small = 1 pass_flags = 1 + mob_size = MOB_SMALL var/network = "SS13" var/obj/machinery/camera/current = null diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 6e0b3c4650..56d608fd65 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -42,6 +42,8 @@ var/list/mob_hat_cache = list() mob_push_flags = SIMPLE_ANIMAL mob_always_swap = 1 + mob_size = MOB_TINY + //Used for self-mailing. var/mail_destination = "" var/obj/machinery/drone_fabricator/master_fabricator @@ -68,6 +70,7 @@ var/list/mob_hat_cache = list() can_pull_mobs = 1 hat_x_offset = 1 hat_y_offset = -12 + mob_size = MOB_SMALL /mob/living/silicon/robot/drone/New() @@ -95,7 +98,7 @@ var/list/mob_hat_cache = list() /mob/living/silicon/robot/drone/init() aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src) - + additional_law_channels["Drone"] = ":d" if(!laws) laws = new law_type if(!module) module = new module_type(src) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7ca869ea26..76fe6a8e40 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -155,7 +155,7 @@ /mob/living/silicon/robot/proc/init() aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) laws = new /datum/ai_laws/nanotrasen() - additional_law_channels += "Binary" + additional_law_channels["Binary"] = ":b" var/new_ai = select_active_ai_with_fewest_borgs() if(new_ai) lawupdate = 1 @@ -214,7 +214,9 @@ mmi = null if(connected_ai) connected_ai.connected_robots -= src - ..() + qdel(wires) + wires = null + return ..() /mob/living/silicon/robot/proc/set_module_sprites(var/list/new_sprites) module_sprites = new_sprites.Copy() diff --git a/code/modules/mob/living/silicon/subystems.dm b/code/modules/mob/living/silicon/subystems.dm index f79f5664a2..fa1363203b 100644 --- a/code/modules/mob/living/silicon/subystems.dm +++ b/code/modules/mob/living/silicon/subystems.dm @@ -76,7 +76,7 @@ set name = "Law Manager" set category = "Subystems" - law_manager.ui_interact(usr, state = self_state) + law_manager.ui_interact(usr, state = conscious_state) /******************** * Power Monitor * diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index de7d397f86..f023df1617 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -98,7 +98,7 @@ melee_damage_lower = 30 melee_damage_upper = 30 attacktext = "smashed their armoured gauntlet into" - mob_size = 20 + mob_size = MOB_LARGE speed = 3 environment_smash = 2 attack_sound = 'sound/weapons/heavysmash.ogg' diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index daf7b3768e..67097c3725 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -23,7 +23,7 @@ minbodytemp = 223 //Below -50 Degrees Celcius maxbodytemp = 323 //Above 50 Degrees Celcius holder_type = /obj/item/weapon/holder/cat - mob_size = 5 + mob_size = MOB_SMALL /mob/living/simple_animal/cat/Life() //MICE! diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index ed32eec986..5b57bad674 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -5,7 +5,7 @@ icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" - small = 1 + mob_size = MOB_SMALL speak_emote = list("clicks") emote_hear = list("clicks") emote_see = list("clacks") diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 60ddd0638b..68578ca08e 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -55,9 +55,9 @@ if(!pulledby) var/obj/effect/plant/food - food = locate(/obj/effect/plant) in oview(5,loc) + food = locate(/obj/effect/plant) in oview(5,loc) if(food) - var/step = get_step_to(src, food, 0) + var/step = get_step_to(src, food, 0) Move(step) /mob/living/simple_animal/hostile/retaliate/goat/Retaliate() @@ -167,7 +167,7 @@ health = 1 var/amount_grown = 0 pass_flags = PASSTABLE | PASSGRILLE - small = 1 + mob_size = MOB_MINISCULE /mob/living/simple_animal/chick/New() ..() @@ -209,7 +209,7 @@ var/global/chicken_count = 0 var/eggsleft = 0 var/body_color pass_flags = PASSTABLE - small = 1 + mob_size = MOB_SMALL /mob/living/simple_animal/chicken/New() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index 66fb31406a..fe1ab1dcd0 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -5,7 +5,6 @@ icon_state = "lizard" icon_living = "lizard" icon_dead = "lizard-dead" - small = 1 speak_emote = list("hisses") health = 5 maxHealth = 5 @@ -15,4 +14,4 @@ response_help = "pets" response_disarm = "shoos" response_harm = "stomps on" - mob_size = 1 + mob_size = MOB_MINISCULE diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index e0ffc718ff..c102b2062c 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -10,7 +10,6 @@ emote_hear = list("squeeks","squeaks","squiks") emote_see = list("runs in a circle", "shakes", "scritches at something") pass_flags = PASSTABLE - small = 1 speak_chance = 1 turns_per_move = 5 see_in_dark = 6 @@ -29,7 +28,7 @@ universal_speak = 0 universal_understand = 1 holder_type = /obj/item/weapon/holder/mouse - mob_size = 1 + mob_size = MOB_MINISCULE /mob/living/simple_animal/mouse/Life() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm index 195cb443bc..4d455e5050 100644 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ b/code/modules/mob/living/simple_animal/friendly/mushroom.dm @@ -4,7 +4,7 @@ icon_state = "mushroom" icon_living = "mushroom" icon_dead = "mushroom_dead" - small = 1 + mob_size = MOB_SMALL speak_chance = 0 turns_per_move = 1 maxHealth = 5 diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index fdd5921472..df3c588a34 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -5,7 +5,7 @@ max_co2 = 0 minbodytemp = 0 maxbodytemp = 500 - mob_size = 5 + mob_size = MOB_SMALL var/obj/item/device/radio/borg/radio = null var/mob/living/silicon/ai/connected_ai = null @@ -39,7 +39,6 @@ var/obj/item/held_item = null //Storage for single item they can hold. speed = -1 //Spiderbots gotta go fast. pass_flags = PASSTABLE - small = 1 speak_emote = list("beeps","clicks","chirps") /mob/living/simple_animal/spiderbot/New() diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index a05f394177..658f0f6d4e 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -33,7 +33,7 @@ icon_living = "parrot_fly" icon_dead = "parrot_dead" pass_flags = PASSTABLE - small = 1 + mob_size = MOB_SMALL speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") speak_emote = list("squawks","says","yells") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f904b66aeb..3905e272f2 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -284,14 +284,14 @@ user << "\The [src] is dead, medical items won't bring \him back to life." if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead. if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch)) - harvest(user) + harvest(user) else if(!O.force) visible_message("[user] gently taps [src] with \the [O].") else O.attack(src, user, user.zone_sel.selecting) - -/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone) + +/mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone) visible_message("\The [src] has been attacked with \the [O] by [user].") @@ -307,7 +307,7 @@ purge = 3 adjustBruteLoss(damage) - return 0 + return 0 /mob/living/simple_animal/movement_delay() var/tally = 0 //Incase I need to add stuff other than "speed" later @@ -396,7 +396,7 @@ for(var/i=0;i[user] chops up \the [src]!") new/obj/effect/decal/cleanable/blood/splatter(get_turf(src)) qdel(src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 14f19b6290..648b1b2815 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -966,7 +966,7 @@ mob/proc/yank_out_object() var/mob/living/carbon/human/human_user = U human_user.bloody_hands(H) - selection.loc = get_turf(src) + selection.forceMove(get_turf(src)) if(!(U.l_hand && U.r_hand)) U.put_in_hands(selection) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index c72bb83856..261bea8fd1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -88,7 +88,6 @@ var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas. var/lastpuke = 0 var/unacidable = 0 - var/small = 0 var/list/pinned = list() // List of things pinning this creature to walls (see living_defense.dm) var/list/embedded = list() // Embedded items, since simple mobs don't have organs. var/list/languages = list() // For speaking/listening. @@ -214,12 +213,12 @@ var/stance_damage = 0 //Whether this mob's ability to stand has been affected - //Indicates if a clientless mob is actually an admin aghosting - var/mob/dead/observer/aghosted = null + //If set, indicates that the client "belonging" to this (clientless) mob is currently controlling some other mob + //so don't treat them as being SSD even though their client var is null. + var/mob/teleop = null var/turf/listed_turf = null //the current turf being examined in the stat panel var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes var/list/active_genes=list() - - + var/mob_size = MOB_MEDIUM diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index 4f8bd02a13..cc1a5458c6 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -149,7 +149,7 @@ if(istype(H) && H.species.gluttonous) if(H.species.gluttonous == 2) can_eat = 2 - else if(!ishuman(target) && !issmall(target) && (target.small || iscarbon(target))) + else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target)) can_eat = 1 if(can_eat) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 647875ca4b..bcb48f0bb0 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1,14 +1,4 @@ // fun if you want to typecast humans/monkeys/etc without writing long path-filled lines. -/proc/ishuman(A) - if(istype(A, /mob/living/carbon/human)) - return 1 - return 0 - -/proc/isalien(A) - if(istype(A, /mob/living/carbon/alien)) - return 1 - return 0 - /proc/isxenomorph(A) if(istype(A, /mob/living/carbon/human)) var/mob/living/carbon/human/H = A @@ -16,85 +6,12 @@ return 0 /proc/issmall(A) - if(A && istype(A, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = A - if(H.species && H.species.is_small) - return 1 + if(A && istype(A, /mob/living)) + var/mob/living/L = A + return L.mob_size <= MOB_SMALL return 0 -/proc/isbrain(A) - if(A && istype(A, /mob/living/carbon/brain)) - return 1 - return 0 - -/proc/isslime(A) - if(istype(A, /mob/living/carbon/slime)) - return 1 - return 0 - -/proc/isrobot(A) - if(istype(A, /mob/living/silicon/robot)) - return 1 - return 0 - -/proc/isanimal(A) - if(istype(A, /mob/living/simple_animal)) - return 1 - return 0 - -/proc/iscorgi(A) - if(istype(A, /mob/living/simple_animal/corgi)) - return 1 - return 0 - -/proc/iscrab(A) - if(istype(A, /mob/living/simple_animal/crab)) - return 1 - return 0 - -/proc/iscat(A) - if(istype(A, /mob/living/simple_animal/cat)) - return 1 - return 0 - -/proc/ismouse(A) - if(istype(A, /mob/living/simple_animal/mouse)) - return 1 - return 0 - -/proc/isbear(A) - if(istype(A, /mob/living/simple_animal/hostile/bear)) - return 1 - return 0 - -/proc/iscarp(A) - if(istype(A, /mob/living/simple_animal/hostile/carp)) - return 1 - return 0 - -/proc/isclown(A) - if(istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) - return 1 - return 0 - -/mob/proc/isSilicon() - return 0 - -/mob/living/silicon/isSilicon() - return 1 - -/proc/isAI(A) - if(istype(A, /mob/living/silicon/ai)) - return 1 - return 0 - -/mob/proc/isMobAI() - return 0 - -/mob/living/silicon/ai/isMobAI() - return 1 - -/mob/proc/isSynthetic() +/mob/living/proc/isSynthetic() return 0 /mob/living/carbon/human/isSynthetic() @@ -107,56 +24,18 @@ /mob/living/silicon/isSynthetic() return 1 -/mob/living/carbon/human/isMonkey() - return istype(species, /datum/species/monkey) - /mob/proc/isMonkey() return 0 /mob/living/carbon/human/isMonkey() return istype(species, /datum/species/monkey) -/proc/ispAI(A) - if(istype(A, /mob/living/silicon/pai)) - return 1 - return 0 - -/proc/iscarbon(A) - if(istype(A, /mob/living/carbon)) - return 1 - return 0 - -/proc/issilicon(A) - if(istype(A, /mob/living/silicon)) - return 1 - return 0 - -/proc/isliving(A) - if(istype(A, /mob/living)) - return 1 - return 0 - -proc/isobserver(A) - if(istype(A, /mob/dead/observer)) - return 1 - return 0 - -proc/isorgan(A) - if(istype(A, /obj/item/organ/external)) - return 1 - return 0 - proc/isdeaf(A) if(istype(A, /mob)) var/mob/M = A return (M.sdisabilities & DEAF) || M.ear_deaf return 0 -proc/isnewplayer(A) - if(istype(A, /mob/new_player)) - return 1 - return 0 - proc/hasorgans(A) // Fucking really?? return ishuman(A) @@ -410,7 +289,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp /proc/shake_camera(mob/M, duration, strength=1) - if(!M || !M.client || M.shakecamera) + if(!M || !M.client || M.shakecamera || M.stat || isEye(M) || isAI(M)) return M.shakecamera = 1 spawn(1) @@ -644,7 +523,7 @@ proc/is_blind(A) // A proper CentCom id is hard currency. else if(id && istype(id, /obj/item/weapon/card/id/centcom)) return SAFE_PERP - + if(check_access && !access_obj.allowed(src)) threatcount += 4 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 837a0f93fc..d8b8778f42 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -176,7 +176,7 @@ if(!mob.control_object) return mob.control_object.dir = direct else - mob.control_object.loc = get_step(mob.control_object,direct) + mob.control_object.forceMove(get_step(mob.control_object,direct)) return @@ -382,7 +382,7 @@ mob << "You cannot get past holy grounds while you are in this plane of existence!" return else - mob.loc = get_step(mob, direct) + mob.forceMove(get_step(mob, direct)) mob.dir = direct if(2) if(prob(50)) @@ -411,7 +411,7 @@ return else return - mob.loc = locate(locx,locy,mobloc.z) + mob.forceMove(locate(locx,locy,mobloc.z)) spawn(0) var/limit = 2//For only two trailing shadows. for(var/turf/T in getline(mobloc, mob.loc)) @@ -422,7 +422,7 @@ else spawn(0) anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir) - mob.loc = get_step(mob, direct) + mob.forceMove(get_step(mob, direct)) mob.dir = direct // Crossed is always a bit iffy for(var/obj/S in mob.loc) diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 235c4ce724..da27c1102f 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -1,3 +1,9 @@ + +/var/atom/movable/lobby_image = new /atom/movable{icon = 'icons/misc/title.dmi'; icon_state = "title"; screen_loc = "1,1"; name = "Baystation12"} + +/mob/new_player + var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled + /mob/new_player/Login() update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying if(join_motd) @@ -8,24 +14,12 @@ mind.active = 1 mind.current = src - if(length(newplayer_start)) - loc = pick(newplayer_start) - else - loc = locate(1,1,1) - lastarea = loc - + loc = null + client.screen += lobby_image + my_client = client sight |= SEE_TURFS player_list |= src -/* - var/list/watch_locations = list() - for(var/obj/effect/landmark/landmark in landmarks_list) - if(landmark.tag == "landmark*new_player") - watch_locations += landmark.loc - - if(watch_locations.len>0) - loc = pick(watch_locations) -*/ new_player_panel() spawn(40) if(client) diff --git a/code/modules/mob/new_player/logout.dm b/code/modules/mob/new_player/logout.dm index ad1c9b3098..99bd567cd5 100644 --- a/code/modules/mob/new_player/logout.dm +++ b/code/modules/mob/new_player/logout.dm @@ -1,7 +1,13 @@ /mob/new_player/Logout() ready = 0 + + // see login.dm + if(my_client) + my_client.screen -= lobby_image + my_client = null + ..() if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to. key = null//We null their key before deleting the mob, so they are properly kicked out. qdel(src) - return \ No newline at end of file + return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a3240d39c4..ee5e786db8 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -330,23 +330,7 @@ return //Find our spawning point. - var/join_message - var/datum/spawnpoint/S - - if(spawning_at) - S = spawntypes[spawning_at] - - if(S && istype(S)) - if(S.check_job_spawning(rank)) - character.loc = pick(S.turfs) - join_message = S.msg - else - character << "Your chosen spawnpoint ([S.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead." - character.loc = pick(latejoin) - join_message = "has arrived on the station" - else - character.loc = pick(latejoin) - join_message = "has arrived on the station" + var/join_message = job_master.LateSpawn(character, rank) character.lastarea = get_area(loc) // Moving wheelchair if they have one @@ -486,7 +470,7 @@ src << browse(null, "window=playersetup") //closes the player setup window proc/has_admin_rights() - return client.holder.rights & R_ADMIN + return check_rights(R_ADMIN, 0, src) proc/is_species_whitelisted(datum/species/S) if(!S) return 1 diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 61e3a7e487..36a606bfcf 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -55,32 +55,52 @@ /obj/structure/stairs name = "Stairs" - desc = "Stairs. You walk up and down them." - icon_state = "rampbottom" - icon = 'icons/obj/structures.dmi' + desc = "Stairs leading to another deck. Not too useful if the gravity goes out." + icon = 'icons/obj/stairs.dmi' density = 0 opacity = 0 anchored = 1 - var/obj/structure/stairs/connected - - New() - ..() - var/turf/above = GetAbove(src) - if(istype(above, /turf/space)) - above.ChangeTurf(/turf/simulated/open) - initialize() - var/updown = icon_state == "rampbottom" ? UP : DOWN + for(var/turf/turf in locs) + var/turf/simulated/open/above = GetAbove(turf) + if(!above) + warning("Stair created without level above: ([loc.x], [loc.y], [loc.z])") + return qdel(src) + if(!istype(above)) + above.ChangeTurf(/turf/simulated/open) - var/turf/T = get_step(src, dir | updown) - connected = locate() in T - ASSERT(connected) - - Uncross(var/atom/movable/M) - if(connected && M.dir == dir) - M.loc = connected.loc + Uncross(atom/movable/A) + if(A.dir == dir) + // This is hackish but whatever. + var/turf/target = get_step(GetAbove(A), dir) + var/turf/source = A.loc + if(target.Enter(A, source)) + A.loc = target + target.Entered(A, source) + return 0 return 1 CanPass(obj/mover, turf/source, height, airflow) - return airflow || !density \ No newline at end of file + return airflow || !density + + // type paths to make mapping easier. + north + dir = NORTH + bound_height = 64 + bound_y = -32 + pixel_y = -32 + + south + dir = SOUTH + bound_height = 64 + + east + dir = EAST + bound_width = 64 + bound_x = -32 + pixel_x = -32 + + west + dir = WEST + bound_width = 64 \ No newline at end of file diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index c78807a328..b358cd0fbb 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -11,10 +11,10 @@ var/list/underlay_references var/global/overlay_map = list() -/turf/simulated/open/New() - . = ..() - ASSERT(HasBelow(z)) +/turf/simulated/open/initialize() + ..() below = GetBelow(src) + ASSERT(HasBelow(z)) /turf/simulated/open/Entered(var/atom/movable/mover) // only fall down in defined areas (read: areas with artificial gravitiy) @@ -29,7 +29,7 @@ return // Prevent pipes from falling into the void... if there is a pipe to support it. - if(istype(mover, /obj/item/pipe) && \ + if(mover.anchored || istype(mover, /obj/item/pipe) && \ (locate(/obj/structure/disposalpipe/up) in below) || \ locate(/obj/machinery/atmospherics/pipe/zpipe/up in below)) return @@ -54,9 +54,9 @@ if(!soft) if(!istype(mover, /mob)) if(istype(below, /turf/simulated/open)) - below.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.") + mover.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.") else - below.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.") + mover.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.") else var/mob/M = mover if(istype(below, /turf/simulated/open)) diff --git a/code/modules/nano/interaction/conscious.dm b/code/modules/nano/interaction/conscious.dm new file mode 100644 index 0000000000..143bc24956 --- /dev/null +++ b/code/modules/nano/interaction/conscious.dm @@ -0,0 +1,7 @@ +/* + This state only checks if user is conscious. +*/ +/var/global/datum/topic_state/conscious_state/conscious_state = new() + +/datum/topic_state/conscious_state/can_use_topic(var/src_object, var/mob/user) + return user.stat == CONSCIOUS ? STATUS_INTERACTIVE : STATUS_CLOSE diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm index b0012de1e5..29ae55b04a 100644 --- a/code/modules/nano/modules/alarm_monitor.dm +++ b/code/modules/nano/modules/alarm_monitor.dm @@ -65,7 +65,7 @@ var/cameras[0] var/lost_sources[0] - if(user.isMobAI()) + if(isAI(user)) for(var/obj/machinery/camera/C in A.cameras()) cameras[++cameras.len] = C.nano_structure() for(var/datum/alarm_source/AS in A.sources) diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index b3d2b5abd0..b84cacad0a 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -69,4 +69,4 @@ return extra_href /datum/topic_state/air_alarm/proc/has_access(var/mob/user) - return user && (user.isMobAI() || atmos_control.access.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO)) + return user && (isAI(user) || atmos_control.access.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO)) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 4074ea1b92..bb5e28ca04 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -8,7 +8,7 @@ usr << "Unable to establish a connection: You're too far away from the station!" return 0 if(href_list["track"]) - if(usr.isMobAI()) + if(isAI(usr)) var/mob/living/silicon/ai/AI = usr var/mob/living/carbon/human/H = locate(href_list["track"]) in mob_list if(hassensorlevel(H, SUIT_SENSOR_TRACKING)) @@ -19,7 +19,7 @@ var/data[0] var/turf/T = get_turf(nano_host()) - data["isAI"] = user.isMobAI() + data["isAI"] = isAI(user) data["crewmembers"] = crew_repository.health_data(T) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 798a4c4dfc..2c691349e0 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -136,7 +136,7 @@ if(href_list["notify_laws"]) owner << "Law Notice" owner.laws.show_laws(owner) - if(owner.isMobAI()) + if(isAI(owner)) var/mob/living/silicon/ai/AI = owner for(var/mob/living/silicon/robot/R in AI.connected_robots) R << "Law Notice" @@ -163,7 +163,7 @@ package_laws(data, "inherent_laws", owner.laws.inherent_laws) package_laws(data, "supplied_laws", owner.laws.supplied_laws) - data["isAI"] = owner.isMobAI() + data["isAI"] = isAI(owner) data["isMalf"] = is_malf(user) data["isSlaved"] = owner.is_slaved() data["isAdmin"] = is_admin(user) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index d7b41e80cb..66ee2b39dc 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -4,13 +4,13 @@ */ /obj/item/weapon/paper - name = "paper" - gender = PLURAL + name = "sheet of paper" + gender = NEUTER icon = 'icons/obj/bureaucracy.dmi' icon_state = "paper" item_state = "paper" throwforce = 0 - w_class = 1.0 + w_class = 1 throw_range = 1 throw_speed = 1 layer = 4 diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index b29525cb96..db7a088216 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -1,6 +1,6 @@ /obj/item/weapon/paper_bundle name = "paper bundle" - gender = PLURAL + gender = NEUTER icon = 'icons/obj/bureaucracy.dmi' icon_state = "paper" item_state = "paper" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6d2e232eef..3ad0754d84 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1,12 +1,12 @@ //update_state -#define UPSTATE_CELL_IN 1 -#define UPSTATE_OPENED1 2 -#define UPSTATE_OPENED2 4 -#define UPSTATE_MAINT 8 -#define UPSTATE_BROKE 16 -#define UPSTATE_BLUESCREEN 32 -#define UPSTATE_WIREEXP 64 -#define UPSTATE_ALLGOOD 128 +#define UPDATE_CELL_IN 1 +#define UPDATE_OPENED1 2 +#define UPDATE_OPENED2 4 +#define UPDATE_MAINT 8 +#define UPDATE_BROKE 16 +#define UPDATE_BLUESCREEN 32 +#define UPDATE_WIREEXP 64 +#define UPDATE_ALLGOOD 128 //update_overlay #define APC_UPOVERLAY_CHARGEING0 1 @@ -170,21 +170,19 @@ area.power_equip = 0 area.power_environ = 0 area.power_change() - if(wires) - qdel(wires) - wires = null + qdel(wires) + wires = null + qdel(terminal) + terminal = null if(cell) - cell.loc = loc + cell.forceMove(loc) cell = null - if(terminal) - qdel(terminal) - terminal = null // Malf AI, removes the APC from AI's hacked APCs list. if((hacker) && (hacker.hacked_apcs) && (src in hacker.hacked_apcs)) hacker.hacked_apcs -= src - ..() + return ..() /obj/machinery/power/apc/proc/make_terminal() // create a terminal object at the same position as original turf loc @@ -288,25 +286,25 @@ return if(update & 1) // Updating the icon state - if(update_state & UPSTATE_ALLGOOD) + if(update_state & UPDATE_ALLGOOD) icon_state = "apc0" - else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2)) + else if(update_state & (UPDATE_OPENED1|UPDATE_OPENED2)) var/basestate = "apc[ cell ? "2" : "1" ]" - if(update_state & UPSTATE_OPENED1) - if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) + if(update_state & UPDATE_OPENED1) + if(update_state & (UPDATE_MAINT|UPDATE_BROKE)) icon_state = "apcmaint" //disabled APC cannot hold cell else icon_state = basestate - else if(update_state & UPSTATE_OPENED2) + else if(update_state & UPDATE_OPENED2) icon_state = "[basestate]-nocover" - else if(update_state & UPSTATE_BROKE) + else if(update_state & UPDATE_BROKE) icon_state = "apc-b" - else if(update_state & UPSTATE_BLUESCREEN) + else if(update_state & UPDATE_BLUESCREEN) icon_state = "apcemag" - else if(update_state & UPSTATE_WIREEXP) + else if(update_state & UPDATE_WIREEXP) icon_state = "apcewires" - if(!(update_state & UPSTATE_ALLGOOD)) + if(!(update_state & UPDATE_ALLGOOD)) if(overlays.len) overlays = 0 return @@ -314,7 +312,7 @@ if(update & 2) if(overlays.len) overlays.len = 0 - if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) + if(!(stat & (BROKEN|MAINT)) && update_state & UPDATE_ALLGOOD) overlays += status_overlays_lock[locked+1] overlays += status_overlays_charging[charging+1] if(operating) @@ -322,6 +320,21 @@ overlays += status_overlays_lighting[lighting+1] overlays += status_overlays_environ[environ+1] + if(update & 3) + if(update_state & UPDATE_BLUESCREEN) + set_light(l_range = 2, l_power = 0.5, l_color = "#0000FF") + else if(!(stat & (BROKEN|MAINT)) && update_state & UPDATE_ALLGOOD) + var/color + switch(charging) + if(0) + color = "#F86060" + if(1) + color = "#A8B0F8" + if(2) + color = "#82FF4C" + set_light(l_range = 2, l_power = 0.5, l_color = color) + else + set_light(0) /obj/machinery/power/apc/proc/check_updates() @@ -331,27 +344,27 @@ update_overlay = 0 if(cell) - update_state |= UPSTATE_CELL_IN + update_state |= UPDATE_CELL_IN if(stat & BROKEN) - update_state |= UPSTATE_BROKE + update_state |= UPDATE_BROKE if(stat & MAINT) - update_state |= UPSTATE_MAINT + update_state |= UPDATE_MAINT if(opened) if(opened==1) - update_state |= UPSTATE_OPENED1 + update_state |= UPDATE_OPENED1 if(opened==2) - update_state |= UPSTATE_OPENED2 + update_state |= UPDATE_OPENED2 else if(emagged || hacker) - update_state |= UPSTATE_BLUESCREEN + update_state |= UPDATE_BLUESCREEN else if(wiresexposed) - update_state |= UPSTATE_WIREEXP + update_state |= UPDATE_WIREEXP if(update_state <= 1) - update_state |= UPSTATE_ALLGOOD + update_state |= UPDATE_ALLGOOD if(operating) update_overlay |= APC_UPOVERLAY_OPERATING - if(update_state & UPSTATE_ALLGOOD) + if(update_state & UPDATE_ALLGOOD) if(locked) update_overlay |= APC_UPOVERLAY_LOCKED @@ -453,7 +466,7 @@ return user.drop_item() - W.loc = src + W.forceMove(src) cell = W user.visible_message(\ "[user.name] has inserted the power cell to [src.name]!",\ diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index e070a5ec90..400e7281b6 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -127,7 +127,7 @@ /obj/machinery/power/port_gen/pacman/Destroy() DropFuel() - ..() + return ..() /obj/machinery/power/port_gen/pacman/RefreshParts() var/temp_rating = 0 @@ -245,11 +245,11 @@ sheets = 0 sheet_left = 0 ..() - + /obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user) if (active && prob(25)) explode() //if they're foolish enough to emag while it's running - + if (!emagged) emagged = 1 return 1 diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 1d5711b4b3..ebd88df3e2 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -19,8 +19,14 @@ ..() /datum/powernet/Destroy() + for(var/obj/structure/cable/C in cables) + cables -= C + C.powernet = null + for(var/obj/machinery/power/M in nodes) + nodes -= M + M.powernet = null powernets -= src - ..() + return ..() //Returns the amount of excess power (before refunding to SMESs) from last tick. //This is for machines that might adjust their power consumption using this data. diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 985bd74e62..39f08f509b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -30,7 +30,9 @@ /obj/machinery/particle_accelerator/control_box/Destroy() if(active) toggle_power() - ..() + qdel(wires) + wires = null + return ..() /obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob) if(construction_state >= 3) diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 16f3bc9159..497e16a885 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -76,11 +76,11 @@ should_be_mapped = 1 /obj/machinery/power/smes/buildable/Destroy() - ..() qdel(wires) + wires = null for(var/datum/nano_module/rcon/R in world) R.FindDevices() - + return ..() // Proc: process() // Parameters: None diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 237f357230..a280de4eca 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -15,6 +15,9 @@ for(var/propname in properties) var/propvalue = properties[propname] + + if(propname == "mode_name") + name = propvalue if(isnull(propvalue)) settings[propname] = gun.vars[propname] //better than initial() as it handles list vars like burst_accuracy else diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 0c222a9c34..eeba7bcd4b 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -11,8 +11,8 @@ modifystate = "energystun" firemodes = list( - list(name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'), - list(name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg'), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg'), ) /obj/item/weapon/gun/energy/gun/mounted @@ -31,8 +31,8 @@ modifystate = null firemodes = list( - list(name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), - list(name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'), ) var/lightfail = 0 diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 2af6758e0a..98817fede3 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -11,9 +11,9 @@ max_shots = 10 firemodes = list( - list(name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=null), - list(name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=null), - list(name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=400), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=null), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=null), + list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=400), ) /obj/item/weapon/gun/energy/pulse_rifle/mounted diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 738ab8fa7b..dccd03d58c 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -47,8 +47,8 @@ self_recharge = 1 firemodes = list( - list(name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"), - list(name="increase yield", projectile_type=/obj/item/projectile/energy/florayield, modifystate="florayield"), + list(mode_name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"), + list(mode_name="increase yield", projectile_type=/obj/item/projectile/energy/florayield, modifystate="florayield"), ) /obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag) diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 110b009c7e..13c1829bbc 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -13,9 +13,9 @@ burst_delay = 2 firemodes = list( - list(name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), - list(name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)), - list(name="short bursts", burst=5, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1,-2,-2), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)), + list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), + list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)), + list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1,-2,-2), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)), ) /obj/item/weapon/gun/projectile/automatic/mini_uzi @@ -67,9 +67,9 @@ magazine_type = /obj/item/ammo_magazine/c762 firemodes = list( - list(name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), - list(name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6)), - list(name="short bursts", burst=5, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2,-2,-3), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)), + list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), + list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6)), + list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2,-2,-3), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)), ) /obj/item/weapon/gun/projectile/automatic/sts35/update_icon() @@ -118,9 +118,9 @@ burst_delay = 4 firemodes = list( - list(name="semiauto", burst=1, fire_delay=0, move_delay=null, use_launcher=null, burst_accuracy=null, dispersion=null), - list(name="3-round bursts", burst=3, fire_delay=null, move_delay=6, use_launcher=null, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 0.6)), - list(name="fire grenades", burst=null, fire_delay=null, move_delay=null, use_launcher=1, burst_accuracy=null, dispersion=null) + list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, use_launcher=null, burst_accuracy=null, dispersion=null), + list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, use_launcher=null, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 0.6)), + list(mode_name="fire grenades", burst=null, fire_delay=null, move_delay=null, use_launcher=1, burst_accuracy=null, dispersion=null) ) var/use_launcher = 0 @@ -183,8 +183,8 @@ magazine_type = /obj/item/ammo_magazine/a762 firemodes = list( - list(name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)), - list(name="long bursts", burst=8, move_delay=8, burst_accuracy = list(0,-1,-1,-2,-2,-2,-3,-3), dispersion = list(1.0, 1.0, 1.0, 1.0, 1.2)), + list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)), + list(mode_name="long bursts", burst=8, move_delay=8, burst_accuracy = list(0,-1,-1,-2,-2,-2,-3,-3), dispersion = list(1.0, 1.0, 1.0, 1.0, 1.2)), ) var/cover_open = 0 diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 85c4522d8d..d4da287a71 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -68,8 +68,8 @@ burst_delay = 0 firemodes = list( - list(name="fire one barrel at a time", burst=1), - list(name="fire both barrels at once", burst=2), + list(mode_name="fire one barrel at a time", burst=1), + list(mode_name="fire both barrels at once", burst=2), ) /obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 7a882fa94e..be5051953e 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -253,7 +253,7 @@ if(prob(5)) M.antibodies |= V.antigen if(prob(50)) - M.radiation += 50 // curing it that way may kill you instead + M.apply_effect(50, IRRADIATE, check_protection = 0) // curing it that way may kill you instead var/absorbed = 0 var/obj/item/organ/diona/nutrients/rad_organ = locate() in M.internal_organs if(rad_organ && !rad_organ.is_broken()) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index ba86ba1bb2..f1c82a900a 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -1166,7 +1166,7 @@ /datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() - M.radiation = max(M.radiation - 1 * removed, 0) + M.apply_effect(max(M.radiation - 1 * removed, 0), IRRADIATE, check_protection = 0) /datum/reagent/ethanol/whiskey name = "Whiskey" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 9644528e0c..b2cd248b25 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -344,7 +344,7 @@ scannable = 1 /datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.radiation = max(M.radiation - 30 * removed, 0) + M.apply_effect(max(M.radiation - 30 * removed, 0), IRRADIATE, check_protection = 0) /datum/reagent/arithrazine name = "Arithrazine" @@ -357,7 +357,7 @@ scannable = 1 /datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - M.radiation = max(M.radiation - 70 * removed, 0) + M.apply_effect(max(M.radiation - 70 * removed, 0), IRRADIATE, check_protection = 0) M.adjustToxLoss(-10 * removed) if(prob(60)) M.take_organ_damage(4 * removed, 0) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index f55eb57f58..e0781a9e6b 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -422,21 +422,21 @@ if(dose < 1) M.apply_effect(3, STUTTER) M.make_dizzy(5) - if(prob(10)) + if(prob(5)) M.emote(pick("twitch", "giggle")) else if(dose < 2) M.apply_effect(3, STUTTER) - M.make_jittery(10) - M.make_dizzy(10) + M.make_jittery(5) + M.make_dizzy(5) M.druggy = max(M.druggy, 35) - if(prob(20)) - M.emote(pick("twitch","giggle")) + if(prob(10)) + M.emote(pick("twitch", "giggle")) else M.apply_effect(3, STUTTER) - M.make_jittery(20) - M.make_dizzy(20) + M.make_jittery(10) + M.make_dizzy(10) M.druggy = max(M.druggy, 40) - if(prob(30)) + if(prob(15)) M.emote(pick("twitch", "giggle")) /datum/reagent/nicotine diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 947d9f77de..e85bb2c2bb 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -60,9 +60,9 @@ user.visible_message("[user] forces [M] to swallow \the [src].") var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [user.name] ([user.ckey]) Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Fed [name] by [M.name] ([M.ckey]) Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [key_name(user)] Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Fed [name] to [key_name(M)] Reagents: [contained]") + msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") if(reagents.total_volume) reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 738380d7d0..957c3b574d 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -40,8 +40,9 @@ /obj/machinery/conveyor/proc/setmove() if(operating == 1) movedir = forwards - else + else if(operating == -1) movedir = backwards + else operating = 0 update() /obj/machinery/conveyor/proc/update() @@ -80,7 +81,7 @@ if(isrobot(user)) return //Carn: fix for borgs dropping their modules on conveyor belts if(I.loc != user) return // This should stop mounted modules ending up outside the module. - user.drop_item(src) + user.drop_item(get_turf(src)) return // attack with hand, move pulled object onto conveyor diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm index 0c81a604a2..7ffeffa8eb 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm @@ -8,13 +8,13 @@ var/weakness = GetAnomalySusceptibility(toucher) if(iscarbon(toucher) && prob(weakness * 100)) var/mob/living/carbon/C = toucher - C << "\red A painful discharge of energy strikes you!" + C << "A painful discharge of energy strikes you!" C.adjustOxyLoss(rand(5,25) * weakness) C.adjustToxLoss(rand(5,25) * weakness) C.adjustBruteLoss(rand(5,25) * weakness) C.adjustFireLoss(rand(5,25) * weakness) C.adjustBrainLoss(rand(5,25) * weakness) - C.radiation += 25 * weakness + C.apply_effect(25 * weakness, IRRADIATE) C.nutrition -= min(50 * weakness, C.nutrition) C.make_dizzy(6 * weakness) C.weakened += 6 * weakness @@ -26,7 +26,7 @@ var/weakness = GetAnomalySusceptibility(C) if(prob(weakness * 100)) if(prob(10)) - C << "\red You feel a painful force radiating from something nearby." + C << "You feel a painful force radiating from something nearby." C.adjustBruteLoss(1 * weakness) C.adjustFireLoss(1 * weakness) C.adjustToxLoss(1 * weakness) @@ -40,7 +40,7 @@ for (var/mob/living/carbon/C in range(effectrange, T)) var/weakness = GetAnomalySusceptibility(C) if(prob(weakness * 100)) - C << "\red A wave of painful energy strikes you!" + C << "A wave of painful energy strikes you!" C.adjustBruteLoss(3 * weakness) C.adjustFireLoss(3 * weakness) C.adjustToxLoss(3 * weakness) diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm index 378848e26e..ed23b965df 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -1,6 +1,6 @@ /obj/machinery/radiocarbon_spectrometer - name = "Radiocarbon spectrometer" + name = "radiocarbon spectrometer" desc = "A specialised, complex scanner for gleaning information on all manner of small things." anchored = 1 density = 1 @@ -91,9 +91,13 @@ user << "You remove [amount_transferred]u of coolant from [src]." update_coolant() return + if(scanned_item) + user << "\The [src] already has \a [scanned_item] inside!" + return user.drop_item() I.loc = src scanned_item = I + user << "You put \the [I] into \the [src]." /obj/machinery/radiocarbon_spectrometer/proc/update_coolant() var/total_purity = 0 diff --git a/code/modules/spells/artifacts.dm b/code/modules/spells/artifacts.dm index 9790dc3dbe..f643012ce3 100644 --- a/code/modules/spells/artifacts.dm +++ b/code/modules/spells/artifacts.dm @@ -19,5 +19,7 @@ user << "You can see... everything!" visible_message("[user] stares into [src], their eyes glazing over.") - announce_ghost_joinleave(user.ghostize(1), 1, "You feel that they used a powerful artifact to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place with their presence.") + + user.teleop = user.ghostize(1) + announce_ghost_joinleave(user.teleop, 1, "You feel that they used a powerful artifact to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place with their presence.") return diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index e023beef80..c111bf6657 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -98,7 +98,7 @@ maxm = 3 badness = 2 activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += (2*multiplier) + mob.apply_effect(2*multiplier, IRRADIATE, check_protection = 0) /datum/disease2/effect/deaf name = "Dead Ear Syndrome" diff --git a/code/world.dm b/code/world.dm index af96bdab4b..ef5c8c91db 100644 --- a/code/world.dm +++ b/code/world.dm @@ -209,6 +209,69 @@ var/world_topic_spam_protect_time = world.timeofday return list2params(positions) + else if(copytext(T,1,5) == "info") + var/input[] = params2list(T) + if(input["key"] != config.comms_password) + if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50) + + spawn(50) + world_topic_spam_protect_time = world.time + return "Bad Key (Throttled)" + + world_topic_spam_protect_time = world.time + world_topic_spam_protect_ip = addr + + return "Bad Key" + + var/search = input["info"] + var/ckey = ckey(search) + + var/list/match = list() + + for(var/mob/M in mob_list) + if(findtext(M.name, search)) + match += M + else if(M.ckey == ckey) + match += M + else if(M.mind && findtext(M.mind.assigned_role, search)) + match += M + + if(!match.len) + return "No matches" + else if(match.len == 1) + var/mob/M = match[1] + var/info = list() + info["key"] = M.key + info["name"] = M.name == M.real_name ? M.name : "[M.name] ([M.real_name])" + info["role"] = M.mind ? (M.mind.assigned_role ? M.mind.assigned_role : "No role") : "No mind" + var/turf/MT = get_turf(M) + info["loc"] = M.loc ? "[M.loc]" : "null" + info["turf"] = MT ? "[MT] @ [MT.x], [MT.y], [MT.z]" : "null" + info["area"] = MT ? "[MT.loc]" : "null" + info["antag"] = M.mind ? (M.mind.special_role ? M.mind.special_role : "Not antag") : "No mind" + info["hasbeenrev"] = M.mind ? M.mind.has_been_rev : "No mind" + info["stat"] = M.stat + info["type"] = M.type + if(isliving(M)) + var/mob/living/L = M + info["damage"] = list2params(list( + oxy = L.getOxyLoss(), + tox = L.getToxLoss(), + fire = L.getFireLoss(), + brute = L.getBruteLoss(), + clone = L.getCloneLoss(), + brain = L.getBrainLoss() + )) + else + info["damage"] = "non-living" + info["gender"] = M.gender + return list2params(info) + else + var/list/ret = list() + for(var/mob/M in match) + ret[M.key] = M.name + return list2params(ret) + else if(copytext(T,1,9) == "adminmsg") /* We got an adminmsg from IRC bot lets split the input then validate the input. diff --git a/html/changelog.css b/html/changelog.css index 9d43ecc076..d5155db726 100644 --- a/html/changelog.css +++ b/html/changelog.css @@ -1,5 +1,5 @@ -.top{font-family:Tahoma,sans-serif;font-size:12px;} -h2{font-family:Tahoma,sans-serif;} +body{font-family:Tahoma,sans-serif;} +.top{font-size:12px;} a img {border:none;} .bgimages16 li { padding:2px 10px 2px 30px; @@ -21,16 +21,57 @@ a img {border:none;} .spellcheck {background-image:url(spell-check.png)} .experiment {background-image:url(burn-exclamation.png)} .maptweak {background-image:url(map-pencil.png)} -.sansserif {font-family:Tahoma,sans-serif;font-size:12px;} -.commit {margin-bottom:20px;font-size:100%;font-weight:normal;} -.changes {list-style:none;margin:5px 0;padding:0 0 0 25px;font-size:0.8em;} -.date {margin:10px 0;color:blue;border-bottom:2px solid #00f;width:60%;padding:2px 0;font-size:1em;font-weight:bold;} -.author {padding-left:10px;margin:0;font-weight:bold;font-size:0.9em;} -.drop {cursor:pointer;border:1px solid #999;display:inline;font-size:0.9em;padding:1px 20px 1px 5px;line-height:16px;} +.sansserif {font-size:12px;} +.commit { + margin-bottom:20px; + font-size:100%;font-weight:normal; +} +.changes { + list-style:none; + margin:5px 0; + padding:0 0 0 25px; + font-size:0.8em; +} +.date { + margin:10px 0; + color:blue; + border-bottom:2px solid #00f; + width:60%; + padding:2px 0; + font-size:1em; + font-weight:bold; +} +.author { + padding-left:10px; + margin:0; + font-weight:bold; + font-size:0.9em; + } +.drop { + cursor:pointer; + border:1px solid #999; + display:inline; + font-size:0.9em; + padding:1px 20px 1px 5px; + line-height:16px; +} .hidden {display:none;} -.indrop {margin:2px 0 0 0;clear:both;background:#fff;border:1px solid #ddd;padding:5px 10px;} -.indrop p {margin:0;font-size:0.8em;line-height:16px;margin:1px 0;} -.indrop img {margin-right:5px;vertical-align:middle;} +.indrop { + margin:2px 0 0 0; + clear:both; + background:#fff; + border:1px solid #ddd; + padding:5px 10px; + } +.indrop p { + margin:0; + font-size:0.8em; + line-height:16px; + margin:1px 0; +} +.indrop img { + margin-right:5px; + vertical-align:middle;} .closed {background:url(chevron-expand.png) right center no-repeat;} .open {background:url(chevron.png) right center no-repeat;} -.lic {font-size:9px;} \ No newline at end of file +.lic {font-size:9px;} diff --git a/html/changelog.html b/html/changelog.html index 8e9a697fd4..897f98072d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,12 @@ -->
+

26 September 2015

+

PsiOmegaDelta updated:

+ +

11 September 2015

HarpyEagle updated: