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 b27de443ef..90696cdb7d 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -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\lattice.dm" #include "code\game\objects\structures\mirror.dm" #include "code\game\objects\structures\mop_bucket.dm" @@ -825,6 +824,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" @@ -1443,6 +1444,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/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/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index cccb0f2910..fb79b29cb9 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -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/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 7110ce74e1..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 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 05ab26d8c5..7cd0a708d8 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -635,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_movable.dm b/code/game/atoms_movable.dm index a9717f5027..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 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/machinery/alarm.dm b/code/game/machinery/alarm.dm index 5dc7b13b48..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) ..() 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/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 646488abee..a434f6c780 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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/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/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/vending.dm b/code/game/machinery/vending.dm index a14b5d2e9a..6a6d4df1fd 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) 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/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/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/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 7c685a9e1d..484c185a14 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 1d25089eca..8e3fed202d 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/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/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/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/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/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/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 d33c47713b..53ff4c3a75 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 ) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 5452763afb..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) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 116fca239f..5d3915c7fd 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -217,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 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/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/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index f5f764f8a3..9140428d79 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 @@ -720,15 +721,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/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 1433c5e126..76fe6a8e40 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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/mob_defines.dm b/code/modules/mob/mob_defines.dm index 6bbc3aff2e..261bea8fd1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -213,8 +213,9 @@ 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 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index bdf7cb8d87..ee5e786db8 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -470,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 8e1673a451..36a606bfcf 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -61,8 +61,7 @@ opacity = 0 anchored = 1 - New() - . = ..() + initialize() for(var/turf/turf in locs) var/turf/simulated/open/above = GetAbove(turf) if(!above) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index 5733e5d0af..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) 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/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 b0a5d67bff..3ad0754d84 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -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 @@ -468,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/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 f360a8c5a1..8062b6e9da 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/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/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/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: