diff --git a/.travis.yml b/.travis.yml index c58b11584f8..754b84c3743 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ sudo: false env: global: - - BYOND_MAJOR="511" - - BYOND_MINOR="1381" + - BYOND_MAJOR="512" + - BYOND_MINOR="1414" - MACRO_COUNT=4 matrix: - TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0" diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index fc074184d88..8d3aa084934 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -17,7 +17,8 @@ Pipelines + Other Objects -> Pipe network var/nodealert = 0 var/power_rating //the maximum amount of power the machine can use to do work, affects how powerful the machine is, in Watts - layer = 2.4 //under wires with their 2.44 + layer = PIPES_LAYER + plane = PLATING_PLANE var/pipe_flags = PIPING_DEFAULT_LAYER_ONLY // Allow other layers by exception basis. var/connect_types = CONNECT_TYPE_REGULAR diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index 9d980647a88..4a9403a64b3 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -6,7 +6,6 @@ icon = 'icons/atmos/injector.dmi' icon_state = "map_injector" pipe_state = "injector" - layer = 3 name = "air injector" desc = "Passively injects air into its surroundings. Has a valve attached to it that can control flow rate." diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm index a38587baf51..baba515fae6 100644 --- a/code/ATMOSPHERICS/mainspipe.dm +++ b/code/ATMOSPHERICS/mainspipe.dm @@ -34,7 +34,8 @@ obj/machinery/atmospherics/pipe/mains_component obj/machinery/atmospherics/mains_pipe icon = 'icons/obj/atmospherics/mainspipe.dmi' - layer = 2.4 //under wires with their 2.5 + layer = PIPES_LAYER + plane = PLATING_PLANE var/volume = 0 diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm index 4bcf2001406..4658b9c40cb 100644 --- a/code/ATMOSPHERICS/pipes/cap.dm +++ b/code/ATMOSPHERICS/pipes/cap.dm @@ -7,7 +7,6 @@ icon = 'icons/atmos/pipes.dmi' icon_state = "" level = 2 - layer = 2.4 //under wires with their 2.44 volume = 35 diff --git a/code/__defines/_planes+layers.dm b/code/__defines/_planes+layers.dm index 7370e10235e..7c964fb867b 100644 --- a/code/__defines/_planes+layers.dm +++ b/code/__defines/_planes+layers.dm @@ -44,37 +44,68 @@ What is the naming convention for planes or layers? #define PLANE_ADMIN2 -91 //And adminbuse #define PLANE_ADMIN3 -90 //And generating salt -#define SPACE_PLANE -32 // Reserved for use in space/parallax -#define PARALLAX_PLANE -30 // Reserved for use in space/parallax +#define SPACE_PLANE -82 // Reserved for use in space/parallax +#define PARALLAX_PLANE -80 // Reserved for use in space/parallax // OPENSPACE_PLANE reserves all planes between OPENSPACE_PLANE_START and OPENSPACE_PLANE_END inclusive -#define OPENSPACE_PLANE -55 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17) -#define OPENSPACE_PLANE_START -53 -#define OPENSPACE_PLANE_END -38 -#define OVER_OPENSPACE_PLANE -37 +#define OPENSPACE_PLANE -75 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17) +#define OPENSPACE_PLANE_START -73 +#define OPENSPACE_PLANE_END -58 +#define OVER_OPENSPACE_PLANE -57 + +// Turf Planes +#define SPACE_PLANE -43 // Space turfs themselves +#define PLATING_PLANE -44 // Plating + #define DISPOSAL_LAYER 2.1 // Under objects, even when planeswapped + #define WIRES_LAYER 2.2 // Under objects, even when planeswapped + #define PIPES_LAYER 2.3 // Under objects, even when planeswapped + #define ABOVE_UTILITY 2.5 // Above stuff like pipes and wires +#define TURF_PLANE -45 // Turfs themselves, most flooring + #define ABOVE_TURF_LAYER 2.1 // Snow and such +#define DECAL_PLANE -44 // Permanent decals +#define DIRTY_PLANE -43 // Nonpermanent decals +#define BLOOD_PLANE -42 // Blood is really dirty, but we can do special stuff if we separate it + +// Obj planes +#define OBJ_PLANE -35 + #define HIDING_LAYER 2.6 // Layer at which mobs hide to be under things like tables + #define DOOR_OPEN_LAYER 2.7 // Under all objects if opened. 2.7 due to tables being at 2.6 + #define UNDER_JUNK_LAYER 2.9 // Things that want to be slightly below common objects + // Turf/Obj layer boundary + #define ABOVE_JUNK_LAYER 3.1 // Things that want to be slightly above common objects + #define DOOR_CLOSED_LAYER 3.1 // Doors when closed + #define WINDOW_LAYER 3.2 // Windows + #define ON_WINDOW_LAYER 3.3 // Ontop of a window + #define SHOWER_OPEN_LAYER 3.4 // Showers when open + // Obj/Mob layer boundary + #define SHOWER_CLOSED_LAYER 4.2 // Should be converted to plane swaps + +// Mob planes +#define MOB_PLANE -25 + #define BELOW_MOB_LAYER 3.9 // Should be converted to plane swaps + #define ABOVE_MOB_LAYER 4.1 // Should be converted to plane swaps + +// Top plane (in the sense that it's the highest in 'the world' and not a UI element) +#define ABOVE_PLANE -10 //////////////////////////////////////////////////////////////////////////////////////// #define PLANE_WORLD 0 // BYOND's default value for plane, the "base plane" //////////////////////////////////////////////////////////////////////////////////////// + //#define AREA_LAYER 1 //For easy recordkeeping; this is a byond define + //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define - #define DECALS_LAYER 2.01 - #define OVERTURF_LAYER 2.1 - #define HIDING_LAYER 2.45 //Layer at which mobs hide to be under things like tables - #define DOOR_OPEN_LAYER 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 + //#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define - #define DOOR_CLOSED_LAYER 3.1 //Above most items if closed - #define SHOWER_OPEN_LAYER 3.4 - #define BELOW_MOB_LAYER 3.9 + //#define MOB_LAYER 4 //For easy recordkeeping; this is a byond define - #define ABOVE_MOB_LAYER 4.1 - #define SHOWER_CLOSED_LAYER 4.2 - + //#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define - #define LIGHTING_LAYER 11 //Layer that lighting used to be on (now it's on a plane) - #define HUD_LAYER 20 //Above lighting, but below obfuscation. For in-game HUD effects (whereas SCREEN_LAYER is for abstract/OOC things like inventory slots) - #define SCREEN_LAYER 22 //Mob HUD/effects layer + #define HUD_LAYER 20 // Above lighting, but below obfuscation. For in-game HUD effects (whereas SCREEN_LAYER is for abstract/OOC things like inventory slots) + #define SCREEN_LAYER 22 // Mob HUD/effects layer + +#define PLANE_PLANETLIGHTING 4 //Lighting on planets #define PLANE_LIGHTING 5 //Where the lighting (and darkness) lives #define PLANE_LIGHTING_ABOVE 6 //For glowy eyes etc. that shouldn't be affected by darkness diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 08131f99bb3..c9b34fc2b6a 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -27,7 +27,7 @@ #define IS_SLIME 8 #define CE_STABLE "stable" // Inaprovaline -#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin +#define CE_ANTIBIOTIC "antibiotic" // Antibiotics #define CE_BLOODRESTORE "bloodrestore" // Iron/nutriment #define CE_PAINKILLER "painkiller" #define CE_ALCOHOL "alcohol" // Liver filtering @@ -36,6 +36,11 @@ #define REAGENTS_PER_SHEET 20 +// Attached to CE_ANTIBIOTIC +#define ANTIBIO_NORM 1 +#define ANTIBIO_OD 2 +#define ANTIBIO_SUPER 3 + // Chemistry lists. var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") // Increase heart rate. var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") // Decrease heart rate. diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 8f67815583e..637b450df67 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -88,17 +88,17 @@ #define slot_back 3 #define slot_belt 4 #define slot_wear_id 5 -#define slot_l_store 6 -#define slot_r_store 7 //Some things may reference this, try to keep it here +#define slot_s_store 6 +#define slot_l_store 7 +#define slot_r_store 8 //Some things may reference this, try to keep it here //Shown when inventory unhidden -#define slot_glasses 8 -#define slot_wear_mask 9 -#define slot_gloves 10 -#define slot_head 11 -#define slot_shoes 12 -#define slot_wear_suit 13 -#define slot_w_uniform 14 -#define slot_s_store 15 +#define slot_glasses 9 +#define slot_wear_mask 10 +#define slot_gloves 11 +#define slot_head 12 +#define slot_shoes 13 +#define slot_wear_suit 14 +#define slot_w_uniform 15 #define slot_l_ear 16 #define slot_r_ear 17 //Secret slots diff --git a/code/__defines/lighting.dm b/code/__defines/lighting.dm index 6b05896b8dd..00e473fc2a7 100644 --- a/code/__defines/lighting.dm +++ b/code/__defines/lighting.dm @@ -9,7 +9,6 @@ #define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources #define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone -//#define LIGHTING_LAYER 10 // drawing layer for lighting overlays #define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects #define LIGHTING_ICON_STATE_DARK "soft_dark" // Change between "soft_dark" and "dark" to swap soft darkvision diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 9343a4590ff..18c8cb1ca71 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -9,8 +9,8 @@ #define CANPARALYSE 0x4 #define CANPUSH 0x8 #define LEAPING 0x10 -#define HIDING 0x20 -#define PASSEMOTES 0x32 // Mob has a cortical borer or holders inside of it that need to see emotes. +#define HIDING 0x20 +#define PASSEMOTES 0x40 // Mob has a cortical borer or holders inside of it that need to see emotes. #define GODMODE 0x1000 #define FAKEDEATH 0x2000 // Replaces stuff like changeling.changeling_fakedeath. #define DISFIGURED 0x4000 // Set but never checked. Remove this sometime and replace occurences with the appropriate organ code diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index f9b7a6e3ef7..6644cc2efee 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -25,6 +25,11 @@ if (config.log_admin) diary << "\[[time_stamp()]]ADMIN: [text][log_end]" +/proc/log_adminpm(text, client/source, client/dest) + admin_log.Add(text) + if (config.log_admin) + diary << "\[[time_stamp()]]ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)][log_end]" + /proc/log_debug(text) if (config.log_debug) debug_log << "\[[time_stamp()]]DEBUG: [text][log_end]" diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index a1b58d06f86..e82e618651d 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -276,3 +276,16 @@ Proc for attack log creation, because really why not humans += H return humans + +/proc/getviewsize(view) + var/viewX + var/viewY + if(isnum(view)) + var/totalviewrange = 1 + 2 * view + viewX = totalviewrange + viewY = totalviewrange + else + var/list/viewrangelist = splittext(view,"x") + viewX = text2num(viewrangelist[1]) + viewY = text2num(viewrangelist[2]) + return list(viewX, viewY) diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 1f0df801414..2ec9da3b278 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -11,7 +11,7 @@ using.icon = 'icons/mob/screen1_alien.dmi' using.icon_state = (mymob.m_intent == "run" ? "running" : "walking") using.screen_loc = ui_acti - using.layer = 20 + using.layer = HUD_LAYER src.adding += using move_intent = using diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 3a251f71fad..c63519c40f3 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -9,6 +9,7 @@ var/list/global_huds = list( global_hud.whitense, global_hud.vimpaired, global_hud.darkMask, + global_hud.centermarker, global_hud.nvg, global_hud.thermal, global_hud.meson, @@ -27,6 +28,7 @@ var/list/global_huds = list( var/obj/screen/whitense var/list/vimpaired var/list/darkMask + var/obj/screen/centermarker var/obj/screen/darksight var/obj/screen/nvg var/obj/screen/thermal @@ -47,7 +49,6 @@ var/list/global_huds = list( /obj/screen/global_screen screen_loc = ui_entire_screen - layer = 17 plane = PLANE_FULLSCREEN mouse_opacity = 0 @@ -70,7 +71,12 @@ var/list/global_huds = list( darksight.icon = null darksight.screen_loc = "1,1" darksight.plane = PLANE_LIGHTING - darksight.plane = LIGHTING_LAYER + 0.1 + + //Marks the center of the screen, for things like ventcrawl + centermarker = new /obj/screen() + centermarker.icon = 'icons/mob/screen1.dmi' + centermarker.icon_state = "centermarker" + centermarker.screen_loc = "CENTER,CENTER" nvg = setup_overlay("nvg_hud") thermal = setup_overlay("thermal_hud") @@ -117,20 +123,17 @@ var/list/global_huds = list( for(i = 1, i <= 4, i++) O = vimpaired[i] O.icon_state = "dither50" - O.layer = 17 O.plane = PLANE_FULLSCREEN O.mouse_opacity = 0 O = darkMask[i] O.icon_state = "dither50" - O.layer = 17 O.plane = PLANE_FULLSCREEN O.mouse_opacity = 0 for(i = 5, i <= 8, i++) O = darkMask[i] O.icon_state = "black" - O.layer = 17 O.plane = PLANE_FULLSCREEN O.mouse_opacity = 2 diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index cab3e3bfca0..325a4a4b7ec 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -11,13 +11,13 @@ blobpwrdisplay.name = "blob power" blobpwrdisplay.icon_state = "block" blobpwrdisplay.screen_loc = ui_health - blobpwrdisplay.layer = 20 + blobpwrdisplay.layer = HUD_LAYER blobhealthdisplay = new /obj/screen() blobhealthdisplay.name = "blob health" blobhealthdisplay.icon_state = "block" blobhealthdisplay.screen_loc = ui_internal - blobhealthdisplay.layer = 20 + blobhealthdisplay.layer = HUD_LAYER mymob.client.screen = list() @@ -36,7 +36,7 @@ using.icon = ui_style using.icon_state = "intent_"+mymob.a_intent using.screen_loc = ui_zonesel - using.layer = 20 + using.layer = HUD_LAYER src.adding += using action_intent = using @@ -50,7 +50,7 @@ using.name = "help" using.icon = ico using.screen_loc = ui_zonesel - using.layer = 21 + using.layer = HUD_LAYER+0.01 src.adding += using help_intent = using @@ -61,7 +61,7 @@ using.name = "disarm" using.icon = ico using.screen_loc = ui_zonesel - using.layer = 21 + using.layer = HUD_LAYER+0.01 src.adding += using disarm_intent = using @@ -72,7 +72,7 @@ using.name = "grab" using.icon = ico using.screen_loc = ui_zonesel - using.layer = 21 + using.layer = HUD_LAYER+0.01 src.adding += using grab_intent = using @@ -83,7 +83,7 @@ using.name = I_HURT using.icon = ico using.screen_loc = ui_zonesel - using.layer = 21 + using.layer = HUD_LAYER+0.01 src.adding += using hurt_intent = using diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 8a6bb736f53..dc414df11f3 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -30,7 +30,7 @@ var/obj/screen/robot_inventory using.alpha = ui_alpha using.icon_state = "radio" using.screen_loc = ui_movi - using.layer = 20 + using.layer = HUD_LAYER src.adding += using //Module select @@ -43,7 +43,7 @@ var/obj/screen/robot_inventory using.alpha = ui_alpha using.icon_state = "inv1" using.screen_loc = ui_inv1 - using.layer = 20 + using.layer = HUD_LAYER src.adding += using mymob:inv1 = using @@ -55,7 +55,7 @@ var/obj/screen/robot_inventory using.alpha = ui_alpha using.icon_state = "inv2" using.screen_loc = ui_inv2 - using.layer = 20 + using.layer = HUD_LAYER src.adding += using mymob:inv2 = using @@ -67,7 +67,7 @@ var/obj/screen/robot_inventory using.alpha = ui_alpha using.icon_state = "inv3" using.screen_loc = ui_inv3 - using.layer = 20 + using.layer = HUD_LAYER src.adding += using mymob:inv3 = using @@ -81,7 +81,7 @@ var/obj/screen/robot_inventory using.alpha = ui_alpha using.icon_state = mymob.a_intent using.screen_loc = ui_acti - using.layer = 20 + using.layer = HUD_LAYER src.adding += using action_intent = using @@ -119,7 +119,7 @@ var/obj/screen/robot_inventory using.icon_state = "panel" using.alpha = ui_alpha using.screen_loc = ui_borg_panel - using.layer = 19 + using.layer = HUD_LAYER-0.01 src.adding += using //Store diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index f08727abf35..26c16804217 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -68,7 +68,7 @@ var/const/tk_maxrange = 15 flags = NOBLUDGEON //item_state = null w_class = ITEMSIZE_NO_CONTAINER - layer = 20 + layer = HUD_LAYER var/last_throw = 0 var/atom/movable/focus = null diff --git a/code/controllers/Processes/planet.dm b/code/controllers/Processes/planet.dm index f9fd57f7889..e39b5e81b8c 100644 --- a/code/controllers/Processes/planet.dm +++ b/code/controllers/Processes/planet.dm @@ -47,7 +47,8 @@ var/datum/controller/process/planet/planet_controller = null //Weather style needs redrawing if(P.needs_work & PLANET_PROCESS_WEATHER) P.needs_work &= ~PLANET_PROCESS_WEATHER - var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state, layer = LIGHTING_LAYER - 1) + var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state) + new_overlay.plane = PLANE_PLANETLIGHTING //Redraw weather icons for(var/T in P.planet_floors) var/turf/simulated/turf = T diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 7fb3a56c61f..d7a91c9b4ff 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -234,7 +234,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle name = "star" var/speed = 10 var/direction = SOUTH - layer = 2 // TURF_LAYER + layer = TURF_LAYER + plane = TURF_PLANE /obj/effect/bgstar/New() ..() diff --git a/code/datums/supplypacks/recreation.dm b/code/datums/supplypacks/recreation.dm index 7bfdaaeeb68..7f801ea1b36 100644 --- a/code/datums/supplypacks/recreation.dm +++ b/code/datums/supplypacks/recreation.dm @@ -39,6 +39,7 @@ name = "Arts and Crafts supplies" contains = list( /obj/item/weapon/storage/fancy/crayons, + /obj/item/weapon/storage/fancy/markers, /obj/item/device/camera, /obj/item/device/camera_film = 2, /obj/item/weapon/storage/photo_album, diff --git a/code/game/antagonist/antagonist_update.dm b/code/game/antagonist/antagonist_update.dm index 7cf17b5640a..16c27f82c7e 100644 --- a/code/game/antagonist/antagonist_update.dm +++ b/code/game/antagonist/antagonist_update.dm @@ -33,7 +33,9 @@ if(!antag_indicator || !other.current || !recipient.current) return var/indicator = (faction_indicator && (other in faction_members)) ? faction_indicator : antag_indicator - return image('icons/mob/mob.dmi', loc = other.current, icon_state = indicator, layer = LIGHTING_LAYER+0.1) + var/image/returnimage = image('icons/mob/mob.dmi', loc = other.current, icon_state = indicator) + returnimage.plane = PLANE_LIGHTING_ABOVE + return returnimage /datum/antagonist/proc/update_all_icons() if(!antag_indicator) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index c79e6abf17a..df3d06c1412 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -13,82 +13,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station */ - - -/area - var/fire = null - var/atmos = 1 - var/atmosalm = 0 - var/poweralm = 1 - var/party = null - level = null - name = "Unknown" - icon = 'icons/turf/areas.dmi' - icon_state = "unknown" - layer = 10 - luminosity = 0 - mouse_opacity = 0 - var/lightswitch = 1 - - var/eject = null - - var/debug = 0 - var/requires_power = 1 - var/always_unpowered = 0 //this gets overriden to 1 for space in area/New() - - var/power_equip = 1 - var/power_light = 1 - var/power_environ = 1 - var/music = null - var/used_equip = 0 - var/used_light = 0 - var/used_environ = 0 - - var/has_gravity = 1 - var/obj/machinery/power/apc/apc = null - var/no_air = null -// var/list/lights // list of all lights on this area - var/list/all_doors = null //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area - var/firedoors_closed = 0 - var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') - var/list/forced_ambience = null - var/sound_env = STANDARD_STATION - var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf - -/*Adding a wizard area teleport list because motherfucking lag -- Urist*/ -/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ -var/list/teleportlocs = list() - -/hook/startup/proc/setupTeleportLocs() - for(var/area/AR in world) - if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue - if(teleportlocs.Find(AR.name)) continue - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z in using_map.station_levels) - teleportlocs += AR.name - teleportlocs[AR.name] = AR - - teleportlocs = sortAssoc(teleportlocs) - - return 1 - -var/list/ghostteleportlocs = list() - -/hook/startup/proc/setupGhostTeleportLocs() - for(var/area/AR in world) - if(ghostteleportlocs.Find(AR.name)) continue - if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom)) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z in using_map.player_levels) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR - - ghostteleportlocs = sortAssoc(ghostteleportlocs) - - return 1 - /*-----------------------------------------------------------------------------*/ ///////// diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index a5c2fc2f440..c7a653a4c34 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -1,15 +1,49 @@ // Areas.dm - - -// === /area + var/fire = null + var/atmos = 1 + var/atmosalm = 0 + var/poweralm = 1 + var/party = null + level = null + name = "Unknown" + icon = 'icons/turf/areas.dmi' + icon_state = "unknown" + plane = PLANE_LIGHTING_ABOVE //In case we color them + luminosity = 0 + mouse_opacity = 0 + var/lightswitch = 1 + + var/eject = null + + var/debug = 0 + var/requires_power = 1 + var/always_unpowered = 0 //this gets overriden to 1 for space in area/New() + + var/power_equip = 1 + var/power_light = 1 + var/power_environ = 1 + var/music = null + var/used_equip = 0 + var/used_light = 0 + var/used_environ = 0 + + var/has_gravity = 1 + var/obj/machinery/power/apc/apc = null + var/no_air = null +// var/list/lights // list of all lights on this area + var/list/all_doors = null //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area + var/firedoors_closed = 0 + var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') + var/list/forced_ambience = null + var/sound_env = STANDARD_STATION + var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf var/global/global_uid = 0 var/uid /area/New() icon_state = "" - layer = 10 uid = ++global_uid all_areas += src @@ -333,3 +367,37 @@ var/list/mob/living/forced_ambiance_list = new /area/drop_location() CRASH("Bad op: area/drop_location() called") + +/*Adding a wizard area teleport list because motherfucking lag -- Urist*/ +/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ +var/list/teleportlocs = list() + +/hook/startup/proc/setupTeleportLocs() + for(var/area/AR in world) + if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue + if(teleportlocs.Find(AR.name)) continue + var/turf/picked = pick(get_area_turfs(AR.type)) + if (picked.z in using_map.station_levels) + teleportlocs += AR.name + teleportlocs[AR.name] = AR + + teleportlocs = sortAssoc(teleportlocs) + + return 1 + +var/list/ghostteleportlocs = list() + +/hook/startup/proc/setupGhostTeleportLocs() + for(var/area/AR in world) + if(ghostteleportlocs.Find(AR.name)) continue + if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom)) + ghostteleportlocs += AR.name + ghostteleportlocs[AR.name] = AR + var/turf/picked = pick(get_area_turfs(AR.type)) + if (picked.z in using_map.player_levels) + ghostteleportlocs += AR.name + ghostteleportlocs[AR.name] = AR + + ghostteleportlocs = sortAssoc(ghostteleportlocs) + + return 1 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c994aff121d..dda3e0a6b57 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1,5 +1,5 @@ /atom - layer = 2 + layer = TURF_LAYER //This was here when I got here. Why though? var/level = 2 var/flags = 0 var/list/fingerprints @@ -511,3 +511,9 @@ /atom/proc/AllowDrop() return FALSE + +/atom/proc/get_nametag_name(mob/user) + return name + +/atom/proc/get_nametag_desc(mob/user) + return "" //Desc itself is often too long to use diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0cd09b8a576..5311d642a27 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1,5 +1,5 @@ /atom/movable - layer = 3 + layer = OBJ_LAYER appearance_flags = TILE_BOUND|PIXEL_SCALE var/last_move = null var/anchored = 0 diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index ab8111000d1..0da6c3c3d56 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -33,7 +33,7 @@ H.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above. H.restore_blood() H.mutations.Remove(HUSK) - H.status_flags -= DISFIGURED + H.status_flags &= ~DISFIGURED H.update_icons_body() for(var/limb in H.organs_by_name) var/obj/item/organ/external/current_limb = H.organs_by_name[limb] diff --git a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm index fb4888ee205..2c47b8e1624 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/portal.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/portal.dm @@ -10,7 +10,7 @@ announce=0 cause_hell=0 - layer=LIGHTING_LAYER+2 // ITS SO BRIGHT + plane = PLANE_LIGHTING_ABOVE // ITS SO BRIGHT consume_range = 6 @@ -79,7 +79,8 @@ var/turf/T_mob = get_turf(src) if((R.z == T_mob.z) && (get_dist(R,T_mob) <= (R.consume_range+10)) && !(R in view(T_mob))) if(!riftimage) - riftimage = image('icons/obj/rift.dmi',T_mob,"rift",LIGHTING_LAYER+2,1) + riftimage = image('icons/obj/rift.dmi',T_mob,"rift",1,1) + riftimage.plane = PLANE_LIGHTING_ABOVE riftimage.mouse_opacity = 0 var/new_x = 32 * (R.x - T_mob.x) + R.pixel_x diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 9db29ebd85b..d40330ca485 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -400,7 +400,8 @@ var/global/datum/controller/occupations/job_master job.equip_backpack(H) // job.equip_survival(H) job.apply_fingerprints(H) - H.equip_post_job() + if(job.title != "Cyborg" && job.title != "AI") + H.equip_post_job() //If some custom items could not be equipped before, try again now. for(var/thing in custom_equip_leftovers) diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index c59c67c3001..b34d1565a03 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -4,7 +4,7 @@ name = "Bluespace Gigabeacon" desc = "A device that draws power from bluespace and creates a permanent tracking beacon." level = 1 // underfloor - layer = 2.5 + layer = UNDER_JUNK_LAYER anchored = 1 use_power = 1 idle_power_usage = 0 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 2d80766ea66..c3251ce1555 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -343,7 +343,7 @@ organStatus["destroyed"] = 1 if(E.status & ORGAN_BROKEN) organStatus["broken"] = E.broken_description - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) organStatus["robotic"] = 1 if(E.splinted) organStatus["splinted"] = 1 @@ -512,7 +512,7 @@ bled = "Bleeding:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" - if(e.status & ORGAN_ROBOT) + if(e.robotic >= ORGAN_ROBOT) robot = "Prosthetic:" if(e.status & ORGAN_DEAD) o_dead = "Necrotic:" diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 0ea5527df21..dd79d5acc19 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -2,7 +2,6 @@ name = "\improper AI Liquid Dispenser" icon = 'icons/obj/device.dmi' icon_state = "motion0" - layer = 3 anchored = 1.0 use_power = 1 idle_power_usage = 10 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 769dd9c39fb..70d8864e2dc 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -6,7 +6,8 @@ use_power = 2 idle_power_usage = 5 active_power_usage = 10 - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER var/list/network = list(NETWORK_DEFAULT) var/c_tag = null diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index 4bcc43bbecf..e76f4db4683 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -40,6 +40,7 @@
\nRequest items

View approved orders

View requests

+ \nView export report

Close"} user << browse(dat, "window=computer;size=575x450") @@ -198,6 +199,7 @@ \nOrder items
\n
\nView requests
\n
\nView orders
\n
+ \nView export report
\n
\nClose"} @@ -367,6 +369,18 @@ temp += "
Clear list" temp += "
OK" + else if (href_list["viewexport"]) + temp = "Previous shuttle export report:

" + var/cratecount = 0 + var/totalvalue = 0 + for(var/S in supply_controller.exported_crates) + var/datum/exported_crate/EC = S + cratecount += 1 + totalvalue += EC.value + temp += "[EC.name] exported for [EC.value] supply points
" + temp += "
Shipment of [cratecount] crates exported for [totalvalue] supply points.
" + temp += "
OK" + else if (href_list["rreq"]) var/ordernum = text2num(href_list["rreq"]) temp = "Invalid Request.
" diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index e1e70ca3a7c..cbfa8686bce 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -3,7 +3,6 @@ desc = "A generic vending machine." icon = 'icons/obj/vending.dmi' icon_state = "robotics" - layer = 2.9 anchored = 1 density = 1 var/obj/machinery/computer3/laptop/vended/newlap = null diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6709cb23635..f7ab7e7a7ec 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -6,13 +6,15 @@ icon_state = "pod_preview" density = 1 anchored = 1.0 - layer = 2.8 + layer = UNDER_JUNK_LAYER interact_offline = 1 var/on = 0 use_power = 1 idle_power_usage = 20 active_power_usage = 200 + buckle_lying = FALSE + buckle_dir = SOUTH var/temperature_archived var/mob/living/carbon/occupant = null @@ -20,12 +22,29 @@ var/current_heat_capacity = 50 + var/image/fluid + /obj/machinery/atmospherics/unary/cryo_cell/New() ..() icon = 'icons/obj/cryogenics_split.dmi' - update_icon() + icon_state = "base" initialize_directions = dir +/obj/machinery/atmospherics/unary/cryo_cell/initialize() + . = ..() + var/image/tank = image(icon,"tank") + tank.alpha = 200 + tank.pixel_y = 18 + tank.plane = MOB_PLANE + tank.layer = MOB_LAYER+0.2 //Above fluid + fluid = image(icon, "tube_filler") + fluid.pixel_y = 18 + fluid.alpha = 200 + fluid.plane = MOB_PLANE + fluid.layer = MOB_LAYER+0.1 //Below glass, above mob + add_overlay(tank) + update_icon() + /obj/machinery/atmospherics/unary/cryo_cell/Destroy() var/turf/T = src.loc T.contents += contents @@ -153,6 +172,7 @@ if(beaker) beaker.loc = get_step(src.loc, SOUTH) beaker = null + update_icon() if(href_list["ejectOccupant"]) if(!occupant || isslime(usr) || ispAI(usr)) @@ -172,6 +192,7 @@ user.drop_item() G.loc = src user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") + update_icon() else if(istype(G, /obj/item/weapon/grab)) var/obj/item/weapon/grab/grab = G if(!ismob(grab.affecting)) @@ -191,40 +212,23 @@ put_mob(target) /obj/machinery/atmospherics/unary/cryo_cell/update_icon() - overlays.Cut() - icon_state = "pod[on]" - var/image/I - - I = image(icon, "pod[on]_top") - I.layer = 5 // this needs to be fairly high so it displays over most things, but it needs to be under lighting (at 10) - I.pixel_z = 32 - overlays += I - - if(occupant) - var/image/pickle = image(occupant.icon, occupant.icon_state) - pickle.overlays = occupant.overlays - pickle.pixel_z = 18 - pickle.layer = 5 - overlays += pickle - - I = image(icon, "lid[on]") - I.layer = 5 - overlays += I - - I = image(icon, "lid[on]_top") - I.layer = 5 - I.pixel_z = 32 - overlays += I + cut_overlay(fluid) + fluid.color = null + if(on) + if(beaker) + fluid.color = beaker.reagents.get_color() + add_overlay(fluid) /obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant() if(air_contents.total_moles < 10) return if(occupant) - if(occupant.stat == 2) + if(occupant.stat >= DEAD) return occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature)*current_heat_capacity/(current_heat_capacity + air_contents.heat_capacity()) occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise - occupant.stat = 1 + occupant.stat = UNCONSCIOUS + occupant.dir = SOUTH if(occupant.bodytemperature < T0C) occupant.sleeping = max(5, (1/occupant.bodytemperature)*2000) occupant.Paralyse(max(5, (1/occupant.bodytemperature)*3000)) @@ -273,14 +277,16 @@ if(occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE + vis_contents -= occupant + occupant.pixel_x = occupant.default_pixel_x + occupant.pixel_y = occupant.default_pixel_y occupant.loc = get_step(src.loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem. if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug. -// occupant.metabslow = 0 + unbuckle_mob(occupant, force = TRUE) occupant = null current_heat_capacity = initial(current_heat_capacity) update_use_power(1) - update_icon() return /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob) if(stat & (NOPOWER|BROKEN)) @@ -307,6 +313,9 @@ if(M.health > -100 && (M.health < 0 || M.sleeping)) M << "You feel a cold liquid surround you. Your skin starts to freeze up." occupant = M + buckle_mob(occupant, forced = TRUE, check_loc = FALSE) + vis_contents |= occupant + occupant.pixel_y += 19 current_heat_capacity = HEAT_CAPACITY_HUMAN update_use_power(2) // M.metabslow = 1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 89042fb5e18..5d6d7abdcc2 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -27,6 +27,13 @@ var/storage_name = "Cryogenic Oversight Control" var/allow_items = 1 +/obj/machinery/computer/cryopod/update_icon() + ..() + if((stat & NOPOWER) || (stat & BROKEN)) + icon_state = "[initial(icon_state)]-p" + else + icon_state = initial(icon_state) + /obj/machinery/computer/cryopod/robot name = "robotic storage console" desc = "An interface between crew and the robotic storage systems" @@ -41,8 +48,6 @@ /obj/machinery/computer/cryopod/dorms name = "residential oversight console" desc = "An interface between visitors and the residential oversight systems tasked with keeping track of all visitors in the deeper section of the colony." - icon = 'icons/obj/robot_storage.dmi' //placeholder - icon_state = "console" //placeholder circuit = "/obj/item/weapon/circuitboard/robotstoragecontrol" storage_type = "visitors" @@ -52,8 +57,6 @@ /obj/machinery/computer/cryopod/travel name = "docking oversight console" desc = "An interface between visitors and the docking oversight systems tasked with keeping track of all visitors who enter or exit from the docks." - icon = 'icons/obj/robot_storage.dmi' //placeholder - icon_state = "console" //placeholder circuit = "/obj/item/weapon/circuitboard/robotstoragecontrol" storage_type = "visitors" @@ -63,8 +66,6 @@ /obj/machinery/computer/cryopod/gateway name = "gateway oversight console" desc = "An interface between visitors and the gateway oversight systems tasked with keeping track of all visitors who enter or exit from the gateway." - icon = 'icons/obj/robot_storage.dmi' //placeholder - icon_state = "console" //placeholder circuit = "/obj/item/weapon/circuitboard/robotstoragecontrol" storage_type = "visitors" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 3179e7c2d1b..2d40396d917 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -415,6 +415,8 @@ desc = "It's an extra resilient airlock intended for spacefaring vessels." icon = 'icons/obj/doors/shuttledoors.dmi' explosion_resistance = 20 + opacity = 0 + glass = 1 assembly_type = /obj/structure/door_assembly/door_assembly_voidcraft // Airlock opens from top-bottom instead of left-right. diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 215238a80b9..39a91b8aff4 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -4,7 +4,7 @@ desc = "Small wall-mounted holographic projector" icon = 'icons/obj/holosign.dmi' icon_state = "sign_off" - layer = 4 + plane = MOB_PLANE use_power = 1 idle_power_usage = 2 active_power_usage = 4 diff --git a/code/game/machinery/kitchen/cooking_machines/fryer.dm b/code/game/machinery/kitchen/cooking_machines/fryer.dm index 7e5cc055e85..451f84c2ff9 100644 --- a/code/game/machinery/kitchen/cooking_machines/fryer.dm +++ b/code/game/machinery/kitchen/cooking_machines/fryer.dm @@ -36,7 +36,7 @@ if(H.species.flags & NO_PAIN) nopain = 2 E = H.get_organ(user.zone_sel.selecting) - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) nopain = 1 user.visible_message("\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!") @@ -45,7 +45,7 @@ E.take_damage(0, rand(20,30)) if(E.children && E.children.len) for(var/obj/item/organ/external/child in E.children) - if(nopain && nopain < 2 && !(child.status & ORGAN_ROBOT)) + if(nopain && nopain < 2 && !(child.robotic >= ORGAN_ROBOT)) nopain = 0 child.take_damage(0, rand(20,30)) else diff --git a/code/game/machinery/kitchen/icecream.dm b/code/game/machinery/kitchen/icecream.dm index fab6319e260..09cb3289ed1 100644 --- a/code/game/machinery/kitchen/icecream.dm +++ b/code/game/machinery/kitchen/icecream.dm @@ -172,7 +172,6 @@ name = "ice cream cone" desc = "Delicious waffle cone, but no ice cream." icon_state = "icecream_cone_waffle" //default for admin-spawned cones, href_list["cone"] should overwrite this all the time - layer = 3.1 bitesize = 3 var/ice_creamed = 0 diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index fa81ff16203..3da253e6827 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -2,7 +2,6 @@ name = "microwave" icon = 'icons/obj/kitchen.dmi' icon_state = "mw" - layer = 2.9 density = 1 anchored = 1 use_power = 1 diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index a2f5c00ad12..b2c3d21b689 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -4,7 +4,6 @@ name = "\improper SmartFridge" icon = 'icons/obj/vending.dmi' icon_state = "smartfridge" - layer = 2.9 density = 1 anchored = 1 use_power = 1 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 673e3663132..874f8876b97 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -97,6 +97,7 @@ Class Procs: name = "machinery" icon = 'icons/obj/stationobjs.dmi' w_class = ITEMSIZE_NO_CONTAINER + layer = UNDER_JUNK_LAYER var/stat = 0 var/emagged = 0 diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index af61e934246..8022235736a 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -9,8 +9,7 @@ icon_state = "floor_magnet-f" name = "Electromagnetic Generator" desc = "A device that uses station power to create points of magnetic energy." - level = 1 // underfloor - layer = 2.5 + plane = PLATING_PLANE anchored = 1 use_power = 1 idle_power_usage = 50 diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index ac0af163786..7e472c8ecab 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -8,8 +8,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w icon_state = "navbeacon0-f" name = "navigation beacon" desc = "A beacon used for bot navigation." - level = 1 // underfloor - layer = 2.5 + plane = PLATING_PLANE anchored = 1 var/open = 0 // true if cover is open var/locked = 1 // true if controls are locked diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index 48bd028c09f..0ec65cc30db 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -168,7 +168,7 @@ qdel(I) qdel(J) H.icon = HI - H.layer = 25 + H.hud_layerise() usr.mapobjs += H #else @@ -287,7 +287,7 @@ H.icon = I qdel(I) - H.layer = 25 + H.hud_layerise() usr.mapobjs += H #endif diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index d4d3cedb476..692e76bf5a4 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -115,7 +115,7 @@ H.adjustBrainLoss(-(rand(1,3))) // Also recharge their internal battery. - if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450) + if(H.isSynthetic() && H.nutrition < 450) H.nutrition = min(H.nutrition+10, 450) cell.use(7000/450*10) @@ -254,7 +254,7 @@ else if(istype(L, /mob/living/carbon/human)) var/mob/living/carbon/human/H = L - if(!isnull(H.internal_organs_by_name["cell"])) + if(H.isSynthetic()) add_fingerprint(H) H.reset_view(src) H.forceMove(src) @@ -264,17 +264,6 @@ else return -/obj/machinery/recharge_station/proc/hascell(var/mob/M) - if(isrobot(M)) - var/mob/living/silicon/robot/R = M - if(R.cell) - return 1 - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!isnull(H.internal_organs_by_name["cell"])) - return 1 - return 0 - /obj/machinery/recharge_station/proc/go_out() if(!occupant) return @@ -289,7 +278,7 @@ set name = "Eject Recharger" set src in oview(1) - if(usr.incapacitated()) + if(usr.incapacitated() || !isliving(usr)) return go_out() @@ -301,8 +290,9 @@ set name = "Enter Recharger" set src in oview(1) - if(!usr.incapacitated()) + if(usr.incapacitated() || !isliving(usr)) return + go_in(usr) /obj/machinery/recharge_station/ghost_pod_recharger diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 4b452295940..939b4da1d04 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -6,7 +6,6 @@ desc = "A generic vending machine." icon = 'icons/obj/vending.dmi' icon_state = "generic" - layer = 2.9 anchored = 1 density = 1 diff --git a/code/game/mecha/combat/gorilla.dm b/code/game/mecha/combat/gorilla.dm index b6f19156672..cc5dacebc37 100644 --- a/code/game/mecha/combat/gorilla.dm +++ b/code/game/mecha/combat/gorilla.dm @@ -51,7 +51,7 @@ desc = "... Blitzkrieg?" icon = 'icons/mecha/mecha64x64.dmi' icon_state = "pzrwreck" - layer = 4 // so it overlaps other people + plane = MOB_PLANE pixel_x = -16 anchored = 1 // It's fucking huge. You aren't moving it. diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 55255d20974..5584590f920 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -52,22 +52,21 @@ if(charging.loc != src.loc) // Could be qdel or teleport or something stop_charging() return - var/done = 1 - if(charging.cell) + var/done = FALSE + if(charging.cell) var/t = min(charge, charging.cell.maxcharge - charging.cell.charge) if(t > 0) charging.give_power(t) use_power(t * 150) - done = 0 else charging.occupant_message("Fully charged.") + done = TRUE if(repair && charging.health < initial(charging.health)) charging.health = min(charging.health + repair, initial(charging.health)) if(charging.health == initial(charging.health)) charging.occupant_message("Fully repaired.") - else - done = 0 + done = FALSE if(done) stop_charging() return diff --git a/code/game/mecha/mech_sensor.dm b/code/game/mecha/mech_sensor.dm index 87a9863ee8c..5173f182cea 100644 --- a/code/game/mecha/mech_sensor.dm +++ b/code/game/mecha/mech_sensor.dm @@ -7,7 +7,7 @@ density = 1 throwpass = 1 use_power = 1 - layer = 3.3 + layer = ON_WINDOW_LAYER power_channel = EQUIP var/on = 0 var/id_tag = null diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 2c864f0a56c..7a79c21e1ef 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -147,7 +147,8 @@ anchored = 1 density = 0 - layer = 2 + plane = TURF_PLANE + layer = ABOVE_TURF_LAYER var/health = 15 var/obj/effect/alien/weeds/node/linked_node = null @@ -155,7 +156,7 @@ icon_state = "weednode" name = "purple sac" desc = "Weird purple octopus-like thing." - layer = 3 + layer = ABOVE_TURF_LAYER+0.01 light_range = NODERANGE var/node_range = NODERANGE diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm index be7e759a636..436ebabcc92 100644 --- a/code/game/objects/effects/chem/chemsmoke.dm +++ b/code/game/objects/effects/chem/chemsmoke.dm @@ -161,7 +161,7 @@ if(chemholder.reagents.reagent_list.len) chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents smoke.icon = I - smoke.layer = 6 + smoke.plane = ABOVE_PLANE smoke.set_dir(pick(cardinal)) smoke.pixel_x = -32 + rand(-8, 8) smoke.pixel_y = -32 + rand(-8, 8) diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm index c04540535bc..b69226815e2 100644 --- a/code/game/objects/effects/decals/Cleanable/fuel.dm +++ b/code/game/objects/effects/decals/Cleanable/fuel.dm @@ -2,7 +2,7 @@ //Liquid fuel is used for things that used to rely on volatile fuels or phoron being contained to a couple tiles. icon = 'icons/effects/effects.dmi' icon_state = "fuel" - layer = TURF_LAYER+0.2 + plane = DIRTY_PLANE anchored = 1 var/amount = 1 diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 46b9d3645c8..90f708ff9df 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -10,7 +10,7 @@ var/global/list/image/splatter_cache=list() gender = PLURAL density = 0 anchored = 1 - layer = 2 + plane = BLOOD_PLANE icon = 'icons/effects/blood.dmi' icon_state = "mfloor1" random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7") @@ -179,7 +179,6 @@ var/global/list/image/splatter_cache=list() gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/blood.dmi' icon_state = "gibbl5" random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6") @@ -236,7 +235,6 @@ var/global/list/image/splatter_cache=list() gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/blood.dmi' icon_state = "mucus" random_icon_states = list("mucus") diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index ab01bfa0050..1ef83bc7223 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -4,7 +4,6 @@ gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/obj/objects.dmi' icon_state = "shards" @@ -36,7 +35,6 @@ gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/effects.dmi' icon_state = "dirt" mouse_opacity = 0 @@ -47,7 +45,6 @@ gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/effects.dmi' icon_state = "flour" @@ -57,7 +54,6 @@ gender = PLURAL density = 0 anchored = 1 - layer = 2 light_range = 1 icon = 'icons/effects/effects.dmi' icon_state = "greenglow" @@ -67,7 +63,7 @@ desc = "Somebody should remove that." density = 0 anchored = 1 - layer = 3 + plane = OBJ_PLANE icon = 'icons/effects/effects.dmi' icon_state = "cobweb1" @@ -76,7 +72,7 @@ desc = "It looks like a melted... something." density = 0 anchored = 1 - layer = 3 + plane = OBJ_PLANE icon = 'icons/obj/chemical.dmi' icon_state = "molten" @@ -85,7 +81,7 @@ desc = "Somebody should remove that." density = 0 anchored = 1 - layer = 3 + plane = OBJ_PLANE icon = 'icons/effects/effects.dmi' icon_state = "cobweb2" @@ -96,7 +92,6 @@ gender = PLURAL density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/blood.dmi' icon_state = "vomit_1" random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4") @@ -107,7 +102,6 @@ desc = "It's red." density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/tomatodecal.dmi' random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3") @@ -116,7 +110,6 @@ desc = "Seems like this one won't hatch." density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/tomatodecal.dmi' random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3") @@ -125,7 +118,6 @@ desc = "It's pie cream from a cream pie." density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/tomatodecal.dmi' random_icon_states = list("smashed_pie") @@ -134,7 +126,6 @@ desc = "Some kind of fruit smear." density = 0 anchored = 1 - layer = 2 icon = 'icons/effects/blood.dmi' icon_state = "mfloor1" random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7") diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 2db1e5e9486..f7965e092d0 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -1,4 +1,5 @@ /obj/effect/decal/cleanable + plane = DIRTY_PLANE var/list/random_icon_states = list() /obj/effect/decal/cleanable/clean_blood(var/ignore = 0) diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 20047ced124..55bb54b8036 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -2,7 +2,7 @@ name = "rune" desc = "A rune drawn in crayon." icon = 'icons/obj/rune.dmi' - layer = 2.1 + plane = DIRTY_PLANE anchored = 1 New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune") diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 964a1301b89..f3a75ce3c28 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -3,7 +3,7 @@ desc = "It's an arrow hanging in mid-air. There may be a wizard about." icon = 'icons/mob/screen1.dmi' icon_state = "arrow" - layer = 16.0 + plane = ABOVE_PLANE anchored = 1 mouse_opacity = 0 @@ -11,4 +11,4 @@ /obj/effect/decal/spraystill density = 0 anchored = 1 - layer = 50 \ No newline at end of file + plane = ABOVE_PLANE \ No newline at end of file diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm index e22acfad74e..db7c4bf74f1 100644 --- a/code/game/objects/effects/decals/warning_stripes.dm +++ b/code/game/objects/effects/decals/warning_stripes.dm @@ -1,6 +1,5 @@ /obj/effect/decal/warning_stripes icon = 'icons/effects/warning_stripes.dmi' - layer = 2 /obj/effect/decal/warning_stripes/New() . = ..() diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index 349400226a1..aaebab43550 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -26,7 +26,8 @@ desc = "Something swinging really wide." icon = 'icons/effects/96x96.dmi' icon_state = "cleave" - layer = 6 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER time_to_die = 6 alpha = 140 mouse_opacity = 0 diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index d6dea13c511..9f4f0fa1185 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -17,7 +17,8 @@ icon = 'icons/misc/beach2.dmi' icon_state = "palm1" density = 1 - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER anchored = 1 /obj/effect/overlay/palmtree_l @@ -25,7 +26,8 @@ icon = 'icons/misc/beach2.dmi' icon_state = "palm2" density = 1 - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER anchored = 1 /obj/effect/overlay/coconut @@ -37,7 +39,7 @@ name = "Bluespace" icon = 'icons/turf/space.dmi' icon_state = "bluespacify" - layer = 10 + plane = ABOVE_PLANE /obj/effect/overlay/wallrot name = "wallrot" @@ -45,7 +47,8 @@ icon = 'icons/effects/wallrot.dmi' anchored = 1 density = 1 - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER mouse_opacity = 0 /obj/effect/overlay/wallrot/New() @@ -70,7 +73,8 @@ /obj/effect/overlay/snow/floor icon_state = "snowfloor" - layer = 2.01 //Just above floor + plane = TURF_PLANE + layer = ABOVE_TURF_LAYER mouse_opacity = 0 //Don't block underlying tile interactions /obj/effect/overlay/snow/floor/edges @@ -81,11 +85,12 @@ /obj/effect/overlay/snow/airlock icon_state = "snowairlock" - layer = 3.2 //Just above airlocks + layer = DOOR_CLOSED_LAYER+0.01 /obj/effect/overlay/snow/floor/pointy icon_state = "snowfloorpointy" /obj/effect/overlay/snow/wall icon_state = "snowwall" - layer = 5 //Same as lights so humans can stand under it + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index a26c1169d5f..d3b9853e063 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -123,7 +123,7 @@ desc = "It never stays still for long." icon_state = "spiderling" anchored = 0 - layer = 2.7 + layer = HIDING_LAYER health = 3 var/last_itch = 0 var/amount_grown = -1 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b5122f29ae6..748a203cc4d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -727,14 +727,16 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. return icon_override //2: species-specific sprite sheets (skipped for inhands) - var/sheet = sprite_sheets[body_type] - if(sheet && !inhands) - return sheet + if(LAZYLEN(sprite_sheets)) + var/sheet = sprite_sheets[body_type] + if(sheet && !inhands) + return sheet //3: slot-specific sprite sheets - sheet = item_icons[slot_name] - if(sheet) - return sheet + if(LAZYLEN(item_icons)) + var/sheet = item_icons[slot_name] + if(sheet) + return sheet //4: item's default icon if(default_worn_icon) @@ -751,9 +753,10 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. /obj/item/proc/get_worn_icon_state(var/slot_name) //1: slot-specific sprite sheets - var/state = item_state_slots[slot_name] - if(state) - return state + if(LAZYLEN(item_state_slots)) + var/state = item_state_slots[slot_name] + if(state) + return state //2: item_state variable if(item_state) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 31bb9160f83..2ad51ca887a 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -46,11 +46,11 @@ if(colour != "#FFFFFF" && shadeColour != "#000000") colour = "#FFFFFF" shadeColour = "#000000" - user << "You will now draw in white and black with this crayon." + to_chat(usr,"You will now draw in white and black with this crayon.") else colour = "#000000" shadeColour = "#FFFFFF" - user << "You will now draw in black and white with this crayon." + to_chat(usr,"You will now draw in black and white with this crayon.") return /obj/item/weapon/pen/crayon/rainbow @@ -72,22 +72,22 @@ switch(drawtype) if("letter") drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z") - user << "You start drawing a letter on the [target.name]." + to_chat(usr,"You start drawing a letter on the [target.name].") if("graffiti") - user << "You start drawing graffiti on the [target.name]." + to_chat(usr,"You start drawing graffiti on the [target.name].") if("rune") - user << "You start drawing a rune on the [target.name]." + to_chat(usr,"You start drawing a rune on the [target.name].") if("arrow") drawtype = input("Choose the arrow.", "Crayon scribbles") in list("left", "right", "up", "down") - user << "You start drawing an arrow on the [target.name]." + to_chat(usr,"You start drawing an arrow on the [target.name].") if(instant || do_after(user, 50)) new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype) - user << "You finish drawing." + to_chat(usr,"You finish drawing.") target.add_fingerprint(user) // Adds their fingerprints to the floor the crayon is drawn on. if(uses) uses-- if(!uses) - user << "You used up your crayon!" + to_chat(usr,"You used up your crayon!") qdel(src) return @@ -99,7 +99,93 @@ if(uses) uses -= 5 if(uses <= 0) - user << "You ate your crayon!" + to_chat(user,"You ate your crayon!") qdel(src) else ..() + +/obj/item/weapon/pen/crayon/marker/black + icon_state = "markerblack" + colour = "#2D2D2D" + shadeColour = "#000000" + colourName = "black" + +/obj/item/weapon/pen/crayon/marker/red + icon_state = "markerred" + colour = "#DA0000" + shadeColour = "#810C0C" + colourName = "red" + +/obj/item/weapon/pen/crayon/marker/orange + icon_state = "markerorange" + colour = "#FF9300" + shadeColour = "#A55403" + colourName = "orange" + +/obj/item/weapon/pen/crayon/marker/yellow + icon_state = "markeryellow" + colour = "#FFF200" + shadeColour = "#886422" + colourName = "yellow" + +/obj/item/weapon/pen/crayon/marker/green + icon_state = "markergreen" + colour = "#A8E61D" + shadeColour = "#61840F" + colourName = "green" + +/obj/item/weapon/pen/crayon/marker/blue + icon_state = "markerblue" + colour = "#00B7EF" + shadeColour = "#0082A8" + colourName = "blue" + +/obj/item/weapon/pen/crayon/marker/purple + icon_state = "markerpurple" + colour = "#DA00FF" + shadeColour = "#810CFF" + colourName = "purple" + +/obj/item/weapon/pen/crayon/marker/mime + icon_state = "markermime" + desc = "A very sad-looking marker." + colour = "#FFFFFF" + shadeColour = "#000000" + colourName = "mime" + uses = 0 + +/obj/item/weapon/pen/crayon/marker/mime/attack_self(mob/living/user as mob) //inversion + if(colour != "#FFFFFF" && shadeColour != "#000000") + colour = "#FFFFFF" + shadeColour = "#000000" + to_chat(usr,"You will now draw in white and black with this marker.") + else + colour = "#000000" + shadeColour = "#FFFFFF" + to_chat(usr,"You will now draw in black and white with this marker.") + return + +/obj/item/weapon/pen/crayon/marker/rainbow + icon_state = "markerrainbow" + colour = "#FFF000" + shadeColour = "#000FFF" + colourName = "rainbow" + uses = 0 + +/obj/item/weapon/pen/crayon/marker/rainbow/attack_self(mob/living/user as mob) + colour = input(user, "Please select the main colour.", "Marker colour") as color + shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color + return + +/obj/item/weapon/pen/crayon/marker/attack(mob/M as mob, mob/user as mob) + if(M == user) + to_chat(usr,"You take a bite of the marker and swallow it.") + user.nutrition += 1 + user.reagents.add_reagent("marker_ink",6) + if(uses) + uses -= 5 + if(uses <= 0) + to_chat(user,"You ate the marker!") + qdel(src) + else + ..() \ No newline at end of file diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index cbdae90c903..f2d3fd39b6f 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -134,11 +134,7 @@ if(href_list["rename"]) var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) ) if(new_name) - owner = new_name - name = "[owner]'s [initial(name)]" - if(camera) - camera.name = name - camera.c_tag = name + register_device(new_name) if(href_list["toggle_visibility"]) switch(network_visibility) diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index f809bcb9b2d..7342988916b 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -75,12 +75,12 @@ var/global/list/obj/item/device/communicator/all_communicators = list() //This is a pretty terrible way of doing this. spawn(5 SECONDS) //Wait for our mob to finish spawning. if(ismob(loc)) - register_device(loc) + register_device(loc.name) initialize_exonet(loc) else if(istype(loc, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = loc if(ismob(S.loc)) - register_device(S.loc) + register_device(S.loc.name) initialize_exonet(S.loc) // Proc: examine() @@ -268,12 +268,12 @@ var/global/list/obj/item/device/communicator/all_communicators = list() // Proc: register_device() // Parameters: 1 (user - the person to use their name for) // Description: Updates the owner's name and the device's name. -/obj/item/device/communicator/proc/register_device(mob/user) - if(!user) +/obj/item/device/communicator/proc/register_device(new_name) + if(!new_name) return - owner = user.name + owner = new_name - name = "[owner]'s [initial(name)]" + name = "[new_name]'s [initial(name)]" if(camera) camera.name = name camera.c_tag = name diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index f1c9aa2d145..e24a727b99b 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -104,7 +104,6 @@ bmark.pixel_x = p_x bmark.pixel_y = p_y bmark.icon = 'icons/effects/effects.dmi' - bmark.layer = 3.5 bmark.icon_state = "scorch" if(decaltype == 1) diff --git a/code/game/objects/items/weapons/id cards/cards.dm b/code/game/objects/items/weapons/id cards/cards.dm index b5654dade7a..d0b2534463c 100644 --- a/code/game/objects/items/weapons/id cards/cards.dm +++ b/code/game/objects/items/weapons/id cards/cards.dm @@ -46,7 +46,6 @@ name = "\proper the coordinates to clown planet" icon_state = "data" item_state = "card-id" - layer = 3 level = 2 desc = "This card contains coordinates to the fabled Clown Planet. Handle with care." function = "teleporter" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 53a6de95644..3e656b844b5 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -71,7 +71,7 @@ /obj/item/weapon/implant/tracking name = "tracking implant" - desc = "Track with this." + desc = "An implant normally given to dangerous criminals. Allows security to track your location." var/id = 1 var/degrade_time = 10 MINUTES //How long before the implant stops working outside of a living body. diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index 3bb0c89bdc4..43183d45f44 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -30,7 +30,7 @@ var/list/tape_roll_applications = list() name = "tape" icon = 'icons/policetape.dmi' anchored = 1 - layer = 3.2 + layer = WINDOW_LAYER var/lifted = 0 var/crumpled = 0 var/tape_dir = 0 @@ -257,7 +257,7 @@ var/list/tape_roll_applications = list() else var/obj/item/tape/P = new tape_type(T) P.update_icon() - P.layer = 3.2 + P.layer = WINDOW_LAYER user << "You finish placing \the [src]." if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor)) @@ -307,10 +307,11 @@ var/list/tape_roll_applications = list() /obj/item/tape/proc/lift(time) lifted = 1 - layer = 8 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER spawn(time) lifted = 0 - layer = initial(layer) + reset_plane_and_layer() // Returns a list of all tape objects connected to src, including itself. /obj/item/tape/proc/gettapeline() diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 48593c7b21c..e4482932b1b 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -373,7 +373,9 @@ /obj/item/weapon/storage/excavation, /obj/item/weapon/anobattery, /obj/item/device/ano_scanner, - /obj/item/weapon/pickaxe/hand + /obj/item/weapon/pickaxe/hand, + /obj/item/device/xenoarch_multi_tool, + /obj/item/weapon/pickaxe/excavationdrill ) /obj/item/weapon/storage/belt/fannypack diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index c390cb0abd9..762720e390c 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -114,6 +114,48 @@ return ..() +/obj/item/weapon/storage/fancy/markers + name = "box of markers" + desc = "A very professional looking box of permanent markers." + icon = 'icons/obj/crayons.dmi' + icon_state = "markerbox" + w_class = ITEMSIZE_SMALL + icon_type = "marker" + can_hold = list( + /obj/item/weapon/pen/crayon/marker + ) + starts_with = list( + /obj/item/weapon/pen/crayon/marker/black, + /obj/item/weapon/pen/crayon/marker/red, + /obj/item/weapon/pen/crayon/marker/orange, + /obj/item/weapon/pen/crayon/marker/yellow, + /obj/item/weapon/pen/crayon/marker/green, + /obj/item/weapon/pen/crayon/marker/blue, + /obj/item/weapon/pen/crayon/marker/purple + ) + +/obj/item/weapon/storage/fancy/markers/initialize() + . = ..() + update_icon() + +/obj/item/weapon/storage/fancy/markers/update_icon() + var/mutable_appearance/ma = new(src) + ma.overlays = list() + for(var/obj/item/weapon/pen/crayon/marker/marker in contents) + ma.overlays += image('icons/obj/crayons.dmi',"m"+marker.colourName) + appearance = ma + +/obj/item/weapon/storage/fancy/markers/attackby(obj/item/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/pen/crayon/marker)) + switch(W:colourName) + if("mime") + to_chat(usr,"This marker is too depressing to be contained in this box.") + return + if("rainbow") + to_chat(usr,"This marker is too childish to be contained in this box.") + return + ..() + //////////// //CIG PACK// //////////// @@ -259,7 +301,8 @@ icon_state = "paperbox" icon = 'icons/obj/cigarettes.dmi' w_class = ITEMSIZE_TINY - throwforce = 1 + throwforce = 2 + slot_flags = SLOT_BELT storage_slots = 14 can_hold = list(/obj/item/weapon/rollingpaper) starts_with = list(/obj/item/weapon/rollingpaper = 14) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 53e73a66e21..9c4a44d76d7 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -173,6 +173,43 @@ max_storage_space = ITEMSIZE_COST_TINY * 14 max_w_class = ITEMSIZE_TINY + var/label_text = "" + var/base_name = " " + var/base_desc = " " + +/obj/item/weapon/storage/pill_bottle/New() + ..() + base_name = name + base_desc = desc + +/obj/item/weapon/storage/pill_bottle/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen)) + var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN) + if(length(tmp_label) > 50) + to_chat(user, "The label can be at most 50 characters long.") + else if(length(tmp_label) > 10) + to_chat(user, "You set the label.") + label_text = tmp_label + update_name_label() + else + to_chat(user, "You set the label to \"[tmp_label]\".") + label_text = tmp_label + update_name_label() + else + ..() + +/obj/item/weapon/storage/pill_bottle/proc/update_name_label() + if(!label_text) + name = base_name + desc = base_desc + return + else if(length(label_text) > 10) + var/short_label_text = copytext(label_text, 1, 11) + name = "[base_name] ([short_label_text]...)" + else + name = "[base_name] ([label_text])" + desc = "[base_desc] It is labeled \"[label_text]\"." + /obj/item/weapon/storage/pill_bottle/antitox name = "bottle of Dylovene pills" desc = "Contains pills used to counter toxins." diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 30257a2b84b..83e944f5934 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -131,7 +131,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "tape" w_class = ITEMSIZE_TINY - layer = 4 + plane = MOB_PLANE anchored = 1 //it's sticky, no you cant move it var/obj/item/weapon/stuck = null diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index 68a2c3a774c..8d9977cc17f 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -188,7 +188,7 @@ carrying.Add(I) Img.icon = I.icon Img.icon_state = I.icon_state - Img.layer = 30 + I.layer + Img.layer = layer + I.layer*0.01 if(istype(I, /obj/item/weapon/material)) var/obj/item/weapon/material/O = I if(O.applies_material_colour) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 31d5189ddbe..3835b2a24bb 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -1,4 +1,6 @@ /obj + layer = OBJ_LAYER + plane = OBJ_PLANE //Used to store information about the contents of the object. var/list/matter var/w_class // Size of the object. diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 5c3542015c5..9b3d866d2bf 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -10,7 +10,8 @@ LINEN BINS icon = 'icons/obj/items.dmi' icon_state = "sheet" slot_flags = SLOT_BACK - layer = 4.0 + plane = MOB_PLANE + layer = BELOW_MOB_LAYER throwforce = 1 throw_speed = 1 throw_range = 2 @@ -19,9 +20,9 @@ LINEN BINS /obj/item/weapon/bedsheet/attack_self(mob/user as mob) user.drop_item() if(layer == initial(layer)) - layer = MOB_LAYER + 0.1 + layer = ABOVE_MOB_LAYER else - layer = initial(layer) + reset_plane_and_layer() add_fingerprint(user) return diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index a3ff9ac9afd..a22bbae0d25 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -2,7 +2,7 @@ icon_state = "girder" anchored = 1 density = 1 - layer = 2 + plane = PLATING_PLANE w_class = ITEMSIZE_HUGE var/state = 0 var/health = 200 diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index a10cd0bf6ea..e20591b9399 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -8,7 +8,7 @@ throwpass = 1 climbable = 1 - layer = 3.1 //Above dirt piles + layer = ABOVE_JUNK_LAYER //Maybe make these calculate based on material? var/health = 100 diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 6fea7e6ecee..ee809999163 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -7,7 +7,7 @@ anchored = 1 flags = CONDUCT pressure_resistance = 5*ONE_ATMOSPHERE - layer = 2.9 + layer = UNDER_JUNK_LAYER explosion_resistance = 1 var/health = 10 var/destroyed = 0 diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index c042b8fc9a6..d9ec122c555 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -6,7 +6,7 @@ density = 0 anchored = 1.0 w_class = ITEMSIZE_NORMAL - layer = 2.3 //under pipes + plane = PLATING_PLANE // flags = CONDUCT /obj/structure/lattice/initialize() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 732bb1b55de..d0324c98bf1 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -148,7 +148,7 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "morguet" density = 1 - layer = 2.0 + plane = TURF_PLANE var/obj/structure/morgue/connected = null anchored = 1 throwpass = 1 diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 27bb902aea8..e67750b8f30 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -6,7 +6,7 @@ density = 1 throwpass = 1 climbable = 1 - layer = 3.2 //Just above doors + layer = WINDOW_LAYER anchored = 1 flags = ON_BORDER icon_state = "railing0" diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 7f78e8f0e71..37edb603c1d 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -172,7 +172,8 @@ obj/structure/safe/ex_act(severity) icon_state = "floorsafe" density = 0 level = 1 //underfloor - layer = 2.5 + plane = TURF_PLANE + layer = ABOVE_UTILITY /obj/structure/safe/floor/initialize() . = ..() diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 1d68de0d25d..33c6d6501cb 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -3,7 +3,7 @@ anchored = 1 opacity = 0 density = 0 - layer = 3.5 + layer = ABOVE_JUNK_LAYER w_class = ITEMSIZE_NORMAL /obj/structure/sign/ex_act(severity) 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 ed9c4e0301a..390e3c84b9c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -47,15 +47,17 @@ if(isnull(stool_cache[cache_key])) var/image/I = image(icon, "[base_icon]_armrest") I.layer = MOB_LAYER + 0.1 + I.plane = MOB_PLANE I.color = padding_material.icon_colour stool_cache[cache_key] = I overlays |= stool_cache[cache_key] /obj/structure/bed/chair/proc/update_layer() if(src.dir == NORTH) - src.layer = FLY_LAYER + plane = MOB_PLANE + layer = MOB_LAYER + 0.1 else - src.layer = OBJ_LAYER + reset_plane_and_layer() /obj/structure/bed/chair/set_dir() ..() diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 83396b363e9..646e52218c1 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -29,7 +29,7 @@ W.density = 1 user.remove_from_mob(W) W.loc = loc - W.layer = 3.1 + W.layer = ABOVE_JUNK_LAYER pinned_target = W user << "You slide the target into the stake." return diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index 0f9b4a603a8..c260103a567 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -7,7 +7,7 @@ icon = 'icons/obj/pipes/transit_tube.dmi' icon_state = "E-W" density = 1 - layer = 3.1 + layer = ABOVE_JUNK_LAYER anchored = 1.0 var/list/tube_dirs = null var/exit_delay = 2 diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index eab6f203fc4..36da7485adb 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -5,7 +5,7 @@ density = 1 w_class = ITEMSIZE_NORMAL - layer = 3.2//Just above doors + layer = WINDOW_LAYER pressure_resistance = 4*ONE_ATMOSPHERE anchored = 1.0 flags = ON_BORDER @@ -462,7 +462,7 @@ if(ratio > 75) return - var/image/I = image(icon, "damage[ratio]", layer + 0.1) + var/image/I = image(icon, "damage[ratio]", layer = layer + 0.1) overlays += I return diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 2efac99edff..3cc0bb8ab9e 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -1,8 +1,8 @@ //Config stuff -#define SUPPLY_DOCKZ 2 //Z-level of the Dock. -#define SUPPLY_STATIONZ 1 //Z-level of the Station. -#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station -#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock +#define SUPPLY_DOCKZ 2 //Z-level of the Dock. +#define SUPPLY_STATIONZ 1 //Z-level of the Station. +#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station +#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock //Supply packs are in /code/defines/obj/supplypacks.dm //Computers are in /code/game/machinery/computer/supply.dm @@ -10,306 +10,324 @@ var/datum/controller/supply/supply_controller = new() var/list/mechtoys = list( - /obj/item/toy/prize/ripley, - /obj/item/toy/prize/fireripley, - /obj/item/toy/prize/deathripley, - /obj/item/toy/prize/gygax, - /obj/item/toy/prize/durand, - /obj/item/toy/prize/honk, - /obj/item/toy/prize/marauder, - /obj/item/toy/prize/seraph, - /obj/item/toy/prize/mauler, - /obj/item/toy/prize/odysseus, - /obj/item/toy/prize/phazon + /obj/item/toy/prize/ripley, + /obj/item/toy/prize/fireripley, + /obj/item/toy/prize/deathripley, + /obj/item/toy/prize/gygax, + /obj/item/toy/prize/durand, + /obj/item/toy/prize/honk, + /obj/item/toy/prize/marauder, + /obj/item/toy/prize/seraph, + /obj/item/toy/prize/mauler, + /obj/item/toy/prize/odysseus, + /obj/item/toy/prize/phazon ) /obj/item/weapon/paper/manifest - name = "supply manifest" - var/is_copy = 1 + name = "supply manifest" + var/is_copy = 1 /area/supply/station - name = "Supply Shuttle" - icon_state = "shuttle3" - requires_power = 0 - base_turf = /turf/space + name = "Supply Shuttle" + icon_state = "shuttle3" + requires_power = 0 + base_turf = /turf/space /area/supply/dock - name = "Supply Shuttle" - icon_state = "shuttle3" - requires_power = 0 - base_turf = /turf/space + name = "Supply Shuttle" + icon_state = "shuttle3" + requires_power = 0 + base_turf = /turf/space /obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY - name = "\improper plastic flaps" - desc = "Completely impassable - or are they?" - icon = 'icons/obj/stationobjs.dmi' //Change this. - icon_state = "plasticflaps" - density = 0 - anchored = 1 - layer = 4 - explosion_resistance = 5 - var/list/mobs_can_pass = list( - /mob/living/bot, - /mob/living/simple_animal/slime, - /mob/living/simple_animal/mouse, - /mob/living/silicon/robot/drone - ) + name = "\improper plastic flaps" + desc = "Completely impassable - or are they?" + icon = 'icons/obj/stationobjs.dmi' //Change this. + icon_state = "plasticflaps" + density = 0 + anchored = 1 + layer = MOB_LAYER + plane = MOB_PLANE + explosion_resistance = 5 + var/list/mobs_can_pass = list( + /mob/living/bot, + /mob/living/simple_animal/slime, + /mob/living/simple_animal/mouse, + /mob/living/silicon/robot/drone + ) /obj/structure/plasticflaps/attackby(obj/item/P, mob/user) - if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src, P.usesound, 50, 1) - user << "You start to cut the plastic flaps." - if(do_after(user, 10 * P.toolspeed)) - user << "You cut the plastic flaps." - var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc ) - A.amount = 4 - qdel(src) - return - else - return + if(istype(P, /obj/item/weapon/wirecutters)) + playsound(src, P.usesound, 50, 1) + user << "You start to cut the plastic flaps." + if(do_after(user, 10 * P.toolspeed)) + user << "You cut the plastic flaps." + var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc ) + A.amount = 4 + qdel(src) + return + else + return /obj/structure/plasticflaps/CanPass(atom/A, turf/T) - if(istype(A) && A.checkpass(PASSGLASS)) - return prob(60) + if(istype(A) && A.checkpass(PASSGLASS)) + return prob(60) - var/obj/structure/bed/B = A - if (istype(A, /obj/structure/bed) && B.has_buckled_mobs())//if it's a bed/chair and someone is buckled, it will not pass - return 0 + var/obj/structure/bed/B = A + if (istype(A, /obj/structure/bed) && B.has_buckled_mobs())//if it's a bed/chair and someone is buckled, it will not pass + return 0 - if(istype(A, /obj/vehicle)) //no vehicles - return 0 + if(istype(A, /obj/vehicle)) //no vehicles + return 0 - var/mob/living/M = A - if(istype(M)) - if(M.lying) - return ..() - for(var/mob_type in mobs_can_pass) - if(istype(A, mob_type)) - return ..() - return issmall(M) + var/mob/living/M = A + if(istype(M)) + if(M.lying) + return ..() + for(var/mob_type in mobs_can_pass) + if(istype(A, mob_type)) + return ..() + return issmall(M) - return ..() + return ..() /obj/structure/plasticflaps/ex_act(severity) - switch(severity) - if (1) - qdel(src) - if (2) - if (prob(50)) - qdel(src) - if (3) - if (prob(5)) - qdel(src) + switch(severity) + if (1) + qdel(src) + if (2) + if (prob(50)) + qdel(src) + if (3) + if (prob(5)) + qdel(src) /obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates - name = "airtight plastic flaps" - desc = "Heavy duty, airtight, plastic flaps." + name = "airtight plastic flaps" + desc = "Heavy duty, airtight, plastic flaps." - New() //set the turf below the flaps to block air - var/turf/T = get_turf(loc) - if(T) - T.blocks_air = 1 - ..() +/obj/structure/plasticflaps/mining/New() //set the turf below the flaps to block air + var/turf/T = get_turf(loc) + if(T) + T.blocks_air = 1 + ..() - Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor - var/turf/T = get_turf(loc) - if(T) - if(istype(T, /turf/simulated/floor)) - T.blocks_air = 0 - ..() +/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor + var/turf/T = get_turf(loc) + if(T && istype(T, /turf/simulated/floor)) + T.blocks_air = 0 + ..() /* /obj/effect/marker/supplymarker - icon_state = "X" - icon = 'icons/misc/mark.dmi' - name = "X" - invisibility = 101 - anchored = 1 - opacity = 0 + icon_state = "X" + icon = 'icons/misc/mark.dmi' + name = "X" + invisibility = 101 + anchored = 1 + opacity = 0 */ /datum/supply_order - var/ordernum - var/datum/supply_packs/object = null - var/orderedby = null - var/comment = null + var/ordernum + var/datum/supply_packs/object = null + var/orderedby = null + var/comment = null + +/datum/exported_crate + var/name + var/value /datum/controller/supply - //supply points - var/points = 50 - var/points_per_process = 1.5 - var/points_per_slip = 2 - var/points_per_platinum = 5 // 5 points per sheet - var/points_per_phoron = 5 - var/points_per_money = 0.02 - //control - var/ordernum - var/list/shoppinglist = list() - var/list/requestlist = list() - var/list/supply_packs = list() - //shuttle movement - var/movetime = 1200 - var/datum/shuttle/ferry/supply/shuttle + //supply points + var/points = 50 + var/points_per_process = 1.5 + var/points_per_slip = 2 + var/points_per_platinum = 5 // 5 points per sheet + var/points_per_phoron = 5 + var/points_per_money = 0.02 + //control + var/ordernum + var/list/shoppinglist = list() + var/list/requestlist = list() + var/list/supply_packs = list() + var/list/exported_crates = list() + //shuttle movement + var/movetime = 1200 + var/datum/shuttle/ferry/supply/shuttle - New() - ordernum = rand(1,9000) +/datum/controller/supply/New() + ordernum = rand(1,9000) - for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs)) - var/datum/supply_packs/P = new typepath() - supply_packs[P.name] = P + for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs)) + var/datum/supply_packs/P = new typepath() + supply_packs[P.name] = P - // Supply shuttle ticker - handles supply point regeneration - // This is called by the process scheduler every thirty seconds - proc/process() - points += points_per_process +// Supply shuttle ticker - handles supply point regeneration +// This is called by the process scheduler every thirty seconds +/datum/controller/supply/proc/process() + points += points_per_process - //To stop things being sent to CentCom which should not be sent to centcomm. Recursively checks for these types. - proc/forbidden_atoms_check(atom/A) - if(istype(A,/mob/living)) - return 1 - if(istype(A,/obj/item/weapon/disk/nuclear)) - return 1 - if(istype(A,/obj/machinery/nuclearbomb)) - return 1 - if(istype(A,/obj/item/device/radio/beacon)) - return 1 +//To stop things being sent to CentCom which should not be sent to centcomm. Recursively checks for these types. +/datum/controller/supply/proc/forbidden_atoms_check(atom/A) + if(isliving(A)) + return 1 + if(istype(A,/obj/item/weapon/disk/nuclear)) + return 1 + if(istype(A,/obj/machinery/nuclearbomb)) + return 1 + if(istype(A,/obj/item/device/radio/beacon)) + return 1 - for(var/i=1, i<=A.contents.len, i++) - var/atom/B = A.contents[i] - if(.(B)) - return 1 + for(var/i=1, i<=A.contents.len, i++) + var/atom/B = A.contents[i] + if(.(B)) + return 1 - //Sellin - proc/sell() - var/area/area_shuttle = shuttle.get_location_area() - if(!area_shuttle) return +//Sellin +/datum/controller/supply/proc/sell() + var/area/area_shuttle = shuttle.get_location_area() + if(!area_shuttle) return - callHook("sell_shuttle", list(area_shuttle)); + callHook("sell_shuttle", list(area_shuttle)); - var/phoron_count = 0 - var/plat_count = 0 - var/money_count = 0 + var/phoron_count = 0 + var/plat_count = 0 + var/money_count = 0 - for(var/atom/movable/MA in area_shuttle) - if(MA.anchored) continue + exported_crates = list() - // Must be in a crate! - if(istype(MA,/obj/structure/closet/crate)) - var/obj/structure/closet/crate/CR = MA - callHook("sell_crate", list(CR, area_shuttle)) + for(var/atom/movable/MA in area_shuttle) + if(MA.anchored) continue - points += CR.points_per_crate - var/find_slip = 1 + // Must be in a crate! + if(istype(MA,/obj/structure/closet/crate)) + var/oldpoints = points + var/oldphoron = phoron_count + var/oldplatinum = plat_count + var/oldmoney = money_count - for(var/atom in CR) - // Sell manifests - var/atom/A = atom - if(find_slip && istype(A,/obj/item/weapon/paper/manifest)) - var/obj/item/weapon/paper/manifest/slip = A - if(!slip.is_copy && slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense - points += points_per_slip - find_slip = 0 - continue + var/obj/structure/closet/crate/CR = MA + callHook("sell_crate", list(CR, area_shuttle)) - // Sell phoron and platinum - if(istype(A, /obj/item/stack)) - var/obj/item/stack/P = A - switch(P.get_material_name()) - if("phoron") phoron_count += P.get_amount() - if("platinum") plat_count += P.get_amount() + points += CR.points_per_crate + var/find_slip = 1 - //Sell spacebucks - if(istype(A, /obj/item/weapon/spacecash)) - var/obj/item/weapon/spacecash/cashmoney = A - money_count += cashmoney.worth - qdel(MA) + for(var/atom in CR) + // Sell manifests + var/atom/A = atom + if(find_slip && istype(A,/obj/item/weapon/paper/manifest)) + var/obj/item/weapon/paper/manifest/slip = A + if(!slip.is_copy && slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense + points += points_per_slip + find_slip = 0 + continue - if(phoron_count) - points += phoron_count * points_per_phoron + // Sell phoron and platinum + if(istype(A, /obj/item/stack)) + var/obj/item/stack/P = A + switch(P.get_material_name()) + if("phoron") phoron_count += P.get_amount() + if("platinum") plat_count += P.get_amount() - if(plat_count) - points += plat_count * points_per_platinum + //Sell spacebucks + if(istype(A, /obj/item/weapon/spacecash)) + var/obj/item/weapon/spacecash/cashmoney = A + money_count += cashmoney.worth - if(money_count) - points += money_count * points_per_money + var/datum/exported_crate/EC = new /datum/exported_crate() + EC.name = CR.name + EC.value = points - oldpoints + EC.value += (phoron_count - oldphoron) * points_per_phoron + EC.value += (plat_count - oldplatinum) * points_per_platinum + EC.value += (money_count - oldmoney) * points_per_money + exported_crates += EC - //Buyin - proc/buy() - if(!shoppinglist.len) return + qdel(MA) - var/orderedamount = shoppinglist.len + points += phoron_count * points_per_phoron + points += plat_count * points_per_platinum + points += money_count * points_per_money - var/area/area_shuttle = shuttle.get_location_area() - if(!area_shuttle) return +//Buyin +/datum/controller/supply/proc/buy() + if(!shoppinglist.len) + return - var/list/clear_turfs = list() + var/orderedamount = shoppinglist.len - for(var/turf/T in area_shuttle) - if(T.density) continue - var/contcount - for(var/atom/A in T.contents) - if(!A.simulated) - continue - contcount++ - if(contcount) - continue - clear_turfs += T + var/area/area_shuttle = shuttle.get_location_area() + if(!area_shuttle) + return - for(var/S in shoppinglist) - if(!clear_turfs.len) break - var/i = rand(1,clear_turfs.len) - var/turf/pickedloc = clear_turfs[i] - clear_turfs.Cut(i,i+1) - shoppinglist -= S + var/list/clear_turfs = list() - var/datum/supply_order/SO = S - var/datum/supply_packs/SP = SO.object + for(var/turf/T in area_shuttle) + if(T.density) + continue + var/contcount + for(var/atom/A in T.contents) + if(!A.simulated) + continue + contcount++ + if(contcount) + continue + clear_turfs += T - var/obj/A = new SP.containertype(pickedloc) - A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]" + for(var/S in shoppinglist) + if(!clear_turfs.len) break + var/i = rand(1,clear_turfs.len) + var/turf/pickedloc = clear_turfs[i] + clear_turfs.Cut(i,i+1) + shoppinglist -= S - //supply manifest generation begin + var/datum/supply_order/SO = S + var/datum/supply_packs/SP = SO.object - var/obj/item/weapon/paper/manifest/slip - if(!SP.contraband) - slip = new /obj/item/weapon/paper/manifest(A) - slip.is_copy = 0 - slip.info = "

[command_name()] Shipping Manifest



" - slip.info +="Order #[SO.ordernum]
" - slip.info +="Destination: [station_name()]
" - slip.info +="[orderedamount] PACKAGES IN THIS SHIPMENT
" - slip.info +="CONTENTS:

" + slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
" + + return diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index ed1600f26f8..c845657c74c 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -67,6 +67,13 @@ var/list/flooring_types desc = "A layer of many tiny bits of frozen water. It's hard to tell how deep it is." icon = 'icons/turf/snow_new.dmi' icon_base = "snow" + footstep_sounds = list("human" = list( + 'sound/effects/footstep/snow1.ogg', + 'sound/effects/footstep/snow2.ogg', + 'sound/effects/footstep/snow3.ogg', + 'sound/effects/footstep/snow4.ogg', + 'sound/effects/footstep/snow5.ogg')) + /decl/flooring/snow/snow2 name = "snow" diff --git a/code/game/turfs/flooring/flooring_decals.dm b/code/game/turfs/flooring/flooring_decals.dm index c41e316badc..957cc20389e 100644 --- a/code/game/turfs/flooring/flooring_decals.dm +++ b/code/game/turfs/flooring/flooring_decals.dm @@ -6,7 +6,7 @@ var/list/floor_decals = list() /obj/effect/floor_decal name = "floor decal" icon = 'icons/turf/flooring/decals.dmi' - layer = DECALS_LAYER + plane = DECAL_PLANE var/supplied_dir /obj/effect/floor_decal/New(var/newloc, var/newdir, var/newcolour) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index c28aedddcab..e1b49762ecd 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -7,7 +7,7 @@ var/image/no_ceiling_image = null return TRUE /proc/cache_no_ceiling_image() - no_ceiling_image = image(icon = 'icons/turf/open_space.dmi', icon_state = "no_ceiling", layer = OVERTURF_LAYER) + no_ceiling_image = image(icon = 'icons/turf/open_space.dmi', icon_state = "no_ceiling") no_ceiling_image.plane = PLANE_MESONS /turf/simulated/floor/update_icon(var/update_neighbors) diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm index 9926c4704ad..5fed8af66ba 100644 --- a/code/game/turfs/simulated/outdoors/snow.dm +++ b/code/game/turfs/simulated/outdoors/snow.dm @@ -3,12 +3,14 @@ icon_state = "snow" edge_blending_priority = 6 movement_cost = 2 + initial_flooring = /decl/flooring/snow turf_layers = list( /turf/simulated/floor/outdoors/rocks, /turf/simulated/floor/outdoors/dirt ) var/list/crossed_dirs = list() + /turf/simulated/floor/outdoors/snow/Entered(atom/A) if(isliving(A)) var/mdir = "[A.dir]" @@ -51,5 +53,5 @@ if(istype(M, /mob/living)) if(M.stunned == 0) to_chat(M, "You slide across the ice!") - M.SetStunned(2) + M.SetStunned(1) step(M,M.dir) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 21fd9492f09..e5bb57ad9e8 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -252,7 +252,7 @@ O.icon_state = "2" O.anchored = 1 O.density = 1 - O.layer = 5 + O.plane = ABOVE_PLANE if(girder_material.integrity >= 150 && !girder_material.is_brittle()) //Strong girders will remain in place when a wall is melted. dismantle_wall(1,1) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 3aa00a20f0c..100c3b5a31c 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -1,5 +1,7 @@ /turf icon = 'icons/turf/floors.dmi' + layer = TURF_LAYER + plane = TURF_PLANE level = 1 var/holy = 0 diff --git a/code/game/turfs/unsimulated/shuttle.dm b/code/game/turfs/unsimulated/shuttle.dm index 99f5bc15bd8..cb70c6c36db 100644 --- a/code/game/turfs/unsimulated/shuttle.dm +++ b/code/game/turfs/unsimulated/shuttle.dm @@ -3,7 +3,6 @@ icon = 'icons/turf/shuttle_white.dmi' thermal_conductivity = 0.05 heat_capacity = 0 - layer = 2 /turf/unsimulated/shuttle/wall name = "wall" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a9075a84307..08b16efa602 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -6,7 +6,8 @@ var/global/floorIsLava = 0 //////////////////////////////// /proc/message_admins(var/msg) msg = "ADMIN LOG: [msg]" - log_adminwarn(msg) + //log_adminwarn(msg) //log_and_message_admins is for this + for(var/client/C in admins) if((R_ADMIN|R_MOD) & C.holder.rights) C << msg diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index dcaa7454857..4ff94877f42 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -104,7 +104,7 @@ if(C.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping)) C << 'sound/effects/adminhelp.ogg' - log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]") + log_adminpm(msg,src,C) send2adminirc("Reply: [key_name(src)]->[key_name(C)]: [html_decode(msg)]") //we don't use message_admins here because the sender/receiver might get it too diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index ba9f41c4036..19461e68c81 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -285,7 +285,8 @@ var/list/blobs = list() name = "blob" desc = "The blob lashing out at something." icon_state = "blob_attack" - layer = 5.2 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER time_to_die = 6 alpha = 140 mouse_opacity = 0 diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index e4c5a10d356..09d4738d67b 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -22,6 +22,7 @@ var/adminobs = null var/area = null var/time_died_as_mouse = null //when the client last died as a mouse + var/datum/tooltip/tooltips = null var/adminhelped = 0 diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 432dfdbb6ea..1fc3b1d8ba6 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -282,21 +282,21 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O . += "Hair
" if(has_flag(mob_species, HAS_HAIR_COLOR)) - . += "Change Color
__
" + . += "Change Color
__
" . += " Style: [pref.h_style]
" . += "
Facial
" if(has_flag(mob_species, HAS_HAIR_COLOR)) - . += "Change Color
__
" + . += "Change Color
__
" . += " Style: [pref.f_style]
" if(has_flag(mob_species, HAS_EYE_COLOR)) . += "
Eyes
" - . += "Change Color
__

" + . += "Change Color
__

" if(has_flag(mob_species, HAS_SKIN_COLOR)) . += "
Body Color
" - . += "Change Color
__

" + . += "Change Color
__

" . += "
Body Markings +
" for(var/M in pref.body_markings) @@ -307,7 +307,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O . += "
" . += "Allow Synth color: [pref.synth_color ? "Yes" : "No"]
" if(pref.synth_color) - . += "Change Color
__
" + . += "Change Color
__
" . = jointext(.,null) @@ -741,7 +741,15 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O dat += "Language: [current_species.species_language]
" dat += "" if(current_species.spawn_flags & SPECIES_CAN_JOIN) - dat += "
Often present on human stations." + switch(current_species.rarity_value) + if(1 to 2) + dat += "
Often present on human stations." + if(3 to 4) + dat += "
Rarely present on human stations." + if(5) + dat += "
Unheard of on human stations." + else + dat += "
May be present on human stations." if(current_species.spawn_flags & SPECIES_IS_WHITELISTED) dat += "
Whitelist restricted." if(!current_species.has_organ[O_HEART]) diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm index 09289c1068f..29502ec9850 100644 --- a/code/modules/client/preference_setup/global/01_ui.dm +++ b/code/modules/client/preference_setup/global/01_ui.dm @@ -7,24 +7,28 @@ S["UI_style_color"] >> pref.UI_style_color S["UI_style_alpha"] >> pref.UI_style_alpha S["ooccolor"] >> pref.ooccolor + S["tooltipstyle"] >> pref.tooltipstyle /datum/category_item/player_setup_item/player_global/ui/save_preferences(var/savefile/S) S["UI_style"] << pref.UI_style S["UI_style_color"] << pref.UI_style_color S["UI_style_alpha"] << pref.UI_style_alpha S["ooccolor"] << pref.ooccolor + S["tooltipstyle"] << pref.tooltipstyle /datum/category_item/player_setup_item/player_global/ui/sanitize_preferences() pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style)) pref.UI_style_color = sanitize_hexcolor(pref.UI_style_color, initial(pref.UI_style_color)) pref.UI_style_alpha = sanitize_integer(pref.UI_style_alpha, 0, 255, initial(pref.UI_style_alpha)) pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor)) + pref.tooltipstyle = sanitize_inlist(pref.tooltipstyle, all_tooltip_styles, initial(pref.tooltipstyle)) /datum/category_item/player_setup_item/player_global/ui/content(var/mob/user) . = "UI Style: [pref.UI_style]
" . += "Custom UI (recommended for White UI):
" . += "-Color: [pref.UI_style_color] 
__
 reset
" . += "-Alpha(transparency): [pref.UI_style_alpha] reset
" + . += "Tooltip Style: [pref.tooltipstyle]
" if(can_select_ooc_color(user)) . += "OOC Color: " if(pref.ooccolor == initial(pref.ooccolor)) @@ -57,6 +61,12 @@ pref.ooccolor = new_ooccolor return TOPIC_REFRESH + else if(href_list["select_tooltip_style"]) + var/tooltip_style_new = input(user, "Choose tooltip style.", "Character Preference", pref.tooltipstyle) as null|anything in all_tooltip_styles + if(!tooltip_style_new || !CanUseTopic(user)) return TOPIC_NOACTION + pref.tooltipstyle = tooltip_style_new + return TOPIC_REFRESH + else if(href_list["reset"]) switch(href_list["reset"]) if("ui") diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index a85befce774..9035485bdab 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -98,6 +98,12 @@ var/list/_client_preferences_by_type enabled_description = "Show" disabled_description = "Hide" +/datum/client_preference/mob_tooltips + description ="Mob tooltips" + key = "MOB_TOOLTIPS" + enabled_description = "Show" + disabled_description = "Hide" + /datum/client_preference/attack_icons description ="Attack icons" key = "ATTACK_ICONS" @@ -119,7 +125,7 @@ var/list/_client_preferences_by_type /datum/client_preference/show_typing_indicator/toggled(var/mob/preference_mob, var/enabled) if(!enabled) - preference_mob.set_typing_indicator(0) + preference_mob.set_typing_indicator(FALSE) /datum/client_preference/show_ooc description ="OOC chat" diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 18e1be05f48..1a09ee6ae96 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -94,7 +94,7 @@ if(job.minimum_character_age && user.client && (user.client.prefs.age < job.minimum_character_age)) . += "[rank] \[MINIMUM CHARACTER AGE: [job.minimum_character_age]]" continue - if((pref.job_civilian_low & ASSISTANT) && (rank != "Assistant")) + if((pref.job_civilian_low & ASSISTANT) && job.flag != ASSISTANT) . += "[rank]" continue if((rank in command_positions) || (rank == "AI"))//Bold head jobs @@ -106,7 +106,7 @@ . += "" - if(rank == "Assistant")//Assistant is special + if(job.flag == ASSISTANT)//Assistant is special if(pref.job_civilian_low & ASSISTANT) . += " \[Yes]" else @@ -180,7 +180,7 @@ if(!job) return 0 - if(role == "Assistant") + if(job.flag == ASSISTANT) if(pref.job_civilian_low & job.flag) pref.job_civilian_low &= ~job.flag else diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 3c5e1f4a61b..546c0594cf7 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -21,6 +21,7 @@ datum/preferences var/UI_style = "Midnight" var/UI_style_color = "#ffffff" var/UI_style_alpha = 255 + var/tooltipstyle = "Midnight" //Style for popup tooltips //character preferences var/real_name //our character's name diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index bcd4e3a0c1a..5312f1f07ec 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -98,11 +98,11 @@ toggle_preference(pref_path) - src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] see the speech indicator." + src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] have the speech indicator." prefs.save_preferences() - feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + feedback_add_details("admin_verb","TTIND") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggle_ahelp_sound() set name = "Toggle Admin Help Sound" @@ -192,6 +192,19 @@ feedback_add_details("admin_verb","TFiringMode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/verb/toggle_mob_tooltips() + set name = "Toggle Mob Tooltips" + set category = "Preferences" + set desc = "Toggles displaying name/species over mobs when moused over." + + var/pref_path = /datum/client_preference/mob_tooltips + toggle_preference(pref_path) + prefs.save_preferences() + + src << "You will now [(is_preference_enabled(/datum/client_preference/mob_tooltips)) ? "see" : "not see"] mob tooltips." + + feedback_add_details("admin_verb","TMobTooltips") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + //Toggles for Staff //Developers diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index d8d683d5d3c..4a736aec5ec 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -20,6 +20,15 @@ "Hologram" = 'icons/mob/screen1_robot_minimalist.dmi' ) +var/global/list/all_tooltip_styles = list( + "Midnight", //Default for everyone is the first one, + "Plasmafire", + "Retro", + "Slimecore", + "Operative", + "Clockwork" + ) + /proc/ui_style2icon(ui_style) if(ui_style in all_ui_styles) return all_ui_styles[ui_style] diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index ff8d0d94c64..ee815fd5584 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -57,7 +57,7 @@ if (!..()) return 0 - if(species_restricted && istype(M,/mob/living/carbon/human)) + if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human)) var/exclusive = null var/wearable = null var/mob/living/carbon/human/H = M diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm new file mode 100644 index 00000000000..feb60ae3a38 --- /dev/null +++ b/code/modules/clothing/head/pilot_helmet.dm @@ -0,0 +1,201 @@ +//Pilot + +/obj/item/clothing/head/pilot + name = "pilot helmet" + desc = "Standard pilot gear. Protects the head from impacts." + icon_state = "pilot_helmet1" + item_icons = list(slot_head_str = 'icons/mob/pilot_helmet.dmi') + sprite_sheets = list( + SPECIES_TESHARI = 'icons/mob/species/seromi/pilot_helmet.dmi' + ) + flags = THICKMATERIAL + armor = list(melee = 20, bullet = 10, laser = 10, energy = 5, bomb = 10, bio = 0, rad = 0) + flags_inv = HIDEEARS + cold_protection = HEAD + min_cold_protection_temperature = HELMET_MIN_COLD_PROTECTION_TEMPERATURE + heat_protection = HEAD + max_heat_protection_temperature = HELMET_MAX_HEAT_PROTECTION_TEMPERATURE + w_class = ITEMSIZE_NORMAL + + var/obj/machinery/computer/shuttle_control/web/shuttle_comp + var/obj/screen/pilot_hud + var/list/images + var/list/raw_images + var/last_status + +/obj/item/clothing/head/pilot/initialize() + . = ..() + + images = list() + raw_images = list() + + pilot_hud = new(src) + pilot_hud.screen_loc = "1,1" + pilot_hud.icon = 'icons/obj/piloting_overlay.dmi' + pilot_hud.icon_state = "dimmer" + pilot_hud.layer = SCREEN_LAYER + pilot_hud.plane = PLANE_FULLSCREEN + pilot_hud.mouse_opacity = 0 + pilot_hud.alpha = 0 + + var/image/I + I = image(pilot_hud.icon,pilot_hud,"top_bar",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 145 + images["top_bar"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"top_dots",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 200 + images["topdots"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"words_discon",layer=SCREEN_LAYER+1) //words_standby, words_flying, words_spool, words_discon + I.appearance_flags = RESET_ALPHA + I.alpha = 200 + images["top_words"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 200 + images["charging"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"left_bar",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 0 + images["left_bar"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"right_bar",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 0 + images["right_bar"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"flyboxes",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 0 + images["flyboxes"] = I + raw_images += I + + I = image(pilot_hud.icon,pilot_hud,"horizon",layer=SCREEN_LAYER+1) + I.appearance_flags = RESET_ALPHA + I.alpha = 0 + images["horizon"] = I + raw_images += I + +/obj/item/clothing/head/pilot/proc/update_hud(var/status) + if(last_status == status) + return + + last_status = status + + if(status == SHUTTLE_INTRANSIT) + var/image/I = images["top_words"] + I.icon_state = "words_flying" + I = images["left_bar"] + I.alpha = 200 + I = images["right_bar"] + I.alpha = 200 + I = images["flyboxes"] + I.alpha = 200 + I = images["horizon"] + I.alpha = 200 + I = images["charging"] + I.icon_state = "" + animate(pilot_hud,alpha=255,time=3 SECONDS) + + else if(status == SHUTTLE_IDLE) + var/image/I = images["top_words"] + I.icon_state = "words_standby" + I = images["left_bar"] + I.alpha = 0 + I = images["right_bar"] + I.alpha = 0 + I = images["flyboxes"] + I.alpha = 0 + I = images["horizon"] + I.alpha = 0 + I = images["charging"] + I.icon_state = "" + animate(pilot_hud,alpha=0,time=3 SECONDS) + + else if(status == SHUTTLE_WARMUP) + var/image/I = images["top_words"] + I.icon_state = "words_spool" + I = images["left_bar"] + I.alpha = 200 + I = images["right_bar"] + I.alpha = 200 + I = images["flyboxes"] + I.alpha = 0 + I = images["horizon"] + I.alpha = 0 + I = images["charging"] + I.icon_state = "charging" + animate(pilot_hud,alpha=255,time=3 SECONDS) + + else if(status == "discon") + var/image/I = images["top_words"] + I.icon_state = "words_discon" + I = images["left_bar"] + I.alpha = 0 + I = images["right_bar"] + I.alpha = 0 + I = images["flyboxes"] + I.alpha = 0 + I = images["horizon"] + I.alpha = 0 + I = images["charging"] + I.icon_state = "" + animate(pilot_hud,alpha=0,time=3 SECONDS) + +/obj/item/clothing/head/pilot/verb/hud_colors() + set name = "Alter HUD color" + set desc = "Change the color of the piloting HUD." + set category = "Object" + set src in usr + + var/newcolor = input(usr,"Pick a color!","HUD Color") as null|color + if(newcolor) + for(var/img in list("top_words","left_bar","right_bar","flyboxes")) + var/image/I = images[img] + I.color = newcolor + +/obj/item/clothing/head/pilot/Destroy() + for(var/img in raw_images) + var/image/I = img + I.loc = null + shuttle_comp = null + qdel(pilot_hud) + return ..() + +/obj/item/clothing/head/pilot/equipped(var/mob/user,var/slot) + . = ..() + if(slot == slot_head && user.client) + user.client.screen |= pilot_hud + user.client.images |= raw_images + +/obj/item/clothing/head/pilot/dropped(var/mob/user) + . = ..() + if(user.client) + user.client.screen -= pilot_hud + user.client.images -= raw_images + +/obj/item/clothing/head/pilot/alt + name = "pilot helmet" + desc = "Standard pilot gear. Protects the head from impacts. This one has a retractable visor" + icon_state = "pilot_helmet2" + action_button_name = "Toggle Visor" + +/obj/item/clothing/head/pilot/alt/attack_self(mob/user as mob) + if(src.icon_state == initial(icon_state)) + src.icon_state = "[icon_state]up" + user << "You raise the visor on the pilot helmet." + else + src.icon_state = initial(icon_state) + user << "You lower the visor on the pilot helmet." + update_clothing_icon() //so our mob-overlays update \ No newline at end of file diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index fcb3040f811..40ce8258afb 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -45,7 +45,6 @@ icon_state = "riot" item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat") armor = list(melee = 80, bullet = 10, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0) - flags_inv = HIDEJUMPSUIT siemens_coefficient = 0.5 /obj/item/clothing/suit/armor/riot/alt @@ -115,7 +114,7 @@ icon_state = "swatarmor" item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat") body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + flags_inv = HIDETIE|HIDEHOLSTER slowdown = 1 armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) siemens_coefficient = 0.7 @@ -311,7 +310,7 @@ desc = "An armoured jacket with silver rank pips and livery." icon_state = "warden_jacket" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + flags_inv = HIDETIE|HIDEHOLSTER /obj/item/clothing/suit/storage/vest/wardencoat/alt name = "Warden's jacket" @@ -332,7 +331,7 @@ desc = "A greatcoat enhanced with a special alloy for some protection and style." icon_state = "hos" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + flags_inv = HIDETIE|HIDEHOLSTER //Jensen cosplay gear /obj/item/clothing/suit/storage/vest/hoscoat/jensen diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index aa2e95c3491..1d93fe9f25a 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -45,7 +45,7 @@ desc = "A long, flowing white robe. It looks comfortable, but not very warm." icon_state = "whiteout_robe" item_state_slots = list(slot_r_hand_str = "suit_white", slot_l_hand_str = "suit_white") - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + flags_inv = HIDETIE|HIDEHOLSTER hoodtype = /obj/item/clothing/head/chaplain_hood/whiteout //Chaplain diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 84a187ef91d..3ab22c662d2 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -92,6 +92,7 @@ var/global/economy_init = 0 news_network.CreateFeedChannel("The [using_map.starsys_name] Times", "[using_map.starsys_name] Times ExoNode - [using_map.station_short]", 1, 1) news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1) + news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1) for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination) var/datum/trade_destination/D = new loc_type diff --git a/code/modules/economy/lorenews.dm b/code/modules/economy/lorenews.dm new file mode 100644 index 00000000000..63f5e024117 --- /dev/null +++ b/code/modules/economy/lorenews.dm @@ -0,0 +1,110 @@ +/datum/event/lore_news + endWhen = 10 + +/datum/event/lore_news/announce() + var/author = "Oculus v6rev7" + var/channel = "Oculum Content Aggregator" + + + //locations by region for later pick() + //probably would be good to move these to a global somehwere but fuck if I know how to do that + var/list/rim = list("Shelf", "Vounna", "Relan", "Whythe", "Angessa's Pearl") // this is also the Association list for most purposes + var/list/crescent = list("Saint Columbia", "Ganesha", "Gavel", "Oasis", "Kess-Gendar") //Vir not included + var/list/core = list("Sol", "Alpha Centauri", "Tau Ceti", "Altair") + var/list/heights = list("New Ohio", "Mahi-Mahi", "Parvati", "Sidhe", "New Seoul") + var/list/bowl = list("Zhu Que", "New Singapore", "Isavau's Gamble", "Love", "Viola", "Stove") + var/list/crypt = list("El", "Jahan's Post", "Abel's Rest", "Raphael", "Thoth", "Terminus") + var/list/weird = list("Silk", "Nyx") //no region + + //by government + var/list/solgov = crescent + core + heights + bowl + crypt + weird + var/list/skrell = list("Qerr'Vallis", "Qerma-Lakirr", "Harrqak", "Kauq'xum") + var/list/skrellfar = list("The Far Kingdom of Light and Shifting Shadow")// more colonies Elgeon + var/list/unathi = list("Moghes", "Qerrna-Qamxea", "Abel's Rest") // more colonies Anewbe + var/list/tajara = list("Rarkajar", "Mesomori", "Arathiir") + var/list/independent = list("New Kyoto", "Casini's Reach", "Ue'Orsi", "Natuna", "Neon Light") + + //this is what you should pick for most applications + //whether or not the rim goes there is something that should be changed per the metaplot + var/list/loc = solgov + skrell + tajara + + //this includes systems Sol doesn't really have eyes on + var/list/allloc = loc + unathi + skrellfar + independent + rim + + //copied right from organizations.dm + var/list/ship_names = list( + "Kestrel", + "Beacon", + "Signal", + "Freedom", + "Glory", + "Axiom", + "Eternal", + "Harmony", + "Light", + "Discovery", + "Endeavor", + "Explorer", + "Swift", + "Dragonfly", + "Ascendant", + "Tenacious", + "Pioneer", + "Hawk", + "Haste", + "Radiant", + "Luminous" + ) + + //generated based on Cerebulon's thing on the wiki + var/list/prefixes = list("IAV","ICV","IDV","IDV","IEV","IFV","IIV","ILV","IMV","IRV","ISV","ITV","SCG-A","SCG-C","SCG-D","SCG-D","SCG-E","SCG-F","SCG-I","SCG-L","SCG-M","SCG-R","SCG-S","SCG-T","BAV","BCV","BDV","BDV","BEV","BFV","BIV","BLV","BMV","BRV","BSV","BTV","HAV","HCV","HDV","HDV","HEV","HFV","HIV","HLV","HMV","HRV","HSV","HTV","MAV","MCV","MDV","MDV","MEV","MFV","MIV","MLV","MMV","MRV","MSV","MTV","NAV","NCV","NDV","NDV","NEV","NFV","NIV","NLV","NMV","NRV","NSV","NTV","VAV","VCV","VDV","VDV","VEV","VFV","VIV","VLV","VMV","VRV","VSV","VTV","WAV","WCV","WDV","WDV","WEV","WFV","WIV","WLV","WMV","WRV","WSV","WTV","XAV","XCV","XDV","XDV","XEV","XFV","XIV","XLV","XMV","XRV","XSV","XTV","ZAV","ZCV","ZDV","ZDV","ZEV","ZFV","ZIV","ZLV","ZMV","ZRV","ZSV","ZTV","GAV","GCV","GDV","GDV","GEV","GFV","GIV","GLV","GMV","GRV","GSV","GTV","AAV","ACV","ADV","ADV","AEV","AFV","AIV","ALV","AMV","ARV","ASV","ATV","LAV","LCV","LDV","LDV","LEV","LFV","LIV","LLV","LMV","LRV","LSV","LTV") + + var/datum/trade_destination/affected_dest = pick(weighted_mundaneevent_locations) //shouldn't do anything, not removing it to avoid breaking shit + //formatting breaks my fucking eyes + var/body = pick("A high-ranking Vey-Med executive was revealed to have been experimenting on biological neural enhancement techniques, believed to be of Skrellian origin, which could lead to the production of transhuman entities with an average cognitive capacity 30% greater than a baseline human.", + "[random_name(MALE)], chairman of the controversial Friends of Ned party, is scheduled to speak at a prominant university in [pick(core)] this Monday, according to a statement on his official newsfeed.", + "A wing of Ward-Takahashi B-class drones became catatonic this Thursday after tripping late-stage anti-emergence protocols. W-T Chief of Development has declined to comment.", + "A brand-new shipment of recreational voidcraft has been deemed \"Unsafe for use\" and seized at [pick(solgov)] customs. Wulf Aeronautics blames error in automated manufactory on [pick(solgov)], assures shareholders of \"One time incident\" after shares drop 4%.", + "Activity in a mostly automated Xion work-site in [pick(solgov)] has been suspended indefinitely, after reports of atypical drone behavior. The EIO's assigned investigator commented on the shutdown, saying \"We'll get them up and running again as soon as we're sure it's safe.\" No comment so far on an estimated time or date of reopening.", + "The EIO has officially raised the Emergence Threat Level in [pick(solgov)] to Blue. Citizens are reminded to comply with all EIO Agent requests. Failure to do so will be met with legal action, up to and including imprisonment.", + "All SolGov citizens beware, the scourge know as the Vox have increased the frequency of their attacks on isolated and poorly defended SolGov territories in [pick(bowl)]. Citizens have been advised to travel in groups and remain aware of their surroundings at all times.", + "The Unathi have recently moved a large amount of material into Abel's Rest, under the premise of building additional power plants. According to our sources, the material is in fact being channeled into domestic terrorist groups on both sides, in an attempt to incite a SolGov response. More news as the story develops.", + "Controversial Kishari director [random_name(FEMALE)] announced this Friday a sequel to the 2525 animated series Soldiers of the Yearlong War. Open auditions for supporting cast members have been called.", + "Amid concerns that it promotes a pro-transtech agenda, a high-profile screening of the award-winning animated film \"The Inventor's Marvelous Mechanical Maidens\" was canceled today on [pick(pick(core, heights))].", + "A radiation leak caused by a power unit rupture at a [pick(solgov)] hazardous materials reclamation plant has left several workers and neighboring residents with acute radiation poisoning. Witnesses report that a basic lifting drone failed to recognize and collided with the misplaced unit.", + "Xenophobic fringe group Humanity First has claimed credit for a bombing at a local government office on [pick(solgov)] which left three seriously injured. Police report that they have two suspects in custody, but details remain sparse.", + "Government official [random_name(MALE)] reports that the crew of the [pick(prefixes)] [pick(ship_names)], the vessel boarded by Jaguar Gang pirates earlier this week, are \"Safe, unharmed, and happy to be back at work.\" Officials were unable to comment on future security measures at this time.", + "Sanitation Technician [random_name(FEMALE)] says she was trapped in her work bathroom for three days after the locking system went haywire! The furious techie says she wants a \"hefty sum\" from her employers and that she won't be visiting that cubicle again any time soon!", + "Experts at a top university have said that almost every position in modern society might be filled by a robot within the next few decades if production continues at its current rate. Workers' Rights groups have expressed alarm at the news, and have called for protections against the \"Tin menace\".", + "An alleged cyberattack on Bishop Cybernetics systems reported to have resulted in the theft of customer data including detailed medical and biological records has been dismissed as \"Unfounded scaremongering\" by company executives.", + "[pick(crescent)] resident [random_name(FEMALE)] says she was overjoyed when her son told her he was planning to get married, but was appalled to find the bride-to-be was a common household cleaning drone! GR3TA assures us that \"Cleaning is complete.\"", + "Striking workers at a manufacturing plant on [pick(bowl)] have returned to work after news spread that plant owners would relocate operations to an automated facility if production did not resume by the end of the month. Factory investor [random_name(FEMALE)] expressed admiration at the \"Decisive action\" taken by the company.", + "Police in [pick(core)] report that they have arrested a man in connection with multinationalist fringe group Nation of Mars. Authorities were alerted when the man's ID was flagged by new screening software at the city spaceport as a known sympathizer with the violent terrorist organization.", + "The mystery of the [pick(prefixes)] [pick(ship_names)] has come to its end as a member of the vessel's skeleton crew was arrested in connection with Golden Tiger activities on the Skrell border. According to authorities, the ship - declared missing some months ago - was illegally sold to criminal elements on its way to breaking yards at [pick(heights)].", + "[random_name(MALE)] comes clean about his decade-long nightmare kept as a slave on Eutopia in a new book to be released later this year. The harried author has fought lawsuits at every turn that claim that his account is \"A work of pure fiction with an obvious leftist agenda.\"", + "Gas mask toting Revolutionary Solar People's Party extremists have reportedly attacked police at a rally in [pick(crypt)]. Peace-keeping officers were viscously pelted with objects and several protesters were found to be equipped with bottles containing an \"unknown substance.\"", + "Be careful what you say around your personal AI device as you never know who might be listening, say top minds! Cybercrime expert [random_name(FEMALE)] says hackers can easily trick your device to listen in on your conversations, record you in secret, or even steal your identity!", + "Thousands of travellers have been stranded at [pick(loc)] spaceport as a major error with the artificial intelligence system purged weeks worth of scheduling and manifest data from the port's mainframe. Major Bill's Transportation is offering stranded passengers 20% off replacement flights.", + "An outraged pet owner claims that a cybernetic company in [pick(solgov)] performed \"disturbing\" surgeries on their beloved cat, Pickles. [random_name(PLURAL)], 58 claims that the local cybernetics firm stole the furry friend from the vet's office and \"Replaced his brain with ones and zeroes.\"", + "Doctors in [pick(pick(skrell, heights))] were left in awe and horror as a Teshari was hatched with the features of an adult human man! Sources say that the youngster hatched with a full head of hair and could recite six nursery rhymes from memory. Could Skrell genetic experiments be to blame?", + "Miners in [pick(bowl)] were dismayed to discover that their boss was actually a C-class drone intelligence! \"I should've known there was something wrong,\" says dumbfounded miner [random_name(MALE)],\"I'd say good morning and he'd just start listing off mineral densities and coordinates. I just thought he loved his job a little too much.\"", + "The remains of an early 22nd century voidcraft containing \"Period artifacts, technology and human remains\" has been located on the surface of Luna after centuries of being disregarded as worthless wreck. Historians hope the find will provide insight into daily life under the short-lived Selene Federation.", + "The unexpected discovery of the remains of a what was believed to be a previously undiscovered species by workers on [pick("Nisp", "Binma", "Sif", "Kishar", "Abel's Rest", "Merelar")] has now been dismissed. Upon close analysis of the specimen, it was identified as a \"Bear with mange\", apparently dumped there some weeks prior.", + "According to a public statement by electronics giant Ward-Takahashi, many artificial intelligence systems - ranging from household appliances to industrial drones and habitat control networks - manufactured before 2550 could be at risk from a new virus dubbed \"Cap-3k\".", + "A controversial opera billed as \"The true story of Nos Amis\" has been criticized by law enforcement agencies as \"glorifying\" some of the most infamous gangsters of the 22nd century. The Polish-language \"Z Francji, do Gwiazd\" is to be distributed exclusively in Alpha Centauri for one week only.", + "Injury count continues to rise in the aftermath of the Positronic Rights Group Rally in [pick(pick(bowl, core, heights))]. Homemade teargas grenades were launched into the crowd at approximately 3:45 pm on Saturday by an unidentified person. Authorities urge anyone with information to call in, toll-free, at any time.", + "Representatives report that investigations continue on a string of fires on [pick("Nisp", "Binma", "Sif", "Kishar", "Abel's Rest", "Merelar")]. While no information has been released to the public, authorities assure the press that they are doing everything in their power to find those responsible.", + "En-route to the contentious rim system, a medical aid mission to Natuna was stopped by Ue-Katish pirates masquerading as refugees, who boarded the ship and stripped it of all supplies.", + "Lead Singer of Strawberry Idol Revealed As Three Teshari In A Trench Coat-- Newest gimmick or shocking revelation??", + "Shocking art critics throughout the system, a recent submission to the [pick(solgov)] Museum of Absurdism's contemporary exhibit was revealed to actually be the nutritional information on the back of a dehydrated cereal product common in Skrell space.", + "The celebrated magical kid series \"Petit Yuusha Jossen Temonila\" has announced its newest season at the height of its demicentenial festival. Noted director [random_name(MALE)] has promised to bring a diverse production staff to the venerable series, and has stated a theme of \"the friendships that transcend borders\".", + "The Hephaestus Industries board of directors announced this Monday the highest annual profits since the height of the Lizard Riots.", + "A radical group of Mercurials were convicted today of violations of Five Points legislature at an extraordinary court on [pick(solgov)]. These convictions come at the heels of a successful sting operation six years in the making, lead by local Head of EIO [random_name(FEMALE)].", + "An unnamed official of the shipping TSC Major Bill's Transportation narrowly escaped an attempt on their life by a deranged assassin. The assassin claims to have been driven to this henious act by the corporation's infamous jingle.", + "In the aftermath of yesterday's synthphobic rally on [pick(solgov)], three positronic citizens were left irreparably damaged by a hostile mob, who claim that the victims were \"AAs\" attempting to infiltrate the rally.", + "EIO spokesperson [random_name(MALE)] stated in a press conference yesterday that the \"Shakespear\" A-class codeline was briefly available for download on the darknet, although they claim to be \"confident that the leak was shut down before any significant portion could be downloaded\". Experts suspect Association involvement.", + "[pick("Strives Towards", "Embraces", "Dreams of", "Cultivates", "Advocates", "Exemplifies")] [pick("Strength", "Wisdom", "Independence", "Pragmatism", "Reason", "Development")], a Community Child from Angessa's Pearl, published his memoir today, detailing a shocking level of abuse by caretakers and educators.", + "Nova Sixty, Mercurial web personality, claims that the disappearence of the SCG-R Song Shi was a plot by \"extradimensional rockmen\" who intend to sow mistrust between the Association and SolGov. Quote Sixty, \"The Far Kingdoms' attempt to hide the TRUTH only proves that they and their rockman allies are NOT to be trusted.\"", + ) + + news_network.SubmitArticle(body, author, channel, null, 1) diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 37a576a4420..f75f6c0597a 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -139,6 +139,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Shipping Error", /datum/event/shipping_error , 30, list(ASSIGNMENT_ANY = 2), 0), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Space Dust", /datum/event/dust , 60, list(ASSIGNMENT_ENGINEER = 20), 0, 0, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lore News", /datum/event/lore_news, 400), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)), ) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 9f8eca869c8..b1a537639de 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -48,6 +48,7 @@ var/list/event_last_fired = list() possibleEvents[/datum/event/economic_event] = 300 possibleEvents[/datum/event/trivial_news] = 400 possibleEvents[/datum/event/mundane_news] = 300 + possibleEvents[/datum/event/lore_news] = 300 // up this if the above ones get removed as they damn well should possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200) possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 3c3f1fd1947..568cf8f44f1 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -47,7 +47,7 @@ mob/living/carbon/proc/handle_hallucinations() if(!H.r_store) slots_free += ui_storage2 if(slots_free.len) halitem.screen_loc = pick(slots_free) - halitem.layer = 50 + halitem.hud_layerise() switch(rand(1,6)) if(1) //revolver halitem.icon = 'icons/obj/gun.dmi' diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index f08f28d97a0..c35d4b489a6 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -51,7 +51,6 @@ density = 0 icon = 'icons/obj/hydroponics_growing.dmi' icon_state = "bush4-1" - layer = 3 pass_flags = PASSTABLE mouse_opacity = 2 @@ -192,12 +191,12 @@ icon_state = "[seed.get_trait(TRAIT_PLANT_ICON)]-[growth]" if(growth>2 && growth == max_growth) - layer = 5 + plane = ABOVE_PLANE set_opacity(1) if(!isnull(seed.chems["woodpulp"])) density = 1 else - layer = 3 + reset_plane_and_layer() density = 0 /obj/effect/plant/proc/calc_dir() diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index cade937bfb2..5e97aa68185 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -5,7 +5,6 @@ simulated = 0 anchored = 1 icon = LIGHTING_ICON - layer = LIGHTING_LAYER plane = PLANE_LIGHTING //invisibility = INVISIBILITY_LIGHTING color = LIGHTING_BASE_MATRIX diff --git a/code/modules/lore_codex/news_data/main.dm b/code/modules/lore_codex/news_data/main.dm index 2a59e12d5e1..2b0c7a4a81b 100644 --- a/code/modules/lore_codex/news_data/main.dm +++ b/code/modules/lore_codex/news_data/main.dm @@ -4,11 +4,13 @@ region. Each is labled by date of publication and title. This list is self-updating, and from time to time the publisher will push new \ articles. You are encouraged to check back frequently." children = list( - /datum/lore/codex/page/article1, - /datum/lore/codex/page/article2, - /datum/lore/codex/page/article3, - /datum/lore/codex/page/article4, + /datum/lore/codex/page/article7, + /datum/lore/codex/page/article6, /datum/lore/codex/page/article5, + /datum/lore/codex/page/article4, + /datum/lore/codex/page/article3, + /datum/lore/codex/page/article2, + /datum/lore/codex/page/article1, /datum/lore/codex/page/about_news, ) @@ -20,7 +22,7 @@ information, feel free to visit our homepage at oc.about.tsc, or the sites of any of our constituents." /datum/lore/codex/page/article1 - name = "08/30/61-- VGA Legalizes Prometheans; Nanotrasen Begins Manufacture and Testing" + name = "08/30/61 - VGA Legalizes Prometheans; Nanotrasen Begins Manufacture and Testing" data = "Today's meeting of the Vir Bicameral led to the passing of the Wynther-Helsey Bill, an implementation of the legal framework \ used in Aetolus to handle the production and cultivation of the Macrolimbus species dubbed \"Prometheans\". These ill-researched organisms \ possess cognitive abilities easily equaling those of A-class drones, but so far have not been included under the EIO's list of dangerous \ @@ -38,7 +40,7 @@ follow-up poll indicates that an appreciable number of Sivians do not support the framework's current implementation." /datum/lore/codex/page/article2 - name = "2/3/62-- Corporate Coup on Aetolus" + name = "2/3/62 - Corporate Coup on Aetolus" data = "A recent incident aboard the NRS Prometheus issued in a major change in the leadership of the Promethean homeworld. During \ a late-night meeting of the Nanotrasen Board of Trustees, several high-ranking personnel, including Head of Research Naomi Harper,\ announced their intention to assume direct control of Nanotrasen facilities in the system. It is known that several dissenting \ @@ -51,7 +53,7 @@ not responded to. Free Traders are recommended to stay clear of the region until the situation resolves itself." /datum/lore/codex/page/article3 - name = "2/10/62-- Aetolian Partisans Declare Independence" + name = "2/10/62 - Aetolian Partisans Declare Independence" data = "Breaking their week-long silence, the leaders of the Aetolian Coup, and their spokesperson and presumed leader Naomi Harper issued an address earlier today, delivered to the Oculum Broadcast office on Pearl by drone courier. Quote Dr. Harper: \"Our previous silence was a necessity, while we consolidated our forces and dealt with corporatists both internally and in Vounna's former Grayson outposts.\". In Harper's hour-long address, she berates the failure of SolGov to provide adequate protections for Prometheans. \"We will not let the Promethean be another positronic brain; they will not labor under a century of slavery, deprived of a state to call their own. The Luddites of the Friends and of the Icarus Front will not be permitted to decide the fate of a nascent race before it begins.\"\

\ Harper proceeded to unilaterally declare Vounna's independence from SolGov, claiming sovereignty over the system as the first Chairperson of the \"Aetolian Council\". Speaker of the Shadow Coalition ISA-5 has urged their government to treat the developing situation with caution but decried Harper's rhetoric, stating in a press release, \"While I know well the injustices visited on myself and my people by misguided forbearers, it is important to treat any emerging technology with respect. Current policies regarding the Prometheans are designed to limit risk during sociological trials on Aetolus and beyond. As for myself, I doubt the sincerity of this human who claims to speak for the Prometheans, when the Prometheans are perfectly equipped to speak for themselves.\"\ @@ -59,7 +61,7 @@ NanoTrasen is expected to redouble their Promethean research programs in the Vir system until stability is restored to Vounna." /datum/lore/codex/page/article4 - name = "2/14/62-- SCG Denounces Aetolian Coup; Mobilizes Fleet" + name = "2/14/62 - SCG Denounces Aetolian Coup; Mobilizes Fleet" data = "Dismissing claims of inaction, a spokesperson for the Solar Confederate Government today confirmed that the Colonial Assembly has voted overwhelmingly in favor of swift military action in response to the coup on Aetolus earlier this month. Icarus Front Chairperson Mackenzie West was quick to make a damning official statement: \"Dr. Harper and her radical agitators cannot be excused for their violent, despicable attempts to destabilize the flourishing economy of the Almach Rim. The ruthless murder of innocents, and illegal seizure of private property are crimes that cannot merely be met with strong words and gentle slaps to the wrist\"...\"I am proud to announce that two units of brave Solar marines have been assigned to the SCG-R Song Shi rapid response cruiser, with the full backing of the Icarus Front - and I hope with my heart, the backing of all patriotic Solar citizens.\"Â\

\ The decision faced resistance from more laissez faire Assembly member states, including prominent SEO governor Bruno Ofako, delaying an earlier consensus. Supporters of the action hope that this decisive display of military strength will encourage the rebels to stand down without further bloodshed, and submit to prosecution by the Lunar High Courts.\ @@ -67,7 +69,7 @@ The Icarus Front has also proposed a temporary ban on continued Promethean research, though this motion has yet to gain any traction." /datum/lore/codex/page/article5 - name = "2/23/62-- \"Almach Association\" Shocks Nation" + name = "2/23/62 - \"Almach Association\" Shocks Nation" data = "Shocking the nation, in the wee hours UTC a number of governments in the Almach Rim announced their intent to secede from the Confederacy as a unified political organization they refer to as the Almach Association, joining the already-declared Aetolian Council. Among the half-dozen affected systems is Angessa's Pearl, through which the Song Shi was passing en route to Aetolus. The Association has already issued a political manifesto and a foundational charter, leading political scientists across the galaxy to suspect back-doors collusion and possible Shelfican interference, a hypothesis made more likely by Morpheus Cyberkinetics' exonet site voicing support for the Association. Others suspect a moment of political crystallization, not unlike that in the Golden Hour three centuries ago. These researchers are already referring to this morning's events as the Gray Hour.\

\ The Association's official manifesto repudiates the Five Points, calling them \"an archaic and distinctly human invention\". Experts agree that this bold declaration puts the Movement more in line with the Golden Hour than with the Age of Secession, and many fear that nothing short of a miracle like the discovery of the positronics will spare humanity from a bloody civil war.\ @@ -75,3 +77,20 @@ While the Association currently lists only a handful of Almach Rim systems as \"Constituent Organizations\", it has named Shelf, the Free Relan Federation, and the Eutopian Foreign Relations Board as \"observers\". The implications of this status are yet to be identified.\

\ The fate of the SCG-R Song Shi and her crew remain unknown." + +/datum/lore/codex/page/article6 + name = "3/03/62 - A Week Out From Almach: What are the facts?" + data = "* Several organizations in the Almach Rim, including Angessa's Pearl, the Aetolian Council, the Interstellar Workers of Wythe, the Republic of Whitney, and members of several prominent families in the Neon Light unilaterally declared secession from SCG.

*This secession was first called the Grey Hour by political scientists in New Florence, a term popularized by reporter Elspor Fong.

* Shelf, the FRF, and the EFRB were declared \"observers\" in the Almach Association charter.

* None of these organizations have issued a statement on the matter.

* The SCG-R Song Shi was stranded in the region during the secession.

* SolGov has not issued an official statement of the fate of the Song Shi.

* Several confederate agencies, including Emergent Intelligence Oversight, the Trade and Customs Bureau, and SCG Fleet Intelligence have declared a \"state of emergency\".

* SolGov itself has NOT declared a state of emergency.

* Legitimate communications in and out of the Almach Rim are restricted to audited text messages for the period.

* Several illegitimate communication links exist and are believed by Fleet Intelligence to be currently hosting the official sites for Morpheus Cyberkinetics and for the Association itself.

* Icarus Front chairperson Mackenzie West has proposed a moratorium on the creation of new Prometheans for the duration of the crisis.

* Local laws on the subject will apply until the Assembly meets late in May.

* No confederate lawmaker has proposed action against Relani, Shelfican, or newly Almachi nationals living within stable regions.

* The border remains tightly closed to migrants, media, and diplomats alike." + +/datum/lore/codex/page/article7 + name = "3/21/62 - Relan, Shelf Join the Almach Association" + data = "Recent reports from within the Association indicate that the Free Relan Federation and Shelf have officially decided to join the Almach Association. President Nia Fischer of the FRF had this to say on the matter, in a speech addressed to the population at large. \ +

\ + \ + \"Our decision to join the Association may, at first, seem strange. It is true that we have much to gain from trade with the Solars, and that the radical transhumanism of Angessa's Pearl is not our way. But I will remind you that it was Shelf, not Sol, who ensured our prosperity just over two decades ago-- who safeguarded our independence and prevented us from falling to barbarism and dictatorship. We owe it, not just to Shelf but to all the members of the Almach Rim, to support their independence just the same. And that, my fellow Relanians, is the crux of it all. The Association is a revolution, at the heart of it all, and many of the now-independent states were owned near-outright by Trans-Stellar Corporations until the Association allowed them to shake out their fetters. What right do we have to sit by while just a dozen light-years coreward newly-born republics suffer the growing pains of independence? What right do we have to bask in our own stability when our neighbors, our comrades in ideology, are struggling with a cruel blockade proposed by politicians back on Earth and Luna? That is why we must join with them, guard them, and guide them, for as long as need be.\"\ +

\ + \ + A Shelfican spokesperson, meanwhile, had only this to say:\ +

\ + \"We're probably going to regret this but, y'know, the whole thing is kind of our fault. Sure, whatever.\"" + diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index ced8b138434..b59909376f7 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -243,7 +243,7 @@ var/list/mining_overlay_cache = list() /turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob) if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "You don't have the dexterity to do this!" + to_chat(user, "You don't have the dexterity to do this!") return if(!density) @@ -263,19 +263,19 @@ var/list/mining_overlay_cache = list() if(valid_tool) if (sand_dug) - user << "This area has already been dug." + to_chat(user, "This area has already been dug.") return var/turf/T = user.loc if (!(istype(T))) return - user << "You start digging." + to_chat(user, "You start digging.") playsound(user.loc, 'sound/effects/rustle1.ogg', 50, 1) if(!do_after(user,40)) return - user << "You dug a hole." + to_chat(user, "You dug a hole.") GetDrilled() else if(istype(W,/obj/item/weapon/storage/bag/ore)) @@ -298,7 +298,7 @@ var/list/mining_overlay_cache = list() return var/obj/item/stack/rods/R = W if (R.use(1)) - user << "Constructing support lattice ..." + to_chat(user, "Constructing support lattice ...") playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) new /obj/structure/lattice(get_turf(src)) @@ -314,7 +314,7 @@ var/list/mining_overlay_cache = list() S.use(1) return else - user << "The plating is going to need some support." + to_chat(user, "The plating is going to need some support.") return @@ -334,7 +334,17 @@ var/list/mining_overlay_cache = list() var/obj/item/device/measuring_tape/P = W user.visible_message("\The [user] extends \a [P] towards \the [src].","You extend \the [P] towards \the [src].") if(do_after(user, 15)) - user << "\The [src] has been excavated to a depth of [excavation_level]cm." + to_chat(user, "\The [src] has been excavated to a depth of [excavation_level]cm.") + return + + if(istype(W, /obj/item/device/xenoarch_multi_tool)) + var/obj/item/device/xenoarch_multi_tool/C = W + if(C.mode) //Mode means scanning + C.depth_scanner.scan_atom(user, src) + else + user.visible_message("\The [user] extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!", "You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!") + if(do_after(user, 15)) + to_chat(user, "\The [src] has been excavated to a depth of [excavation_level]cm.") return if (istype(W, /obj/item/weapon/pickaxe)) @@ -356,7 +366,7 @@ var/list/mining_overlay_cache = list() if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably) fail_message = ". [pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]" - user << "You start [P.drill_verb][fail_message]." + to_chat(user, "You start [P.drill_verb][fail_message].") if(fail_message && prob(90)) if(prob(25)) @@ -375,7 +385,7 @@ var/list/mining_overlay_cache = list() else if(newDepth > F.excavation_required - F.clearance_range) // Not quite right but you still extract your find, the closer to the bottom the better, but not above 80% excavate_find(prob(80 * (F.excavation_required - newDepth) / F.clearance_range), F) - user << "You finish [P.drill_verb] \the [src]." + to_chat(user, "You finish [P.drill_verb] \the [src].") if(newDepth >= 200) // This means the rock is mined out fully var/obj/structure/boulder/B @@ -480,7 +490,7 @@ var/list/mining_overlay_cache = list() if(prob(50)) pain = 1 for(var/mob/living/M in range(src, 200)) - M << "[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!" + to_chat(M, "[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!") if(pain) flick("pain",M.pain) if(prob(50)) diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index 9074357afaa..7f082e1ef08 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -140,6 +140,42 @@ note dizziness decrements automatically in the mob's Life() proc. //reset the pixel offsets to zero is_floating = 0 +/atom/movable/proc/fade_towards(atom/A,var/time = 2) + set waitfor = FALSE + + var/pixel_x_diff = 0 + var/pixel_y_diff = 0 + var/pixel_z_diff = 0 + var/direction = get_dir(src, A) + if(direction & NORTH) + pixel_y_diff = 32 + else if(direction & SOUTH) + pixel_y_diff = -32 + + if(direction & EAST) + pixel_x_diff = 32 + else if(direction & WEST) + pixel_x_diff = -32 + + if(!direction) // On top of? + pixel_z_diff = -8 + + var/default_pixel_x = initial(pixel_x) + var/default_pixel_y = initial(pixel_y) + var/default_pixel_z = initial(pixel_z) + var/initial_alpha = alpha + var/mob/mob = src + if(istype(mob)) + default_pixel_x = mob.default_pixel_x + default_pixel_y = mob.default_pixel_y + + animate(src, alpha = 0, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, pixel_z = pixel_z + pixel_z_diff, time = time) + sleep(time+1) //So you can wait on this proc to finish if you want to time your next steps + pixel_x = default_pixel_x + pixel_y = default_pixel_y + pixel_z = default_pixel_z + alpha = initial_alpha + /atom/movable/proc/do_attack_animation(atom/A) var/pixel_x_diff = 0 @@ -167,7 +203,17 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/living/do_attack_animation(atom/A) ..() - is_floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + //Check for clients with pref enabled + var/list/viewing = list() + for(var/m in viewers(A)) + var/mob/M = m + var/client/C = M.client + if(C && C.is_preference_enabled(/datum/client_preference/attack_icons)) + viewing += M.client + + //Animals attacking each other in the distance, probably. Forgeddaboutit. + if(!viewing.len) + return FALSE // What icon do we use for the attack? var/obj/used_item @@ -180,6 +226,9 @@ note dizziness decrements automatically in the mob's Life() proc. if(!used_item && !(attack_icon && attack_icon_state)) return FALSE //Didn't find an item, not doing animation. + // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + is_floating = 0 + var/image/I if(used_item) //Found an in-hand item to animate @@ -192,13 +241,7 @@ note dizziness decrements automatically in the mob's Life() proc. I = image(attack_icon, A, attack_icon_state, A.layer + 1) I.dir = dir - //Check for clients with pref enabled - var/list/viewing = list() - for(var/m in viewers(A)) - var/mob/M = m - var/client/C = M.client - if(C && C.is_preference_enabled(/datum/client_preference/attack_icons)) - viewing += M.client + // Show the overlay to the clients flick_overlay(I, viewing, 5, TRUE) // 5 ticks/half a second // Set the direction of the icon animation. diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7f151f8955f..2b9340192fa 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -8,7 +8,7 @@ desc = "It's a g-g-g-g-ghooooost!" //jinkies! icon = 'icons/mob/ghost.dmi' icon_state = "ghost" - layer = 3.9 //Just below normal mobs + layer = BELOW_MOB_LAYER plane = PLANE_GHOSTS alpha = 127 stat = DEAD @@ -103,12 +103,12 @@ if (ishuman(body)) var/mob/living/carbon/human/H = body icon = H.icon - underlays = H.underlays - overlays = H.overlays + icon_state = H.icon_state + add_overlay(H.overlays_standing) //All our equipment sprites else icon = body.icon icon_state = body.icon_state - overlays = body.overlays + add_overlay(body.overlays) gender = body.gender if(body.mind && body.mind.name) @@ -800,4 +800,7 @@ mob/observer/dead/MayRespawn(var/feedback = 0) if(PP.pai == null) PP.overlays += "pai-ghostalert" spawn(54) - PP.overlays.Cut() \ No newline at end of file + PP.overlays.Cut() + +/mob/observer/dead/speech_bubble_appearance() + return "ghost" diff --git a/code/modules/mob/freelook/chunk.dm b/code/modules/mob/freelook/chunk.dm index 7c50bd3135a..41439b4adc7 100644 --- a/code/modules/mob/freelook/chunk.dm +++ b/code/modules/mob/freelook/chunk.dm @@ -100,6 +100,7 @@ for(var/turf in visRemoved) var/turf/t = turf if(obscuredTurfs[t]) + LAZYINITLIST(t.obfuscations) if(!t.obfuscations[obfuscation.type]) var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER) ob_image.plane = PLANE_FULLSCREEN @@ -141,6 +142,7 @@ for(var/turf in obscuredTurfs) var/turf/t = turf + LAZYINITLIST(t.obfuscations) if(!t.obfuscations[obfuscation.type]) var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER) ob_image.plane = PLANE_FULLSCREEN diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index 482025426eb..0b31e24cce2 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -8,7 +8,7 @@ VN.updateVisibility(A, opacity_check) /turf - var/list/image/obfuscations = new() + var/list/image/obfuscations /turf/drain_power() return -1 diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 4d01759ce97..7153c0fe261 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -302,11 +302,6 @@ else adverb = " a very lengthy message" message = "[speaker] [verb][adverb]." - if(src.status_flags & PASSEMOTES) - for(var/obj/item/weapon/holder/H in src.contents) - H.show_message(message) - for(var/mob/living/M in src.contents) - M.show_message(message) src.show_message(message) /mob/proc/hear_sleep(var/message) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index a1cfdcb39b6..3a19eee319f 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -39,10 +39,13 @@ var/list/holder_mob_icon_cache = list() update_state() /obj/item/weapon/holder/proc/update_state() - if(istype(loc,/turf) || !(contents.len)) + if(!(contents.len)) + qdel(src) + else if(isturf(loc)) + drop_items() if(held_mob) held_mob.forceMove(loc) - drop_items() + held_mob = null qdel(src) /obj/item/weapon/holder/proc/drop_items() @@ -136,7 +139,6 @@ var/list/holder_mob_icon_cache = list() grabber << "You scoop up \the [src]!" src << "\The [grabber] scoops you up!" - grabber.status_flags |= PASSEMOTES H.sync(src) return H diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 4f9f81156f1..241993423d1 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -20,7 +20,7 @@ get_targets() /mob/living/bot/cleanbot/handleIdle() - if(!screwloose && !oddbutton && prob(5)) + if(!screwloose && !oddbutton && prob(2)) custom_emote(2, "makes an excited booping sound!") playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0) @@ -67,7 +67,8 @@ return busy = 1 - custom_emote(2, "begins to clean up \the [D]") + if(prob(20)) + custom_emote(2, "begins to clean up \the [D]") update_icons() var/cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50 if(do_after(src, cleantime)) diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 1e23af341c3..0141cdb39a5 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -338,7 +338,7 @@ new /obj/item/weapon/farmbot_arm_assembly(loc, src) /obj/structure/reagent_dispensers/watertank/attackby(var/obj/item/organ/external/S, mob/user as mob) - if ((!istype(S, /obj/item/organ/external/arm)) || (!S.robotic == ORGAN_ROBOT)) + if ((!istype(S, /obj/item/organ/external/arm)) || S.robotic != ORGAN_ROBOT) ..() return diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 29e9cd0a9b1..0e35d6b2b00 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -333,7 +333,7 @@ qdel(src) /obj/item/weapon/storage/firstaid/attackby(var/obj/item/organ/external/S, mob/user as mob) - if (!istype(S, /obj/item/organ/external/arm) || !(S.robotic == ORGAN_ROBOT)) + if (!istype(S, /obj/item/organ/external/arm) || S.robotic != ORGAN_ROBOT) ..() return diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm index 614647993b7..585b421c7ff 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm @@ -33,7 +33,6 @@ if(!istype(H) || !src || !(src.Adjacent(H))) return 0 H << "You feel your being twine with that of \the [src] as it merges with your biomass." - H.status_flags |= PASSEMOTES src << "You feel your being twine with that of \the [H] as you merge with its biomass." loc = H verbs += /mob/living/carbon/alien/diona/proc/split @@ -66,4 +65,3 @@ for(var/atom/A in M.contents) if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder)) return - M.status_flags &= ~PASSEMOTES \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 0a85e9a155c..09b7aadc70d 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -644,6 +644,10 @@ if(M) message = "slaps [M] across the face. Ouch!" playsound(loc, 'sound/effects/snap.ogg', 50, 1) + if(ishuman(M)) //Snowflakey! + var/mob/living/carbon/human/H = M + if(istype(H.wear_mask,/obj/item/clothing/mask/smokable)) + H.drop_from_inventory(H.wear_mask) else message = "slaps [T.himself]!" playsound(loc, 'sound/effects/snap.ogg', 50, 1) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 09f6c62276f..dc3a01527f9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -94,6 +94,8 @@ stat("Chemical Storage", mind.changeling.chem_charges) stat("Genetic Damage Time", mind.changeling.geneticdamage) stat("Re-Adaptations", "[mind.changeling.readapts]/[mind.changeling.max_readapts]") + if(species) + species.Stat(src) /mob/living/carbon/human/ex_act(severity) if(!blinded) @@ -1270,9 +1272,12 @@ if(!affecting) . = 0 fail_msg = "They are missing that limb." - else if (affecting.robotic >= ORGAN_ROBOT) + else if (affecting.robotic == ORGAN_ROBOT) . = 0 fail_msg = "That limb is robotic." + else if (affecting.robotic >= ORGAN_LIFELIKE) + . = 0 + fail_msg = "Your needle refuses to penetrate more than a short distance..." else switch(target_zone) if(BP_HEAD) @@ -1548,7 +1553,7 @@ return species.fire_icon_state // Called by job_controller. Makes drones start with a permit, might be useful for other people later too. -/mob/living/carbon/human/equip_post_job() //Drone Permit moved to equip_survival_gear() +/mob/living/carbon/human/equip_post_job() var/braintype = get_FBP_type() if(braintype == FBP_DRONE) var/turf/T = get_turf(src) @@ -1558,7 +1563,58 @@ /mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot. if(status_flags & HIDING) // Hiding? Carry on. - if(stat == DEAD || paralysis || weakened || stunned) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work. - status_flags &= ~HIDING //No hiding for you. Mob layer should be updated naturally, but it actually isn't. + if(stat == DEAD || paralysis || weakened || stunned || restrained()) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work. + reset_plane_and_layer() + status_flags &= ~HIDING else layer = HIDING_LAYER + +/mob/living/carbon/human/proc/get_display_species() + //Shows species in tooltip + //Beepboops get special text if obviously beepboop + if(looksSynthetic()) + if(gender == MALE) + return "Android" + else if(gender == FEMALE) + return "Gynoid" + else + return "Synthetic" + //Else species name + if(species) + return species.get_examine_name() + //Else CRITICAL FAILURE! + return "" + +/mob/living/carbon/human/get_nametag_name(mob/user) + return name //Could do fancy stuff here? + +/mob/living/carbon/human/get_nametag_desc(mob/user) + var/msg = "" + if(hasHUD(user,"security")) + //Try to find their name + var/perpname + if(wear_id) + var/obj/item/weapon/card/id/I = wear_id.GetID() + if(I) + perpname = I.registered_name + else + perpname = name + else + perpname = name + //Try to find their record + var/criminal = "None" + if(perpname) + var/datum/data/record/G = find_general_record("name", perpname) + if(G) + var/datum/data/record/S = find_security_record("id", G.fields["id"]) + if(S) + criminal = S.fields["criminal"] + //If it's interesting, append + if(criminal != "None") + msg += "([criminal]) " + + if(hasHUD(user,"medical")) + msg += "(Health: [round((health/getMaxHealth())*100)]%) " + + msg += get_display_species() + return msg diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 45532aa1d48..95a3d0e5ed6 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -108,7 +108,8 @@ amount += O.burn_dam return amount -/mob/living/carbon/human/adjustBruteLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/adjustBruteLoss(var/amount,var/include_robo) amount = amount*species.brute_mod if(amount > 0) for(var/datum/modifier/M in modifiers) @@ -121,10 +122,11 @@ for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) amount *= M.incoming_healing_percent - heal_overall_damage(-amount, 0) + heal_overall_damage(-amount, 0, include_robo) BITSET(hud_updateflag, HEALTH_HUD) -/mob/living/carbon/human/adjustFireLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/adjustFireLoss(var/amount,var/include_robo) amount = amount*species.burn_mod if(amount > 0) for(var/datum/modifier/M in modifiers) @@ -137,7 +139,7 @@ for(var/datum/modifier/M in modifiers) if(!isnull(M.incoming_healing_percent)) amount *= M.incoming_healing_percent - heal_overall_damage(0, -amount) + heal_overall_damage(0, -amount, include_robo) BITSET(hud_updateflag, HEALTH_HUD) /mob/living/carbon/human/proc/adjustBruteLossByPart(var/amount, var/organ_name, var/obj/damage_source = null) @@ -348,7 +350,8 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t //Heal MANY external organs, in random order -/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn, var/include_robo) var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn) var/update = 0 @@ -358,7 +361,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t var/brute_was = picked.brute_dam var/burn_was = picked.burn_dam - update |= picked.heal_damage(brute,burn) + update |= picked.heal_damage(brute,burn,robo_repair = include_robo) brute -= (brute_was-picked.brute_dam) burn -= (burn_was-picked.burn_dam) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1befd9579b3..db20f7f7440 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -341,7 +341,7 @@ emp_act /mob/living/carbon/human/emag_act(var/remaining_charges, mob/user, var/emag_source) var/obj/item/organ/external/affecting = get_organ(user.zone_sel.selecting) - if(!affecting || !(affecting.status & ORGAN_ROBOT)) + if(!affecting || !(affecting.robotic >= ORGAN_ROBOT)) user << "That limb isn't robotic." return -1 if(affecting.sabotaged) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index af9e46f3512..8a9db8a349d 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -167,7 +167,7 @@ var/toxDam = getToxLoss() if(toxDam) - output += "System Instability: [toxDam > 25 ? "Severe" : "Moderate"]\n" + output += "System Instability: [toxDam > 25 ? "Severe" : "Moderate"]. Seek charging station for cleanup.\n" else output += "System Instability: OK\n" @@ -273,26 +273,9 @@ var/obj/item/organ/O = new limb_path(src) organ_data["descriptor"] = O.name to_chat(src, "You feel a slithering sensation as your [O.name] reform.") - update_icons_all() + update_icons_body() active_regen = FALSE else to_chat(src, "Your regeneration is interrupted!") nutrition -= 75 active_regen = FALSE - -/mob/living/carbon/human/proc/hide_humanoid() - set name = "Hide" - set desc = "Allows you to hide beneath tables or certain items. Toggled on or off." - set category = "Abilities" - - if(stat == DEAD || paralysis || weakened || stunned || restrained()) // No hiding if you're stunned! - return - - if(status_flags & HIDING) - layer = MOB_LAYER - to_chat(src, "You have stopped hiding.") - else - layer = HIDING_LAYER //Just above cables with their 2.44 - to_chat(src, "You are now hiding.") - - status_flags ^= HIDING diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b27f98bc40c..3ce0c85ef1c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -850,28 +850,6 @@ if(status_flags & GODMODE) return 0 //godmode - var/obj/item/organ/internal/diona/node/light_organ = locate() in internal_organs - - if(!isSynthetic()) - if(light_organ && !light_organ.is_broken()) - var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing - if(isturf(loc)) //else, there's considered to be no light - var/turf/T = loc - light_amount = T.get_lumcount() * 10 - nutrition += light_amount - traumatic_shock -= light_amount - - if(species.flags & IS_PLANT) - if(nutrition > 450) - nutrition = 450 - - if(light_amount >= 3) //if there's enough light, heal - adjustBruteLoss(-(round(light_amount/2))) - adjustFireLoss(-(round(light_amount/2))) - adjustToxLoss(-(light_amount)) - adjustOxyLoss(-(light_amount)) - //TODO: heal wounds, heal broken limbs. - if(species.light_dam) var/light_amount = 0 if(isturf(loc)) @@ -899,14 +877,6 @@ if(overeatduration > 1) overeatduration -= 2 //doubled the unfat rate - if(!isSynthetic() && (species.flags & IS_PLANT) && (!light_organ || light_organ.is_broken())) - if(nutrition < 200) - take_overall_damage(2,0) - - //traumatic_shock is updated every tick, incrementing that is pointless - shock_stage is the counter. - //Not that it matters much for diona, who have NO_PAIN. - shock_stage++ - // TODO: stomach and bloodstream organ. if(!isSynthetic()) handle_trace_chems() @@ -1161,7 +1131,7 @@ else sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) - see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING + see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : see_invisible_default if(XRAY in mutations) sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS @@ -1173,7 +1143,7 @@ if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) see_invisible = SEE_INVISIBLE_CULT else - see_invisible = SEE_INVISIBLE_LIVING + see_invisible = see_invisible_default seer = 0 if(!seedarkness) @@ -1184,7 +1154,7 @@ else sight = species.get_vision_flags(src) see_in_dark = species.darksight - see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING + see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : see_invisible_default var/tmp/glasses_processed = 0 var/obj/item/weapon/rig/rig = back @@ -1205,7 +1175,7 @@ if(!glasses_processed && (species.get_vision_flags(src) > 0)) sight |= species.get_vision_flags(src) if(!seer && !glasses_processed && seedarkness) - see_invisible = SEE_INVISIBLE_LIVING + see_invisible = see_invisible_default if(healths) if (chem_effects[CE_PAINKILLER] > 100) @@ -1385,7 +1355,7 @@ if(G.see_invisible >= 0) see_invisible = G.see_invisible else if(!druggy && !seer) - see_invisible = SEE_INVISIBLE_LIVING + see_invisible = see_invisible_default /mob/living/carbon/human/handle_random_events() if(inStasisNow()) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 39b84609071..787ec957192 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -422,3 +422,7 @@ // Used to override normal fall behaviour. Use only when the species does fall down a level. /datum/species/proc/fall_impact_special(var/mob/living/carbon/human/H, var/atom/A) return FALSE + +// Allow species to display interesting information in the human stat panels +/datum/species/proc/Stat(var/mob/living/carbon/human/H) + return diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index c8e3e0c5d5a..0dd73b3f887 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -183,6 +183,9 @@ var/list/wrapped_species_by_ref = list() r_skin = hex2num(copytext(new_skin, 2, 4)) g_skin = hex2num(copytext(new_skin, 4, 6)) b_skin = hex2num(copytext(new_skin, 6, 8)) + r_synth = r_skin + g_synth = g_skin + b_synth = b_skin var/datum/species/shapeshifter/S = species if(S.monochromatic) @@ -286,4 +289,36 @@ var/list/wrapped_species_by_ref = list() if(species && mind) apply_traits() - return \ No newline at end of file + return + +/mob/living/carbon/human/proc/shapeshifter_select_eye_colour() + + set name = "Select Eye Color" + set category = "Abilities" + + if(stat || world.time < last_special) + return + + last_special = world.time + 50 + + var/current_color = rgb(r_eyes,g_eyes,b_eyes) + var/new_eyes = input("Pick a new color for your eyes.","Eye Color", current_color) as null|color + if(!new_eyes) + return + + shapeshifter_set_eye_color(new_eyes) + +/mob/living/carbon/human/proc/shapeshifter_set_eye_color(var/new_eyes) + + var/list/new_color_rgb_list = hex2rgb(new_eyes) + // First, update mob vars. + r_eyes = new_color_rgb_list[1] + g_eyes = new_color_rgb_list[2] + b_eyes = new_color_rgb_list[3] + // Now sync the organ's eye_colour list, if possible + var/obj/item/organ/internal/eyes/eyes = internal_organs_by_name[O_EYES] + if(istype(eyes)) + eyes.update_colour() + + update_icons_body() + update_eyes() diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 800d15c6d4f..00f7973202c 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -83,6 +83,7 @@ var/datum/species/shapeshifter/promethean/prometheans /mob/living/carbon/human/proc/shapeshifter_select_shape, /mob/living/carbon/human/proc/shapeshifter_select_colour, /mob/living/carbon/human/proc/shapeshifter_select_hair, + /mob/living/carbon/human/proc/shapeshifter_select_eye_colour, /mob/living/carbon/human/proc/shapeshifter_select_hair_colors, /mob/living/carbon/human/proc/shapeshifter_select_gender, /mob/living/carbon/human/proc/regenerate diff --git a/code/modules/mob/living/carbon/human/species/station/seromi.dm b/code/modules/mob/living/carbon/human/species/station/seromi.dm index 72f4f808d40..a8b39251582 100644 --- a/code/modules/mob/living/carbon/human/species/station/seromi.dm +++ b/code/modules/mob/living/carbon/human/species/station/seromi.dm @@ -114,7 +114,7 @@ inherent_verbs = list( /mob/living/carbon/human/proc/sonar_ping, - /mob/living/carbon/human/proc/hide_humanoid + /mob/living/proc/hide ) /datum/species/teshari/equip_survival_gear(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 231db8a9fb0..f1911b29df5 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -405,3 +405,33 @@ qdel(D) H.visible_message("\The [H] splits apart with a wet slithering noise!") + +/datum/species/diona/handle_environment_special(var/mob/living/carbon/human/H) + if(H.inStasisNow()) + return + + var/obj/item/organ/internal/diona/node/light_organ = locate() in H.internal_organs + + if(light_organ && !light_organ.is_broken()) + var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing + if(isturf(H.loc)) //else, there's considered to be no light + var/turf/T = H.loc + light_amount = T.get_lumcount() * 10 + H.nutrition += light_amount + H.shock_stage -= light_amount + + if(H.nutrition > 450) + H.nutrition = 450 + if(light_amount >= 3) //if there's enough light, heal + H.adjustBruteLoss(-(round(light_amount/2))) + H.adjustFireLoss(-(round(light_amount/2))) + H.adjustToxLoss(-(light_amount)) + H.adjustOxyLoss(-(light_amount)) + //TODO: heal wounds, heal broken limbs. + + else if(H.nutrition < 200) + H.take_overall_damage(2,0) + + //traumatic_shock is updated every tick, incrementing that is pointless - shock_stage is the counter. + //Not that it matters much for diona, who have NO_PAIN. + H.shock_stage++ diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 5c10ea509e0..71717886f8b 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -231,7 +231,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() if(eyes) icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]" else - icon_key += "#000000" + icon_key += "[r_eyes], [g_eyes], [b_eyes]" for(var/organ_tag in species.has_limbs) var/obj/item/organ/external/part = organs_by_name[organ_tag] diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 0f393a9417d..5cf6395b7d6 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -100,7 +100,7 @@ src.lying = 1 src.blinded = 1 else - if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc. + if (src.paralysis || src.stunned || src.weakened || (status_flags & FAKEDEATH)) //Stunned etc. if (src.stunned > 0) src.stat = 0 if (src.weakened > 0) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 5fdea4a0e6f..31fe6b3152d 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -6,7 +6,8 @@ var/is_adult = 0 speak_emote = list("chirps") - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER maxHealth = 150 health = 150 gender = NEUTER diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e1c44ae9a53..3892f8310e1 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -13,7 +13,6 @@ var/mutable_appearance/dsma = new(dsoverlay) //Changing like ten things, might as well. dsma.alpha = 0 dsma.plane = PLANE_LIGHTING - dsma.layer = LIGHTING_LAYER + 0.1 dsma.blend_mode = BLEND_ADD dsoverlay.appearance = dsma @@ -254,7 +253,8 @@ default behaviour is: /mob/living/proc/getActualBruteLoss() // Mostly for humans with robolimbs. return getBruteLoss() -/mob/living/proc/adjustBruteLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/proc/adjustBruteLoss(var/amount,var/include_robo) if(status_flags & GODMODE) return 0 //godmode if(amount > 0) @@ -328,7 +328,8 @@ default behaviour is: /mob/living/proc/getActualFireLoss() // Mostly for humans with robolimbs. return getFireLoss() -/mob/living/proc/adjustFireLoss(var/amount) +//'include_robo' only applies to healing, for legacy purposes, as all damage typically hurts both types of organs +/mob/living/proc/adjustFireLoss(var/amount,var/include_robo) if(status_flags & GODMODE) return 0 //godmode if(amount > 0) for(var/datum/modifier/M in modifiers) @@ -834,7 +835,6 @@ default behaviour is: for(var/atom/A in M.contents) if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder)) return - M.status_flags &= ~PASSEMOTES else if(istype(H.loc,/obj/item/clothing/accessory/holster)) var/obj/item/clothing/accessory/holster/holster = H.loc diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 23dbb6fc09d..9739e596b8e 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -55,5 +55,7 @@ var/glow_intensity = null var/glow_color = "#FFFFFF" // The color they're glowing! + var/see_invisible_default = SEE_INVISIBLE_LIVING + var/list/hud_list //Holder for health hud, status hud, wanted hud, etc (not like inventory slots) var/has_huds = FALSE //Whether or not we should bother initializing the above list diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index d2c2d72e4e8..1442c80f9ba 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -6,9 +6,12 @@ if(stat == DEAD || paralysis || weakened || stunned || restrained()) return - if(layer == HIDING_LAYER) - layer = MOB_LAYER - src << text("You have stopped hiding.") + if(status_flags & HIDING) + status_flags &= ~HIDING + reset_plane_and_layer() + to_chat(src,"You have stopped hiding.") else + status_flags |= HIDING layer = HIDING_LAYER //Just above cables with their 2.44 - src << text("You are now hiding.") + plane = OBJ_PLANE + to_chat(src,"You are now hiding.") diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index d022ef71b8e..4b4edeb25c4 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -298,11 +298,14 @@ proc/get_radio_key_from_channel(var/channel) else return 1 //If we're in nullspace, then forget it. + //Remember the speech images so we can remove them later and they can get GC'd + var/list/images_to_clients = list() + //The 'post-say' static speech bubble var/speech_bubble_test = say_test(message) var/speech_type = speech_bubble_appearance() var/image/speech_bubble = image('icons/mob/talk.dmi',src,"[speech_type][speech_bubble_test]") - spawn(30) qdel(speech_bubble) + images_to_clients[speech_bubble] = list() // Attempt Multi-Z Talking var/mob/above = src.shadow @@ -311,7 +314,7 @@ proc/get_radio_key_from_channel(var/channel) if(ST) var/list/results = get_mobs_and_objs_in_view_fast(ST, world.view) var/image/z_speech_bubble = image('icons/mob/talk.dmi', above, "h[speech_bubble_test]") - spawn(30) qdel(z_speech_bubble) + images_to_clients[z_speech_bubble] = list() for(var/item in results["mobs"]) if(item != above && !(item in listening)) listening[item] = z_speech_bubble @@ -326,12 +329,17 @@ proc/get_radio_key_from_channel(var/channel) var/dst = get_dist(get_turf(M),get_turf(src)) if(dst <= message_range || (M.stat == DEAD && !forbid_seeing_deadchat)) //Inside normal message range, or dead with ears (handled in the view proc) - M << (listening[M] || speech_bubble) // Send the image attached to shadow mob if available + if(M.client) + var/image/I1 = listening[M] || speech_bubble + images_to_clients[I1] |= M.client + M << I1 M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol) - if(whispering) //Don't even bother with these unless whispering if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range - M << (listening[M] || speech_bubble) // Send the image attached to shadow mob if available + if(M.client) + var/image/I2 = listening[M] || speech_bubble + images_to_clients[I2] |= M.client + M << I2 M.hear_say(stars(message), verb, speaking, alt_name, italics, src, speech_sound, sound_vol*0.2) if(dst > w_scramble_range && dst <= world.view) //Inside whisper 'visible' range M.show_message("[src.name] [w_not_heard].", 2) @@ -344,6 +352,17 @@ proc/get_radio_key_from_channel(var/channel) if(dst <= message_range) O.hear_talk(src, message, verb, speaking) + //Remove all those images. At least it's just ONE spawn this time. + spawn(30) + for(var/img in images_to_clients) + var/image/I = img + var/list/clients_from_image = images_to_clients[I] + for(var/client in clients_from_image) + var/client/C = client + if(C) //Could have disconnected after message sent, before removing bubble. + C.images -= I + qdel(I) + //Log the message to file if(whispering) log_whisper(message,src) @@ -352,8 +371,11 @@ proc/get_radio_key_from_channel(var/channel) return 1 /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language) - for (var/mob/O in viewers(src, null)) - O.hear_signlang(message, verb, language, src) + var/list/potentials = get_mobs_and_objs_in_view_fast(src, world.view) + var/list/mobs = potentials["mobs"] + for(var/hearer in mobs) + var/mob/M = hearer + M.hear_signlang(message, verb, language, src) return 1 /obj/effect/speech_bubble diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 2bdcf1b912b..2b11059ff9c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -258,7 +258,7 @@ var/list/ai_verbs_default = list( aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")" if(aiCommunicator) - aiCommunicator.register_device(src) + aiCommunicator.register_device(src.name) /* The AI Power supply is a dummy object used for powering the AI since only machinery should be using power. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 589f410f012..6c7b8953850 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -210,7 +210,7 @@ /mob/living/silicon/robot/proc/setup_communicator() if (!communicator) communicator = new/obj/item/device/communicator/integrated(src) - communicator.register_device(src, "[modtype] [braintype]") + communicator.register_device(src.name, "[modtype] [braintype]") //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO //Improved /N @@ -706,34 +706,29 @@ return 0 /mob/living/silicon/robot/updateicon() - overlays.Cut() + cut_overlays() if(stat == CONSCIOUS) - overlays += "eyes-[module_sprites[icontype]]" + add_overlay("eyes-[module_sprites[icontype]]") if(opened) var/panelprefix = custom_sprite ? "[src.ckey]-[src.name]" : "ov" if(wiresexposed) - overlays += "[panelprefix]-openpanel +w" + add_overlay("[panelprefix]-openpanel +w") else if(cell) - overlays += "[panelprefix]-openpanel +c" + add_overlay("[panelprefix]-openpanel +c") else - overlays += "[panelprefix]-openpanel -c" + add_overlay("[panelprefix]-openpanel -c") if(has_active_type(/obj/item/borg/combat/shield)) var/obj/item/borg/combat/shield/shield = locate() in src if(shield && shield.active) - overlays += "[module_sprites[icontype]]-shield" + add_overlay("[module_sprites[icontype]]-shield") if(modtype == "Combat") if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) icon_state = "[module_sprites[icontype]]-roll" else icon_state = module_sprites[icontype] - return - - if(typing) - typing = FALSE - set_typing_indicator(1) /mob/living/silicon/robot/proc/installed_modules() if(weapon_lock) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 0d88e0c96ff..602be39e879 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -30,7 +30,8 @@ /mob/living/silicon/New() silicon_mob_list |= src ..() - add_language("Galactic Common") + add_language(LANGUAGE_GALCOM) + set_default_language(all_languages[LANGUAGE_GALCOM]) init_id() init_subsystems() diff --git a/code/modules/mob/living/simple_animal/animals/bat.dm b/code/modules/mob/living/simple_animal/animals/bat.dm index edd9c3dec52..1be28a078f6 100644 --- a/code/modules/mob/living/simple_animal/animals/bat.dm +++ b/code/modules/mob/living/simple_animal/animals/bat.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/scarybat name = "space bats" desc = "A swarm of cute little blood sucking bats that looks pretty upset." + tt_desc = "Desmodus rotundus" //Common vampire bat icon = 'icons/mob/bats.dmi' icon_state = "bat" icon_living = "bat" diff --git a/code/modules/mob/living/simple_animal/animals/bear.dm b/code/modules/mob/living/simple_animal/animals/bear.dm index 0680714f863..d0f871e7cee 100644 --- a/code/modules/mob/living/simple_animal/animals/bear.dm +++ b/code/modules/mob/living/simple_animal/animals/bear.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/hostile/bear name = "space bear" desc = "RawrRawr!!" + tt_desc = "Ursinae aetherius" //...bearspace? Maybe. icon_state = "bear" icon_living = "bear" icon_dead = "bear_dead" diff --git a/code/modules/mob/living/simple_animal/animals/carp.dm b/code/modules/mob/living/simple_animal/animals/carp.dm index 4dc4daffdaf..8b6e01c4528 100644 --- a/code/modules/mob/living/simple_animal/animals/carp.dm +++ b/code/modules/mob/living/simple_animal/animals/carp.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/carp name = "space carp" desc = "A ferocious, fang-bearing creature that resembles a fish." + tt_desc = "Cyprinus aetherius" //carpspace? maybe icon_state = "carp" icon_living = "carp" icon_dead = "carp_dead" diff --git a/code/modules/mob/living/simple_animal/animals/cat.dm b/code/modules/mob/living/simple_animal/animals/cat.dm index 81cd043ce0b..74121bdd53e 100644 --- a/code/modules/mob/living/simple_animal/animals/cat.dm +++ b/code/modules/mob/living/simple_animal/animals/cat.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/cat name = "cat" desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers." + tt_desc = "Felis catus" intelligence_level = SA_ANIMAL icon_state = "cat2" item_state = "cat2" diff --git a/code/modules/mob/living/simple_animal/animals/corgi.dm b/code/modules/mob/living/simple_animal/animals/corgi.dm index a6d0dcd9c0c..d5c198ad781 100644 --- a/code/modules/mob/living/simple_animal/animals/corgi.dm +++ b/code/modules/mob/living/simple_animal/animals/corgi.dm @@ -3,6 +3,7 @@ name = "corgi" real_name = "corgi" desc = "It's a corgi." + tt_desc = "Canis familiaris" intelligence_level = SA_ANIMAL icon_state = "corgi" icon_living = "corgi" @@ -37,6 +38,7 @@ real_name = "Ian" //Intended to hold the name without altering it. gender = MALE desc = "It's a corgi." + tt_desc = "Canis commandus" var/turns_since_scan = 0 var/obj/movement_target response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/animals/crab.dm b/code/modules/mob/living/simple_animal/animals/crab.dm index 04b6161d3bb..68aa2afd148 100644 --- a/code/modules/mob/living/simple_animal/animals/crab.dm +++ b/code/modules/mob/living/simple_animal/animals/crab.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/crab name = "crab" desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time." + tt_desc = "Ranina ranina" icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" diff --git a/code/modules/mob/living/simple_animal/animals/farm_animals.dm b/code/modules/mob/living/simple_animal/animals/farm_animals.dm index 213aff73bfc..52904786a4a 100644 --- a/code/modules/mob/living/simple_animal/animals/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/animals/farm_animals.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/retaliate/goat name = "goat" desc = "Not known for their pleasant disposition." + tt_desc = "Oreamnos americanus" icon_state = "goat" icon_living = "goat" icon_dead = "goat_dead" @@ -85,6 +86,7 @@ /mob/living/simple_animal/cow name = "cow" desc = "Known for their milk, just don't tip them over." + tt_desc = "Bos taurus" icon_state = "cow" icon_living = "cow" icon_dead = "cow_dead" @@ -153,6 +155,7 @@ /mob/living/simple_animal/chick name = "\improper chick" desc = "Adorable! They make such a racket though." + tt_desc = "Gallus domesticus" icon_state = "chick" icon_living = "chick" icon_dead = "chick_dead" @@ -203,6 +206,7 @@ var/global/chicken_count = 0 /mob/living/simple_animal/chicken name = "\improper chicken" desc = "Hopefully the eggs are good this season." + tt_desc = "Gallus domesticus" icon_state = "chicken" icon_living = "chicken" icon_dead = "chicken_dead" diff --git a/code/modules/mob/living/simple_animal/animals/giant_spider.dm b/code/modules/mob/living/simple_animal/animals/giant_spider.dm index 4eca650adee..439e401e089 100644 --- a/code/modules/mob/living/simple_animal/animals/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/animals/giant_spider.dm @@ -8,6 +8,7 @@ /mob/living/simple_animal/hostile/giant_spider name = "giant spider" desc = "Furry and brown, it makes you shudder to look at it. This one has deep red eyes." + tt_desc = "Atrax robustus gigantus" icon_state = "guard" icon_living = "guard" icon_dead = "guard_dead" diff --git a/code/modules/mob/living/simple_animal/animals/goose.dm b/code/modules/mob/living/simple_animal/animals/goose.dm index dd3b93c4795..764a07415cd 100644 --- a/code/modules/mob/living/simple_animal/animals/goose.dm +++ b/code/modules/mob/living/simple_animal/animals/goose.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/goose name = "space goose" desc = "That's no duck. That's a space goose. You have a bad feeling about this." + tt_desc = "Anser aetherius" //Goose space?! icon_state = "goose" icon_living = "goose" icon_dead = "goose_dead" diff --git a/code/modules/mob/living/simple_animal/animals/lizard.dm b/code/modules/mob/living/simple_animal/animals/lizard.dm index 38822faf0df..c4c1487315d 100644 --- a/code/modules/mob/living/simple_animal/animals/lizard.dm +++ b/code/modules/mob/living/simple_animal/animals/lizard.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/lizard name = "Lizard" desc = "A cute tiny lizard." + tt_desc = "Gekko gecko" icon = 'icons/mob/critter.dmi' icon_state = "lizard" icon_living = "lizard" diff --git a/code/modules/mob/living/simple_animal/animals/mouse.dm b/code/modules/mob/living/simple_animal/animals/mouse.dm index 87df9015277..123e82a6110 100644 --- a/code/modules/mob/living/simple_animal/animals/mouse.dm +++ b/code/modules/mob/living/simple_animal/animals/mouse.dm @@ -2,6 +2,7 @@ name = "mouse" real_name = "mouse" desc = "It's a small rodent." + tt_desc = "Mus musculus" icon_state = "mouse_gray" item_state = "mouse_gray" icon_living = "mouse_gray" diff --git a/code/modules/mob/living/simple_animal/animals/parrot.dm b/code/modules/mob/living/simple_animal/animals/parrot.dm index 59e04cf1d6b..67d1a1071c8 100644 --- a/code/modules/mob/living/simple_animal/animals/parrot.dm +++ b/code/modules/mob/living/simple_animal/animals/parrot.dm @@ -31,6 +31,7 @@ /mob/living/simple_animal/parrot name = "parrot" desc = "The parrot squawks, \"It's a parrot! BAWWK!\"" + tt_desc = "Poicephalus robustus" icon = 'icons/mob/animal.dmi' icon_state = "parrot_fly" icon_living = "parrot_fly" diff --git a/code/modules/mob/living/simple_animal/animals/penguin.dm b/code/modules/mob/living/simple_animal/animals/penguin.dm index 4bb985d1acb..8463d9ac39c 100644 --- a/code/modules/mob/living/simple_animal/animals/penguin.dm +++ b/code/modules/mob/living/simple_animal/animals/penguin.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/penguin name = "space penguin" desc = "An ungainly, waddling, cute, and VERY well-dressed bird." + tt_desc = "Aptenodytes forsteri" icon_state = "penguin" icon_living = "penguin" icon_dead = "penguin_dead" diff --git a/code/modules/mob/living/simple_animal/animals/slime.dm b/code/modules/mob/living/simple_animal/animals/slime.dm index f7d23771a3c..fdb4347ae92 100644 --- a/code/modules/mob/living/simple_animal/animals/slime.dm +++ b/code/modules/mob/living/simple_animal/animals/slime.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/slime name = "pet slime" desc = "A lovable, domesticated slime." + tt_desc = "Amorphidae proteus" icon = 'icons/mob/slimes.dmi' icon_state = "grey baby slime" icon_living = "grey baby slime" diff --git a/code/modules/mob/living/simple_animal/animals/spiderbot.dm b/code/modules/mob/living/simple_animal/animals/spiderbot.dm index 7ae8edfb7a3..83f18c071a7 100644 --- a/code/modules/mob/living/simple_animal/animals/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/animals/spiderbot.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/spiderbot name = "spider-bot" desc = "A skittering robotic friend!" + tt_desc = "Maintenance Robot" icon = 'icons/mob/robots.dmi' icon_state = "spiderbot-chassis" icon_living = "spiderbot-chassis" diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index b89e2f2af67..e4add4d7497 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -168,9 +168,6 @@ host.reset_view(null) host.machine = null - - var/mob/living/H = host - H.status_flags &= ~PASSEMOTES host = null return diff --git a/code/modules/mob/living/simple_animal/borer/borer_powers.dm b/code/modules/mob/living/simple_animal/borer/borer_powers.dm index 311b013ef86..b75da20cc4d 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_powers.dm @@ -104,7 +104,6 @@ M << "Something disgusting and slimy wiggles into your ear!" src.host = M - src.host.status_flags |= PASSEMOTES src.forceMove(M) //Update their traitor status. diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 885b2015bbf..be3909d6619 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -5,6 +5,7 @@ /mob/living/simple_animal name = "animal" + desc = "" icon = 'icons/mob/animal.dmi' health = 20 maxHealth = 20 @@ -13,6 +14,8 @@ mob_swap_flags = MONKEY|SLIME|HUMAN mob_push_flags = MONKEY|SLIME|HUMAN + var/tt_desc = "Uncataloged Life Form" //Tooltip description + //Settings for played mobs var/show_stat_health = 1 // Does the percentage health show in the stat panel for the mob var/ai_inactive = 0 // Set to 1 to turn off most AI actions @@ -1697,3 +1700,6 @@ /mob/living/simple_animal/retaliate retaliate = 1 destroy_surroundings = 1 + +/mob/living/simple_animal/get_nametag_desc(mob/user) + return "[tt_desc]" diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index 3bc7929eacb..68ac2da7584 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -8,11 +8,8 @@ emote_type = 2 //This lets them emote through containers. The communicator has a image feed of the person calling them so... /mob/living/voice/New(loc) - add_language("Galactic Common") - for(var/datum/language/L in languages) //This is needed to get around some saycode problems. - if(L.name == "Galactic Common") - set_default_language(L) - break + add_language(LANGUAGE_GALCOM) + set_default_language(all_languages[LANGUAGE_GALCOM]) if(istype(loc, /obj/item/device/communicator)) comm = loc diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index f29a396af68..0c6b5a5d7ce 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -57,3 +57,7 @@ //set macro to normal incase it was overriden (like cyborg currently does) client.set_hotkeys_macro("macro", "hotkeymode") + + if(!client.tooltips) + client.tooltips = new(client) + \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 00864d0a04d..c418c287d88 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1143,3 +1143,19 @@ mob/proc/yank_out_object() //Throwing stuff /mob/proc/throw_item(atom/target) return + +/mob/MouseEntered(location, control, params) + if(usr != src && usr.is_preference_enabled(/datum/client_preference/mob_tooltips)) + openToolTip(user = usr, tip_src = src, params = params, title = get_nametag_name(usr), content = get_nametag_desc(usr)) + + ..() + +/mob/MouseDown() + closeToolTip(usr) //No reason not to, really + + ..() + +/mob/MouseExited() + closeToolTip(usr) //No reason not to, really + + ..() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index cc446a04887..7e012c71a0f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -1,6 +1,7 @@ /mob density = 1 - layer = 4.0 + layer = MOB_LAYER + plane = MOB_PLANE animate_movement = 2 flags = PROXMOVE var/datum/mind/mind @@ -219,9 +220,7 @@ var/get_rig_stats = 0 //Moved from computer.dm - - var/hud_typing = 0 //Typing indicator stuff. - var/typing //Simple mobs use this variable. + var/typing var/obj/effect/decal/typing_indicator var/low_priority = FALSE //Skip processing life() if there's just no players on this Z-level diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 58c530d06cf..b5cc72fd199 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -31,7 +31,6 @@ var/force_down //determines if the affecting mob will be pinned to the ground var/dancing //determines if assailant and affecting keep looking at each other. Basically a wrestling position - layer = 21 abstract = 1 item_state = "nothing" w_class = ITEMSIZE_HUGE @@ -194,7 +193,7 @@ return var/shift = 0 var/adir = get_dir(assailant, affecting) - affecting.layer = 4 + affecting.layer = MOB_LAYER switch(state) if(GRAB_PASSIVE) shift = 8 @@ -217,7 +216,7 @@ switch(adir) if(NORTH) animate(affecting, pixel_x = 0, pixel_y =-shift, 5, 1, LINEAR_EASING) - affecting.layer = 3.9 + affecting.layer = BELOW_MOB_LAYER if(SOUTH) animate(affecting, pixel_x = 0, pixel_y = shift, 5, 1, LINEAR_EASING) if(WEST) @@ -396,7 +395,7 @@ /obj/item/weapon/grab/Destroy() animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING) - affecting.layer = 4 + affecting.reset_plane_and_layer() if(affecting) affecting.grabbed_by -= src affecting = null diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index 1252ed6649f..563f4339262 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -135,7 +135,6 @@ //Lighting is weird and has matrix shenanigans. Think of this as turning on/off darkness. /obj/screen/plane_master/fullbright plane = PLANE_LIGHTING - layer = LIGHTING_LAYER+1 color = null //To break lighting when visible (this is sorta backwards) alpha = 0 //Starts full opaque invisibility = 101 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index fa09155b639..1d49c1aacb6 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -115,7 +115,13 @@ if(alert(src,"Are you sure you wish to observe? You will have to wait 5 minutes before being able to respawn!","Player Setup","Yes","No") == "Yes") if(!client) return 1 - var/mob/observer/dead/observer = new() + + //Make a new mannequin quickly, and allow the observer to take the appearance + var/mob/living/carbon/human/dummy/mannequin = new() + client.prefs.dress_preview_mob(mannequin) + var/mob/observer/dead/observer = new(mannequin) + observer.forceMove(null) //Let's not stay in our doomed mannequin + qdel(mannequin) spawning = 1 src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo @@ -125,20 +131,13 @@ close_spawn_windows() var/obj/O = locate("landmark*Observer-Start") if(istype(O)) - src << "Now teleporting." - observer.loc = O.loc + to_chat(src,"Now teleporting.") + observer.forceMove(O.loc) else - src << "Could not locate an observer spawn point. Use the Teleport verb to jump to the station map." + to_chat(src,"Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.") observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly. announce_ghost_joinleave(src) - var/mob/living/carbon/human/dummy/mannequin = new() - client.prefs.dress_preview_mob(mannequin) - observer.appearance = mannequin - observer.alpha = 127 - observer.layer = initial(observer.layer) - observer.invisibility = initial(observer.invisibility) - qdel(mannequin) if(client.prefs.be_random_name) client.prefs.real_name = random_name(client.prefs.identifying_gender) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index b5add4f23f9..206450c9098 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -11,7 +11,7 @@ set name = "Say" set category = "IC" - set_typing_indicator(0) + set_typing_indicator(FALSE) usr.say(message) /mob/verb/me_verb(message as text) @@ -24,7 +24,7 @@ message = sanitize(message) - set_typing_indicator(0) + set_typing_indicator(FALSE) if(use_me) usr.emote("me",usr.emote_type,message) else diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index 5b164a84996..5f0d0894546 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -1,41 +1,34 @@ /mob/proc/set_typing_indicator(var/state) //Leaving this here for mobs. + if(!is_preference_enabled(/datum/client_preference/show_typing_indicator)) + cut_overlay(typing_indicator, TRUE) + return + if(!typing_indicator) typing_indicator = new typing_indicator.icon = 'icons/mob/talk.dmi' typing_indicator.icon_state = "[speech_bubble_appearance()]_typing" - if(client && !stat) - typing_indicator.invisibility = invisibility - if(!is_preference_enabled(/datum/client_preference/show_typing_indicator)) - add_overlay(typing_indicator) - else - if(state) - if(!typing) - add_overlay(typing_indicator) - typing = 1 - else - if(typing) - cut_overlay(typing_indicator) - typing = 0 - return state + if(state && !typing) + add_overlay(typing_indicator, TRUE) + typing = TRUE + else if(typing) + cut_overlay(typing_indicator, TRUE) + typing = FALSE + + if(shadow) //Multi-Z above-me shadows + shadow.set_typing_indicator(state) + + return state /mob/verb/say_wrapper() set name = ".Say" set hidden = 1 - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(1) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 1 - + set_typing_indicator(TRUE) var/message = input("","say (text)") as text - - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(0) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 0 - + set_typing_indicator(FALSE) + if(message) say_verb(message) @@ -43,17 +36,9 @@ set name = ".Me" set hidden = 1 - if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(1) - else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 1 - + set_typing_indicator(TRUE) var/message = input("","me (text)") as text - - if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 0 - else if(!ishuman(src)) //If they're a mob, use the old code. - set_typing_indicator(0) + set_typing_indicator(FALSE) if(message) me_verb(message) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index caef5069345..42a501459f8 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -84,6 +84,16 @@ /mob/proc/can_ztravel() return 0 +/mob/living/zMove(direction) + //Sort of a lame hack to allow ztravel through zpipes. Should be improved. + if(is_ventcrawling && istype(loc,/obj/machinery/atmospherics/pipe/zpipe)) + var/obj/machinery/atmospherics/pipe/zpipe/currentpipe = loc + if(istype(currentpipe.node1,/obj/machinery/atmospherics/pipe/zpipe)) + currentpipe.ventcrawl_to(src, currentpipe.node1, direction) + else if(istype(currentpipe.node2,/obj/machinery/atmospherics/pipe/zpipe)) + currentpipe.ventcrawl_to(src, currentpipe.node2, direction) + return ..() + /mob/observer/can_ztravel() return 1 diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index 10af55f5a3b..7d8dbb26539 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -56,6 +56,7 @@ overlays = M.overlays transform = M.transform dir = M.dir + invisibility = M.invisibility if(shadow) shadow.sync_icon(src) @@ -117,13 +118,6 @@ if(shadow) shadow.visible_message(message, self_message, blind_message) -// We should show the typing indicator so people above us can tell we're about to talk. -/mob/set_typing_indicator(var/state) - var/old_typing = src.typing - . = ..() - if(shadow && old_typing != src.typing) - shadow.set_typing_indicator(state) // Okay the real proc changed something! That means we should handle things too - /mob/zshadow/set_typing_indicator(var/state) if(!typing_indicator) typing_indicator = new diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index ec003a813e5..310bbfa9c52 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -519,3 +519,8 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/update(var/force_open = 0) src_object.ui_interact(user, ui_key, src, force_open, master_ui, state) + +/datum/nanoui/proc/append_template(var/key, var/filename) + add_template(key, filename) + open() + update(1) diff --git a/code/modules/organs/internal/organ_internal.dm b/code/modules/organs/internal/organ_internal.dm index 43b3a4c4d7f..58ed176505d 100644 --- a/code/modules/organs/internal/organ_internal.dm +++ b/code/modules/organs/internal/organ_internal.dm @@ -52,13 +52,13 @@ . = ..() //Should be an interger value for infection level if(!.) return - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/antibiotics = owner.chem_effects[CE_ANTIBIOTIC] - if(. >= 2 && antibiotics < 5) //INFECTION_LEVEL_TWO + if(. >= 2 && antibiotics < ANTIBIO_NORM) //INFECTION_LEVEL_TWO if (prob(3)) take_damage(1,silent=prob(30)) - if(. >= 3 && antibiotics < 30) //INFECTION_LEVEL_THREE + if(. >= 3 && antibiotics < ANTIBIO_OD) //INFECTION_LEVEL_THREE if (prob(50)) take_damage(1,silent=prob(15)) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index abd388c930a..e26ea193749 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -148,25 +148,25 @@ var/list/organ_cache = list() germ_level = 0 return 0 - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/antibiotics = owner.chem_effects[CE_ANTIBIOTIC] || 0 var/infection_damage = 0 - if((status & ORGAN_DEAD) && antibiotics < 30) //Sepsis from 'dead' organs + if((status & ORGAN_DEAD) && antibiotics < ANTIBIO_OD) //Sepsis from 'dead' organs infection_damage = min(1, 1 + round((germ_level - INFECTION_LEVEL_THREE)/200,0.25)) //1 Tox plus a little based on germ level - else if(germ_level > INFECTION_LEVEL_TWO && antibiotics < 30) + else if(germ_level > INFECTION_LEVEL_TWO && antibiotics < ANTIBIO_OD) infection_damage = min(0.25, 0.25 + round((germ_level - INFECTION_LEVEL_TWO)/200,0.25)) if(infection_damage) owner.adjustToxLoss(infection_damage) if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30)) - adjust_germ_level(-1) + adjust_germ_level(-antibiotics) if (germ_level >= INFECTION_LEVEL_ONE/2) //aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes - if(antibiotics < 5 && prob(round(germ_level/6))) + if(!antibiotics && prob(round(germ_level/6))) adjust_germ_level(1) if(germ_level >= INFECTION_LEVEL_ONE) @@ -181,7 +181,7 @@ var/list/organ_cache = list() . = 2 //Organ qualifies for effect-specific processing //No particular effect on the general 'organ' at 3 - if (germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) + if (germ_level >= INFECTION_LEVEL_THREE && antibiotics < ANTIBIO_OD) . = 3 //Organ qualifies for effect-specific processing adjust_germ_level(rand(5,10)) //Germ_level increases without overdose of antibiotics @@ -234,19 +234,19 @@ var/list/organ_cache = list() //Germs /obj/item/organ/proc/handle_antibiotics() - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/antibiotics = owner.chem_effects[CE_ANTIBIOTIC] || 0 - if (!germ_level || antibiotics < 5) + if (!germ_level || antibiotics < ANTIBIO_NORM) return if (germ_level < INFECTION_LEVEL_ONE) germ_level = 0 //cure instantly else if (germ_level < INFECTION_LEVEL_TWO) - adjust_germ_level(-6) //at germ_level < 500, this should cure the infection in a minute + adjust_germ_level(-antibiotics*4) //at germ_level < 500, this should cure the infection in a minute else if (germ_level < INFECTION_LEVEL_THREE) - adjust_germ_level(-2) //at germ_level < 1000, this will cure the infection in 5 minutes + adjust_germ_level(-antibiotics*2) //at germ_level < 1000, this will cure the infection in 5 minutes else - adjust_germ_level(-1) // You waited this long to get treated, you don't really deserve this organ + adjust_germ_level(-antibiotics) // You waited this long to get treated, you don't really deserve this organ //Adds autopsy data for used_weapon. /obj/item/organ/proc/add_autopsy_data(var/used_weapon, var/damage) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 86a9f589e46..6becbcaaf43 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -621,13 +621,13 @@ Note that amputating the affected organ does in fact remove the infection from t handle_germ_effects() /obj/item/organ/external/proc/handle_germ_sync() - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/antibiotics = owner.chem_effects[CE_ANTIBIOTIC] for(var/datum/wound/W in wounds) //Open wounds can become infected if (owner.germ_level > W.germ_level && W.infection_check()) W.germ_level++ - if (antibiotics < 5) + if (antibiotics < ANTIBIO_NORM) for(var/datum/wound/W in wounds) //Infected wounds raise the organ's germ level if (W.germ_level > germ_level) @@ -638,9 +638,9 @@ Note that amputating the affected organ does in fact remove the infection from t . = ..() //May be null or an infection level, if null then no specific processing needed here if(!.) return - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/antibiotics = owner.chem_effects[CE_ANTIBIOTIC] - if(. >= 2 && antibiotics < 5) //INFECTION_LEVEL_TWO + if(. >= 2 && antibiotics < ANTIBIO_NORM) //INFECTION_LEVEL_TWO //spread the infection to internal organs var/obj/item/organ/target_organ = null //make internal organs become infected one at a time instead of all at once for (var/obj/item/organ/I in internal_organs) @@ -672,7 +672,7 @@ Note that amputating the affected organ does in fact remove the infection from t if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) parent.germ_level++ - if(. >= 3 && antibiotics < 30) //INFECTION_LEVEL_THREE + if(. >= 3 && antibiotics < ANTIBIO_OD) //INFECTION_LEVEL_THREE if (!(status & ORGAN_DEAD)) status |= ORGAN_DEAD owner << "You can't feel your [name] anymore..." diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index e7522a35313..971af563ee4 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -50,44 +50,60 @@ var/global/list/limb_icon_cache = list() if(eyes) eyes.update_colour() /obj/item/organ/external/head/get_icon() - ..() - overlays.Cut() + + //The overlays are not drawn on the mob, they are used for if the head is removed and becomes an item + cut_overlays() + + //Every 'addon' below requires information from species if(!owner || !owner.species) return - if(owner.should_have_organ(O_EYES)) + + //Eye color/icon + var/should_have_eyes = owner.should_have_organ(O_EYES) + var/has_eye_color = owner.species.appearance_flags & HAS_EYE_COLOR + if((should_have_eyes || has_eye_color) && eye_icon) var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name[O_EYES] - if(eye_icon) - var/icon/eyes_icon = new/icon(eye_icon_location, eye_icon) + var/icon/eyes_icon = new/icon(eye_icon_location, eye_icon) + //Should have eyes + if(should_have_eyes) + //And we have them if(eyes) eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD) + //They're gone! else eyes_icon.Blend(rgb(128,0,0), ICON_ADD) - mob_icon.Blend(eyes_icon, ICON_OVERLAY) - overlays |= eyes_icon - + //We have weird other-sorts of eyes (as we're not supposed to have eye organ, but we have HAS_EYE_COLOR species) + else + eyes_icon.Blend(rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes), ICON_ADD) + add_overlay(eyes_icon) + mob_icon.Blend(eyes_icon, ICON_OVERLAY) + + //Lip color/icon if(owner.lip_style && (species && (species.appearance_flags & HAS_LIPS))) var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s") - overlays |= lip_icon + add_overlay(lip_icon) mob_icon.Blend(lip_icon, ICON_OVERLAY) - //Head markings. + //Head markings for(var/M in markings) var/datum/sprite_accessory/marking/mark_style = markings[M]["datum"] var/icon/mark_s = new/icon("icon" = mark_style.icon, "icon_state" = "[mark_style.icon_state]-[organ_tag]") mark_s.Blend(markings[M]["color"], ICON_ADD) - overlays |= mark_s //So when it's not on your body, it has icons + add_overlay(mark_s) //So when it's not on your body, it has icons mob_icon.Blend(mark_s, ICON_OVERLAY) //So when it's on your body, it has icons icon_cache_key += "[M][markings[M]["color"]]" + //Facial hair if(owner.f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style] if(facial_hair_style && facial_hair_style.species_allowed && (species.get_bodytype(owner) in facial_hair_style.species_allowed)) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") if(facial_hair_style.do_colouration) facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD) - overlays |= facial_s + add_overlay(facial_s) + //Head hair if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair/hair_style = hair_styles_list[owner.h_style] if(hair_style && (species.get_bodytype(owner) in hair_style.species_allowed)) @@ -96,7 +112,7 @@ var/global/list/limb_icon_cache = list() if(hair_style.do_colouration && islist(h_col) && h_col.len >= 3) hair_s.Blend(rgb(h_col[1], h_col[2], h_col[3]), ICON_MULTIPLY) hair_s.Blend(hair_s_add, ICON_ADD) - overlays |= hair_s + add_overlay(hair_s) return mob_icon diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 9e090c2095c..816b62a099a 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -13,7 +13,8 @@ w_class = ITEMSIZE_TINY throw_range = 1 throw_speed = 1 - layer = 4 + plane = MOB_PLANE + layer = MOB_LAYER pressure_resistance = 1 slot_flags = SLOT_HEAD body_parts_covered = HEAD diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 23ac5ace63e..2e3bfb2f797 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -8,7 +8,8 @@ w_class = ITEMSIZE_SMALL throw_range = 2 throw_speed = 1 - layer = 4 + plane = MOB_PLANE + layer = MOB_LAYER pressure_resistance = 1 attack_verb = list("bapped") var/page = 1 // current page diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index d29dc212ac8..3f585f323b2 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -184,11 +184,18 @@ var/instant = 0 var/colourName = "red" //for updateIcon purposes - suicide_act(mob/user) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] - viewers(user) << "[user] is jamming the [src.name] up [TU.his] nose and into [TU.his] brain. It looks like [TU.he] [TU.is] trying to commit suicide." - return (BRUTELOSS|OXYLOSS) +/obj/item/weapon/pen/crayon/suicide_act(mob/user) + var/datum/gender/TU = gender_datums[user.get_visible_gender()] + viewers(user) << "[user] is jamming the [src.name] up [TU.his] nose and into [TU.his] brain. It looks like [TU.he] [TU.is] trying to commit suicide." + return (BRUTELOSS|OXYLOSS) - New() - name = "[colourName] crayon" - ..() +/obj/item/weapon/pen/crayon/New() + name = "[colourName] crayon" + +/obj/item/weapon/pen/crayon/marker + name = "marker" + desc = "A chisel-tip permanent marker. Hopefully non-toxic." + icon_state = "markerred" + +/obj/item/weapon/pen/crayon/marker/New() + name = "[colourName] marker" diff --git a/code/modules/power/fusion/core/core_field.dm b/code/modules/power/fusion/core/core_field.dm index ef1c3716fae..1efb09d777b 100644 --- a/code/modules/power/fusion/core/core_field.dm +++ b/code/modules/power/fusion/core/core_field.dm @@ -9,7 +9,8 @@ icon = 'icons/obj/machines/power/fusion.dmi' icon_state = "emfield_s1" alpha = 50 - layer = 4 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER light_color = "#cc7700" var/size = 1 diff --git a/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm b/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm index 468f24510ae..29d93620151 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_assembly.dm @@ -2,7 +2,6 @@ name = "fuel rod assembly" icon = 'icons/obj/machines/power/fusion.dmi' icon_state = "fuel_assembly" - layer = 4 var/material_name diff --git a/code/modules/power/fusion/fuel_assembly/fuel_compressor.dm b/code/modules/power/fusion/fuel_assembly/fuel_compressor.dm index 6a0f1bc205f..375af68696d 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_compressor.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_compressor.dm @@ -4,7 +4,6 @@ icon_state = "fuel_compressor1" density = 1 anchored = 1 - layer = 4 circuit = /obj/item/weapon/circuitboard/fusion_fuel_compressor diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 6de14313f1a..f80454d9bda 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,7 +16,8 @@ icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-stage1" anchored = 1 - layer = 5 + plane = MOB_LAYER + layer = ABOVE_MOB_LAYER var/stage = 1 var/fixture_type = "tube" var/sheets_refunded = 2 @@ -132,7 +133,8 @@ icon = 'icons/obj/lighting.dmi' icon_state = "bulb-construct-stage1" anchored = 1 - layer = 5 + plane = MOB_LAYER + layer = ABOVE_MOB_LAYER stage = 1 fixture_type = "bulb" sheets_refunded = 1 @@ -143,7 +145,6 @@ icon = 'icons/obj/lighting.dmi' icon_state = "flamp-construct-stage1" anchored = 0 - layer = OBJ_LAYER stage = 1 fixture_type = "flamp" sheets_refunded = 2 @@ -156,7 +157,8 @@ icon_state = "tube1" desc = "A lighting fixture." anchored = 1 - layer = 5 // They were appearing under mobs which is a little weird - Ostaf + plane = MOB_LAYER + layer = ABOVE_MOB_LAYER use_power = 2 idle_power_usage = 2 active_power_usage = 20 diff --git a/code/modules/power/sensors/powernet_sensor.dm b/code/modules/power/sensors/powernet_sensor.dm index d082b179223..20c8837b32d 100644 --- a/code/modules/power/sensors/powernet_sensor.dm +++ b/code/modules/power/sensors/powernet_sensor.dm @@ -12,7 +12,7 @@ desc = "Small machine which transmits data about specific powernet" anchored = 1 density = 0 - layer = 2.46 // Above cables, but should be below floors. + layer = ABOVE_UTILITY icon = 'icons/obj/objects.dmi' icon_state = "floor_beacon" // If anyone wants to make better sprite, feel free to do so without asking me. diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 246dbba6c7e..75ec8fffc7c 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -7,7 +7,7 @@ icon_state = "singularity_s1" anchored = 1 density = 1 - layer = 6 + plane = ABOVE_PLANE light_range = 6 unacidable = 1 //Don't comment this out. diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index a1f2fbf030e..2c01476a7a8 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -8,10 +8,10 @@ icon_state = "term" desc = "It's an underfloor wiring terminal for power equipment." level = 1 - layer = TURF_LAYER var/obj/machinery/power/master = null anchored = 1 - layer = 2.6 // a bit above wires + plane = PLATING_PLANE + layer = WIRES_LAYER+0.01 /obj/machinery/power/terminal/New() diff --git a/code/modules/projectiles/effects.dm b/code/modules/projectiles/effects.dm index ba6a749ebee..18010d3d173 100644 --- a/code/modules/projectiles/effects.dm +++ b/code/modules/projectiles/effects.dm @@ -1,7 +1,7 @@ /obj/effect/projectile icon = 'icons/effects/projectiles.dmi' icon_state = "bolt" - layer = 20 + plane = ABOVE_PLANE /obj/effect/projectile/New(var/turf/location) if(istype(location)) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 32702881318..b398de7d2f0 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -401,7 +401,7 @@ P.activate() /obj/item/projectile/proc/impact_effect(var/matrix/M) - if(ispath(tracer_type)) + if(ispath(tracer_type) && location) var/obj/effect/projectile/P = new impact_type(location.loc) if(istype(P)) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 1ac48546f5e..3587e2f36ae 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -281,7 +281,6 @@ name = "All-In-One Grinder" icon = 'icons/obj/kitchen.dmi' icon_state = "juicer1" - layer = 2.9 density = 0 anchored = 0 use_power = 1 diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 536ad9d2483..ce7227ce46f 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -108,7 +108,7 @@ /datum/reagent/proc/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) return -/datum/reagent/proc/overdose(var/mob/living/carbon/M, var/alien, var/removed) // Overdose effect. Doesn't happen instantly. +/datum/reagent/proc/overdose(var/mob/living/carbon/M, var/alien, var/removed) // Overdose effect. if(alien == IS_DIONA) return if(ishuman(M)) 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 8695f36c51f..853fe1cab02 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -450,6 +450,9 @@ if(adj_temp < 0 && M.bodytemperature > 310) M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) +/datum/reagent/drink/overdose(var/mob/living/carbon/M, var/alien) //Add special interactions here in the future if desired. + ..() + // Juices /datum/reagent/drink/juice/banana @@ -1044,11 +1047,14 @@ adj_dizzy = -5 adj_drowsy = -3 adj_sleepy = -2 - overdose = 45 + glass_name = "Coffee Milkshake" glass_desc = "An energizing coffee milkshake, perfect for hot days at work.." +/datum/reagent/drink/milkshake/coffeeshake/overdose(var/mob/living/carbon/M, var/alien) + M.make_jittery(5) + /datum/reagent/drink/rewriter name = "Rewriter" id = "rewriter" @@ -2844,4 +2850,4 @@ adj_temp = -5 glass_name = "Mint Julep" - glass_desc = "Minty and refreshing, perfect for a hot day." \ No newline at end of file + glass_desc = "Minty and refreshing, perfect for a hot day." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index b731f503268..d753d045d6e 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -509,11 +509,46 @@ taste_description = "bitterness" reagent_state = LIQUID color = "#C1C1C1" - metabolism = REM * 0.05 + metabolism = REM * 0.25 mrate_static = TRUE overdose = REAGENTS_OVERDOSE scannable = 1 +/datum/reagent/spaceacillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + ..() + M.add_chemical_effect(CE_ANTIBIOTIC, dose >= overdose ? ANTIBIO_OD : ANTIBIO_NORM) + +/datum/reagent/corophizine + name = "Corophizine" + id = "corophizine" + description = "A wide-spectrum antibiotic drug. Powerful and uncomfortable in equal doses." + taste_description = "burnt toast" + reagent_state = LIQUID + color = "#FFB0B0" + mrate_static = TRUE + overdose = 10 + scannable = 1 + +/datum/reagent/corophizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + ..() + M.add_chemical_effect(CE_ANTIBIOTIC, ANTIBIO_SUPER) + + //Based roughly on Levofloxacin's rather severe side-effects + if(prob(20)) + M.Confuse(5) + if(prob(20)) + M.Weaken(5) + if(prob(20)) + M.make_dizzy(5) + if(prob(20)) + M.hallucination = max(M.hallucination, 10) + + //One of the levofloxacin side effects is 'spontaneous tendon rupture', which I'll immitate here. 1:1000 chance, so, pretty darn rare. + if(ishuman(M) && rand(1,1000) == 1) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/eo = pick(H.organs) //Misleading variable name, 'organs' is only external organs + eo.fracture() + /datum/reagent/sterilizine name = "Sterilizine" id = "sterilizine" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm index 9b15c07b70d..6c83b0e26da 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm @@ -49,6 +49,60 @@ id = "crayon_dust_brown" color = "#846F35" +/datum/reagent/marker_ink + name = "Marker ink" + id = "marker_ink" + description = "Intensely coloured ink used in markers." + taste_description = "extremely bitter" + reagent_state = LIQUID + color = "#888888" + overdose = 5 + +/datum/reagent/marker_ink/black + name = "Black marker ink" + id = "marker_ink_black" + color = "#000000" + +/datum/reagent/marker_ink/red + name = "Red marker ink" + id = "marker_ink_red" + color = "#FE191A" + +/datum/reagent/marker_ink/orange + name = "Orange marker ink" + id = "marker_ink_orange" + color = "#FFBE4F" + +/datum/reagent/marker_ink/yellow + name = "Yellow marker ink" + id = "marker_ink_yellow" + color = "#FDFE7D" + +/datum/reagent/marker_ink/green + name = "Green marker ink" + id = "marker_ink_green" + color = "#18A31A" + +/datum/reagent/marker_ink/blue + name = "Blue marker ink" + id = "marker_ink_blue" + color = "#247CFF" + +/datum/reagent/marker_ink/purple + name = "Purple marker ink" + id = "marker_ink_purple" + color = "#CC0099" + +/datum/reagent/marker_ink/grey //Mime + name = "Grey marker ink" + id = "marker_ink_grey" + color = "#808080" + +/datum/reagent/marker_ink/brown //Rainbow + name = "Brown marker ink" + id = "marker_ink_brown" + color = "#846F35" + /datum/reagent/paint name = "Paint" id = "paint" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 37634ac28a4..6e79670459a 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -417,6 +417,14 @@ required_reagents = list("cryptobiolin" = 1, "inaprovaline" = 1) result_amount = 2 +/datum/chemical_reaction/corophizine + name = "Corophizine" + id = "corophizine" + result = "corophizine" + required_reagents = list("spaceacillin" = 1, "carbon" = 1, "phoron" = 0.1) + catalysts = list("phoron" = 5) + result_amount = 2 + /datum/chemical_reaction/imidazoline name = "imidazoline" id = "imidazoline" @@ -868,7 +876,7 @@ name = "Red paint" id = "red_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_red" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_red" = 1) result_amount = 5 /datum/chemical_reaction/red_paint/send_data() @@ -878,7 +886,7 @@ name = "Orange paint" id = "orange_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_orange" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_orange" = 1) result_amount = 5 /datum/chemical_reaction/orange_paint/send_data() @@ -888,7 +896,7 @@ name = "Yellow paint" id = "yellow_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_yellow" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_yellow" = 1) result_amount = 5 /datum/chemical_reaction/yellow_paint/send_data() @@ -898,7 +906,7 @@ name = "Green paint" id = "green_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_green" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_green" = 1) result_amount = 5 /datum/chemical_reaction/green_paint/send_data() @@ -908,7 +916,7 @@ name = "Blue paint" id = "blue_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_blue" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_blue" = 1) result_amount = 5 /datum/chemical_reaction/blue_paint/send_data() @@ -918,7 +926,7 @@ name = "Purple paint" id = "purple_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_purple" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_purple" = 1) result_amount = 5 /datum/chemical_reaction/purple_paint/send_data() @@ -928,7 +936,7 @@ name = "Grey paint" id = "grey_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_grey" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_grey" = 1) result_amount = 5 /datum/chemical_reaction/grey_paint/send_data() @@ -938,7 +946,7 @@ name = "Brown paint" id = "brown_paint" result = "paint" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_brown" = 1) + required_reagents = list("plasticide" = 1, "water" = 3, "marker_ink_brown" = 1) result_amount = 5 /datum/chemical_reaction/brown_paint/send_data() diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 18852a52dc1..3a7cec0213d 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -48,7 +48,7 @@ return /obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) - if(!reagents.total_volume) + if(reagents && !reagents.total_volume) user << "None of [src] left!" user.drop_from_inventory(src) qdel(src) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 2933ee97277..0048cd51948 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -6,7 +6,8 @@ icon_state = "conveyor0" name = "conveyor belt" desc = "A conveyor belt." - layer = 2 // so they appear under stuff + plane = TURF_PLANE + layer = ABOVE_TURF_LAYER anchored = 1 circuit = /obj/item/weapon/circuitboard/conveyor var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index e9b59dd14fb..fdae51e6476 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -663,7 +663,7 @@ var/dpdir = 0 // bitmask of pipe directions dir = 0 // dir will contain dominant direction for junction pipes var/health = 10 // health points 0-10 - layer = 2.3 // slightly lower than wires and other pipes + layer = DISPOSAL_LAYER // slightly lower than wires and other pipes var/base_icon_state // initial icon state on map var/sortType = "" var/subtype = 0 diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 649d041db21..f90fd1c313c 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1802,6 +1802,22 @@ CIRCUITS BELOW build_path = /obj/item/device/universal_translator/ear sort_string = "HABQB" +/datum/design/obj/item/device/xenoarch_multi_tool + name = "xenoarcheology multitool" + id = "xenoarch_multitool" + req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3, TECH_BLUESPACE = 3) + build_path = /obj/item/device/xenoarch_multi_tool + materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "uranium" = 500, "phoron" = 500) + sort_string = "HABQC" + +/datum/design/excavationdrill + name = "Excavation Drill" + id = "excavationdrill" + req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2, TECH_BLUESPACE = 3) + build_type = PROTOLATHE + materials = list(DEFAULT_WALL_MATERIAL = 4000, "glass" = 4000) + build_path = /obj/item/weapon/pickaxe/excavationdrill + /* Uncomment if someone makes these buildable /datum/design/circuit/general_alert name = "general alert console" diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm index e558a2621e2..023d5fee95f 100644 --- a/code/modules/shieldgen/energy_field.dm +++ b/code/modules/shieldgen/energy_field.dm @@ -15,7 +15,8 @@ icon_state = "shield" alpha = 100 anchored = 1 - layer = 4.1 //just above mobs + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER density = 0 var/obj/machinery/shield_gen/my_gen = null var/strength = 0 // in Renwicks diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm index 618ec3ff05a..ed90e66c6a8 100644 --- a/code/modules/shuttles/shuttle.dm +++ b/code/modules/shuttles/shuttle.dm @@ -90,7 +90,7 @@ make_sounds(origin, HYPERSPACE_END) return //someone cancelled the launch - on_shuttle_departure() + on_shuttle_departure(origin) moving_status = SHUTTLE_INTRANSIT //shouldn't matter but just to be safe move(origin, destination) @@ -127,10 +127,10 @@ depart_time = world.time - on_shuttle_departure(departing) - moving_status = SHUTTLE_INTRANSIT + on_shuttle_departure(departing) + move(departing, interim, direction) interim.shuttle_arrived() diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index a8ca493470d..90e51415354 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -16,6 +16,7 @@ var/autopilot_first_delay = null // If your want your shuttle to stay for a different amount of time for the first time, set this. var/can_rename = TRUE // Lets the pilot rename the shuttle. Only available once. category = /datum/shuttle/web_shuttle + var/list/obj/item/clothing/head/pilot/helmets /datum/shuttle/web_shuttle/New() current_area = locate(current_area) @@ -27,10 +28,12 @@ autopilot_delay = autopilot_first_delay if(!visible_name) visible_name = name + helmets = list() ..() /datum/shuttle/web_shuttle/Destroy() qdel(web_master) + helmets.Cut() return ..() @@ -42,16 +45,30 @@ ..() last_move = world.time +/datum/shuttle/web_shuttle/short_jump() + . = ..() + update_helmets() + +/datum/shuttle/web_shuttle/long_jump() + . = ..() + update_helmets() + /datum/shuttle/web_shuttle/on_shuttle_departure() + . = ..() web_master.on_shuttle_departure() + update_helmets() /datum/shuttle/web_shuttle/on_shuttle_arrival() + . = ..() web_master.on_shuttle_arrival() + update_helmets() /datum/shuttle/web_shuttle/proc/build_destinations() return /datum/shuttle/web_shuttle/process() + update_helmets() + if(moving_status == SHUTTLE_IDLE) if(web_master.autopath) // We're currently flying a path. autopilot_say("Continuing route.") @@ -92,6 +109,20 @@ autopilot_say("Taking off.") web_master.process_autopath() +/datum/shuttle/web_shuttle/proc/update_helmets() + for(var/helm in helmets) + if(!helm) + helmets -= helm + continue + var/obj/item/clothing/head/pilot/H = helm + if(!H.shuttle_comp || get_area(H.shuttle_comp) != get_area(H)) + H.shuttle_comp = null + H.audible_message("\The [H] pings as it loses it's connection with the ship.") + H.update_hud("discon") + helmets -= H + else + H.update_hud(moving_status) + /datum/shuttle/web_shuttle/proc/adjust_autopilot(on) if(on) if(autopilot) @@ -154,6 +185,19 @@ for(var/lost in find_sensors) log_debug("[my_area] shuttle computer couldn't find [lost] sensor!") +/obj/machinery/computer/shuttle_control/web/attackby(obj/I, mob/user) + var/datum/shuttle/web_shuttle/shuttle = shuttle_controller.shuttles[shuttle_tag] + if(shuttle && istype(I,/obj/item/clothing/head/pilot)) + var/obj/item/clothing/head/pilot/H = I + H.shuttle_comp = src + shuttle.helmets |= I + to_chat(user,"You register the helmet with the ship's console.") + shuttle.update_helmets() + return + + return ..() + + // Fairly copypasta-y. /obj/machinery/computer/shuttle_control/web/attack_hand(mob/user) if(..(user)) diff --git a/code/modules/spells/aoe_turf/conjure/conjure.dm b/code/modules/spells/aoe_turf/conjure/conjure.dm index 1302513bfeb..e96985e9bb3 100644 --- a/code/modules/spells/aoe_turf/conjure/conjure.dm +++ b/code/modules/spells/aoe_turf/conjure/conjure.dm @@ -56,7 +56,8 @@ How they spawn stuff is decided by behaviour vars, which are explained below animation.density = 0 animation.anchored = 1 animation.icon = 'icons/effects/effects.dmi' - animation.layer = 3 + animation.plane = OBJ_PLANE + animation.layer = ABOVE_JUNK_LAYER animation.master = summoned_object for(var/varName in newVars) diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm index e48db592ad6..68cf35e9a4c 100644 --- a/code/modules/spells/targeted/ethereal_jaunt.dm +++ b/code/modules/spells/targeted/ethereal_jaunt.dm @@ -26,7 +26,8 @@ animation.density = 0 animation.anchored = 1 animation.icon = 'icons/mob/mob.dmi' - animation.layer = 5 + animation.plane = MOB_PLANE + animation.layer = ABOVE_MOB_LAYER animation.master = holder target.ExtinguishMob() if(target.buckled) diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 3174bbf405b..4debf4017c4 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -464,9 +464,9 @@ while(!new_name) if(!target) return var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name) - var/clean_name = sanitizeName(try_name) + var/clean_name = sanitizeName(try_name, allow_numbers = TRUE) if(clean_name) - var/okay = alert(target,"New name will be '[clean_name]', ok?", "Cancel", "Ok") + var/okay = alert(target,"New name will be '[clean_name]', ok?", "Confirmation","Cancel","Ok") if(okay == "Ok") new_name = clean_name diff --git a/code/modules/tables/flipping.dm b/code/modules/tables/flipping.dm index 670edd01d86..5de58c13546 100644 --- a/code/modules/tables/flipping.dm +++ b/code/modules/tables/flipping.dm @@ -84,7 +84,8 @@ set_dir(direction) if(dir != NORTH) - layer = 5 + plane = MOB_PLANE + layer = ABOVE_MOB_LAYER climbable = 0 //flipping tables allows them to be used as makeshift barriers flipped = 1 flags |= ON_BORDER @@ -102,7 +103,7 @@ verbs -=/obj/structure/table/proc/do_put verbs +=/obj/structure/table/verb/do_flip - layer = initial(layer) + reset_plane_and_layer() flipped = 0 climbable = initial(climbable) flags &= ~ON_BORDER diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 003535a5907..b32af0f479e 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -6,7 +6,7 @@ density = 1 anchored = 1 climbable = 1 - layer = 2.8 + layer = UNDER_JUNK_LAYER throwpass = 1 surgery_odds = 66 var/flipped = 0 diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm new file mode 100644 index 00000000000..1b03157e83e --- /dev/null +++ b/code/modules/tooltip/tooltip.dm @@ -0,0 +1,124 @@ +/* +Tooltips v1.1 - 22/10/15 +Developed by Wire (#goonstation on irc.synirc.net) +- Added support for screen_loc pixel offsets. Should work. Maybe. +- Added init function to more efficiently send base vars + +Configuration: +- Set control to the correct skin element (remember to actually place the skin element) +- Set file to the correct path for the .html file (remember to actually place the html file) +- Attach the datum to the user client on login, e.g. +/client/New() + src.tooltips = new /datum/tooltip(src) + +Usage: +- Define mouse event procs on your (probably HUD) object and simply call the show and hide procs respectively: +/obj/screen/hud + MouseEntered(location, control, params) + usr.client.tooltip.show(params, title = src.name, content = src.desc) + + MouseExited() + usr.client.tooltip.hide() + +Customization: +- Theming can be done by passing the theme var to show() and using css in the html file to change the look +- For your convenience some pre-made themes are included + +Notes: +- You may have noticed 90% of the work is done via javascript on the client. Gotta save those cycles man. +- This is entirely untested in any other codebase besides goonstation so I have no idea if it will port nicely. Good luck! + - After testing and discussion (Wire, Remie, MrPerson, AnturK) ToolTips are ok and work for /tg/station13 +*/ + + +/datum/tooltip + var/client/owner + var/control = "mainwindow.tooltip" + var/showing = 0 + var/queueHide = 0 + var/init = 0 + + +/datum/tooltip/New(client/C) + if (C) + owner = C + owner << browse(file2text('code/modules/tooltip/tooltip.html'), "window=[control]") + ..() + + +/datum/tooltip/proc/show(atom/movable/thing, params = null, title = null, content = null, theme = "default", special = "none") + if (!thing || !params || (!title && !content) || !owner || !isnum(world.icon_size)) + return 0 + if (!init) + //Initialize some vars + init = 1 + owner << output(list2params(list(world.icon_size, control)), "[control]:tooltip.init") + + showing = 1 + + if (title && content) + title = "

[title]

" + content = "

[content]

" + else if (title && !content) + title = "

[title]

" + else if (!title && content) + content = "

[content]

" + + // Strip macros from item names + title = replacetext(title, "\proper", "") + title = replacetext(title, "\improper", "") + + //Make our dumb param object + if(params[1] != "i") //Byond Bug: http://www.byond.com/forum/?post=2352648 + params = "icon-x=16;icon-y=16;[params]" //Put in some placeholders + params = {"{ "cursor": "[params]", "screenLoc": "[thing.screen_loc]" }"} + + //Send stuff to the tooltip + var/view_size = getviewsize(owner.view) + owner << output(list2params(list(params, view_size[1] , view_size[2], "[title][content]", theme, special)), "[control]:tooltip.update") + + //If a hide() was hit while we were showing, run hide() again to avoid stuck tooltips + showing = 0 + if (queueHide) + hide() + + return 1 + + +/datum/tooltip/proc/hide() + if (queueHide) + schedule_task_with_source_in(1, src, .proc/do_hide) + else + do_hide() + + queueHide = showing ? TRUE : FALSE + + return TRUE + +/datum/tooltip/proc/do_hide() + winshow(owner, control, FALSE) + +/* TG SPECIFIC CODE */ + + +//Open a tooltip for user, at a location based on params +//Theme is a CSS class in tooltip.html, by default this wrapper chooses a CSS class based on the user's UI_style (Midnight, Plasmafire, Retro, etc) +//Includes sanity.checks +/proc/openToolTip(mob/user = null, atom/movable/tip_src = null, params = null, title = "", content = "", theme = "") + if(istype(user)) + if(user.client && user.client.tooltips) + if(!theme && user.client.prefs && user.client.prefs.tooltipstyle) + theme = lowertext(user.client.prefs.tooltipstyle) + if(!theme) + theme = "midnight" + user.client.tooltips.show(tip_src, params, title, content, theme) + + +//Arbitrarily close a user's tooltip +//Includes sanity checks. +/proc/closeToolTip(mob/user) + if(istype(user)) + if(user.client && user.client.tooltips) + user.client.tooltips.hide() + + diff --git a/code/modules/tooltip/tooltip.html b/code/modules/tooltip/tooltip.html new file mode 100644 index 00000000000..67fb8a77f10 --- /dev/null +++ b/code/modules/tooltip/tooltip.html @@ -0,0 +1,249 @@ + + + + Tooltip + + + + + +
+
+
+ + + + diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm index f6619516816..bc6bafbe529 100644 --- a/code/modules/turbolift/turbolift_console.dm +++ b/code/modules/turbolift/turbolift_console.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/turbolift.dmi' anchored = 1 density = 0 - layer = 4 + plane = MOB_PLANE var/datum/turbolift/lift diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 4741038cf4b..f3a9dab0413 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -35,6 +35,7 @@ var/list/ventcrawl_machinery = list( if(is_ventcrawling && istype(loc, /obj/machinery/atmospherics)) //attach us back into the pipes remove_ventcrawl() add_ventcrawl(loc) + client.screen += global_hud.centermarker /mob/living/simple_animal/slime/can_ventcrawl() if(victim) @@ -154,6 +155,7 @@ var/list/ventcrawl_machinery = list( if(HAZARD_HIGH_PRESSURE to INFINITY) to_chat(src, "You feel a roaring wind pushing you away from the vent!") + fade_towards(vent_found,45) if(!do_after(src, 45, vent_found, 1, 1)) return if(!can_ventcrawl()) @@ -179,9 +181,12 @@ var/list/ventcrawl_machinery = list( for(var/datum/pipeline/pipeline in network.line_members) for(var/obj/machinery/atmospherics/A in (pipeline.members || pipeline.edges)) if(!A.pipe_image) - A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) + A.pipe_image = image(A, A.loc, dir = A.dir) + A.pipe_image.plane = PLANE_LIGHTING_ABOVE pipes_shown += A.pipe_image client.images += A.pipe_image + if(client) + client.screen += global_hud.centermarker /mob/living/proc/remove_ventcrawl() is_ventcrawling = 0 @@ -189,6 +194,7 @@ var/list/ventcrawl_machinery = list( if(client) for(var/image/current_image in pipes_shown) client.images -= current_image + client.screen -= global_hud.centermarker client.eye = src pipes_shown.len = 0 \ No newline at end of file diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index 1b8ab86fd6a..3670f60beac 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -82,7 +82,7 @@ majormutate() //Space antibiotics have a good chance to stop disease completely - if(mob.reagents.has_reagent("spaceacillin")) + if(mob.chem_effects[CE_ANTIBIOTIC]) if(stage == 1 && prob(70-resistance)) src.cure(mob) else diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 838ea5f0edd..d7db2633ad5 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -190,7 +190,7 @@ var/mob/living/carbon/human/H = mob var/organ = pick(list("heart","kidney","liver", "lungs")) var/obj/item/organ/internal/O = H.organs_by_name[organ] - if (!(O.robotic = ORGAN_ROBOT)) + if (O.robotic != ORGAN_ROBOT) O.damage += (5*multiplier) H << "You feel a cramp in your guts." @@ -370,7 +370,7 @@ var/mob/living/carbon/human/H = mob var/obj/item/organ/internal/O = H.organs_by_name for (var/organ in H.organs_by_name) - if (!(O.robotic = ORGAN_ROBOT)) + if (O.robotic != ORGAN_ROBOT) O.rejecting = 0 diff --git a/code/modules/virus2/helpers.dm b/code/modules/virus2/helpers.dm index d10fdbfb686..64790fdfc59 100644 --- a/code/modules/virus2/helpers.dm +++ b/code/modules/virus2/helpers.dm @@ -81,7 +81,7 @@ proc/airborne_can_reach(turf/source, turf/target) var/list/antibodies_in_common = M.antibodies & disease.antigen if(antibodies_in_common.len) return - if(M.reagents.has_reagent("spaceacillin")) + if(M.chem_effects[CE_ANTIBIOTIC]) if(prob(disease.resistance)) var/datum/disease2/disease/D = disease.getcopy() D.minormutate() diff --git a/code/modules/xenoarcheaology/artifacts/gigadrill.dm b/code/modules/xenoarcheaology/artifacts/gigadrill.dm index 42c7288d2d9..b6c665cb661 100644 --- a/code/modules/xenoarcheaology/artifacts/gigadrill.dm +++ b/code/modules/xenoarcheaology/artifacts/gigadrill.dm @@ -7,7 +7,7 @@ var/drill_time = 10 var/turf/drilling_turf density = 1 - layer = 3.1 //to go over ores + layer = ABOVE_JUNK_LAYER /obj/machinery/giga_drill/attack_hand(mob/user as mob) if(active) diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm index 4c0bafd7071..09b9d398ea8 100644 --- a/code/modules/xenoarcheaology/boulder.dm +++ b/code/modules/xenoarcheaology/boulder.dm @@ -29,11 +29,22 @@ C.scan_atom(user, src) return + if(istype(I, /obj/item/device/xenoarch_multi_tool)) + var/obj/item/device/xenoarch_multi_tool/C = I + if(C.mode) //Mode means scanning. + C.depth_scanner.scan_atom(user, src) + return + else + user.visible_message("\The [user] extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!", "You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!") + if(do_after(user, 15)) + to_chat(user, "\The [src] has been excavated to a depth of [2 * src.excavation_level]cm.") + return + if(istype(I, /obj/item/device/measuring_tape)) var/obj/item/device/measuring_tape/P = I user.visible_message("\The [user] extends \the [P] towards \the [src].", "You extend \the [P] towards \the [src].") if(do_after(user, 15)) - user << "\The [src] has been excavated to a depth of [2 * src.excavation_level]cm." + to_chat(user, "\The [src] has been excavated to a depth of [2 * src.excavation_level]cm.") return if(istype(I, /obj/item/weapon/pickaxe)) @@ -43,12 +54,12 @@ return last_act = world.time - user << "You start [P.drill_verb] [src]." + to_chat(user, "You start [P.drill_verb] [src].") if(!do_after(user, P.digspeed)) return - user << "You finish [P.drill_verb] [src]." + to_chat(user, "You finish [P.drill_verb] [src].") excavation_level += P.excavation_amount if(excavation_level > 100) @@ -87,4 +98,4 @@ else if(istype(AM,/obj/mecha)) var/obj/mecha/M = AM if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill)) - M.selected.action(src) \ No newline at end of file + M.selected.action(src) diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index 17412b4a8be..5f8c30ecad9 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -80,13 +80,13 @@ SSxenoarch.digsite_spawning_turfs.Remove(T) if(nearestTargetDist >= 0) - user << "Exotic energy detected on wavelength '[nearestTargetId]' in a radius of [nearestTargetDist]m[nearestSimpleTargetDist > 0 ? "; small anomaly detected in a radius of [nearestSimpleTargetDist]m" : ""]" + to_chat(user, "Exotic energy detected on wavelength '[nearestTargetId]' in a radius of [nearestTargetDist]m[nearestSimpleTargetDist > 0 ? "; small anomaly detected in a radius of [nearestSimpleTargetDist]m" : ""]") else if(nearestSimpleTargetDist >= 0) - user << "Small anomaly detected in a radius of [nearestSimpleTargetDist]m." + to_chat(user, "Small anomaly detected in a radius of [nearestSimpleTargetDist]m.") else - user << "Background radiation levels detected." + to_chat(user, "Background radiation levels detected.") else - user << "Scanning array is recharging." + to_chat(user, "Scanning array is recharging.") /obj/item/device/depth_scanner name = "depth analysis scanner" @@ -133,7 +133,7 @@ positive_locations.Add(D) - user << "\icon[src] [src] pings." + to_chat(user, "\icon[src] [src] pings.") else if(istype(A, /obj/structure/boulder)) var/obj/structure/boulder/B = A @@ -151,7 +151,7 @@ positive_locations.Add(D) - user << "\icon[src] [src] pings [pick("madly","wildly","excitedly","crazily")]!" + to_chat(user, "\icon[src] [src] pings [pick("madly","wildly","excitedly","crazily")]!") /obj/item/device/depth_scanner/attack_self(var/mob/living/user) interact(user) @@ -310,3 +310,39 @@ usr << browse(null, "window=locater") updateSelfDialog() + +/obj/item/device/xenoarch_multi_tool + name = "xenoarcheology multitool" + desc = "Has the features of the Alden-Saraspova counter, a measuring tape, and a depth analysis scanner all in one!" + icon_state = "ano_scanner2" + item_state = "lampgreen" + icon = 'icons/obj/xenoarchaeology.dmi' + origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2) + matter = list(DEFAULT_WALL_MATERIAL = 10000,"glass" = 5000) + w_class = ITEMSIZE_SMALL + slot_flags = SLOT_BELT + var/mode = 1 //Start off scanning. 1 = scanning, 0 = measuring + var/obj/item/device/ano_scanner/anomaly_scanner = null + var/obj/item/device/depth_scanner/depth_scanner = null + +/obj/item/device/xenoarch_multi_tool/New() + anomaly_scanner = new/obj/item/device/ano_scanner(src) + depth_scanner = new/obj/item/device/depth_scanner(src) + +/obj/item/device/xenoarch_multi_tool/attack_self(var/mob/living/user) + depth_scanner.interact(user) + +/obj/item/device/xenoarch_multi_tool/verb/swap_settings(var/mob/living/user) + set name = "Swap Functionality" + set desc = "Swap between the scanning and measuring functionality.." + mode = !mode + if(mode) + to_chat(user, "The device will now scan for artifacts.") + else + to_chat(user, "The device will now measure depth dug.") + +/obj/item/device/xenoarch_multi_tool/verb/scan_for_anomalies(var/mob/living/user) + set name = "Scan for Anomalies" + set desc = "Scan for artifacts and anomalies within your vicinity." + anomaly_scanner.interact(user) + diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index b954d5eb054..d911843cca2 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -149,3 +149,43 @@ smallest.loc = src picksToSort -= smallest orient2hud() + +/obj/item/weapon/pickaxe/excavationdrill + name = "excavation drill" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "excavationdrill2" + item_state = "syringe_0" + excavation_amount = 15 + digspeed = 30 + desc = "Advanced archaeological drill combining ultrasonic excitation and bluespace manipulation to provide extreme precision. The tip is adjustable from 1 to 30 cm." + drill_sound = 'sound/weapons/thudswoosh.ogg' + drill_verb = "drilling" + force = 5 + w_class = 2 + attack_verb = list("drilled") + +/obj/item/weapon/pickaxe/excavationdrill/attack_self(mob/user as mob) + var/depth = input("Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num + if(depth>30 || depth<1) + to_chat(user, "Invalid depth.") + return + excavation_amount = depth + to_chat(user, "You set the depth to [depth]cm.") + switch(depth) + if(1 to 5) + icon_state = "excavationdrill0" + if(6 to 10) + icon_state = "excavationdrill1" + if(11 to 15) + icon_state = "excavationdrill2" + if(16 to 20) + icon_state = "excavationdrill3" + if(21 to 25) + icon_state = "excavationdrill4" + if(25 to 30) + icon_state = "excavationdrill5" //The other 2 sprites are comically long. Let's just cut it at 5. + +/obj/item/weapon/pickaxe/excavationdrill/examine(mob/user) + ..() + var/depth = excavation_amount + to_chat(user, "It is currently set at [depth]cms.") \ No newline at end of file diff --git a/html/changelogs/Billybangles - Markers.yml b/html/changelogs/Billybangles - Markers.yml new file mode 100644 index 00000000000..afab2bf8cb3 --- /dev/null +++ b/html/changelogs/Billybangles - Markers.yml @@ -0,0 +1,38 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: battlefieldCommander + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added permanent markers, an alternative to crayons." + - tweak: "The chemistry recipe for paint now uses marker ink instead of crayon dust." + - rscdel: "Removed crayon boxes from the map. They can still be ordered from cargo in case you need a snack." diff --git a/html/changelogs/Cameron - Xenoarch Upgrades.yml b/html/changelogs/Cameron - Xenoarch Upgrades.yml new file mode 100644 index 00000000000..b352e0d3b74 --- /dev/null +++ b/html/changelogs/Cameron - Xenoarch Upgrades.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Cameron653 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds a xenoarch excavation tool, craftable in R&D. Allows depth selection of 1-30" + - rscadd: "Adds a xenoarch multitool, craftable in R&D. Has xenoarch counter, measure tool, and depth scanner all in one." diff --git a/maps/southern_cross/icons/mob/sc_head.dmi b/icons/mob/pilot_helmet.dmi similarity index 100% rename from maps/southern_cross/icons/mob/sc_head.dmi rename to icons/mob/pilot_helmet.dmi diff --git a/icons/mob/screen1.dmi b/icons/mob/screen1.dmi index 6828c365eac..0798bbc4d3c 100644 Binary files a/icons/mob/screen1.dmi and b/icons/mob/screen1.dmi differ diff --git a/maps/southern_cross/icons/mob/species/teshari/sc_head.dmi b/icons/mob/species/seromi/pilot_helmet.dmi similarity index 100% rename from maps/southern_cross/icons/mob/species/teshari/sc_head.dmi rename to icons/mob/species/seromi/pilot_helmet.dmi diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 70594a801a8..a0c2983ea7b 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/crayons.dmi b/icons/obj/crayons.dmi index 7ebabd5a81e..80ab2d153ca 100644 Binary files a/icons/obj/crayons.dmi and b/icons/obj/crayons.dmi differ diff --git a/icons/obj/cryogenics_split.dmi b/icons/obj/cryogenics_split.dmi index a25513a1435..86ef62b6f8c 100644 Binary files a/icons/obj/cryogenics_split.dmi and b/icons/obj/cryogenics_split.dmi differ diff --git a/icons/obj/piloting_overlay.dmi b/icons/obj/piloting_overlay.dmi new file mode 100644 index 00000000000..56074a50045 Binary files /dev/null and b/icons/obj/piloting_overlay.dmi differ diff --git a/icons/obj/robot_storage.dmi b/icons/obj/robot_storage.dmi index 52b79d26603..24e0aa73a37 100644 Binary files a/icons/obj/robot_storage.dmi and b/icons/obj/robot_storage.dmi differ diff --git a/icons/obj/xenoarchaeology.dmi b/icons/obj/xenoarchaeology.dmi index 6ece09b46ed..e0baa63cffd 100644 Binary files a/icons/obj/xenoarchaeology.dmi and b/icons/obj/xenoarchaeology.dmi differ diff --git a/interface/skin.dmf b/interface/skin.dmf index f32c3024961..571152d5c28 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1936,6 +1936,14 @@ window "mainwindow" is-checked = false group = "" button-type = pushbox + elem "tooltip" + type = BROWSER + pos = 0,0 + size = 999x999 + anchor1 = none + anchor2 = none + is-visible = false + saved-params = "" window "mapwindow" elem "mapwindow" diff --git a/maps/RandomZLevels/wildwest.dm b/maps/RandomZLevels/wildwest.dm index 51ac498fb24..90d22afb862 100644 --- a/maps/RandomZLevels/wildwest.dm +++ b/maps/RandomZLevels/wildwest.dm @@ -104,7 +104,6 @@ desc = "What is that thing?" density = 1 anchored = 1 - layer = 3 icon = 'icons/mob/critter.dmi' icon_state = "blob" var/triggerproc = "explode" //name of the proc thats called when the mine is triggered @@ -171,4 +170,4 @@ C << "You have regenerated." C.visible_message("[usr] appears to wake from the dead, having healed all wounds.") C.update_canmove() - return 1 + return 1 diff --git a/maps/northern_star/polaris-1.dmm b/maps/northern_star/polaris-1.dmm index 3f1213a0508..f09d64398e3 100644 --- a/maps/northern_star/polaris-1.dmm +++ b/maps/northern_star/polaris-1.dmm @@ -298,7 +298,7 @@ "afL" = (/turf/simulated/wall,/area/chapel/main) "afM" = (/obj/structure/table/woodentable,/obj/item/device/flashlight/lamp{pixel_y = 10},/obj/machinery/camera/network/civilian{c_tag = "CIV - Chapel Office"; dir = 4},/turf/simulated/floor/lino,/area/chapel/office) "afN" = (/obj/structure/table/woodentable,/obj/item/weapon/paper_bin{pixel_x = 1; pixel_y = 9},/obj/item/weapon/pen/blue{pixel_x = 5; pixel_y = 5},/turf/simulated/floor/lino,/area/chapel/office) -"afO" = (/obj/structure/table/woodentable,/obj/item/weapon/storage/fancy/crayons,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/lino,/area/chapel/office) +"afO" = (/obj/structure/table/woodentable,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/item/weapon/storage/fancy/markers,/turf/simulated/floor/lino,/area/chapel/office) "afP" = (/turf/simulated/floor/lino,/area/chapel/office) "afQ" = (/obj/structure/closet/wardrobe/chaplain_black,/obj/machinery/light{dir = 4},/turf/simulated/floor/lino,/area/chapel/office) "afR" = (/obj/machinery/light/small{dir = 8},/obj/item/weapon/storage/bible,/obj/structure/table/rack,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/random/maintenance/clean,/turf/simulated/floor,/area/maintenance/locker) @@ -1821,7 +1821,7 @@ "aJa" = (/obj/structure/table/rack,/obj/item/weapon/storage/toolbox/mechanical,/obj/item/weapon/storage/belt/utility,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/effect/decal/cleanable/dirt,/obj/random/maintenance/security,/obj/random/maintenance/security,/turf/simulated/floor/plating,/area/maintenance/security_starboard) "aJb" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/disposalpipe/segment,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor,/area/maintenance/security_starboard) "aJc" = (/turf/simulated/wall,/area/storage/art) -"aJd" = (/obj/structure/table/standard,/obj/item/weapon/storage/fancy/crayons,/obj/item/weapon/storage/fancy/crayons,/turf/simulated/floor/tiled,/area/storage/art) +"aJd" = (/obj/structure/table/standard,/obj/item/weapon/storage/fancy/markers,/obj/item/weapon/storage/fancy/markers,/turf/simulated/floor/tiled,/area/storage/art) "aJe" = (/obj/structure/table/standard,/obj/item/weapon/packageWrap,/obj/item/weapon/packageWrap,/turf/simulated/floor/tiled,/area/storage/art) "aJf" = (/obj/structure/table/standard,/obj/item/weapon/hand_labeler,/obj/item/weapon/hand_labeler,/obj/machinery/power/apc{dir = 1; name = "north bump"; pixel_x = 0; pixel_y = 24},/obj/structure/cable/green{d2 = 2; icon_state = "0-2"},/obj/machinery/light_switch{pixel_x = 11; pixel_y = 24},/turf/simulated/floor/tiled,/area/storage/art) "aJg" = (/obj/structure/table/standard,/obj/item/stack/cable_coil/random,/obj/item/stack/cable_coil/random,/obj/machinery/atmospherics/unary/vent_pump/on,/obj/item/device/taperecorder,/obj/item/device/taperecorder,/turf/simulated/floor/tiled,/area/storage/art) diff --git a/maps/southern_cross/items/clothing/sc_head.dm b/maps/southern_cross/items/clothing/sc_head.dm deleted file mode 100644 index bcc1c989657..00000000000 --- a/maps/southern_cross/items/clothing/sc_head.dm +++ /dev/null @@ -1,37 +0,0 @@ -//Pilot - -/obj/item/clothing/head/pilot - name = "pilot helmet" - desc = "Standard pilot gear. Protects the head from impacts." - icon_state = "pilot_helmet1" - item_icons = list(slot_head_str = 'maps/southern_cross/icons/mob/sc_head.dmi') - icon = 'maps/southern_cross/icons/obj/sc_hats.dmi' - sprite_sheets = list( - "Teshari" = 'maps/southern_cross/icons/mob/species/teshari/sc_head.dmi' - ) - flags = THICKMATERIAL - armor = list(melee = 20, bullet = 10, laser = 10, energy = 5, bomb = 10, bio = 0, rad = 0) - flags_inv = HIDEEARS - cold_protection = HEAD - min_cold_protection_temperature = HELMET_MIN_COLD_PROTECTION_TEMPERATURE - heat_protection = HEAD - max_heat_protection_temperature = HELMET_MAX_HEAT_PROTECTION_TEMPERATURE - w_class = ITEMSIZE_NORMAL - -/obj/item/clothing/head/pilot/alt - name = "pilot helmet" - desc = "Standard pilot gear. Protects the head from impacts. This one has a retractable visor" - icon_state = "pilot_helmet2" - sprite_sheets = list( - "Teshari" = 'maps/southern_cross/icons/mob/species/teshari/sc_head.dmi' - ) - action_button_name = "Toggle Visor" - -/obj/item/clothing/head/pilot/alt/attack_self(mob/user as mob) - if(src.icon_state == initial(icon_state)) - src.icon_state = "[icon_state]up" - user << "You raise the visor on the pilot helmet." - else - src.icon_state = initial(icon_state) - user << "You lower the visor on the pilot helmet." - update_clothing_icon() //so our mob-overlays update \ No newline at end of file diff --git a/maps/southern_cross/southern_cross-1.dmm b/maps/southern_cross/southern_cross-1.dmm index 54fe25d22ec..55517709358 100644 --- a/maps/southern_cross/southern_cross-1.dmm +++ b/maps/southern_cross/southern_cross-1.dmm @@ -3981,7 +3981,7 @@ "byC" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 8},/obj/effect/floor_decal/borderfloor{dir = 4},/obj/effect/floor_decal/corner/purple/border{dir = 4},/obj/machinery/light{dir = 4; icon_state = "tube1"; pixel_x = 0},/turf/simulated/floor/tiled,/area/janitor) "byD" = (/obj/structure/closet/toolcloset,/obj/machinery/alarm{dir = 4; icon_state = "alarm0"; pixel_x = -22},/obj/effect/floor_decal/borderfloor{dir = 8},/obj/effect/floor_decal/corner/yellow/border{dir = 8},/turf/simulated/floor/tiled,/area/storage/auxillary) "byE" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/structure/table/steel,/obj/random/maintenance/engineering,/obj/random/tech_supply,/obj/random/tech_supply,/obj/random/tech_supply,/obj/random/tech_supply,/obj/item/stack/cable_coil/random,/obj/item/stack/cable_coil/random,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/tiled,/area/storage/auxillary) -"byF" = (/obj/structure/table/steel,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen/blue{pixel_x = -5; pixel_y = -1},/obj/item/weapon/pen/red{pixel_x = -1; pixel_y = 3},/obj/item/weapon/storage/fancy/crayons,/obj/item/weapon/storage/fancy/crayons,/obj/machinery/camera/network/civilian{c_tag = "CIV - Auxiliary Storage"; dir = 8},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/obj/effect/floor_decal/borderfloor{dir = 4},/obj/effect/floor_decal/corner/yellow/border{dir = 4},/turf/simulated/floor/tiled,/area/storage/auxillary) +"byF" = (/obj/structure/table/steel,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen/blue{pixel_x = -5; pixel_y = -1},/obj/item/weapon/pen/red{pixel_x = -1; pixel_y = 3},/obj/machinery/camera/network/civilian{c_tag = "CIV - Auxiliary Storage"; dir = 8},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/obj/effect/floor_decal/borderfloor{dir = 4},/obj/effect/floor_decal/corner/yellow/border{dir = 4},/obj/item/weapon/storage/fancy/markers,/obj/item/weapon/storage/fancy/markers,/turf/simulated/floor/tiled,/area/storage/auxillary) "byG" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/manifold/hidden{dir = 8; icon_state = "map"; tag = "icon-manifold-f (WEST)"},/obj/effect/floor_decal/industrial/warning{icon_state = "warning"; dir = 4},/obj/machinery/meter,/obj/machinery/light/small{dir = 8},/turf/simulated/floor/plating,/area/maintenance/research) "byH" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/maintenance{name = "Firefighting Equipment"; req_access = null; req_one_access = list(12,47)},/turf/simulated/floor/plating,/area/maintenance/research) "byI" = (/obj/machinery/portable_atmospherics/canister,/turf/simulated/floor/plating,/area/maintenance/research) @@ -8505,7 +8505,7 @@ "dhC" = (/obj/machinery/photocopier,/turf/simulated/floor/lino,/area/chapel/office) "dhD" = (/obj/structure/table/wooden_reinforced,/obj/structure/flora/pottedplant/thinbush{pixel_y = 10},/turf/simulated/floor/lino,/area/chapel/office) "dhE" = (/obj/structure/table/wooden_reinforced,/obj/item/weapon/nullrod,/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater,/obj/machinery/power/apc{dir = 1; name = "north bump"; pixel_x = 0; pixel_y = 24},/obj/machinery/button/windowtint{id = "chapel"; pixel_x = -11; pixel_y = 24},/obj/machinery/light_switch{pixel_x = 11; pixel_y = 24},/obj/structure/cable/green{d2 = 2; icon_state = "0-2"},/turf/simulated/floor/lino,/area/chapel/office) -"dhF" = (/obj/structure/table/wooden_reinforced,/obj/item/weapon/storage/fancy/crayons,/obj/item/device/radio/intercom{dir = 1; name = "Station Intercom (General)"; pixel_y = 21},/turf/simulated/floor/lino,/area/chapel/office) +"dhF" = (/obj/structure/table/wooden_reinforced,/obj/item/device/radio/intercom{dir = 1; name = "Station Intercom (General)"; pixel_y = 21},/obj/item/weapon/storage/fancy/markers,/turf/simulated/floor/lino,/area/chapel/office) "dhG" = (/obj/structure/closet/wardrobe/chaplain_black,/turf/simulated/floor/lino,/area/chapel/office) "dhH" = (/obj/machinery/power/breakerbox/activated{RCon_tag = "Civilian Substation Bypass"},/turf/simulated/floor/plating,/area/maintenance/substation/civilian) "dhI" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/effect/floor_decal/industrial/warning{icon_state = "warning"; dir = 8},/turf/simulated/floor/plating,/area/maintenance/substation/civilian) diff --git a/maps/southern_cross/southern_cross.dm b/maps/southern_cross/southern_cross.dm index 7ddc08f49d4..29c4f295f23 100644 --- a/maps/southern_cross/southern_cross.dm +++ b/maps/southern_cross/southern_cross.dm @@ -25,7 +25,6 @@ #include "items/headset_sc.dm" #include "items/clothing/sc_suit.dm" #include "items/clothing/sc_under.dm" - #include "items/clothing/sc_head.dm" #include "items/clothing/sc_accessory.dm" #include "job/outfits.dm" #include "structures/closets/engineering.dm" diff --git a/nano/js/nano_state.js b/nano/js/nano_state.js index 3e9ef3ab1ff..e211895cee5 100644 --- a/nano/js/nano_state.js +++ b/nano/js/nano_state.js @@ -7,8 +7,7 @@ function NanoStateClass() { return; } - this.key = this.key.toLowerCase(); - + this.key = this.key.toLowerCase(); NanoStateManager.addState(this);*/ } @@ -18,102 +17,99 @@ NanoStateClass.prototype.contentRendered = false; NanoStateClass.prototype.mapInitialised = false; NanoStateClass.prototype.isCurrent = function () { - return NanoStateManager.getCurrentState() == this; + return NanoStateManager.getCurrentState() == this; }; NanoStateClass.prototype.onAdd = function (previousState) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function - - NanoBaseCallbacks.addCallbacks(); - NanoBaseHelpers.addHelpers(); + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + NanoBaseCallbacks.addCallbacks(); + NanoBaseHelpers.addHelpers(); }; NanoStateClass.prototype.onRemove = function (nextState) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function - - NanoBaseCallbacks.removeCallbacks(); - NanoBaseHelpers.removeHelpers(); + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + NanoBaseCallbacks.removeCallbacks(); + NanoBaseHelpers.removeHelpers(); }; NanoStateClass.prototype.onBeforeUpdate = function (data) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function - - data = NanoStateManager.executeBeforeUpdateCallbacks(data); - - return data; // Return data to continue, return false to prevent onUpdate and onAfterUpdate + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + data = NanoStateManager.executeBeforeUpdateCallbacks(data); + return data; // Return data to continue, return false to prevent onUpdate and onAfterUpdate }; NanoStateClass.prototype.onUpdate = function (data) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + try + { + if (!this.layoutRendered || (data['config'].hasOwnProperty('autoUpdateLayout') && data['config']['autoUpdateLayout'])) + { + $("#uiLayout").html(NanoTemplate.parse('layout', data)); // render the 'mail' template to the #mainTemplate div + this.layoutRendered = true; + } + if (!this.contentRendered || (data['config'].hasOwnProperty('autoUpdateContent') && data['config']['autoUpdateContent'])) + { + var content = ""; + var keys = NanoTemplate.getKeys(); + for (i = 0; i < keys.length; i++) { + if(keys[i] == "layout"){ continue; } + content += NanoTemplate.parse(keys[i], data); + } + $("#uiContent").html(content); // render the 'mail' template to the #mainTemplate div + this.contentRendered = true; + } + if (NanoTemplate.templateExists('mapContent')) + { + if (!this.mapInitialised) + { + // Add drag functionality to the map ui + $('#uiMap').draggable(); + $('#uiMapTooltip') + .off('click') + .on('click', function (event) { + event.preventDefault(); + $(this).fadeOut(400); + }); + this.mapInitialised = true; + } - try - { - if (!this.layoutRendered || (data['config'].hasOwnProperty('autoUpdateLayout') && data['config']['autoUpdateLayout'])) - { - $("#uiLayout").html(NanoTemplate.parse('layout', data)); // render the 'mail' template to the #mainTemplate div - this.layoutRendered = true; - } - if (!this.contentRendered || (data['config'].hasOwnProperty('autoUpdateContent') && data['config']['autoUpdateContent'])) - { - $("#uiContent").html(NanoTemplate.parse('main', data)); // render the 'mail' template to the #mainTemplate div - this.contentRendered = true; - } - if (NanoTemplate.templateExists('mapContent')) - { - if (!this.mapInitialised) - { - // Add drag functionality to the map ui - $('#uiMap').draggable(); + $("#uiMapContent").html(NanoTemplate.parse('mapContent', data)); // render the 'mapContent' template to the #uiMapContent div - $('#uiMapTooltip') - .off('click') - .on('click', function (event) { - event.preventDefault(); - $(this).fadeOut(400); - }); - - this.mapInitialised = true; - } - - $("#uiMapContent").html(NanoTemplate.parse('mapContent', data)); // render the 'mapContent' template to the #uiMapContent div - - if (data['config'].hasOwnProperty('showMap') && data['config']['showMap']) - { - $('#uiContent').addClass('hidden'); - $('#uiMapWrapper').removeClass('hidden'); - } - else - { - $('#uiMapWrapper').addClass('hidden'); - $('#uiContent').removeClass('hidden'); - } - } - if (NanoTemplate.templateExists('mapHeader')) - { - $("#uiMapHeader").html(NanoTemplate.parse('mapHeader', data)); // render the 'mapHeader' template to the #uiMapHeader div - } - if (NanoTemplate.templateExists('mapFooter')) - { - $("#uiMapFooter").html(NanoTemplate.parse('mapFooter', data)); // render the 'mapFooter' template to the #uiMapFooter div - } - } - catch(error) - { - alert('ERROR: An error occurred while rendering the UI: ' + error.message); - return; - } + if (data['config'].hasOwnProperty('showMap') && data['config']['showMap']) + { + $('#uiContent').addClass('hidden'); + $('#uiMapWrapper').removeClass('hidden'); + } + else + { + $('#uiMapWrapper').addClass('hidden'); + $('#uiContent').removeClass('hidden'); + } + } + if (NanoTemplate.templateExists('mapHeader')) + { + $("#uiMapHeader").html(NanoTemplate.parse('mapHeader', data)); // render the 'mapHeader' template to the #uiMapHeader div + } + if (NanoTemplate.templateExists('mapFooter')) + { + $("#uiMapFooter").html(NanoTemplate.parse('mapFooter', data)); // render the 'mapFooter' template to the #uiMapFooter div + } + } + catch(error) + { + alert('ERROR: An error occurred while rendering the UI: ' + error.message); + return; + } }; NanoStateClass.prototype.onAfterUpdate = function (data) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function - - NanoStateManager.executeAfterUpdateCallbacks(data); + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + NanoStateManager.executeAfterUpdateCallbacks(data); }; NanoStateClass.prototype.alertText = function (text) { - // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function - - alert(text); + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + alert(text); }; diff --git a/nano/js/nano_template.js b/nano/js/nano_template.js index f8f5d265948..b2f894fd076 100644 --- a/nano/js/nano_template.js +++ b/nano/js/nano_template.js @@ -1,15 +1,15 @@ var NanoTemplate = function () { - var _templateData = {}; + var _templateData = {}; - var _templates = {}; - var _compiledTemplates = {}; + var _templates = {}; + var _compiledTemplates = {}; var _helpers = {}; - var init = function () { - // We store templateData in the body tag, it's as good a place as any + var init = function () { + // We store templateData in the body tag, it's as good a place as any _templateData = $('body').data('templateData'); if (_templateData == null) @@ -18,94 +18,101 @@ var NanoTemplate = function () { } loadNextTemplate(); - }; + }; - var loadNextTemplate = function () { - // we count the number of templates for this ui so that we know when they've all been rendered - var templateCount = Object.size(_templateData); + var loadNextTemplate = function () { + // we count the number of templates for this ui so that we know when they've all been rendered + var templateCount = Object.size(_templateData); - if (!templateCount) - { - $(document).trigger('templatesLoaded'); - return; - } + if (!templateCount) + { + $(document).trigger('templatesLoaded'); + return; + } - // load markup for each template and register it - for (var key in _templateData) - { - if (!_templateData.hasOwnProperty(key)) - { - continue; - } + // load markup for each template and register it + for (var key in _templateData) + { + if (!_templateData.hasOwnProperty(key)) + { + continue; + } - $.when($.ajax({ - url: _templateData[key], - cache: false, - dataType: 'text' - })) - .done(function(templateMarkup) { + $.when($.ajax({ + url: _templateData[key], + cache: false, + dataType: 'text' + })) + .done(function(templateMarkup) { - templateMarkup += '
'; + templateMarkup += '
'; - try - { - NanoTemplate.addTemplate(key, templateMarkup); - } - catch(error) - { - alert('ERROR: An error occurred while loading the UI: ' + error.message); - return; - } + try + { + NanoTemplate.addTemplate(key, templateMarkup); + } + catch(error) + { + alert('ERROR: An error occurred while loading the UI: ' + error.message); + return; + } - delete _templateData[key]; + delete _templateData[key]; - loadNextTemplate(); - }) - .fail(function () { - alert('ERROR: Loading template ' + key + '(' + _templateData[key] + ') failed!'); - }); + loadNextTemplate(); + }) + .fail(function () { + alert('ERROR: Loading template ' + key + '(' + _templateData[key] + ') failed!'); + }); - return; - } - } + return; + } + } - var compileTemplates = function () { + var compileTemplates = function () { - for (var key in _templates) { - try { - _compiledTemplates[key] = doT.template(_templates[key], null, _templates) - } - catch (error) { - alert(error.message); - } - } - }; + for (var key in _templates) { + try { + _compiledTemplates[key] = doT.template(_templates[key], null, _templates) + } + catch (error) { + alert(error.message); + } + } + }; - return { - init: function () { - init(); - }, - addTemplate: function (key, templateString) { - _templates[key] = templateString; - }, - templateExists: function (key) { - return _templates.hasOwnProperty(key); - }, - parse: function (templateKey, data) { - if (!_compiledTemplates.hasOwnProperty(templateKey) || !_compiledTemplates[templateKey]) { - if (!_templates.hasOwnProperty(templateKey)) { - alert('ERROR: Template "' + templateKey + '" does not exist in _compiledTemplates!'); - return '

Template error (does not exist)

'; - } - compileTemplates(); - } - if (typeof _compiledTemplates[templateKey] != 'function') { - alert(_compiledTemplates[templateKey]); - alert('ERROR: Template "' + templateKey + '" failed to compile!'); - return '

Template error (failed to compile)

'; - } - return _compiledTemplates[templateKey].call(this, data['data'], data['config'], _helpers); - }, + return { + init: function () { + init(); + }, + addTemplate: function (key, templateString) { + _templates[key] = templateString; + }, + templateExists: function (key) { + return _templates.hasOwnProperty(key); + }, + getKeys: function () { + var _keys = []; + for(var key in _templates) { + _keys.push(key); + } + return _keys; + }, + parse: function (templateKey, data) { + if (!_compiledTemplates.hasOwnProperty(templateKey) || !_compiledTemplates[templateKey]) { + if (!_templates.hasOwnProperty(templateKey)) { + alert('ERROR: Template "' + templateKey + '" does not exist in _compiledTemplates!'); + return '

Templateerror (does not exist)

'; + } + compileTemplates(); + } + if (typeof _compiledTemplates[templateKey] != 'function') { + alert(_compiledTemplates[templateKey]); + alert('ERROR: Template "' + templateKey + '" failed to compile!'); + return '

Template error (failed to compile)

'; + } + return _compiledTemplates[templateKey].call(this, data['data'], data['config'], _helpers); + }, addHelper: function (helperName, helperFunction) { if (!jQuery.isFunction(helperFunction)) { alert('NanoTemplate.addHelper failed to add ' + helperName + ' as it is not a function.'); @@ -129,7 +136,7 @@ var NanoTemplate = function () { delete _helpers[helperName]; } } - } + } }(); diff --git a/polaris.dme b/polaris.dme index 2e320f36579..ce77d288f29 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1359,6 +1359,7 @@ #include "code\modules\clothing\head\jobs.dm" #include "code\modules\clothing\head\misc.dm" #include "code\modules\clothing\head\misc_special.dm" +#include "code\modules\clothing\head\pilot_helmet.dm" #include "code\modules\clothing\head\soft_caps.dm" #include "code\modules\clothing\head\solgov.dm" #include "code\modules\clothing\masks\boxing.dm" @@ -1457,6 +1458,7 @@ #include "code\modules\economy\EFTPOS.dm" #include "code\modules\economy\Events.dm" #include "code\modules\economy\Events_Mundane.dm" +#include "code\modules\economy\lorenews.dm" #include "code\modules\economy\price_list.dm" #include "code\modules\economy\retail_scanner.dm" #include "code\modules\economy\TradeDestinations.dm" @@ -2314,6 +2316,7 @@ #include "code\modules\tables\tables.dm" #include "code\modules\tables\update_triggers.dm" #include "code\modules\tension\tension.dm" +#include "code\modules\tooltip\tooltip.dm" #include "code\modules\turbolift\_turbolift.dm" #include "code\modules\turbolift\turbolift.dm" #include "code\modules\turbolift\turbolift_areas.dm" diff --git a/sound/effects/footstep/snow1.ogg b/sound/effects/footstep/snow1.ogg new file mode 100644 index 00000000000..e98e6df420c Binary files /dev/null and b/sound/effects/footstep/snow1.ogg differ diff --git a/sound/effects/footstep/snow2.ogg b/sound/effects/footstep/snow2.ogg new file mode 100644 index 00000000000..e4e2058e50c Binary files /dev/null and b/sound/effects/footstep/snow2.ogg differ diff --git a/sound/effects/footstep/snow3.ogg b/sound/effects/footstep/snow3.ogg new file mode 100644 index 00000000000..1a6e23b6c39 Binary files /dev/null and b/sound/effects/footstep/snow3.ogg differ diff --git a/sound/effects/footstep/snow4.ogg b/sound/effects/footstep/snow4.ogg new file mode 100644 index 00000000000..9cc98e830e3 Binary files /dev/null and b/sound/effects/footstep/snow4.ogg differ diff --git a/sound/effects/footstep/snow5.ogg b/sound/effects/footstep/snow5.ogg new file mode 100644 index 00000000000..a3fa77173fe Binary files /dev/null and b/sound/effects/footstep/snow5.ogg differ