From bf2bcbce67c46778379de5d64107347172830bc9 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sun, 31 Jul 2016 21:29:03 -0700 Subject: [PATCH 1/9] Removes most hard-coded z level checks --- _maps/__MAP_DEFINES.dm | 32 +++++++++- _maps/cyberiad.dm | 2 +- _maps/metastation.dm | 2 +- code/__DEFINES/misc.dm | 15 ----- code/_globalvars/mapping.dm | 11 ---- code/controllers/Processes/shuttles.dm | 6 +- code/controllers/Processes/weather.dm | 4 +- code/controllers/configuration.dm | 12 ---- code/controllers/master_controller.dm | 2 +- code/datums/cache/air_alarm.dm | 3 +- code/datums/diseases/advance/advance.dm | 3 +- code/datums/spell.dm | 10 +-- code/datums/weather/weather.dm | 12 ++-- code/datums/weather/weather_types.dm | 7 +-- code/game/area/Space Station 13 areas.dm | 3 +- code/game/atoms.dm | 6 +- code/game/gamemodes/antag_spawner.dm | 3 +- code/game/gamemodes/blob/blob.dm | 3 +- code/game/gamemodes/blob/blob_report.dm | 3 +- code/game/gamemodes/borer/borer.dm | 4 +- code/game/gamemodes/cult/runes.dm | 3 +- code/game/gamemodes/events.dm | 3 +- code/game/gamemodes/game_mode.dm | 6 +- code/game/gamemodes/gameticker.dm | 3 +- .../gamemodes/malfunction/Malf_Modules.dm | 3 +- .../game/gamemodes/malfunction/malfunction.dm | 3 +- code/game/gamemodes/meteor/meteors.dm | 4 +- .../gamemodes/miniantags/borer/borer_event.dm | 3 +- .../gamemodes/miniantags/bot_swarm/swarmer.dm | 5 +- code/game/gamemodes/nations/nations.dm | 3 +- code/game/gamemodes/newobjective.dm | 3 +- .../gamemodes/nuclear/nuclear_challenge.dm | 3 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 9 +-- code/game/gamemodes/objective.dm | 18 ++---- code/game/gamemodes/revolution/revolution.dm | 3 +- code/game/gamemodes/scoreboard.dm | 12 ++-- code/game/gamemodes/xenos/xenos.dm | 6 +- code/game/machinery/alarm.dm | 1 - .../atmoalter/area_atmos_computer.dm | 1 - code/game/machinery/camera/camera.dm | 2 +- code/game/machinery/camera/tracking.dm | 5 +- code/game/machinery/computer/camera.dm | 3 +- .../game/machinery/computer/communications.dm | 6 +- code/game/machinery/computer/honkputer.dm | 6 +- code/game/machinery/computer/law.dm | 3 +- code/game/machinery/computer/pod.dm | 6 +- code/game/machinery/computer/prisoner.dm | 3 +- code/game/machinery/computer/security.dm | 3 +- code/game/machinery/computer/skills.dm | 3 +- code/game/machinery/firealarm.dm | 4 +- code/game/machinery/supply_display.dm | 3 +- code/game/machinery/telecomms/broadcaster.dm | 12 ++-- .../telecomms/machine_interactions.dm | 12 ++-- .../machinery/telecomms/telecomunications.dm | 6 +- code/game/machinery/teleporter.dm | 15 ++--- code/game/mecha/equipment/tools/tools.dm | 6 +- code/game/objects/effects/landmarks.dm | 2 +- code/game/objects/items/devices/camera_bug.dm | 2 - .../objects/items/devices/radio/intercom.dm | 2 +- .../objects/items/weapons/bee_briefcase.dm | 3 +- .../objects/items/weapons/teleportation.dm | 7 +-- .../structures/crates_lockers/closets.dm | 3 +- .../structures/crates_lockers/crates.dm | 3 +- code/game/turfs/space/transit.dm | 3 +- code/modules/admin/topic.dm | 9 +-- code/modules/admin/verbs/debug.dm | 3 +- code/modules/admin/verbs/playsound.dm | 3 +- code/modules/awaymissions/zlevel.dm | 2 +- .../clothing/spacesuits/rig/modules/ninja.dm | 3 +- code/modules/computer3/computers/camera.dm | 3 +- .../computer3/computers/communications.dm | 3 +- code/modules/computer3/computers/law.dm | 3 +- code/modules/computer3/computers/medical.dm | 3 +- code/modules/computer3/computers/prisoner.dm | 3 +- code/modules/computer3/computers/robot.dm | 3 +- code/modules/computer3/computers/security.dm | 3 +- code/modules/computer3/networking.dm | 2 +- code/modules/events/alien_infestation.dm | 3 +- code/modules/events/anomaly_bluespace.dm | 3 +- code/modules/events/brand_intelligence.dm | 3 +- code/modules/events/disease_outbreak.dm | 3 +- code/modules/events/dust.dm | 2 +- code/modules/events/grid_check.dm | 15 ++--- code/modules/events/holidays/Christmas.dm | 3 +- code/modules/events/holidays/Holidays.dm | 2 +- code/modules/events/radiation_storm.dm | 9 +-- code/modules/events/rogue_drones.dm | 2 +- code/modules/events/spider_infestation.dm | 3 +- code/modules/events/undead.dm | 3 +- code/modules/events/vent_clog.dm | 3 +- code/modules/events/wormholes.dm | 3 +- code/modules/holiday/christmas.dm | 3 +- code/modules/hydroponics/seed.dm | 3 +- code/modules/mining/equipment_locker.dm | 6 +- code/modules/mining/ore.dm | 3 +- code/modules/mob/living/living.dm | 5 +- code/modules/mob/living/silicon/ai/ai.dm | 4 +- .../living/silicon/pai/software_modules.dm | 3 +- code/modules/nano/interaction/default.dm | 3 +- code/modules/nano/modules/crew_monitor.dm | 3 +- code/modules/pda/cart_apps.dm | 3 +- code/modules/pda/messenger.dm | 2 +- code/modules/power/apc.dm | 18 ++---- code/modules/power/gravitygenerator.dm | 12 ++-- code/modules/power/smes.dm | 3 +- .../projectiles/guns/energy/telegun.dm | 3 +- code/modules/research/experimentor.dm | 2 +- .../security_levels/security levels.dm | 27 +++----- code/modules/shuttle/assault_pod.dm | 1 - code/modules/shuttle/emergency.dm | 3 +- code/modules/shuttle/supply.dm | 6 +- code/modules/shuttle/syndicate.dm | 4 +- code/modules/space_management/level_check.dm | 7 +++ code/modules/space_management/level_traits.dm | 62 +++++++++++++++++++ code/modules/space_management/space_level.dm | 8 ++- .../space_management/space_transition.dm | 19 +++--- .../space_management/zlevel_manager.dm | 31 +++++++--- code/modules/store/store.dm | 3 +- code/modules/telesci/bscrystal.dm | 3 +- config/example/config.txt | 12 ---- config/example/space_levels.txt | 13 ---- paradise.dme | 2 + 122 files changed, 325 insertions(+), 410 deletions(-) create mode 100644 code/modules/space_management/level_check.dm create mode 100644 code/modules/space_management/level_traits.dm delete mode 100644 config/example/space_levels.txt diff --git a/_maps/__MAP_DEFINES.dm b/_maps/__MAP_DEFINES.dm index be9889b91e7..a3a14443cda 100644 --- a/_maps/__MAP_DEFINES.dm +++ b/_maps/__MAP_DEFINES.dm @@ -1,6 +1,32 @@ + +// Linkage flags #define CROSSLINKED 2 #define SELFLOOPING 1 #define UNAFFECTED 0 +// Attributes (In text for the convenience of those using VV) + #define BLOCK_TELEPORT "Blocks Teleport" + // Impedes with the casting of some spells + #define IMPEDES_MAGIC "Impedes Magic" + // A level the station exists on + #define STATION_LEVEL "Station Level" + // A level affected by Code Red announcements, cargo telepads, or similar + #define STATION_CONTACT "Station Contact" + // A level dedicated to admin use + #define ADMIN_LEVEL "Admin Level" + // A level that can be navigated to through space + #define REACHABLE "Reachable" + // For away missions - used by some consoles + #define AWAY_LEVEL "Away" + // Allows weather + #define HAS_WEATHER "Weather" + // Enhances telecomms signals + #define BOOSTS_SIGNAL "Boosts signals" + // Currently used for determining mining score + #define ORE_LEVEL "Mining" + // Levels the AI can control bots on + #define AI_OK "AI Allowed" + +// Level names #define MAIN_STATION "Main Station" #define CENTCOMM "CentComm" #define TELECOMMS "Telecomms Satellite" @@ -10,4 +36,8 @@ #define EMPTY_AREA "Empty Area" #define EMPTY_AREA_2 "Empty Area 2" #define AWAY_MISSION "Away Mission" - #define AWAY_MISSION_LIST list(AWAY_MISSION = UNAFFECTED) + +// Convenience define + #define DECLARE_LEVEL(NAME,LINKS,TRAITS) list("name" = NAME, "linkage" = LINKS, "attributes" = TRAITS) + + #define AWAY_MISSION_LIST list(DECLARE_LEVEL(AWAY_MISSION,UNAFFECTED,list(BLOCK_TELEPORT, AWAY_LEVEL))) diff --git a/_maps/cyberiad.dm b/_maps/cyberiad.dm index a2f78f9d26c..d832502cee5 100644 --- a/_maps/cyberiad.dm +++ b/_maps/cyberiad.dm @@ -24,7 +24,7 @@ z7 = empty #define MAP_FILE "cyberiad.dmm" #define MAP_NAME "NSS Cyberiad" - #define MAP_TRANSITION_CONFIG list(MAIN_STATION = CROSSLINKED, CENTCOMM = SELFLOOPING, TELECOMMS = CROSSLINKED, CONSTRUCTION = CROSSLINKED, MINING = CROSSLINKED, DERELICT = CROSSLINKED, EMPTY_AREA = CROSSLINKED) + #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)), DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)), DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)), DECLARE_LEVEL(CONSTRUCTION,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,HAS_WEATHER,ORE_LEVEL,AI_OK)), DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE))) #elif !defined(MAP_OVERRIDE) diff --git a/_maps/metastation.dm b/_maps/metastation.dm index 2010b25d501..454cde2adf3 100644 --- a/_maps/metastation.dm +++ b/_maps/metastation.dm @@ -25,7 +25,7 @@ z7 = empty space #define MAP_FILE "MetaStation.v41A.II.dmm" #define MAP_NAME "MetaStation" - #define MAP_TRANSITION_CONFIG list(MAIN_STATION = CROSSLINKED, CENTCOMM = SELFLOOPING, TELECOMMS = CROSSLINKED, DERELICT = CROSSLINKED, MINING = CROSSLINKED, EMPTY_AREA = CROSSLINKED, EMPTY_AREA_2 = CROSSLINKED) + #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)), DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)), DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)), DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,AI_OK)), DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(EMPTY_AREA_2,CROSSLINKED,list(REACHABLE))) #elif !defined(MAP_OVERRIDE) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index f6ddb6a5a6a..cda5c95d85e 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -1,20 +1,5 @@ - - - -//zlevel defines, can be overriden for different maps in the appropriate _maps file. -#define ZLEVEL_STATION 1 -#define ZLEVEL_CENTCOMM 2 -#define ZLEVEL_TELECOMMS 3 -#define ZLEVEL_ENGI 4 -#define ZLEVEL_ASTEROID 5 -#define ZLEVEL_DERELICT 6 -#define ZLEVEL_EMPTY 7 -#define MAX_Z 7 // Used in space.dm to defince which Z-levels cannot be exited via space. #define TRANSITIONEDGE 7 //Distance from edge to move to another z-level -/// -#define ENGINE_EJECT_Z 3 - //Object specific defines #define CANDLE_LUM 3 //For how bright candles are diff --git a/code/_globalvars/mapping.dm b/code/_globalvars/mapping.dm index 2324bf85077..abc81f9d52a 100644 --- a/code/_globalvars/mapping.dm +++ b/code/_globalvars/mapping.dm @@ -7,14 +7,6 @@ var/list/cardinal = list( NORTH, SOUTH, EAST, WEST ) var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) var/list/diagonals = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) -//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. -//(Exceptions: extended, sandbox and nuke) -Errorage -//Was list("3" = 30, "4" = 70). -//Spacing should be a reliable method of getting rid of a body -- Urist. -//Go away Urist, I'm restoring this to the longer list. ~Errorage -// TODO: Tie into space manager -var/list/accessable_z_levels = list(ZLEVEL_STATION,ZLEVEL_TELECOMMS,ZLEVEL_ENGI,ZLEVEL_ASTEROID,ZLEVEL_DERELICT,ZLEVEL_EMPTY) //Keep this to six maps, repeating z-levels is okay if needed - var/global/list/global_map = null //list/global_map = list(list(1,5),list(4,3))//an array of map Z levels. //Resulting sector map looks like @@ -26,9 +18,6 @@ var/global/list/global_map = null //3 - AI satellite //5 - empty space -// TODO: Tie into space manager -var/shuttle_z = ZLEVEL_CENTCOMM //default - var/list/monkeystart = list() var/list/wizardstart = list() var/list/newplayer_start = list() diff --git a/code/controllers/Processes/shuttles.dm b/code/controllers/Processes/shuttles.dm index 9c20d612247..bae4bce175f 100644 --- a/code/controllers/Processes/shuttles.dm +++ b/code/controllers/Processes/shuttles.dm @@ -164,8 +164,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 continue var/turf/T = get_turf(thing) - // TODO: Tie into space manager - if(T && T.z == ZLEVEL_STATION) + if(T && is_station_level(T.z)) callShuttle = 0 break @@ -210,8 +209,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 if(!M.roundstart_move) continue for(var/obj/docking_port/stationary/S in stationary) - // TODO: Tie into space manager - if(S.z != ZLEVEL_STATION && findtext(S.id, M.id)) + if(is_station_level(S.z) && findtext(S.id, M.id)) S.width = M.width S.height = M.height S.dwidth = M.dwidth diff --git a/code/controllers/Processes/weather.dm b/code/controllers/Processes/weather.dm index df9ee95369b..6cdcce750b6 100644 --- a/code/controllers/Processes/weather.dm +++ b/code/controllers/Processes/weather.dm @@ -1,5 +1,5 @@ -// TODO: Tie into space manager //Used for all kinds of weather, ex. lavaland ash storms. +// TODO: This could probably be better-integrated with the space manager var/global/datum/controller/process/weather/weather_master /datum/controller/process/weather @@ -33,7 +33,7 @@ var/global/datum/controller/process/weather/weather_master var/list/possible_weather_for_this_z = list() for(var/V in existing_weather) var/datum/weather/WE = V - if(WE.target_z == Z && WE.probability) //Another check so that it doesn't run extra weather + if(WE.target_level == Z && WE.probability) //Another check so that it doesn't run extra weather possible_weather_for_this_z[WE] = WE.probability var/datum/weather/W = pickweight(possible_weather_for_this_z) run_weather(W.name) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 5cedd40abfc..e01aa597ba6 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -495,18 +495,6 @@ if("max_maint_drones") config.max_maint_drones = text2num(value) - if("station_levels") - config.station_levels = text2numlist(value, ";") - - if("admin_levels") - config.admin_levels = text2numlist(value, ";") - - if("contact_levels") - config.contact_levels = text2numlist(value, ";") - - if("player_levels") - config.player_levels = text2numlist(value, ";") - if("expected_round_length") config.expected_round_length = MinutesToTicks(text2num(value)) diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 6ebb4d36340..e7621dcfc3e 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -48,7 +48,7 @@ var/global/pipe_processing_killed = 0 if(!config.disable_space_ruins) var/timer = start_watch() log_startup_progress("Creating random space levels...") - seedRuins(ZLEVEL_EMPTY, rand(0, 3), /area/space, space_ruins_templates) + seedRuins(level_name_to_num(EMPTY_AREA), rand(0, 3), /area/space, space_ruins_templates) log_startup_progress("Loaded random space levels in [stop_watch(timer)]s.") // We'll keep this around for the time when we finally expunge all diff --git a/code/datums/cache/air_alarm.dm b/code/datums/cache/air_alarm.dm index 67de7f95f21..a46306d1ea2 100644 --- a/code/datums/cache/air_alarm.dm +++ b/code/datums/cache/air_alarm.dm @@ -15,8 +15,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new() alarms[++alarms.len] = passed_alarm.get_nano_data_console() else for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : air_alarms)) - // TODO: Tie into space manager - if(!monitored_alarms && alarm.z != ZLEVEL_STATION && alarm.z != ZLEVEL_ASTEROID) + if(!monitored_alarms && is_station_contact(alarm.z)) continue alarms[++alarms.len] = alarm.get_nano_data_console() diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index b97ce1f5c7f..009701d8057 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -406,8 +406,7 @@ var/list/advance_cures = list( AD.Refresh() for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) - // TODO: Tie into space manager - if(H.z != ZLEVEL_STATION) + if(is_station_level(H.z)) continue if(!H.HasDisease(D)) H.ForceContractDisease(D) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 63b9405f73e..aba4e7c8970 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -67,10 +67,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin caster.reset_view(0) return 0 - // TODO: Tie into space manager - if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel - return 0 - if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages") + if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel return 0 if(!skipcharge) @@ -364,10 +361,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) return 0 - // TODO: Tie into space manager - if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel - return 0 - if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages") + if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel return 0 switch(charge_type) diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm index 7a073edc902..7002f92061b 100644 --- a/code/datums/weather/weather.dm +++ b/code/datums/weather/weather.dm @@ -28,7 +28,7 @@ var/area_type = /area/space //Types of area to affect var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins - var/target_z = ZLEVEL_STATION //The z-level to affect + var/target_level = MAIN_STATION //The z-level to affect var/overlay_layer = 10 //Since it's above everything else, this is the layer used by default. 2 is below mobs and walls if you need to use that. var/aesthetic = FALSE //If the weather has no purpose other than looks @@ -52,13 +52,13 @@ stage = STARTUP_STAGE for(var/V in get_areas(area_type)) var/area/A = V - if(A.z == target_z) + if(is_on_level_name(A,target_level)) impacted_areas |= A weather_duration = rand(weather_duration_lower, weather_duration_upper) update_areas() for(var/V in player_list) var/mob/M = V - if(M.z == target_z) + if(is_on_level_name(M,target_level)) if(telegraph_message) to_chat(M, telegraph_message) if(telegraph_sound) @@ -72,7 +72,7 @@ update_areas() for(var/V in player_list) var/mob/M = V - if(M.z == target_z) + if(is_on_level_name(M,target_level)) if(weather_message) to_chat(M, weather_message) if(weather_sound) @@ -87,7 +87,7 @@ update_areas() for(var/V in player_list) var/mob/M = V - if(M.z == target_z) + if(is_on_level_name(M,target_level)) if(end_message) to_chat(M, end_message) if(end_sound) @@ -102,7 +102,7 @@ update_areas() /datum/weather/proc/can_impact(mob/living/L) //Can this weather impact a mob? - if(L.z != target_z) + if(!is_on_level_name(L,target_level)) return if(immunity_type in L.weather_immunities) return diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm index bf942b7ceba..0295d8f36fb 100644 --- a/code/datums/weather/weather_types.dm +++ b/code/datums/weather/weather_types.dm @@ -1,5 +1,4 @@ //Different types of weather. -// TODO: Tie into space manager /datum/weather/floor_is_lava //The Floor is Lava: Makes all turfs damage anyone on them unless they're standing on a solid object. name = "the floor is lava" @@ -17,7 +16,7 @@ end_duration = 0 area_type = /area - target_z = ZLEVEL_STATION + target_level = MAIN_STATION overlay_layer = 2 //Covers floors only immunity_type = "lava" @@ -51,7 +50,7 @@ end_duration = 0 area_type = /area - target_z = ZLEVEL_STATION + target_level = MAIN_STATION /datum/weather/advanced_darkness/update_areas() for(var/V in impacted_areas) @@ -88,7 +87,7 @@ end_overlay = "light_ash" area_type = /area/mine - target_z = ZLEVEL_ASTEROID + target_level = MINING immunity_type = "ash" diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 07ad5956002..27eaf0490ff 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -67,8 +67,7 @@ var/list/teleportlocs = list() if(AR.no_teleportlocs) continue if(teleportlocs.Find(AR.name)) continue var/turf/picked = safepick(get_area_turfs(AR.type)) - // TODO: Tie into space manager - if(picked && (picked.z == ZLEVEL_STATION)) + if(picked && is_station_level(picked.z)) teleportlocs += AR.name teleportlocs[AR.name] = AR diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e4332ac78c0..5d075334fb1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -41,8 +41,7 @@ if(!T) return 0 - // TODO: Tie into space manager - if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother + if(!is_admin_level(T.z))//if not, don't bother return 0 //check for centcomm shuttles @@ -59,8 +58,7 @@ if(!T) return 0 - // TODO: Tie into space manager - if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother + if(!is_admin_level(T.z))//if not, don't bother return 0 if(istype(T.loc, /area/shuttle/syndicate_elite) || istype(T.loc, /area/syndicate_mothership)) diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index 7d9aed3d442..f42fc5a3c46 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -80,8 +80,7 @@ var/mob/living/demon_type = /mob/living/simple_animal/slaughter /obj/item/weapon/antag_spawner/slaughter_demon/attack_self(mob/user as mob) - // TODO: Tie into space manager - if(user.z == ZLEVEL_CENTCOMM)//this is to make sure the wizard does NOT summon a demon from the Den.. + if(level_blocks_magic(user.z))//this is to make sure the wizard does NOT summon a demon from the Den.. to_chat(user, "You should probably wait until you reach the station.") return diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index ebab12dc0f2..8998fffc922 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -118,8 +118,7 @@ var/list/blob_nodes = list() if(directory[ckey(blob.key)]) blob_client = directory[ckey(blob.key)] location = get_turf(C) - // TODO: Tie into space manager - if(location.z != ZLEVEL_STATION || istype(location, /turf/space)) + if(!is_station_level(location.z) || istype(location, /turf/space)) if(!warned) to_chat(C, "You feel ready to burst, but this isn't an appropriate place! You must return to the station!") message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if he doesn't return to the station.") diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index e74a0677942..198c0264dd1 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -23,8 +23,7 @@ var/nukecode = rand(10000, 99999) for(var/obj/machinery/nuclearbomb/bomb in world) if(bomb && bomb.r_code) - // TODO: Tie into space manager - if(bomb.z == ZLEVEL_STATION) + if(is_station_level(bomb.z)) bomb.r_code = nukecode intercepttext += "Nanotrasen Update: Biohazard Alert.
" diff --git a/code/game/gamemodes/borer/borer.dm b/code/game/gamemodes/borer/borer.dm index bb5117d4579..6a4b7031cc3 100644 --- a/code/game/gamemodes/borer/borer.dm +++ b/code/game/gamemodes/borer/borer.dm @@ -35,7 +35,7 @@ return 0 // not enough candidates for borer for(var/obj/machinery/atmospherics/unary/vent_pump/v in world) - if(!v.welded && (v.z in config.station_levels)) + if(!v.welded && is_station_level(v.z)) found_vents.Add(v) // for each 2 possible borers, add one borer and one host @@ -156,4 +156,4 @@ greet_borer(borer) - return \ No newline at end of file + return diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index dc12c64fbed..6f18213670f 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -14,8 +14,7 @@ var/list/sacrificed = list() for(var/obj/effect/rune/R in world) if(R == src) continue - // TODO: Tie into space manager - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != ZLEVEL_CENTCOMM) + if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && is_teleport_allowed(R.z)) index++ allrunesloc.len = index allrunesloc[index] = R.loc diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 123ca75a78a..01259f24237 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -2,8 +2,7 @@ //command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) - // TODO: Tie into space manager - if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded) + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) if(temp_vent.parent.other_atmosmch.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 77f503a1db2..63fb22bc694 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -427,8 +427,7 @@ proc/get_nt_opposed() /proc/get_nuke_code() var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in world) - // TODO: Tie into space manager - if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION) + if(bomb && bomb.r_code && is_station_level(bomb.z)) nukecode = bomb.r_code return nukecode @@ -452,8 +451,7 @@ proc/get_nt_opposed() text += " died" else text += " survived" - if(fleecheck && ply.current.z > ZLEVEL_STATION) - // TODO: Tie into space manager + if(fleecheck && !is_station_level(ply.current.z)) text += " while fleeing the station" if(ply.current.real_name != ply.name) text += " as [ply.current.real_name]" diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 4fd8c5a452b..d78652bfa42 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -266,8 +266,7 @@ var/round_start_time = 0 M.client.screen += cinematic if(M.stat != DEAD) var/turf/T = get_turf(M) - // TODO: Tie into space manager - if(T && T.z == ZLEVEL_STATION) + if(T && is_station_level(T.z)) M.death(0) //no mercy //Now animate the cinematic diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 40d78c131ae..74ace72bd28 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -69,8 +69,7 @@ rcd light flash thingy on matter drain src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets for(var/obj/machinery/porta_turret/turret in machines) var/turf/T = get_turf(turret) - // TODO: Tie into space manager - if(T.z in config.station_levels) + if(is_station_level(T.z)) // Increase health by 37.5% of original max, decrease delays between shots to 66% turret.health += initial(turret.health) * 3 / 8 turret.eprojectile = /obj/item/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR. diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index fb85a0a1606..a20acc95a08 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -141,8 +141,7 @@ /datum/game_mode/proc/check_ai_loc() for(var/datum/mind/AI_mind in malf_ai) var/turf/ai_location = get_turf(AI_mind.current) - // TODO: Tie into space manager - if(ai_location && (ai_location.z == ZLEVEL_STATION)) + if(ai_location && is_station_level(ai_location.z)) return 1 return 0 diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index a2ff0f4e1d8..890cc4e151c 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -36,8 +36,7 @@ var/Me = pickweight(meteortypes) var/obj/effect/meteor/M = new Me(pickedstart) M.dest = pickedgoal - // TODO: Tie into space manager - M.z_original = ZLEVEL_STATION + M.z_original = level_name_to_num(MAIN_STATION) spawn(0) walk_towards(M, M.dest, 1) return @@ -103,7 +102,6 @@ var/dropamt = 2 /obj/effect/meteor/Move() - // TODO: Tie into space manager if(z != z_original || loc == dest) qdel(src) return diff --git a/code/game/gamemodes/miniantags/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm index 28a0282487d..b0df1749403 100644 --- a/code/game/gamemodes/miniantags/borer/borer_event.dm +++ b/code/game/gamemodes/miniantags/borer/borer_event.dm @@ -17,8 +17,7 @@ /datum/event/borer_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - // TODO: Tie into space manager - if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded) + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) //Stops cortical borers getting stuck in small networks. See: Security, Virology if(temp_vent.parent.other_atmosmch.len > 50) vents += temp_vent diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index ed84f211e53..1f9f5ff115a 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -290,14 +290,13 @@ /mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(var/mob/living/target) if(target != src) to_chat(src, "Attempting to remove this being from our presence.") - // TODO: Tie into space manager - if(src.z != ZLEVEL_STATION) + if(!is_station_level(src.z)) to_chat(src, "Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.") return if(do_mob(src, target, 30)) var/cycle for(cycle=0,cycle<100,cycle++) - var/random_location = locate(rand(37,202),rand(75,192),ZLEVEL_STATION)//Drunk dial a turf in the general ballpark of the station + var/random_location = locate(rand(37,202),rand(75,192),level_name_to_num(MAIN_STATION))//Drunk dial a turf in the general ballpark of the station if(istype(random_location, /turf/simulated/floor)) var/turf/simulated/floor/F = random_location if(F.air) diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 5f729e4484e..adca32ece73 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -142,8 +142,7 @@ datum/game_mode/nations /datum/game_mode/nations/proc/remove_access() for(var/obj/machinery/door/airlock/W in airlocks) - // TODO: Tie into space manager - if(W.z in config.station_levels) + if(is_station_level(W.z)) W.req_access = list() diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index ef0edffd5f8..7ab6bf5cb23 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1358,8 +1358,7 @@ datum var/turf/T = get_turf(target.current) if(target.current.stat == 2) return 1 - // TODO: Tie into space manager - else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this + else if((T) && !is_station_level(T.z))//If they leave the station they count as dead for this return 2 else return 0 diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 15a4c8ec246..790c6a18e34 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -19,8 +19,7 @@ if(player_list.len < MIN_CHALLENGE_PLAYERS) to_chat(user, "The enemy crew is too small to be worth declaring war on.") return - // TODO: Tie into space manager - if(user.z != ZLEVEL_CENTCOMM) + if(!is_admin_level(user.z)) to_chat(user, "You have to be at your base to use this.") return diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index ae22e0ec458..833cb6d99ae 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -353,8 +353,7 @@ var/bomb_set var/off_station = 0 var/turf/bomb_location = get_turf(src) - // TODO: Tie into space manager - if( bomb_location && (bomb_location.z in config.station_levels) ) + if( bomb_location && is_station_level(bomb_location.z) ) if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) ) off_station = 1 else @@ -364,8 +363,7 @@ var/bomb_set if(ticker.mode && ticker.mode.name == "nuclear emergency") var/obj/docking_port/mobile/syndie_shuttle = shuttle_master.getShuttle("syndicate") if(syndie_shuttle) - // TODO: Tie into space manager - ticker.mode:syndies_didnt_escape = (syndie_shuttle.z > ZLEVEL_STATION ? 0 : 1) //muskets will make me change this, but it will do for now + ticker.mode:syndies_didnt_escape = is_station_level(syndie_shuttle.z) ticker.mode:nuke_off_station = off_station ticker.station_explosion_cinematic(off_station,null) if(ticker.mode) @@ -403,8 +401,7 @@ var/bomb_set /obj/item/weapon/disk/nuclear/process() var/turf/disk_loc = get_turf(src) - // TODO: Tie into space manager - if(disk_loc.z != ZLEVEL_STATION && disk_loc.z != ZLEVEL_CENTCOMM) + if(!is_secure_level(disk_loc.z)) var/holder = get(src, /mob) if(holder) to_chat(holder, "You can't help but feel that you just lost something back there...") diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b6b1094b103..c6bf4305f42 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -77,8 +77,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ check_completion() if(target && target.current) - // TODO: Tie into space manager - if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite + if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || is_away_level(target.current.z) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 return 0 return 1 @@ -110,8 +109,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client) return 1 var/turf/T = get_turf(target.current) - // TODO: Tie into space manager - if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this + if(T && !is_station_level(T.z)) //If they leave the station they count as dead for this return 2 return 0 return 1 @@ -146,8 +144,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ if(target in ticker.mode:head_revolutionaries) return 1 var/turf/T = get_turf(target.current) - // TODO: Tie into space manager - if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this + if(T && !is_station_level(T.z)) //If they leave the station they count as dead for this rval = 2 return 0 return rval @@ -173,11 +170,9 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ check_completion() if(target && target.current) - // TODO: Tie into space manager - if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite + if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || is_away_level(target.current.z) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 - // TODO: Tie into space manager - if((target.current.z in config.admin_levels)) + if(is_admin_level(target.current.z)) return 0 return 1 @@ -577,8 +572,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ check_completion() if(target && target.current) - // TODO: Tie into space manager - if(target.current.stat == DEAD || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) + if(target.current.stat == DEAD || is_away_level(target.current.z) || !target.current.ckey) return 1 return 0 return 1 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 9e74459dadd..97489ab3fdb 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -314,8 +314,7 @@ /datum/game_mode/revolution/proc/check_heads_victory() for(var/datum/mind/rev_mind in head_revolutionaries) var/turf/T = get_turf(rev_mind.current) - // TODO: Tie into space manager - if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == ZLEVEL_STATION)) + if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != DEAD) && rev_mind.current.client && T && is_station_level(T.z)) if(ishuman(rev_mind.current)) return 0 return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 8ee145e8759..f74b8b1484d 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -21,14 +21,12 @@ // Who is alive/dead, who escaped for(var/mob/living/silicon/ai/I in mob_list) - // TODO: Tie into space manager - if(I.stat == DEAD && (I.z in config.station_levels)) + if(I.stat == DEAD && is_station_level(I.z)) score_deadaipenalty++ score_deadcrew++ for(var/mob/living/carbon/human/I in mob_list) - // TODO: Tie into space manager - if(I.stat == DEAD && (I.z in config.station_levels)) + if(I.stat == DEAD && is_station_level(I.z)) score_deadcrew++ if(I && I.mind) @@ -81,8 +79,7 @@ // Check station's power levels for(var/obj/machinery/power/apc/A in machines) - // TODO: Tie into space manager - if(!(A.z in config.station_levels)) continue + if(!is_station_level(A.z)) continue for(var/obj/item/weapon/stock_parts/cell/C in A.contents) if(C.charge < 2300) @@ -91,8 +88,7 @@ // Check how much uncleaned mess is on the station for(var/obj/effect/decal/cleanable/M in world) - // TODO: Tie into space manager - if(!(M.z in config.station_levels)) continue + if(!is_station_level(M.z)) continue if(istype(M, /obj/effect/decal/cleanable/blood/gibs)) score_mess += 3 diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm index 4d3fc5bfae8..14ac0f27b80 100644 --- a/code/game/gamemodes/xenos/xenos.dm +++ b/code/game/gamemodes/xenos/xenos.dm @@ -122,8 +122,7 @@ command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert") set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - // TODO: Tie into space manager - if(V && (V.z in config.station_levels)) + if(V && is_station_level(V.z)) V.locked = 0 V.update_icon() return ..() @@ -143,8 +142,7 @@ var/list/livingplayers = list() for(var/mob/M in player_list) var/turf/T = get_turf(M) - // TODO: Tie into space manager - if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && ((T.z in config.station_levels) || (T.z in config.admin_levels)))) + if((M) && (M.stat != DEAD) && M.client && T && (is_station_level(T.z) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && is_secure_level(T.z))) if(ishuman(M)) livingplayers += 1 return livingplayers.len diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index ac95e1b2a05..3ea08ee842c 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -769,7 +769,6 @@ var/turf/pos = get_turf(src) data["x"] = pos.x data["y"] = pos.y - // TODO: Tie into space manager data["z"] = pos.z return data diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index a75c3afac88..36b680f1ebc 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -113,7 +113,6 @@ scrubber.update_icon() proc/validscrubber( var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber as obj ) - // TODO: Tie into space manager if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z) return 0 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index bcf8ee75b00..0935f8443f6 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -43,7 +43,7 @@ /obj/machinery/camera/initialize() ..() - if(z == ZLEVEL_STATION && prob(3) && !start_active) + if(is_station_level(z) && prob(3) && !start_active) toggle_cam() /obj/machinery/camera/Destroy() diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index cccc7e52f91..909d53be265 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -1,10 +1,7 @@ /mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf) if(!T) return 1 - // TODO: Tie into space manager - if((T.z in config.admin_levels)) - return 1 - if(T.z > MAX_Z) + if(!is_level_reachable(T.z)) return 1 return 0 diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index a9b1e3ff31c..fd5dc873739 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -75,8 +75,7 @@ var/list/cameras = list() for(var/obj/machinery/camera/C in cameranet.cameras) - // TODO: Tie into space manager - if((z > MAX_Z || C.z > MAX_Z) && (C.z != z)) //can only recieve away mission cameras on away missions + if((is_away_level(src.z) || is_away_level(C.z)) && !atoms_share_level(C, src)) //can only recieve away mission cameras on away missions continue if(!can_access_camera(C)) continue diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 790c516fc95..5ea7456fd08 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -54,8 +54,7 @@ if(..(href, href_list)) return 1 - // TODO: Tie into space manager - if((!(src.z in config.station_levels) && !(src.z in config.admin_levels))) + if(!is_secure_level(src.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return 1 @@ -304,8 +303,7 @@ if(stat & (NOPOWER|BROKEN)) return - // TODO: Tie into space manager - if(!(src.z in list(ZLEVEL_STATION, ZLEVEL_CENTCOMM))) + if(!is_secure_level(src.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 75880d41975..3668b7576d4 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -20,8 +20,7 @@ /obj/machinery/computer/HONKputer/Topic(href, href_list) if(..()) return 1 - // TODO: Tie into space manager - if(!(src.z in config.station_levels)) + if(!is_station_level(src.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return usr.set_machine(src) @@ -69,8 +68,7 @@ /obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob) if(..()) return - // TODO: Tie into space manager - if(src.z > ZLEVEL_DERELICT) + if(is_away_level(src.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index a6f1a0e6c26..125a5fc06ad 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -29,8 +29,7 @@ attackby(obj/item/weapon/O as obj, mob/user as mob, params) - // TODO: Tie into space manager - if(user.z > ZLEVEL_DERELICT) + if(is_away_level(user.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return if(istype(O, /obj/item/weapon/aiModule)) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 38e6c139f2e..cfb4a4284a3 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -208,7 +208,9 @@ id_tags -= ident_tag if(href_list["dstele"]) var/choices = list(0) - choices += accessable_z_levels + var/list/reachable_levels = levels_by_trait(REACHABLE) + for(var/datum/space_level/S in reachable_levels) + choices += S.zpos var/obj/machinery/computer/pod/deathsquad/D = src var/input = input("Enter the destination Z-Level. The mechs will arrive from the East. Leave 0 if you don't want to set a specific ZLevel", "Mass Driver Controls", 0) in choices D.teleporter_dest = input @@ -362,4 +364,4 @@ AM.dir = 8 var/atom/target = get_edge_target_turf(AM, AM.dir) AM.throw_at(target, 50, 1) - return \ No newline at end of file + return diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index e3683361ef2..fa1ba551728 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -65,8 +65,7 @@ health_display = "DEAD" else if(total_loss) health_display = "HURT ([total_loss])" - // TODO: Tie into space manager - if((M.z in config.station_levels) && !istype(M.loc, /turf/space)) + if(is_station_level(M.z) && !istype(M.loc, /turf/space)) loc_display = "[get_area(M)]" dat += "ID: [T.id]
Subject: [M]
Location: [loc_display]
Health: [health_display]
" dat += "(Message Holder) |
" diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index c7c23dbc724..c03ce8ee440 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -41,8 +41,7 @@ /obj/machinery/computer/secure_data/attack_hand(mob/user as mob) if(..()) return - // TODO: Tie into space manager - if(src.z > ZLEVEL_DERELICT) + if(is_away_level(src.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return var/dat diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 7c0680f26d3..81aa33109f0 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -41,8 +41,7 @@ if(..()) return - // TODO: Tie into space manager - if(src.z > ZLEVEL_DERELICT) + if(is_away_level(src.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return var/dat diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 9b2e0bdf957..a1fee30eda3 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -293,9 +293,7 @@ FIRE ALARM pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0 - // TODO: Tie into space manager - // also hwat - if(z == ZLEVEL_STATION || ZLEVEL_ASTEROID == 5) + if(is_station_contact(src.z)) if(security_level) src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]") else diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm index caf0c9c67d9..9c945fff989 100644 --- a/code/game/machinery/supply_display.dm +++ b/code/game/machinery/supply_display.dm @@ -5,8 +5,7 @@ /obj/machinery/status_display/supply_display/update() if(!..() && mode == STATUS_DISPLAY_CUSTOM) if(shuttle_master.supply.mode == SHUTTLE_IDLE) - // TODO: Tie into space manager - if(shuttle_master.supply.z == ZLEVEL_STATION) + if(is_station_level(shuttle_master.supply.z)) message1 = "CARGO" message2 = "Docked" else diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 7ddb0f4b963..92de3b8906e 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -439,7 +439,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept if(data == 1) for(var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"]) var/turf/position = get_turf(R) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(position && position.z == level) receive |= R.send_hear(display_freq, level) @@ -452,7 +452,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept if(istype(R, /obj/item/device/radio/headset)) continue var/turf/position = get_turf(R) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(position && position.z == level) receive |= R.send_hear(display_freq) @@ -464,7 +464,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq) for(var/obj/item/device/radio/R in antag_connection.devices["[RADIO_CHAT]"]) var/turf/position = get_turf(R) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(position && position.z == level) receive |= R.send_hear(freq) @@ -474,7 +474,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept else for(var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) var/turf/position = get_turf(R) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(position && position.z == level) receive |= R.send_hear(display_freq) @@ -601,7 +601,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept /atom/proc/test_telecomms() var/datum/signal/signal = src.telecomms_process() var/turf/position = get_turf(src) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager return (position.z in signal.data["level"]) && signal.data["done"] /atom/proc/telecomms_process(var/do_sleep = 1) @@ -620,7 +620,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept "type" = 4, // determines what type of radio input it is: test broadcast "reject" = 0, "done" = 0, - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager "level" = pos.z // The level it is being broadcasted at. ) signal.frequency = PUB_FREQ// Common channel diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 0c0dfd178fe..347f4ebc685 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -180,12 +180,12 @@ var/turf/position = get_turf(src) // Toggle on/off getting signals from the station or the current Z level - // TODO: Tie into space manager - if(src.listening_level == ZLEVEL_STATION) // equals the station + // TODO: Could work with the space manager better + if(is_station_level(src.listening_level)) // equals the station src.listening_level = position.z return 1 - else if(position.z == ZLEVEL_TELECOMMS) - src.listening_level = ZLEVEL_STATION + else if(level_boosts_signal(position.z)) + src.listening_level = level_name_to_num(MAIN_STATION) return 1 return 0 @@ -234,8 +234,8 @@ /obj/machinery/telecomms/relay/Options_Menu() var/dat = "" - if(src.z == ZLEVEL_TELECOMMS) - dat += "
Signal Locked to Station: [listening_level == ZLEVEL_STATION ? "TRUE" : "FALSE"]" + if(level_boosts_signal(src.z)) + dat += "
Signal Locked to Station: [is_station_level(listening_level) ? "TRUE" : "FALSE"]" dat += "
Broadcasting: [broadcasting ? "YES" : "NO"]" dat += "
Receiving: [receiving ? "YES" : "NO"]" return dat diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index f4c2d973f7d..0bb3975d1e6 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -56,7 +56,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() continue if(amount && send_count >= amount) break - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(machine.loc.z != listening_level) if(long_range_link == 0 && machine.long_range_link == 0) continue @@ -143,7 +143,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() if(!listening_level) //Defaults to our Z level! var/turf/position = get_turf(src) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager listening_level = position.z /obj/machinery/telecomms/initialize() @@ -169,7 +169,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() /obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T) var/turf/position = get_turf(src) var/turf/T_position = get_turf(T) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if((position.z == T_position.z) || (src.long_range_link && T.long_range_link)) for(var/x in autolinkers) if(T.autolinkers.Find(x)) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 6ecc675fdef..369cb0fc708 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -182,8 +182,7 @@ var/turf/T = get_turf(R) if(!T) continue - // TODO: Tie into space manager - if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY) + if(!is_teleport_allowed(T.z)) continue if(R.syndicate == 1 && emagged == 0) continue @@ -199,13 +198,12 @@ continue else var/mob/M = I.loc - if(M.stat == 2) + if(M.stat == DEAD) if(M.timeofdeath + 6000 < world.time) continue var/turf/T = get_turf(M) if(!T) continue - // TODO: Tie into space manager - if((T.z in config.admin_levels)) continue + if(!is_teleport_allowed(T.z)) continue var/tmpname = M.real_name if(areaindex[tmpname]) tmpname = "[tmpname] ([++areaindex[tmpname]])" @@ -227,8 +225,7 @@ var/turf/T = get_turf(R) if(!T || !R.teleporter_hub || !R.teleporter_console) continue - // TODO: Tie into space manager - if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY) + if(!is_teleport_allowed(T.z)) continue var/tmpname = T.loc.name if(areaindex[tmpname]) @@ -323,7 +320,7 @@ return power_station /obj/machinery/teleport/hub/Bumped(M as mob|obj) - if(z == ZLEVEL_CENTCOMM && !admin_usage) + if(!is_teleport_allowed(z) && !admin_usage) to_chat(M, "You can't use this here.") return if(power_station && power_station.engaged && !panel_open) @@ -401,7 +398,7 @@ /obj/machinery/teleport/perma/Bumped(M as mob|obj) if(stat & (BROKEN|NOPOWER)) return - if(z == ZLEVEL_CENTCOMM) + if(!is_teleport_allowed(z)) to_chat(M, "You can't use this here.") return if(target && !recalibrating && !panel_open) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index cb55c783005..d945e1cbb7f 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -382,8 +382,7 @@ range = RANGED action(atom/target) - // TODO: Tie into space manager - if(!action_checks(target) || (src.loc.z in config.admin_levels)) return + if(!action_checks(target) || !is_teleport_allowed(src.loc.z)) return var/turf/T = get_turf(target) if(T) set_ready_state(0) @@ -404,8 +403,7 @@ action(atom/target) - // TODO: Tie into space manager - if(!action_checks(target) || (src.loc.z in config.admin_levels)) return + if(!action_checks(target) || !is_teleport_allowed(src.loc.z)) return var/list/theareas = list() for(var/area/AR in orange(100, chassis)) if(AR in theareas) continue diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 7f109425205..3a567518e42 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -13,7 +13,7 @@ switch(name) //some of these are probably obsolete if("shuttle") - shuttle_z = z + log_debug("Obsolete landmark '[name]' at ([x],[y],[z])") qdel(src) if("airtunnel_stop") diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index dec4f4c75fb..e50f26bcf4f 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -61,7 +61,6 @@ return null var/turf/T = get_turf(user.loc) - // TODO: Tie into space manager if(T.z != current.z || !current.can_use()) to_chat(user, "[src] has lost the signal.") current = null @@ -226,7 +225,6 @@ to_chat(usr, "Something's wrong with that camera. You can't get a feed.") return var/turf/T = get_turf(loc) - // TODO: Tie into space manager if(!T || C.z != T.z) to_chat(usr, "You can't get a signal.") return diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index a8623b17f56..502a5da02b3 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -124,7 +124,7 @@ return -1 if(!(0 in level)) var/turf/position = get_turf(src) - // TODO: Tie into space manager + // TODO: Integrate radio with the space manager if(isnull(position) || !(position.z in level)) return -1 if(!src.listening) diff --git a/code/game/objects/items/weapons/bee_briefcase.dm b/code/game/objects/items/weapons/bee_briefcase.dm index 98f3fc1709b..8a15bc7f517 100644 --- a/code/game/objects/items/weapons/bee_briefcase.dm +++ b/code/game/objects/items/weapons/bee_briefcase.dm @@ -64,8 +64,7 @@ //Play sound through the station intercomms, so everyone knows the doom you have wrought. for(var/O in global_intercoms) var/obj/item/device/radio/intercom/I = O - // TODO: Tie into space manager - if(I.z != ZLEVEL_STATION) //Only broadcast to the station intercoms + if(!is_station_level(I.z)) //Only broadcast to the station intercoms continue if(!I.on) //Only broadcast to active intercoms (powered, switched on) continue diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index decfa424872..15650f188d9 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -48,8 +48,7 @@ Frequency: return 1 var/turf/current_location = get_turf(usr)//What turf is the user on? - // TODO: Tie into space manager - if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2. + if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're in the admin zone to_chat(usr, "\The [src] is malfunctioning.") return 1 @@ -62,7 +61,6 @@ Frequency: for(var/obj/item/device/radio/beacon/W in beacons) if(W.frequency == frequency && !W.syndicate) - // TODO: Tie into space manager if(W && W.z == z) var/turf/TB = get_turf(W) temp += "[W.code]: [TB.x], [TB.y], [TB.z]
" @@ -109,8 +107,7 @@ Frequency: /obj/item/weapon/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? - // TODO: Tie into space manager - if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=ZLEVEL_EMPTY)//If turf was not found or they're on z level 2 or >7 which does not currently exist. + if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof to_chat(user, "\The [src] is malfunctioning.") return var/list/L = list( ) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 4fe639160d4..cd027cc28b3 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -192,8 +192,7 @@ return var/obj/item/weapon/rcs/E = W if(E.rcell && (E.rcell.charge >= E.chargecost)) - // TODO: Tie into space manager - if(!(src.z in config.contact_levels)) + if(!is_station_contact(src.z)) to_chat(user, "The rapid-crate-sender can't locate any telepads!") return if(E.mode == 0) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index f9b32b071f7..bf74c11ee84 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -84,8 +84,7 @@ if(istype(W, /obj/item/weapon/rcs) && !src.opened) var/obj/item/weapon/rcs/E = W if(E.rcell && (E.rcell.charge >= E.chargecost)) - // TODO: Tie into space manager - if(!(src.z in config.player_levels)) + if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code to_chat(user, "The rapid-crate-sender can't locate any telepads!") return if(E.mode == 0) diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 1b7c9343ca2..9feda5d78a7 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -93,7 +93,8 @@ var/max = world.maxx-TRANSITIONEDGE var/min = 1+TRANSITIONEDGE - var/_z = rand(ZLEVEL_CENTCOMM+1,MAX_Z) //select a random space zlevel + var/datum/space_level/dest = pick(levels_by_trait(REACHABLE)) + var/_z = dest.zpos //select a random space zlevel //now select coordinates for a border turf var/_x diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 8a9e8dea103..3a54a20ab0f 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1979,8 +1979,7 @@ return else for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) - // TODO: Tie into space manager - if((F.z in config.station_levels)) + if(is_station_level(F.z)) spawn(0) if(!F.receivefax(P)) to_chat(src.owner, "\red Message transmission to [F.department] failed.") @@ -2327,8 +2326,7 @@ for(var/mob/living/carbon/human/H in mob_list) var/turf/loc = find_loc(H) var/security = 0 - // TODO: Tie into space manager - if(!(loc.z in config.station_levels) || prisonwarped.Find(H)) + if(!is_station_level(loc.z) || prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue @@ -2565,8 +2563,7 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","EgL") for(var/obj/machinery/door/airlock/W in world) - // TODO: Tie into space manager - if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) + if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) W.req_access = list() message_admins("[key_name_admin(usr)] activated Egalitarian Station mode") command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index dd685a37a0b..baf9afbbb9d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -373,8 +373,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that for(var/I in singularities) var/obj/singularity/S = I - // TODO: Tie into space manager - if(S.z == ZLEVEL_CENTCOMM || S.z >= MAX_Z) + if(!is_level_reachable(S.z)) continue qdel(S) log_admin("[key_name(src)] has deleted all Singularities and Tesla orbs.") diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 660a1c8f199..b93eb1f043f 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -81,8 +81,7 @@ var/list/sounds_cache = list() for(var/O in global_intercoms) var/obj/item/device/radio/intercom/I = O - // TODO: Tie into space manager - if(I.z != ZLEVEL_STATION && !ignore_z) + if(is_station_level(I.z) && !ignore_z) continue if(!I.on && !ignore_power) continue diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index da6515a591d..b12ee063f2d 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -59,7 +59,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away var/map = pick(potentialRandomZlevels) var/file = file(map) if(isfile(file)) - var/zlev = space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED) + var/zlev = space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED, traits = list(AWAY_LEVEL,BLOCK_TELEPORT)) space_manager.add_dirt(zlev) maploader.load_map(file, z_offset = zlev) late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev))) diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index c50e9b1c6d3..6f9b1589e5a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -115,8 +115,7 @@ to_chat(H, "You cannot teleport into solid walls.") return 0*///Who the fuck cares? Ninjas in walls are cool. - // TODO: Tie into space manager - if(T.z in config.admin_levels) + if(!is_teleport_allowed(T.z)) to_chat(H, "You cannot use your teleporter on this Z-level.") return 0 diff --git a/code/modules/computer3/computers/camera.dm b/code/modules/computer3/computers/camera.dm index 070015f4dc4..52001231647 100644 --- a/code/modules/computer3/computers/camera.dm +++ b/code/modules/computer3/computers/camera.dm @@ -181,8 +181,7 @@ //proc/camera_list(var/datum/file/camnet_key/key) get_machines(var/datum/file/camnet_key/key) - // TODO: Tie into space manager - if(!computer || computer.z > ZLEVEL_DERELICT) + if(!computer || !is_away_level(computer.z)) return null var/list/L = list() diff --git a/code/modules/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm index d6575d3c143..5230a2c4953 100644 --- a/code/modules/computer3/computers/communications.dm +++ b/code/modules/computer3/computers/communications.dm @@ -59,8 +59,7 @@ Topic(var/href, var/list/href_list) if(!interactable() || !computer.radio || ..(href,href_list) ) return - // TODO: Tie into space manager - if(!(computer.z in config.station_levels)) + if(!is_station_level(computer.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return diff --git a/code/modules/computer3/computers/law.dm b/code/modules/computer3/computers/law.dm index 7534aa65932..533a600a4eb 100644 --- a/code/modules/computer3/computers/law.dm +++ b/code/modules/computer3/computers/law.dm @@ -24,8 +24,7 @@ attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params) - // TODO: Tie into space manager - if(user.z > ZLEVEL_DERELICT) + if(is_away_level(user.z)) to_chat(user, "Unable to establish a connection: You're too far away from the station!") return if(istype(module, /obj/item/weapon/aiModule)) diff --git a/code/modules/computer3/computers/medical.dm b/code/modules/computer3/computers/medical.dm index 6e96b6728e7..462f031a3f7 100644 --- a/code/modules/computer3/computers/medical.dm +++ b/code/modules/computer3/computers/medical.dm @@ -49,8 +49,7 @@ scan = computer.cardslot.reader if(!interactable()) return - // TODO: Tie into space manager - if(computer.z > ZLEVEL_DERELICT) + if(is_away_level(computer.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return var/dat diff --git a/code/modules/computer3/computers/prisoner.dm b/code/modules/computer3/computers/prisoner.dm index 75b2302991f..9ec6152a9e0 100644 --- a/code/modules/computer3/computers/prisoner.dm +++ b/code/modules/computer3/computers/prisoner.dm @@ -43,8 +43,7 @@ if(!T.implanted) continue var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - // TODO: Tie into space manager - if(M.z == ZLEVEL_STATION && !istype(M.loc, /turf/space)) + if(is_station_level(M.z) && !istype(M.loc, /turf/space)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc dat += "ID: [T.id] | Location: [loc_display]
" diff --git a/code/modules/computer3/computers/robot.dm b/code/modules/computer3/computers/robot.dm index a728c8993bf..1f6bd0fa054 100644 --- a/code/modules/computer3/computers/robot.dm +++ b/code/modules/computer3/computers/robot.dm @@ -31,8 +31,7 @@ interact() - // TODO: Tie into space manager - if(!interactable() || computer.z > ZLEVEL_DERELICT) + if(!interactable() || is_away_level(computer.z)) return var/dat if(src.temp) diff --git a/code/modules/computer3/computers/security.dm b/code/modules/computer3/computers/security.dm index d974101b33f..9ae324d70ac 100644 --- a/code/modules/computer3/computers/security.dm +++ b/code/modules/computer3/computers/security.dm @@ -57,8 +57,7 @@ if(!interactable()) return - // TODO: Tie into space manager - if(computer.z > ZLEVEL_DERELICT) + if(is_away_level(computer.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return var/dat diff --git a/code/modules/computer3/networking.dm b/code/modules/computer3/networking.dm index 0fc1c966d1c..f55a63b0718 100644 --- a/code/modules/computer3/networking.dm +++ b/code/modules/computer3/networking.dm @@ -105,7 +105,7 @@ for(var/obj/O in radio_connection.devices) if(istype(O,typekey)) T = get_turf(O) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(istype(O) && (subspace || (O.z == z_level))) // radio does not work across z-levels result |= O return result diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index b6313a77a40..05054f468dd 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -17,8 +17,7 @@ /datum/event/alien_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - // TODO: Tie into space manager - if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded) + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm index f7db50694d6..65b005c2538 100644 --- a/code/modules/events/anomaly_bluespace.dm +++ b/code/modules/events/anomaly_bluespace.dm @@ -19,8 +19,7 @@ var/obj/item/device/radio/beacon/chosen var/list/possible = list() for(var/obj/item/device/radio/beacon/W in world) - // TODO: Tie into space manager - if(!(W.z in config.station_levels)) + if(!is_station_level(W.z)) continue possible += W diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index e51ad46f61a..d640bca8641 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -18,8 +18,7 @@ /datum/event/brand_intelligence/start() for(var/obj/machinery/vending/V in machines) - // TODO: Tie into space manager - if(V.z != ZLEVEL_STATION) continue + if(!is_station_level(V.z)) continue vendingMachines.Add(V) if(!vendingMachines.len) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 0f44bf586ee..cdcfb6d06e9 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -21,8 +21,7 @@ var/turf/T = get_turf(H) if(!T) continue - // TODO: Tie into space manager - if(T.z != ZLEVEL_STATION) + if(!is_station_level(T.z)) continue var/foundAlready = 0 // don't infect someone that already has the virus for(var/datum/disease/D in H.viruses) diff --git a/code/modules/events/dust.dm b/code/modules/events/dust.dm index 17b529f9bda..5ed631736dd 100644 --- a/code/modules/events/dust.dm +++ b/code/modules/events/dust.dm @@ -62,7 +62,7 @@ goal = locate(endx, endy, 1) src.x = startx src.y = starty - src.z = ZLEVEL_STATION + src.z = level_name_to_num(MAIN_STATION) spawn(0) walk_towards(src, goal, 1) return diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index 282c8daab9e..c6f6944c915 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -22,8 +22,7 @@ for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - // TODO: Tie into space manager - if(current_area.type in skipped_areas || !(S.z in config.station_levels)) + if(current_area.type in skipped_areas || !is_station_level(S.z)) continue S.last_charge = S.charge S.last_output_attempt = S.output_attempt @@ -36,8 +35,7 @@ for(var/obj/machinery/power/apc/C in world) var/area/current_area = get_area(C) - // TODO: Tie into space manager - if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) + if(current_area.type in skipped_areas_apc || !is_station_level(C.z)) continue if(C.cell) C.cell.charge = 0 @@ -50,15 +48,13 @@ command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in machines) var/area/current_area = get_area(C) - // TODO: Tie into space manager - if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) + if(current_area.type in skipped_areas_apc || !is_station_level(C.z)) continue if(C.cell) C.cell.charge = C.cell.maxcharge for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - // TODO: Tie into space manager - if(current_area.type in skipped_areas || !(S.z in config.station_levels)) + if(current_area.type in skipped_areas || !is_station_level(S.z)) continue S.charge = S.last_charge S.output_attempt = S.last_output_attempt @@ -70,8 +66,7 @@ if(announce) command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/smes/S in machines) - // TODO: Tie into space manager - if(S.z != ZLEVEL_STATION) + if(!is_station_level(S.z)) continue S.charge = S.capacity S.output_level = S.output_level_max diff --git a/code/modules/events/holidays/Christmas.dm b/code/modules/events/holidays/Christmas.dm index b9e23d406ef..16fa1fb85f1 100644 --- a/code/modules/events/holidays/Christmas.dm +++ b/code/modules/events/holidays/Christmas.dm @@ -1,7 +1,6 @@ /proc/Christmas_Game_Start() for(var/obj/structure/flora/tree/pine/xmas in world) - // TODO: Tie into space manager - if(!(xmas.z in config.station_levels)) continue + if(!is_station_level(xmas.z)) continue for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/weapon/a_gift(T) diff --git a/code/modules/events/holidays/Holidays.dm b/code/modules/events/holidays/Holidays.dm index 8b219e77d8a..107767455f6 100644 --- a/code/modules/events/holidays/Holidays.dm +++ b/code/modules/events/holidays/Holidays.dm @@ -171,7 +171,7 @@ var/global/Holiday = null */ /* var/list/obj/containers = list() for(var/obj/item/weapon/storage/S in world) - if(!(S.z in config.station_levels)) continue + if(!is_station_level(S.z)) continue containers += S message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/ diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 54a2bb41bb9..7968e2493cf 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -24,8 +24,7 @@ command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') for(var/area/A in world) - // TODO: Tie into space manager - if(!(A.z in config.station_levels) || is_safe_zone(A)) + if(!is_station_level(A.z) || is_safe_zone(A)) continue A.radiation_alert() @@ -43,8 +42,7 @@ var/turf/T = get_turf(H) if(!T) continue - // TODO: Tie into space manager - if(!(T.z in config.station_levels) || is_safe_zone(T.loc)) + if(!is_station_level(T.z) || is_safe_zone(T.loc)) continue if(istype(H,/mob/living/carbon/human)) @@ -63,8 +61,7 @@ command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") for(var/area/A in world) - // TODO: Tie into space manager - if(!(A.z in config.station_levels) || is_safe_zone(A)) + if(!is_station_level(A.z) || is_safe_zone(A)) continue A.reset_radiation_alert() diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 455312baa99..9b7386fe470 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -41,7 +41,7 @@ var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread() sparks.set_up(3, 0, D.loc) sparks.start() - D.z = ZLEVEL_CENTCOMM + D.z = level_name_to_num(CENTCOMM) D.has_loot = 0 qdel(D) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 2c46fc8dffa..2b3ffb799df 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -16,8 +16,7 @@ var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - // TODO: Tie into space manager - if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded) + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) if(temp_vent.parent.other_atmosmch.len > 50) vents += temp_vent diff --git a/code/modules/events/undead.dm b/code/modules/events/undead.dm index 3399c69c979..f705b63611c 100644 --- a/code/modules/events/undead.dm +++ b/code/modules/events/undead.dm @@ -9,8 +9,7 @@ RS.start() RS.kill() for(var/area/A) - // TODO: Tie into space manager - if(!(A.z in config.station_levels)) continue //Spook on main station only. + if(!is_station_level(A.z)) continue //Spook on main station only. if(A.luminosity) continue // if(A.lighting_space) continue if(A.type == /area) continue diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index de4e62215a8..e5679764a39 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -11,8 +11,7 @@ /datum/event/vent_clog/setup() endWhen = rand(25, 100) for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines) - // TODO: Tie into space manager - if((temp_vent.loc.z in config.station_levels)) + if(is_station_level(temp_vent.loc.z)) if(temp_vent.parent.other_atmosmch.len > 50) vents += temp_vent diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index b022527094d..cb5155358a2 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -13,8 +13,7 @@ /datum/event/wormholes/start() for(var/turf/simulated/floor/T in world) - // TODO: Tie into space manager - if((T.z in config.station_levels)) + if(is_station_level(T.z)) pick_turfs += T for(var/i = 1, i <= number_of_wormholes, i++) diff --git a/code/modules/holiday/christmas.dm b/code/modules/holiday/christmas.dm index c90e97d60c1..f9fbaf81b1d 100644 --- a/code/modules/holiday/christmas.dm +++ b/code/modules/holiday/christmas.dm @@ -1,7 +1,6 @@ /datum/holiday/xmas/celebrate() for(var/obj/structure/flora/tree/pine/xmas in world) - // TODO: Tie into space manager - if(!(xmas.z in config.station_levels)) continue + if(!is_station_level(xmas.z)) continue for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/weapon/a_gift(T) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index ec7a5aca25f..994f141d373 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -376,8 +376,7 @@ // Bluespace tomato code copied over from grown.dm. if(get_trait(TRAIT_TELEPORTING)) - // TODO: Tie into space manager - if(target.z in config.admin_levels) + if(!is_teleport_allowed(target.z)) return 1 //Plant potency determines radius of teleport. diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 211914afcbb..7de55560258 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -528,8 +528,7 @@ /obj/item/device/wormhole_jaunter/attack_self(mob/user as mob) var/turf/device_turf = get_turf(user) - // TODO: Tie into space manager - if(!device_turf||device_turf.z==ZLEVEL_CENTCOMM||device_turf.z>=ZLEVEL_EMPTY) + if(!device_turf||is_teleport_allowed(device_turf.z)) to_chat(user, "You're having difficulties getting the [src.name] to work.") return else @@ -537,8 +536,7 @@ var/list/L = list() for(var/obj/item/device/radio/beacon/B in world) var/turf/T = get_turf(B) - // TODO: Tie into space manager - if(T.z == ZLEVEL_STATION) + if(is_station_level(T.z)) L += B if(!L.len) to_chat(user, "The [src.name] failed to create a wormhole.") diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 2a6f5555555..ec36988cb20 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -240,8 +240,7 @@ /obj/item/weapon/ore/New() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 - // TODO: Tie into space manager - if(src.z == ZLEVEL_ASTEROID) + if(is_mining_level(src.z)) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) /obj/item/weapon/ore/ex_act() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c67879f0457..122e4e3ebe4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -18,10 +18,7 @@ var/turf/T = get_turf(src) if(!T) return 0 - // TODO: Tie into space manager - if(T.z == ZLEVEL_CENTCOMM) //dont detect mobs on centcomm - return 0 - if(T.z >= MAX_Z) + if(!is_level_reachable(T.z)) return 0 if(user != null && src == user) return 0 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 7870e3a91fc..471dcbec0bb 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -640,15 +640,13 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO)) return - var/ai_allowed_Zlevel = list(ZLEVEL_STATION,ZLEVEL_TELECOMMS,ZLEVEL_ASTEROID) var/d var/area/bot_area d += "Query network status
" d += "" for(var/mob/living/simple_animal/bot/Bot in simple_animal_list) - // TODO: Tie into space manager - if((Bot.z in ai_allowed_Zlevel) && !Bot.remote_disabled) //Only non-emagged bots on the allowed Z-level are detected! + if(is_ai_allowed(Bot.z) && !Bot.remote_disabled) //Only non-emagged bots on the allowed Z-level are detected! bot_area = get_area(Bot) d += "" //If the bot is on, it will display the bot's current mode status. If the bot is not mode, it will just report "Idle". "Inactive if it is not on at all. diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 6d4c3a45150..1b21e7d4c36 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -499,8 +499,7 @@ /mob/living/silicon/pai/proc/hackloop() var/turf/T = get_turf_or_move(src.loc) for(var/mob/living/silicon/ai/AI in player_list) - // TODO: Tie into space manager - if(!T || !(T.z in config.contact_levels)) + if(!T || !is_station_contact(T.z)) break if(T.loc) to_chat(AI, "Network Alert: Brute-force encryption crack in progress in [T.loc].") diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index 50c2bd79143..cb00e6a12b3 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -41,8 +41,7 @@ // Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras) // unless it's on the same level as the object it's interacting with. var/turf/T = get_turf(src_object) - // TODO: Tie into space manager - if(!T || !(z == T.z || (T.z in config.player_levels))) + if(!T || !(atoms_share_level(src,T) || is_level_reachable(T.z))) return STATUS_CLOSE // If an object is in view then we can interact with it diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 65f5a9299ee..ce89f59947b 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -5,8 +5,7 @@ if(..()) return 1 var/turf/T = get_turf(nano_host()) - // TODO: Tie into space manager - if(!T || !(T.z in config.player_levels)) + if(!T || !is_level_reachable(T.z)) to_chat(usr, "Unable to establish a connection: You're too far away from the station!") return 0 if(href_list["track"]) diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index 1c407bd223c..30f732f48ae 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -316,8 +316,7 @@ if(shuttle_master.supply.mode == SHUTTLE_CALL) supplyData["shuttle_moving"] = 1 - // TODO: Tie into space manager - if(shuttle_master.supply.z != ZLEVEL_STATION) + if(!is_station_level(shuttle_master.supply.z)) supplyData["shuttle_loc"] = "station" else supplyData["shuttle_loc"] = "centcom" diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index 2a8ca83b218..6d7bbc90bd3 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -158,7 +158,7 @@ if(signal.data["done"]) useTC = 1 var/turf/pos = get_turf(P) - // TODO: Tie into space manager + // TODO: Make the radio system cooperate with the space manager if(pos.z in signal.data["level"]) useTC = 2 //Let's make this barely readable diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 5cbb8837c68..c38a53437e5 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -170,8 +170,7 @@ apcs -= src if(malfai && operating) if(ticker.mode.config_tag == "malfunction") - // TODO: Tie into space manager - if(src.z == ZLEVEL_STATION) + if(is_station_level(src.z)) ticker.mode:apcs-- area.power_light = 0 area.power_equip = 0 @@ -996,8 +995,7 @@ malfai.malfhacking = 0 locked = 1 if(ticker.mode.config_tag == "malfunction") - // TODO: Tie into space manager - if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas)) + if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs++ if(usr:parent) src.malfai = usr:parent @@ -1029,8 +1027,7 @@ if(malfai) if(ticker.mode.config_tag == "malfunction") - // TODO: Tie into space manager - if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas)) + if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas)) operating ? ticker.mode:apcs++ : ticker.mode:apcs-- src.update() @@ -1045,8 +1042,7 @@ if(!malf.can_shunt) to_chat(malf, "You cannot shunt.") return - // TODO: Tie into space manager - if(!(src.z in config.station_levels)) + if(!is_station_level(src.z)) return src.occupier = new /mob/living/silicon/ai(src,malf.laws,null,1) src.occupier.adjustOxyLoss(malf.getOxyLoss()) @@ -1095,8 +1091,7 @@ /obj/machinery/power/apc/proc/ion_act() //intended to be exactly the same as an AI malf attack - // TODO: Tie into space manager - if(!src.malfhack && (src.z in config.station_levels)) + if(!src.malfhack && is_station_level(src.z)) if(prob(3)) src.locked = 1 if(src.cell.charge > 0) @@ -1371,8 +1366,7 @@ /obj/machinery/power/apc/proc/set_broken() if(malfai && operating) if(ticker.mode.config_tag == "malfunction") - // TODO: Tie into space manager - if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas)) + if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs-- stat |= BROKEN operating = 0 diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index ea633c7e78f..6468f813fa6 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -124,8 +124,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 O.main_part = null qdel(O) for(var/area/A in world) - // TODO: Tie into space manager - if(!(A.z in config.station_levels)) continue + if(!is_station_level(A.z)) continue A.gravitychange(0,A) shake_everyone() return ..() @@ -302,8 +301,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought online and is now producing gravity for this level.", "gravity") message_admins("The gravity generator was brought online. ([area.name])") for(var/area/A in world) - // TODO: Tie into space manager - if(!(A.z in config.station_levels)) continue + if(!is_station_level(A.z)) continue A.gravitychange(1,A) else if(gravity_in_level() == 1) @@ -311,8 +309,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought offline and there is now no gravity for this level.", "gravity") message_admins("The gravity generator was brought offline with no backup generator. ([area.name])") for(var/area/A in world) - // TODO: Tie into space manager - if(!(A.z in config.station_levels)) continue + if(!is_station_level(A.z)) continue A.gravitychange(0,A) update_icon() @@ -380,7 +377,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 shake_camera(M, 15, 1) M.playsound_local(our_turf, 'sound/effects/alert.ogg', 100, 1, 0.5) -// TODO: Tie into space manager +// TODO: Make the gravity generator cooperate with the space manager /obj/machinery/gravity_generator/main/proc/gravity_in_level() var/turf/T = get_turf(src) if(!T) @@ -389,7 +386,6 @@ var/const/GRAV_NEEDS_WRENCH = 3 return length(gravity_generators["[T.z]"]) return 0 -// TODO: Tie into space manager /obj/machinery/gravity_generator/main/proc/update_list() var/turf/T = get_turf(src.loc) if(T) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 75f88f9b751..4af4ccaeee4 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -433,8 +433,7 @@ return 1 /obj/machinery/power/smes/proc/ion_act() - // TODO: Tie into space manager - if(src.z in config.station_levels) + if(is_station_level(src.z)) if(prob(1)) //explosion for(var/mob/M in viewers(src)) M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2) diff --git a/code/modules/projectiles/guns/energy/telegun.dm b/code/modules/projectiles/guns/energy/telegun.dm index c280fe59903..7b94698f0e9 100644 --- a/code/modules/projectiles/guns/energy/telegun.dm +++ b/code/modules/projectiles/guns/energy/telegun.dm @@ -23,8 +23,7 @@ var/turf/T = get_turf(R) if(!T) continue - // TODO: Tie into space manager - if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY) + if(!is_teleport_allowed(T.z)) continue if(R.syndicate == 1) continue diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 262820990c2..a0f1aecb520 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -729,7 +729,7 @@ to_chat(user, "The [src] begins to vibrate!") spawn(rand(10,30)) var/turf/userturf = get_turf(user) - if(src.loc == user && userturf.z != ZLEVEL_CENTCOMM) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you! + if(src.loc == user && is_teleport_allowed(userturf.z)) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you! visible_message("The [src] twists and bends, relocating itself!") throwSmoke(userturf) do_teleport(user, userturf, 8, asoundin = 'sound/effects/phasein.ogg') diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index b340e14d356..4bdf86deaa9 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -37,8 +37,7 @@ CC.post_status("alert", "outline") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_green") @@ -54,8 +53,7 @@ CC.post_status("alert", "outline") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue") @@ -67,8 +65,7 @@ security_level = SEC_LEVEL_RED var/obj/machinery/door/airlock/highsecurity/red/R = locate(/obj/machinery/door/airlock/highsecurity/red) in world - // TODO: Tie into space manager - if(R && (R.z in config.station_levels)) + if(R && is_station_level(R.z)) R.locked = 0 R.update_icon() @@ -77,8 +74,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_red") @@ -90,14 +86,12 @@ if(security_level < SEC_LEVEL_RED) for(var/obj/machinery/door/airlock/highsecurity/red/R in world) - // TODO: Tie into space manager - if((R.z in config.station_levels)) + if(is_station_level(R.z)) R.locked = 0 R.update_icon() for(var/obj/machinery/door/airlock/hatch/gamma/H in world) - // TODO: Tie into space manager - if((H.z in config.station_levels)) + if(is_station_level(H.z)) H.locked = 0 H.update_icon() @@ -106,8 +100,7 @@ CC.post_status("alert", "gammaalert") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_gamma") FA.update_icon() @@ -121,8 +114,7 @@ CC.post_status("alert", "epsilonalert") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_epsilon") @@ -135,8 +127,7 @@ CC.post_status("alert", "deltaalert") for(var/obj/machinery/firealarm/FA in world) - // TODO: Tie into space manager - if((FA.z in config.contact_levels)) + if(is_station_contact(FA.z)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta") diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 40e7aa05aa0..fe3d059a08a 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -6,7 +6,6 @@ height = 7 /obj/docking_port/mobile/assault_pod/request() - // TODO: Tie into space manager if(z == initial(src.z)) //No launching pods that have already launched return ..() diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 1224f5719b9..89aeb978cdf 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -202,8 +202,7 @@ if(time_left <= 0 && !shuttle_master.emergencyNoEscape) //move each escape pod to its corresponding transit dock for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile) - // TODO: Tie into space manager - if(M.z == ZLEVEL_STATION) //Will not launch from the mine/planet + if(is_station_level(M.z)) //Will not launch from the mine/planet M.enterTransit() //now move the actual emergency shuttle to its transit dock for(var/area/shuttle/escape/E in world) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index f076c7ee977..3451f7fbe08 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -28,7 +28,7 @@ return 1 /obj/docking_port/mobile/supply/canMove() - if(z == ZLEVEL_STATION) + if(is_station_level(z)) return forbidden_atoms_check(areaInstance) return ..() @@ -45,7 +45,7 @@ sell() /obj/docking_port/mobile/supply/proc/buy() - if(z != ZLEVEL_STATION) //we only buy when we are -at- the station + if(!is_station_level(z)) //we only buy when we are -at- the station return 1 if(!shuttle_master.shoppinglist.len) @@ -93,7 +93,7 @@ shuttle_master.shoppinglist.Cut() /obj/docking_port/mobile/supply/proc/sell() - if(z != ZLEVEL_CENTCOMM) //we only sell when we are -at- centcomm + if(z != level_name_to_num(CENTCOMM)) //we only sell when we are -at- centcomm return 1 var/plasma_count = 0 diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index b1afd14bcf5..1c03c3f7039 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -30,9 +30,9 @@ /obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list) if(href_list["move"]) - if(z != ZLEVEL_CENTCOMM) + if(z != level_name_to_num(CENTCOMM)) to_chat(usr, "Pods are one way!") return 0 ..() -#undef SYNDICATE_CHALLENGE_TIMER \ No newline at end of file +#undef SYNDICATE_CHALLENGE_TIMER diff --git a/code/modules/space_management/level_check.dm b/code/modules/space_management/level_check.dm new file mode 100644 index 00000000000..391f5968c22 --- /dev/null +++ b/code/modules/space_management/level_check.dm @@ -0,0 +1,7 @@ +/proc/is_on_level_name(atom/A,name) + var/datum/space_level/S = space_manager.get_zlev_by_name(name) + return A.z == S.zpos + +// For expansion later +/proc/atoms_share_level(atom/A, atom/B) + return A.z == B.z diff --git a/code/modules/space_management/level_traits.dm b/code/modules/space_management/level_traits.dm new file mode 100644 index 00000000000..83309c3764f --- /dev/null +++ b/code/modules/space_management/level_traits.dm @@ -0,0 +1,62 @@ +/proc/is_level_reachable(z) + return check_level_trait(z, REACHABLE) + +/proc/is_station_level(z) + return check_level_trait(z, STATION_LEVEL) + +/proc/is_station_contact(z) + return check_level_trait(z, STATION_CONTACT) + +/proc/is_teleport_allowed(z) + return !check_level_trait(z, BLOCK_TELEPORT) + +/proc/is_admin_level(z) + return check_level_trait(z, ADMIN_LEVEL) + +/proc/is_away_level(z) + return check_level_trait(z, AWAY_LEVEL) + +/proc/is_mining_level(z) + return check_level_trait(z, ORE_LEVEL) + +/proc/is_ai_allowed(z) + return check_level_trait(z, AI_OK) + +/proc/level_blocks_magic(z) + return check_level_trait(z, IMPEDES_MAGIC) + +/proc/level_boosts_signal(z) + return check_level_trait(z, BOOSTS_SIGNAL) + +// Used for the nuke disk, or for checking if players survived through xenos +/proc/is_secure_level(z) + var/secure = check_level_trait(z, STATION_LEVEL) + if(!secure) + // This is to allow further admin levels later, other than centcomm + secure = (z == level_name_to_num(CENTCOMM)) + return secure + +var/list/default_map_traits = MAP_TRANSITION_CONFIG +/proc/check_level_trait(z, trait) + if(z == 0) + return 0 // If you're nowhere, you have no traits + var/list/trait_list + if(space_manager.initialized) + var/datum/space_level/S = space_manager.get_zlev(z) + trait_list = S.flags + else + trait_list = default_map_traits[z] + trait_list = trait_list["attributes"] + return (trait in trait_list) + +/proc/levels_by_trait(trait) + var/list/result = list() + for(var/A in space_manager.z_list) + var/datum/space_level/S = space_manager.z_list[A] + if(trait in S.flags) + result |= S + return result + +/proc/level_name_to_num(name) + var/datum/space_level/S = space_manager.get_zlev_by_name(name) + return S.zpos diff --git a/code/modules/space_management/space_level.dm b/code/modules/space_management/space_level.dm index 6b7654cd504..085bd89f44b 100644 --- a/code/modules/space_management/space_level.dm +++ b/code/modules/space_management/space_level.dm @@ -1,7 +1,7 @@ /datum/space_level var/name = "Your config settings failed, you need to fix this for the datum space levels to work" var/zpos = 1 - var/flags = 0 // We'll use this to keep track of whether you can teleport/etc + var/flags = list() // We'll use this to keep track of whether you can teleport/etc // Map transition stuff var/list/neighbors = list() @@ -19,8 +19,9 @@ var/dirt_count = 0 var/list/init_list = list() -/datum/space_level/New(z, name, transition_type = SELFLOOPING) +/datum/space_level/New(z, name, transition_type = SELFLOOPING, traits = list(BLOCK_TELEPORT)) zpos = z + flags = traits set_linkage(transition_type) build_space_destination_arrays() @@ -57,7 +58,8 @@ linkage = transition_type if(transition_type == SELFLOOPING) link_to_self() // `link_to_self` is defined in space_transitions.dm - + if(transition_type == UNAFFECTED) + reset_connections() /datum/space_level/proc/resume_init() if(dirt_count > 0) diff --git a/code/modules/space_management/space_transition.dm b/code/modules/space_management/space_transition.dm index 469365e4023..d158d694ff5 100644 --- a/code/modules/space_management/space_transition.dm +++ b/code/modules/space_management/space_transition.dm @@ -20,6 +20,7 @@ var/list/direction_cache = list() /datum/space_level/proc/link_to_self() + reset_connections() neighbors = list() var/list/L = list(Z_LEVEL_NORTH,Z_LEVEL_SOUTH,Z_LEVEL_EAST,Z_LEVEL_WEST) for(var/A in L) @@ -279,7 +280,7 @@ /datum/spacewalk_grid/proc/get_height() return 1 + max_y - min_y -// This function is called repeatedly to build the map +// This function chooses an available point next to any node in the grid /datum/spacewalk_grid/proc/get_empty_node() var/datum/point/P = pick(available_nodes) if(isnull(P)) @@ -287,6 +288,12 @@ consume_node(P) return P +// This function is called repeatedly to build the map +/datum/spacewalk_grid/proc/add_level(datum/space_level/S) + var/datum/point/P = get_empty_node() + P.set_space_level(S) + + // This proc substantiates the grid of points used to determine routes between levels // Separating this from initialization gives us time in which we can add more crosslink z levels // before we bake in all our connections @@ -318,16 +325,10 @@ D = pick(crosslinks) crosslinks.Remove(D) // We now choose a point in our imaginary grid adjacent to our current location - P = point_grid.get_empty_node() - // Let our z level know where in the imaginary grid it is - // This will also handle establishing neighborship with other z levels - P.set_space_level(D) + point_grid.add_level(D) -// A heavy proc - loops through all space turfs and sets its destination +// Loops through border space turfs and sets its destination // based on its space level's linkage -// Takes 0.6 seconds per call on my machine - could have each z level -// have its own space turf cache, but I don't want to complicate this more -// than is necessary /datum/zlev_manager/proc/setup_space_destinations() var/timer = start_watch() log_debug("Assigning space turf destinations...") diff --git a/code/modules/space_management/zlevel_manager.dm b/code/modules/space_management/zlevel_manager.dm index 8f83c0ab5e4..26607380a37 100644 --- a/code/modules/space_management/zlevel_manager.dm +++ b/code/modules/space_management/zlevel_manager.dm @@ -3,9 +3,11 @@ var/global/datum/zlev_manager/space_manager = new /datum/zlev_manager // A list of z-levels var/list/z_list = list() + var/list/levels_by_name = list() var/list/heaps = list() var/datum/spacewalk_grid/linkage_map + var/initialized = 0 // Populate our space level list // and prepare space transitions @@ -14,18 +16,24 @@ var/global/datum/zlev_manager/space_manager = new var/k = 1 // First take care of "Official" z levels, without visiting levels outside of the list - for(var/A in map_transition_config) - // `A` is the name - // `map_transition_config[A]` is the transition type - z_list["[k]"] = new /datum/space_level(k, A, transition_type = map_transition_config[A]) + for(var/list/features in map_transition_config) if(k > world.maxz) - CRASH("More map transitions defined than existent z levels - [num_official_z_levels]") + CRASH("More map attributes pre-defined than existent z levels - [num_official_z_levels]") + var/name = features["name"] + var/linking = features["linkage"] + var/list/attributes = features["attributes"] + attributes = attributes.Copy() // Clone the list so it can't be changed on accident + + var/datum/space_level/S = new /datum/space_level(k, name, transition_type = linking, traits = attributes) + z_list["[k]"] = S + levels_by_name[name] = S k++ // Then, we take care of unmanaged z levels // They get the default linkage of SELFLOOPING for(var/i = k, i <= world.maxz, i++) z_list["[i]"] = new /datum/space_level(i) + initialized = 1 /datum/zlev_manager/proc/get_zlev(z) @@ -34,6 +42,11 @@ var/global/datum/zlev_manager/space_manager = new else return z_list["[z]"] +/datum/zlev_manager/proc/get_zlev_by_name(A) + if(!(A in levels_by_name)) + throw EXCEPTION("Non-existent z level: '[A]'") + return levels_by_name[A] + /* * "Dirt" management * "Dirt" is used to keep track of whether a z level should automatically have @@ -88,10 +101,14 @@ var/global/datum/zlev_manager/space_manager = new // Increments the max z-level by one // For convenience's sake returns the z-level added -/datum/zlev_manager/proc/add_new_zlevel(name, linkage = SELFLOOPING) +/datum/zlev_manager/proc/add_new_zlevel(name, linkage = SELFLOOPING, traits = list(BLOCK_TELEPORT)) + if(name in levels_by_name) + throw EXCEPTION("Name already in use: [name]") world.maxz++ var/our_z = world.maxz - z_list["[our_z]"] = new /datum/space_level(our_z,name, transition_type = linkage) + var/datum/space_level/S = new /datum/space_level(our_z, name, transition_type = linkage, traits = traits) + levels_by_name[name] = S + z_list["[our_z]"] = S return our_z /datum/zlev_manager/proc/cut_levels_downto(new_maxz) diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm index 7d5fc1e527d..d93d56acc41 100644 --- a/code/modules/store/store.dm +++ b/code/modules/store/store.dm @@ -48,8 +48,7 @@ var/global/datum/store/centcomm_store=new /datum/store/proc/reconnect_database() for(var/obj/machinery/computer/account_database/DB in world) - // TODO: Tie into space manager - if((DB.z in config.station_levels)) + if(is_station_level(DB.z)) linked_db = DB break diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index 431d9e2958e..6f5e3b30279 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -22,8 +22,7 @@ qdel(src) /obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L) - // TODO: Tie into space manager - if(L.z in config.admin_levels) + if(!is_teleport_allowed(L.z)) src.visible_message("[src]'s fragments begin rapidly vibrating and blink out of existence.") qdel(src) return diff --git a/config/example/config.txt b/config/example/config.txt index 2f723c704f4..b1df63d508a 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -260,18 +260,6 @@ GHOST_INTERACTION ## Default is "python" on Windows, "/usr/bin/env python2" on UNIX. #PYTHON_PATH pythonw -## Defines which Z-levels the station exists on. -STATION_LEVELS 1 - -## Defines which Z-levels are used for admin functionality, such as Central Command and the Syndicate Shuttle -ADMIN_LEVELS 2 - -## Defines which Z-levels which, for example, a Code Red announcement may affect -CONTACT_LEVELS 1;5 - -## Defines all Z-levels a character can typically reach -PLAYER_LEVELS 1;3;4;5;6;7 - ## Expected round length in minutes EXPECTED_ROUND_LENGTH 120 diff --git a/config/example/space_levels.txt b/config/example/space_levels.txt deleted file mode 100644 index d40624bb64d..00000000000 --- a/config/example/space_levels.txt +++ /dev/null @@ -1,13 +0,0 @@ -Main Station;1;linked - -Central Command;2;unlinked - -Telecommunications Satellite;3;linked - -Engineering Outpost;4;linked - -Mining Asteroid;5;linked - -Derelicted Station;6;linked - -Empty Area;7;linked \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 51cc0c1616b..7ee9b673572 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1995,6 +1995,8 @@ #include "code\modules\shuttle\supply.dm" #include "code\modules\shuttle\syndicate.dm" #include "code\modules\space_management\heap_space_level.dm" +#include "code\modules\space_management\level_check.dm" +#include "code\modules\space_management\level_traits.dm" #include "code\modules\space_management\space_chunk.dm" #include "code\modules\space_management\space_level.dm" #include "code\modules\space_management\space_transition.dm" From 607e92ba1ccb1ea0d005a825d209acd69ee05bb7 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sun, 31 Jul 2016 21:42:25 -0700 Subject: [PATCH 2/9] Left a var abandoned, whoops --- code/modules/space_management/space_transition.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/space_management/space_transition.dm b/code/modules/space_management/space_transition.dm index d158d694ff5..bd254a37b8b 100644 --- a/code/modules/space_management/space_transition.dm +++ b/code/modules/space_management/space_transition.dm @@ -317,7 +317,6 @@ var/datum/spacewalk_grid/point_grid = new // We do this so we can display the way the levels connect later linkage_map = point_grid - var/datum/point/P // Now, we pop entries in a random order from our list of space levels // and assign its connections based on the grid From 28e00f8bf707704b4a53855c3ba56812489c19d9 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Aug 2016 09:00:54 -0700 Subject: [PATCH 3/9] Newlines to make the map defines readable --- _maps/cyberiad.dm | 8 +++++++- _maps/metastation.dm | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/_maps/cyberiad.dm b/_maps/cyberiad.dm index d832502cee5..6b131de4ee7 100644 --- a/_maps/cyberiad.dm +++ b/_maps/cyberiad.dm @@ -24,7 +24,13 @@ z7 = empty #define MAP_FILE "cyberiad.dmm" #define MAP_NAME "NSS Cyberiad" - #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)), DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)), DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)), DECLARE_LEVEL(CONSTRUCTION,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,HAS_WEATHER,ORE_LEVEL,AI_OK)), DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE))) + #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)),\ +DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)),\ +DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)),\ +DECLARE_LEVEL(CONSTRUCTION,CROSSLINKED,list(REACHABLE)),\ +DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,HAS_WEATHER,ORE_LEVEL,AI_OK)),\ +DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)),\ +DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE))) #elif !defined(MAP_OVERRIDE) diff --git a/_maps/metastation.dm b/_maps/metastation.dm index 454cde2adf3..0b4e6a6e157 100644 --- a/_maps/metastation.dm +++ b/_maps/metastation.dm @@ -25,7 +25,13 @@ z7 = empty space #define MAP_FILE "MetaStation.v41A.II.dmm" #define MAP_NAME "MetaStation" - #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)), DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)), DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)), DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,AI_OK)), DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE)), DECLARE_LEVEL(EMPTY_AREA_2,CROSSLINKED,list(REACHABLE))) + #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)),\ +DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)),\ +DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)),\ +DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)),\ +DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,AI_OK,ORE_LEVEL,HAS_WEATHER)),\ +DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE)),\ +DECLARE_LEVEL(EMPTY_AREA_2,CROSSLINKED,list(REACHABLE))) #elif !defined(MAP_OVERRIDE) From 30a28f69fd39ae65a9241468abd4c8dcd302e3a0 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Aug 2016 09:06:14 -0700 Subject: [PATCH 4/9] Adds spacing too --- _maps/cyberiad.dm | 15 ++++++++------- _maps/metastation.dm | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/_maps/cyberiad.dm b/_maps/cyberiad.dm index 6b131de4ee7..434cc79eb52 100644 --- a/_maps/cyberiad.dm +++ b/_maps/cyberiad.dm @@ -24,13 +24,14 @@ z7 = empty #define MAP_FILE "cyberiad.dmm" #define MAP_NAME "NSS Cyberiad" - #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)),\ -DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)),\ -DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)),\ -DECLARE_LEVEL(CONSTRUCTION,CROSSLINKED,list(REACHABLE)),\ -DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,HAS_WEATHER,ORE_LEVEL,AI_OK)),\ -DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)),\ -DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE))) + #define MAP_TRANSITION_CONFIG list(\ +DECLARE_LEVEL(MAIN_STATION, CROSSLINKED, list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)),\ +DECLARE_LEVEL(CENTCOMM, SELFLOOPING, list(ADMIN_LEVEL, BLOCK_TELEPORT, IMPEDES_MAGIC)),\ +DECLARE_LEVEL(TELECOMMS, CROSSLINKED, list(REACHABLE, BOOSTS_SIGNAL, AI_OK)),\ +DECLARE_LEVEL(CONSTRUCTION, CROSSLINKED, list(REACHABLE)),\ +DECLARE_LEVEL(MINING, CROSSLINKED, list(REACHABLE, STATION_CONTACT, HAS_WEATHER, ORE_LEVEL, AI_OK)),\ +DECLARE_LEVEL(DERELICT, CROSSLINKED, list(REACHABLE)),\ +DECLARE_LEVEL(EMPTY_AREA, CROSSLINKED, list(REACHABLE))) #elif !defined(MAP_OVERRIDE) diff --git a/_maps/metastation.dm b/_maps/metastation.dm index 0b4e6a6e157..9240a5e928f 100644 --- a/_maps/metastation.dm +++ b/_maps/metastation.dm @@ -25,13 +25,14 @@ z7 = empty space #define MAP_FILE "MetaStation.v41A.II.dmm" #define MAP_NAME "MetaStation" - #define MAP_TRANSITION_CONFIG list(DECLARE_LEVEL(MAIN_STATION,CROSSLINKED,list(STATION_LEVEL,STATION_CONTACT,REACHABLE,AI_OK)),\ -DECLARE_LEVEL(CENTCOMM,SELFLOOPING,list(ADMIN_LEVEL,BLOCK_TELEPORT,IMPEDES_MAGIC)),\ -DECLARE_LEVEL(TELECOMMS,CROSSLINKED,list(REACHABLE,BOOSTS_SIGNAL,AI_OK)),\ -DECLARE_LEVEL(DERELICT,CROSSLINKED,list(REACHABLE)),\ -DECLARE_LEVEL(MINING,CROSSLINKED,list(REACHABLE,STATION_CONTACT,AI_OK,ORE_LEVEL,HAS_WEATHER)),\ -DECLARE_LEVEL(EMPTY_AREA,CROSSLINKED,list(REACHABLE)),\ -DECLARE_LEVEL(EMPTY_AREA_2,CROSSLINKED,list(REACHABLE))) + #define MAP_TRANSITION_CONFIG list(\ +DECLARE_LEVEL(MAIN_STATION, CROSSLINKED, list(STATION_LEVEL, STATION_CONTACT, REACHABLE, AI_OK)),\ +DECLARE_LEVEL(CENTCOMM, SELFLOOPING, list(ADMIN_LEVEL, BLOCK_TELEPORT, IMPEDES_MAGIC)),\ +DECLARE_LEVEL(TELECOMMS, CROSSLINKED, list(REACHABLE, BOOSTS_SIGNAL, AI_OK)),\ +DECLARE_LEVEL(DERELICT, CROSSLINKED, list(REACHABLE)),\ +DECLARE_LEVEL(MINING, CROSSLINKED, list(REACHABLE, STATION_CONTACT, AI_OK, ORE_LEVEL, HAS_WEATHER)),\ +DECLARE_LEVEL(EMPTY_AREA, CROSSLINKED, list(REACHABLE)),\ +DECLARE_LEVEL(EMPTY_AREA_2, CROSSLINKED, list(REACHABLE))) #elif !defined(MAP_OVERRIDE) From c48d216ebcd270119797b7e32859ccc352858a6b Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Aug 2016 14:25:38 -0700 Subject: [PATCH 5/9] Fixes negated conditions --- code/controllers/Processes/shuttles.dm | 2 +- code/datums/cache/air_alarm.dm | 2 +- code/datums/diseases/advance/advance.dm | 2 +- code/modules/admin/verbs/playsound.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/controllers/Processes/shuttles.dm b/code/controllers/Processes/shuttles.dm index bae4bce175f..8108fdea027 100644 --- a/code/controllers/Processes/shuttles.dm +++ b/code/controllers/Processes/shuttles.dm @@ -209,7 +209,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 if(!M.roundstart_move) continue for(var/obj/docking_port/stationary/S in stationary) - if(is_station_level(S.z) && findtext(S.id, M.id)) + if(!is_station_level(S.z) && findtext(S.id, M.id)) S.width = M.width S.height = M.height S.dwidth = M.dwidth diff --git a/code/datums/cache/air_alarm.dm b/code/datums/cache/air_alarm.dm index a46306d1ea2..b507c096081 100644 --- a/code/datums/cache/air_alarm.dm +++ b/code/datums/cache/air_alarm.dm @@ -15,7 +15,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new() alarms[++alarms.len] = passed_alarm.get_nano_data_console() else for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : air_alarms)) - if(!monitored_alarms && is_station_contact(alarm.z)) + if(!monitored_alarms && !is_station_contact(alarm.z)) continue alarms[++alarms.len] = alarm.get_nano_data_console() diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 009701d8057..5492a9f9ced 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -406,7 +406,7 @@ var/list/advance_cures = list( AD.Refresh() for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) - if(is_station_level(H.z)) + if(!is_station_level(H.z)) continue if(!H.HasDisease(D)) H.ForceContractDisease(D) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index b93eb1f043f..957070eae8e 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -81,7 +81,7 @@ var/list/sounds_cache = list() for(var/O in global_intercoms) var/obj/item/device/radio/intercom/I = O - if(is_station_level(I.z) && !ignore_z) + if(!is_station_level(I.z) && !ignore_z) continue if(!I.on && !ignore_power) continue From bc93078da558228ff46979efc1e7a1309eb91448 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Aug 2016 18:28:47 -0700 Subject: [PATCH 6/9] Merge conflicts begone --- _maps/map_files/cyberiad/cyberiad.dmm | 2 +- .../unary_devices/heat_exchanger.dm | 1 + code/__DEFINES/misc.dm | 6 + code/controllers/Processes/fires.dm | 23 ++ code/datums/spells/ethereal_jaunt.dm | 1 + code/datums/uplink_item.dm | 7 + code/game/dna/dna2.dm | 23 ++ code/game/gamemodes/events.dm | 2 +- .../gamemodes/malfunction/Malf_Modules.dm | 6 +- .../miniantags/slaughter/bloodcrawl.dm | 1 + code/game/gamemodes/scoreboard.dm | 2 +- code/game/gamemodes/vampire/vampire.dm | 4 +- code/game/gamemodes/wizard/artefact.dm | 4 +- code/game/jobs/job/security.dm | 2 +- code/game/jobs/job/supervisor.dm | 4 +- code/game/machinery/syndicatebomb.dm | 1 + code/game/machinery/vending.dm | 2 +- code/game/mecha/combat/marauder.dm | 1 + code/game/mecha/working/ripley.dm | 1 + code/game/objects/buckling.dm | 7 + .../objects/effects/decals/Cleanable/misc.dm | 4 + code/game/objects/effects/decals/cleanable.dm | 5 +- .../game/objects/effects/decals/contraband.dm | 1 + code/game/objects/items.dm | 16 ++ code/game/objects/items/candle.dm | 133 ++++++----- code/game/objects/items/devices/guitar.dm | 2 + .../objects/items/devices/taperecorder.dm | 6 + code/game/objects/items/devices/violin.dm | 4 +- code/game/objects/items/flag.dm | 75 +----- code/game/objects/items/stacks/medical.dm | 148 ++++++------ .../objects/items/stacks/sheets/mineral.dm | 14 ++ .../items/stacks/sheets/sheet_types.dm | 226 +++++++++--------- code/game/objects/items/stacks/stack.dm | 208 ++++++++-------- .../game/objects/items/stacks/stack_recipe.dm | 55 +++++ .../objects/items/stacks/tiles/tile_types.dm | 4 + code/game/objects/items/toys.dm | 42 ++-- code/game/objects/items/trash.dm | 4 + code/game/objects/items/weapons/cards_ids.dm | 41 +++- code/game/objects/items/weapons/cash.dm | 1 + code/game/objects/items/weapons/cigs.dm | 17 +- code/game/objects/items/weapons/courtroom.dm | 2 + .../objects/items/weapons/gift_wrappaper.dm | 2 + .../items/weapons/grenades/atmosgrenade.dm | 24 ++ .../items/weapons/grenades/clusterbuster.dm | 10 + .../objects/items/weapons/grenades/grenade.dm | 2 + code/game/objects/items/weapons/handcuffs.dm | 2 +- code/game/objects/items/weapons/mop.dm | 1 + code/game/objects/items/weapons/paint.dm | 2 + code/game/objects/items/weapons/scrolls.dm | 1 + code/game/objects/items/weapons/shields.dm | 1 + code/game/objects/items/weapons/signs.dm | 1 + code/game/objects/items/weapons/staff.dm | 1 + .../objects/items/weapons/storage/backpack.dm | 12 + .../objects/items/weapons/storage/bags.dm | 8 +- .../objects/items/weapons/storage/belt.dm | 4 +- .../objects/items/weapons/storage/bible.dm | 1 + .../objects/items/weapons/storage/boxes.dm | 1 + .../items/weapons/storage/briefcase.dm | 2 + .../objects/items/weapons/storage/fancy.dm | 1 + .../objects/items/weapons/storage/firstaid.dm | 10 +- .../objects/items/weapons/storage/storage.dm | 39 ++- .../items/weapons/storage/uplink_kits.dm | 11 +- .../objects/items/weapons/storage/wallets.dm | 1 + .../objects/items/weapons/table_rack_parts.dm | 1 + .../objects/items/weapons/tanks/watertank.dm | 3 +- code/game/objects/objs.dm | 34 ++- code/game/objects/structures/artstuff.dm | 3 + code/game/objects/structures/bedsheet_bin.dm | 13 + .../crates_lockers/closets/cardboardbox.dm | 2 + .../crates_lockers/closets/coffin.dm | 2 + .../crates_lockers/closets/gimmick.dm | 2 + .../crates_lockers/closets/secure/bar.dm | 2 + .../crates_lockers/closets/secure/personal.dm | 2 + .../crates_lockers/closets/secure/security.dm | 2 + code/game/objects/structures/flora.dm | 5 + code/game/objects/structures/mineral_doors.dm | 2 + code/game/objects/structures/signs.dm | 1 + .../structures/stool_bed_chair_nest/bed.dm | 3 + .../structures/stool_bed_chair_nest/chairs.dm | 5 + code/game/objects/structures/tables_racks.dm | 2 + code/game/objects/structures/watercloset.dm | 6 +- code/game/objects/structures/window.dm | 8 - code/game/sound.dm | 17 +- code/game/turfs/simulated/floor.dm | 11 - code/game/turfs/simulated/walls.dm | 6 - code/game/turfs/turf.dm | 6 +- code/modules/admin/admin_verbs.dm | 7 +- code/modules/admin/verbs/serialization.dm | 26 ++ code/modules/clothing/clothing.dm | 22 ++ code/modules/clothing/gloves/color.dm | 6 + code/modules/clothing/gloves/miscellaneous.dm | 3 + code/modules/clothing/head/collectable.dm | 3 + code/modules/clothing/head/hardhat.dm | 1 + code/modules/clothing/head/helmet.dm | 1 + code/modules/clothing/head/misc.dm | 1 + code/modules/clothing/head/misc_special.dm | 1 + code/modules/clothing/masks/breath.dm | 1 + code/modules/clothing/masks/gasmask.dm | 8 + code/modules/clothing/masks/voice.dm | 1 + code/modules/clothing/shoes/magboots.dm | 1 + code/modules/clothing/shoes/miscellaneous.dm | 4 + code/modules/clothing/suits/armor.dm | 4 +- code/modules/clothing/suits/bio.dm | 2 + code/modules/clothing/suits/jobs.dm | 1 + code/modules/clothing/suits/miscellaneous.dm | 5 + code/modules/clothing/suits/storage.dm | 9 + code/modules/clothing/suits/utility.dm | 7 +- code/modules/clothing/suits/wiz_robe.dm | 7 +- .../clothing/under/accessories/accessory.dm | 1 + code/modules/clothing/under/chameleon.dm | 1 + code/modules/clothing/under/color.dm | 1 + .../clothing/under/jobs/engineering.dm | 3 + code/modules/clothing/under/jobs/security.dm | 10 +- code/modules/clothing/under/miscellaneous.dm | 4 + code/modules/events/grid_check.dm | 4 +- code/modules/food_and_drinks/drinks/drinks.dm | 1 + .../drinks/drinks/drinkingglass.dm | 11 + code/modules/food_and_drinks/food.dm | 1 + .../kitchen_machinery/cooker.dm | 6 +- code/modules/hydroponics/grown.dm | 1 + code/modules/hydroponics/grown_inedible.dm | 8 +- code/modules/hydroponics/seed_packets.dm | 2 +- code/modules/library/lib_items.dm | 3 + code/modules/mining/money_bag.dm | 2 + code/modules/mob/living/carbon/_defines.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 7 +- code/modules/mob/living/carbon/human/human.dm | 118 ++++++++- .../living/carbon/human/human_attackhand.dm | 7 +- code/modules/mob/living/carbon/human/life.dm | 15 +- code/modules/mob/living/living_defense.dm | 20 +- code/modules/mob/living/silicon/ai/ai.dm | 8 +- code/modules/mob/living/silicon/pai/pai.dm | 3 + .../mob/living/simple_animal/simple_animal.dm | 37 +-- code/modules/nano/interaction/base.dm | 4 +- code/modules/paperwork/clipboard.dm | 1 + code/modules/paperwork/folders.dm | 3 +- code/modules/paperwork/paper.dm | 54 ++--- code/modules/paperwork/paperbin.dm | 34 +-- code/modules/paperwork/photography.dm | 6 +- code/modules/persistence/persistence.dm | 38 +++ code/modules/power/apc.dm | 14 +- code/modules/power/cable.dm | 9 +- code/modules/power/lighting.dm | 6 +- code/modules/power/singularity/singularity.dm | 1 + code/modules/projectiles/projectile.dm | 1 + .../modules/projectiles/projectile/bullets.dm | 4 +- .../modules/reagents/newchem/Blob-Reagents.dm | 2 +- code/modules/reagents/newchem/pyro.dm | 36 ++- .../oldchem/reagents/reagents_water.dm | 16 +- code/modules/recycling/disposal.dm | 5 +- code/modules/recycling/sortingmachinery.dm | 1 + .../research/xenobiology/xenobiology.dm | 1 + code/modules/surgery/organs/organ.dm | 29 +++ code/modules/surgery/organs/organ_external.dm | 33 ++- goon/browserassets/css/browserOutput.css | 38 +-- html/changelog.html | 68 ++++++ html/changelogs/.all_changelog.yml | 55 +++++ html/changelogs/AutoChangeLog-pr-5244.yml | 4 - html/changelogs/AutoChangeLog-pr-5250.yml | 4 - html/changelogs/AutoChangeLog-pr-5254.yml | 5 - html/changelogs/AutoChangeLog-pr-5255.yml | 4 - html/changelogs/AutoChangeLog-pr-5257.yml | 4 - html/changelogs/AutoChangeLog-pr-5263.yml | 4 - icons/mob/custom-synthetic.dmi | Bin 101539 -> 115023 bytes icons/mob/custom-synthetic64.dmi | Bin 0 -> 1841 bytes icons/mob/species/vox/uniform.dmi | Bin 277834 -> 279095 bytes icons/mob/uniform.dmi | Bin 339135 -> 340868 bytes icons/obj/clothing/uniforms.dmi | Bin 81821 -> 82143 bytes paradise.dme | 5 + 169 files changed, 1524 insertions(+), 745 deletions(-) create mode 100644 code/controllers/Processes/fires.dm create mode 100644 code/game/objects/items/stacks/stack_recipe.dm create mode 100644 code/game/objects/items/weapons/grenades/atmosgrenade.dm create mode 100644 code/modules/admin/verbs/serialization.dm create mode 100644 code/modules/persistence/persistence.dm delete mode 100644 html/changelogs/AutoChangeLog-pr-5244.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5250.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5254.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5255.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5257.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5263.yml create mode 100644 icons/mob/custom-synthetic64.dmi diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index ed3fd57bf3a..f99f4bd23f0 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -8528,7 +8528,7 @@ "dhZ" = (/obj/structure/table,/obj/item/weapon/grenade/plastic/c4{pixel_x = 2; pixel_y = 1},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) "dia" = (/obj/machinery/light/spot{tag = "icon-tube1 (WEST)"; icon_state = "tube1"; dir = 8},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) "dib" = (/obj/machinery/atmospherics/unary/vent_pump/high_volume{dir = 2; frequency = 1331; id_tag = "synd_pump"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) -"dic" = (/obj/machinery/atmospherics/unary/tank/air{dir = 1},/turf/simulated/shuttle/wall{dir = 4; icon_state = "wall3"},/area/shuttle/syndicate) +"dic" = (/obj/machinery/atmospherics/unary/tank/air{dir = 2},/turf/simulated/shuttle/wall{dir = 4; icon_state = "wall3"},/area/shuttle/syndicate) "did" = (/obj/machinery/door/window{dir = 4; name = "Equipment Room"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) "die" = (/obj/machinery/access_button{command = "cycle_interior"; frequency = 1331; master_tag = "synd_airlock"; name = "interior access button"; pixel_x = 25; pixel_y = 25; req_access_txt = "0"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) "dif" = (/obj/machinery/atmospherics/pipe/manifold4w/hidden,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate) diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm index d837af98739..8b871847b23 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm @@ -10,6 +10,7 @@ var/obj/machinery/atmospherics/unary/heat_exchanger/partner = null var/update_cycle + burn_state = LAVA_PROOF /obj/machinery/atmospherics/unary/heat_exchanger/update_icon() if(node) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index cda5c95d85e..9c6f32283ce 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -258,3 +258,9 @@ // Used by radios to indicate that they have sent a message via something other than subspace #define RADIO_CONNECTION_FAIL 0 #define RADIO_CONNECTION_NON_SUBSPACE 1 + +//Fire stuff, for burn_state +#define LAVA_PROOF -2 +#define FIRE_PROOF -1 +#define FLAMMABLE 0 +#define ON_FIRE 1 \ No newline at end of file diff --git a/code/controllers/Processes/fires.dm b/code/controllers/Processes/fires.dm new file mode 100644 index 00000000000..4566143a906 --- /dev/null +++ b/code/controllers/Processes/fires.dm @@ -0,0 +1,23 @@ +var/global/datum/controller/process/fire/fire_master + +/datum/controller/process/fire + var/list/burning = list() + +/datum/controller/process/fire/setup() + name = "fire" + schedule_interval = 20 //every 2 seconds + fire_master = src + log_startup_progress("Fire process starting up.") + +/datum/controller/process/fire/statProcess() + ..() + stat(null, "[burning.len] burning objects") + +/datum/controller/process/fire/doWork() + for(var/obj/burningobj in burning) + if(burningobj.burn_state == ON_FIRE) + if(burningobj.burn_world_time < world.time) + burningobj.burn() + SCHECK + else + burning.Remove(burningobj) \ No newline at end of file diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index eba2aa895f4..b75cba1f858 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -98,6 +98,7 @@ var/canmove = 1 density = 0 anchored = 1 + burn_state = LAVA_PROOF /obj/effect/dummy/spell_jaunt/Destroy() // Eject contents if deleted somehow diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 022d2dc128b..16c0d8b01ae 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -470,6 +470,13 @@ var/list/uplink_items = list() gamemodes = list(/datum/game_mode/nuclear) surplus = 0 +/datum/uplink_item/dangerous/atmosgrenades + name = "Atmos Grenades" + desc = "A box of two (2) grenades that wreak havoc with the atmosphere of the target area. Capable of engulfing a large area in lit plasma, or N2O. Deploy with extreme caution!" + reference = "AGG" + item = /obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades + cost = 6 + /datum/uplink_item/dangerous/emp name = "EMP Grenades and Implanter Kit" desc = "A box that contains two EMP grenades and an EMP implant. Useful to disrupt communication, \ diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 76254b13c44..a8a33784263 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -419,3 +419,26 @@ var/global/list/bad_blocks[0] unique_enzymes = md5(character.real_name) reg_dna[unique_enzymes] = character.real_name + +// Hmm, I wonder how to go about this without a huge convention break +/datum/dna/proc/serialize() + var/data = list() + data["UE"] = unique_enzymes + data["SE"] = SE.Copy() // This is probably too lazy for my own good + data["UI"] = UI.Copy() + data["species"] = species // This works because `species` is a string, not a datum + // Because old DNA coders were insane or something + data["b_type"] = b_type + data["real_name"] = real_name + return data + +/datum/dna/proc/deserialize(data) + unique_enzymes = data["UE"] + // The de-serializer is unlikely to tamper with the lists + SE = data["SE"] + UI = data["UI"] + UpdateUI() + UpdateSE() + species = data["species"] + b_type = data["b_type"] + real_name = data["real_name"] \ No newline at end of file diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 01259f24237..d1fd034e312 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -53,7 +53,7 @@ apc.overload_lighting() else - for(var/obj/machinery/power/apc/apc in machines) + for(var/obj/machinery/power/apc/apc in apcs) apc.overload_lighting() return diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 74ace72bd28..0bbca32f3b5 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -78,7 +78,7 @@ rcd light flash thingy on matter drain /datum/AI_Module/large/destroy_rcd module_name = "Destroy RCDs" mod_pick_name = "rcd" - description = "Send a specialised pulse to detonate all hand-held and exosuit Rapid Cconstruction Devices on the station." + description = "Send a specialised pulse to detonate all hand-held and exosuit Rapid Construction Devices on the station." cost = 25 one_time = 1 @@ -108,7 +108,7 @@ rcd light flash thingy on matter drain /datum/AI_Module/large/mecha_domination module_name = "Viral Mech Domination" mod_pick_name = "mechjack" - description = "Hack into a mech's onboard computer, shunting all processes into it and ejecting any occupants. Once uploaded to the mech, it is impossible to leave.\ + description = "Hack into a mech's onboard computer, shunting all processes into it and ejecting any occupants. Once uploaded to the mech, it is impossible to leave. \ Do not allow the mech to leave the station's vicinity or allow it to be destroyed." cost = 30 one_time = 1 @@ -288,7 +288,7 @@ rcd light flash thingy on matter drain for(var/datum/AI_Module/small/blackout/blackout in current_modules) if(blackout.uses > 0) blackout.uses -- - for(var/obj/machinery/power/apc/apc in world) + for(var/obj/machinery/power/apc/apc in apcs) if(prob(30*apc.overload)) apc.overload_lighting() else diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index 5977f362bdc..73165079b6e 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -159,6 +159,7 @@ density = 0 anchored = 1 invisibility = 60 + burn_state = LAVA_PROOF /obj/effect/dummy/slaughter/relaymove(mob/user, direction) forceMove(get_step(src,direction)) diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index f74b8b1484d..71cfb065237 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -78,7 +78,7 @@ // Check station's power levels - for(var/obj/machinery/power/apc/A in machines) + for(var/obj/machinery/power/apc/A in apcs) if(!is_station_level(A.z)) continue for(var/obj/item/weapon/stock_parts/cell/C in A.contents) diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 2d8018a3f8e..2e1bf79de49 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -10,7 +10,7 @@ config_tag = "vampire" restricted_jobs = list("AI", "Cyborg") protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Chaplain", "Brig Physician", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer") - protected_species = list("Machine") + protected_species = list("Machine", "Plasmaman") required_players = 15 required_enemies = 1 recommended_enemies = 4 @@ -273,7 +273,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha owner.attack_log += text("\[[time_stamp()]\] Bit [H] ([H.ckey]) in the neck and draining their blood") H.attack_log += text("\[[time_stamp()]\] Has been bit in the neck by [owner] ([owner.ckey])") log_attack("[owner] ([owner.ckey]) bit [H] ([H.ckey]) in the neck") - owner.visible_message("[owner] bites [H]'s neck!", "You bite [H]'s neck and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.") + owner.visible_message("[owner] grabs [H]'s harshly and sinks in thier fangs!", "You sink your fangs into [H] and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.") if(!iscarbon(owner)) H.LAssailant = null else diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index b7c1d7920e1..8b9cb6eb0e9 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -766,8 +766,8 @@ var/global/list/multiverse = list() var/obj/item/link = null var/cooldown_time = 30 //3s var/cooldown = 0 - - + burntime = 0 + burn_state = FLAMMABLE /obj/item/voodoo/attackby(obj/item/I as obj, mob/user as mob, params) if(target && cooldown < world.time) diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index fdf754df57f..b858225caf5 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -244,7 +244,7 @@ if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back) if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) - H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform) + H.equip_or_collect(new /obj/item/clothing/under/rank/security/pod_pilot(H), slot_w_uniform) H.equip_or_collect(new /obj/item/clothing/suit/jacket/pilot(H), slot_wear_suit) H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes) H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda) diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 7768cf11870..22c114a0f2c 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -39,7 +39,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) L.imp_in = H L.implanted = 1 H.sec_hud_set_implants() - captain_announcement.Announce("All hands, captain [H.real_name] on deck!") + captain_announcement.Announce("All hands, Captain [H.real_name] on deck!") callHook("captain_spawned", list("captain" = H)) return 1 @@ -143,7 +143,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) department_flag = KARMA total_positions = 1 spawn_positions = 1 - supervisors = "the nanotrasen representative" + supervisors = "the Nanotrasen representative" selection_color = "#ddddff" idtype = /obj/item/weapon/card/id/nanotrasen req_admin_notify = 1 diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index db4cb0271c0..bf4300351fa 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -182,6 +182,7 @@ item_state = "eshield0" w_class = 3 origin_tech = "syndicate=6;combat=5" + burn_state = FLAMMABLE //Burnable (but the casing isn't) var/adminlog = null /obj/item/weapon/bombcore/ex_act(severity) //Little boom can chain a big boom diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 11b8b5c3d42..feb034b4b0f 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -894,7 +894,7 @@ /obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 6,/obj/item/weapon/reagent_containers/syringe/insulin = 4, /obj/item/weapon/reagent_containers/syringe = 12,/obj/item/device/healthanalyzer = 5,/obj/item/device/healthupgrade = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4, /obj/item/weapon/reagent_containers/dropper = 2,/obj/item/stack/medical/bruise_pack/advanced = 3, /obj/item/stack/medical/ointment/advanced = 3, - /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2) + /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 4, /obj/item/device/sensor_device = 2) contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/pancuronium = 1,/obj/item/weapon/reagent_containers/glass/bottle/sulfonal = 1) diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index 386afc0710c..b34897764e2 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -8,6 +8,7 @@ deflect_chance = 25 damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7) max_temperature = 60000 + burn_state = LAVA_PROOF infra_luminosity = 3 var/zoom = 0 var/thrusters = 0 diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index c4916306ac2..2a4f6adf189 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -68,6 +68,7 @@ initial_icon = "firefighter" max_temperature = 65000 health = 250 + burn_state = LAVA_PROOF lights_power = 7 damage_absorption = list("brute"=0.6,"fire"=0.5,"bullet"=0.7,"laser"=0.7,"energy"=1,"bomb"=0.4) max_equip = 5 // More armor, less tools diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index ada2399f20d..cead6e33ffd 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -49,6 +49,13 @@ M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src) return 1 +/obj/buckle_mob(mob/living/M) + . = ..() + if(.) + if(burn_state == ON_FIRE) //Sets the mob on fire if you buckle them to a burning atom/movableect + M.adjust_fire_stacks(1) + M.IgniteMob() + /atom/movable/proc/unbuckle_mob() if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr)) . = buckled_mob diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index 2aa7a997834..3c0a712a311 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -84,6 +84,10 @@ layer = 3 icon = 'icons/effects/effects.dmi' icon_state = "cobweb1" + burntime = 1 + +/obj/effect/decal/cleanable/cobweb/fire_act() + qdel(src) /obj/effect/decal/cleanable/molten_item name = "gooey grey mass" diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 878adf6688b..0d6bf3255a5 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -38,6 +38,7 @@ ..() /obj/effect/decal/cleanable/fire_act() - reagents.chem_temp += 30 - reagents.handle_reactions() + if(reagents) + reagents.chem_temp += 30 + reagents.handle_reactions() ..() \ No newline at end of file diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 6658838a5d3..9c3dd867c74 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -18,6 +18,7 @@ var/serial_number = 0 var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor var/subtype = 0 + burn_state = FLAMMABLE /obj/item/weapon/contraband/poster/New(turf/loc, given_serial = 0) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 111f7c4dc33..82412c8e883 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -192,6 +192,22 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d to_chat(user, "You try to move your [temp.name], but cannot!") return 0 + if(burn_state == ON_FIRE) + var/mob/living/carbon/human/H = user + if(istype(H)) + if(H.gloves && (H.gloves.max_heat_protection_temperature > 360)) + extinguish() + to_chat(user, "You put out the fire on [src].") + else + to_chat(user, "You burn your hand on [src]!") + var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm") + if(affecting && affecting.take_damage(0, 5)) // 5 burn damage + H.UpdateDamageIcon() + H.updatehealth() + return + else + extinguish() + if(istype(src.loc, /obj/item/weapon/storage)) //If the item is in a storage item, take it out var/obj/item/weapon/storage/S = src.loc diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 9a46a843a56..f0c3ee84e98 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -1,81 +1,90 @@ /obj/item/candle name = "red candle" - desc = "a candle" + desc = "In Greek myth, Prometheus stole fire from the Gods and gave it to humankind. The jewelry he kept for himself." icon = 'icons/obj/candle.dmi' icon_state = "candle1" item_state = "candle1" w_class = 1 - - light_color = "#E09D37" - var/wax = 200 var/lit = 0 - proc - light(var/flavor_text = "\red [usr] lights the [name].") + var/infinite = 0 + var/start_lit = 0 + light_color = "#E09D37" + +/obj/item/candle/New() + ..() + if(start_lit) + // No visible message + light(show_message = 0) + +/obj/item/candle/update_icon() + var/i + if(wax>150) + i = 1 + else if(wax>80) + i = 2 + else i = 3 + icon_state = "candle[i][lit ? "_lit" : ""]" - update_icon() - var/i - if(wax>150) - i = 1 - else if(wax>80) - i = 2 - else i = 3 - icon_state = "candle[i][lit ? "_lit" : ""]" +/obj/item/candle/attackby(obj/item/weapon/W, mob/user, params) + ..() + if(istype(W, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = W + if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool + light("[user] casually lights [src] with [WT], what a badass.") + else if(istype(W, /obj/item/weapon/lighter)) + var/obj/item/weapon/lighter/L = W + if(L.lit) + light("After some fiddling, [user] manages to light [src] with [L].") + else if(istype(W, /obj/item/weapon/match)) + var/obj/item/weapon/match/M = W + if(M.lit) + light("[user] lights [src] with [M]") + else if(istype(W, /obj/item/candle)) + var/obj/item/candle/C = W + if(C.lit) + light("[user] tilts [C] and lights [src] with it.") - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - ..() - if(istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool - light("\red [user] casually lights the [name] with [W], what a badass.") - else if(istype(W, /obj/item/weapon/lighter)) - var/obj/item/weapon/lighter/L = W - if(L.lit) - light() - else if(istype(W, /obj/item/weapon/match)) - var/obj/item/weapon/match/M = W - if(M.lit) - light() - else if(istype(W, /obj/item/candle)) - var/obj/item/candle/C = W - if(C.lit) - light() +/obj/item/candle/fire_act() + if(!lit) + light() //honk - - light(var/flavor_text = "\red [usr] lights the [name].") - if(!src.lit) - src.lit = 1 - //src.damtype = "fire" - for(var/mob/O in viewers(usr, null)) - O.show_message(flavor_text, 1) - set_light(CANDLE_LUM) - processing_objects.Add(src) - - - process() - if(!lit) - return - wax-- - if(!wax) - new/obj/item/trash/candle(src.loc) - if(istype(src.loc, /mob)) - var/mob/M = src.loc - M.unEquip(src, 1) //src is being deleted anyway - qdel(src) +/obj/item/candle/proc/light(show_message) + if(!lit) + lit = 1 + if(show_message) + usr.visible_message(show_message) + set_light(CANDLE_LUM) + processing_objects.Add(src) update_icon() - if(istype(loc, /turf)) //start a fire if possible - var/turf/T = loc - T.hotspot_expose(700, 5) - attack_self(mob/user as mob) - if(lit) - lit = 0 - update_icon() - set_light(0) +/obj/item/candle/process() + if(!lit) + return + if(!infinite) + wax-- + if(!wax) + new/obj/item/trash/candle(src.loc) + if(istype(src.loc, /mob)) + var/mob/M = src.loc + M.unEquip(src, 1) //src is being deleted anyway + qdel(src) + update_icon() + if(isturf(loc)) //start a fire if possible + var/turf/T = loc + T.hotspot_expose(700, 5) + + +/obj/item/candle/attack_self(mob/user) + if(lit) + user.visible_message("[user] snuffs out [src].") + lit = 0 + update_icon() + set_light(0) /obj/item/candle/eternal desc = "A candle. This one seems to have an odd quality about the wax." - wax = 10000 \ No newline at end of file + infinite = 1 \ No newline at end of file diff --git a/code/game/objects/items/devices/guitar.dm b/code/game/objects/items/devices/guitar.dm index dc9067c34e4..b95cea0aae3 100644 --- a/code/game/objects/items/devices/guitar.dm +++ b/code/game/objects/items/devices/guitar.dm @@ -7,6 +7,8 @@ icon_state = "guitar" item_state = "guitar" force = 10 + burn_state = FLAMMABLE + burntime = 20 var/datum/song/handheld/song hitsound = 'sound/effects/guitarsmash.ogg' diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 9ea2f17378a..97a999fb161 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -42,6 +42,10 @@ update_icon() +/obj/item/device/taperecorder/fire_act() + mytape.ruin() //Fires destroy the tape + return ..() + /obj/item/device/taperecorder/attack_hand(mob/user) if(loc == user) if(mytape) @@ -253,6 +257,8 @@ var/list/timestamp = list() var/ruined = 0 +/obj/item/device/tape/fire_act() + ruin() /obj/item/device/tape/attack_self(mob/user) if(!ruined) diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm index 9c4d5e9ddb4..c0cc320fdc3 100644 --- a/code/game/objects/items/devices/violin.dm +++ b/code/game/objects/items/devices/violin.dm @@ -7,6 +7,8 @@ icon_state = "violin" item_state = "violin" force = 10 + burn_state = FLAMMABLE + burntime = 20 hitsound = 'sound/weapons/smash.ogg' var/datum/song/handheld/song @@ -18,7 +20,7 @@ qdel(song) song = null return ..() - + /obj/item/device/violin/initialize() song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded ..() diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 879a6846639..ea018289e0f 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -1,77 +1,14 @@ /obj/item/flag icon = 'icons/obj/flag.dmi' w_class = 4 - var/lit = 0 - var/burntime = 30 + burntime = 20 + burn_state = FLAMMABLE -/obj/item/flag/fire_act(null, temperature, volume) - if(!lit) - Ignite() - return - -/obj/item/flag/proc/Ignite() - if(lit) return - lit = 1 - update_icons() - processing_objects.Add(src) - -/obj/item/flag/process() - burntime-- - if(burntime < 1) - processing_objects.Remove(src) - if(istype(src.loc,/turf)) - new /obj/effect/decal/cleanable/ash(src.loc) - new /obj/item/stack/rods(src.loc) - qdel(src) - return - if(istype(src.loc,/mob/living/carbon)) - var/mob/living/carbon/C = src.loc - var/turf/location = get_turf(C) - new /obj/effect/decal/cleanable/ash(location) - new /obj/item/stack/rods(location) - qdel(src) - return - else - qdel(src) - return - -/obj/item/flag/attackby(obj/item/weapon/W as obj, mob/user as mob, params) +/obj/item/flag/attackby(obj/item/weapon/W, mob/user, params) ..() - if(istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool - light("[user] casually lights the [name] with [W], what a badass.") - - else if(istype(W, /obj/item/weapon/lighter/zippo)) - var/obj/item/weapon/lighter/zippo/Z = W - if(Z.lit) - light("With a single flick of their wrist, [user] smoothly lights the [name] with their [W]. Damn they're cool.") - - else if(istype(W, /obj/item/weapon/lighter)) - var/obj/item/weapon/lighter/L = W - if(L.lit) - light("After some fiddling, [user] manages to light the [name] with [W].") - - else if(istype(W, /obj/item/weapon/match)) - var/obj/item/weapon/match/M = W - if(M.lit) - light("[user] lights the [name] with their [W].") - - else if(istype(W, /obj/item/weapon/melee/energy/sword/saber)) - var/obj/item/weapon/melee/energy/sword/saber/S = W - if(S.active) - light("[user] swings their [W], barely missing their nose. They light the [name] in the process.") - - else if(istype(W, /obj/item/device/assembly/igniter)) - light("[user] fiddles with [W], and manages to light the [name].") - -/obj/item/flag/proc/light(var/flavor_text = "[usr] lights the [name].") - if(!src.lit) - src.lit = 1 - var/turf/T = get_turf(src) - T.visible_message(flavor_text) - update_icons() - processing_objects.Add(src) + if(is_hot(W) && burn_state != ON_FIRE) + user.visible_message("[user] lights the [name] with [W].") + fire_act() /obj/item/flag/proc/update_icons() overlays = null diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index c34710d01f0..2c6d04b9c06 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -2,16 +2,18 @@ name = "medical pack" singular_name = "medical pack" icon = 'icons/obj/items.dmi' - amount = 5 - max_amount = 5 + amount = 6 + max_amount = 6 w_class = 1 throw_speed = 3 throw_range = 7 var/heal_brute = 0 var/heal_burn = 0 + var/self_delay = 20 + var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent? -/obj/item/stack/medical/attack(mob/living/carbon/M, mob/user) - if(!istype(M)) +/obj/item/stack/medical/attack(mob/living/M, mob/user) + if(!iscarbon(M) && !isanimal(M)) to_chat(user, "[src] cannot be applied to [M]!") return 1 @@ -20,13 +22,12 @@ return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) - if(isliving(M)) - if(!M.can_inject(user, 1)) - return 1 + if(!H.can_inject(user, 1)) + return 1 if(!affecting) to_chat(user, "That limb is missing!") @@ -36,16 +37,36 @@ to_chat(user, "This can't be used on a robotic limb.") return 1 + if(M == user && !unique_handling) + user.visible_message("[user] starts to apply [src] on [H]...") + if(!do_mob(user, H, self_delay)) + return 1 + return - H.UpdateDamageIcon() + if(isanimal(M)) + var/mob/living/simple_animal/critter = M + if(!(critter.healable)) + to_chat(user, "You cannot use [src] on [critter]!") + return + else if (critter.health == critter.maxHealth) + to_chat(user, "[critter] is at full health.") + return + else if(heal_brute < 1) + to_chat(user, "[src] won't help [critter] at all.") + return + + critter.heal_organ_damage(heal_brute, heal_burn) + user.visible_message("[user] applies [src] on [critter].", \ + "You apply [src] on [critter].") - else - M.heal_organ_damage(heal_brute/2, heal_burn/2) - user.visible_message("[M] has been applied with [src] by [user].", \ - "You apply [src] to [M].") use(1) - M.updatehealth() + else + M.heal_organ_damage(heal_brute, heal_burn) + M.updatehealth() + user.visible_message("[user] applies [src] on [M].", \ + "You apply [src] on [M].") + use(1) //Bruise Packs// @@ -56,11 +77,11 @@ icon_state = "gauze" origin_tech = "biotech=1" -/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M, mob/user) +/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/user) if(..()) return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -69,26 +90,17 @@ var/disinfected = affecting.disinfect() if(!(bandaged || disinfected)) - to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.") + to_chat(user, "The wounds on [H]'s [affecting.name] have already been bandaged.") return 1 else - for(var/datum/wound/W in affecting.wounds) - if(W.internal) - continue - if(W.current_stage <= W.max_bleeding_stage) - user.visible_message("[user] bandages \the [W.desc] on [M]'s [affecting.name].", \ - "You bandage \the [W.desc] on [M]'s [affecting.name]." ) - else if(istype(W,/datum/wound/bruise)) - user.visible_message("[user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].", \ - "You place a bruise patch over \the [W.desc] on [M]'s [affecting.name]." ) - else - user.visible_message("[user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].", \ - "You place a bandaid over \the [W.desc] on [M]'s [affecting.name]." ) - if(bandaged) - affecting.heal_damage(heal_brute, heal_burn) + user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ + "You bandage the wounds on [H]'s [affecting.name]." ) + + affecting.heal_damage(heal_brute, heal_burn) + H.UpdateDamageIcon() use(1) else - to_chat(user, "[affecting] is cut open, you'll need more than a bandage!") + to_chat(user, "[affecting] is cut open, you'll need more than a bandage!") /obj/item/stack/medical/bruise_pack/advanced @@ -96,7 +108,7 @@ singular_name = "advanced trauma kit" desc = "An advanced trauma kit for severe injuries." icon_state = "traumakit" - heal_brute = 12 + heal_brute = 25 @@ -111,25 +123,26 @@ icon_state = "ointment" origin_tech = "biotech=1" -/obj/item/stack/medical/ointment/attack(mob/living/carbon/M, mob/user) +/obj/item/stack/medical/ointment/attack(mob/living/M, mob/user) if(..()) return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) if(!affecting.salve()) - to_chat(user, "The wounds on [M]'s [affecting.name] have already been salved.") + to_chat(user, "The wounds on [H]'s [affecting.name] have already been salved.") return 1 else - user.visible_message("[user] salves the wounds on [M]'s [affecting.name].", \ - "You salve the wounds on [M]'s [affecting.name]." ) + user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ + "You salve the wounds on [H]'s [affecting.name]." ) affecting.heal_damage(heal_brute, heal_burn) + H.UpdateDamageIcon() use(1) else - to_chat(user, "[affecting] is cut open, you'll need more than some ointment!") + to_chat(user, "[affecting] is cut open, you'll need more than some ointment!") /obj/item/stack/medical/ointment/advanced @@ -137,7 +150,7 @@ singular_name = "advanced burn kit" desc = "An advanced treatment kit for severe burns." icon_state = "burnkit" - heal_burn = 12 + heal_burn = 25 @@ -151,7 +164,7 @@ icon = 'icons/obj/hydroponics_products.dmi' icon_state = "alien3-product" color = "#378C61" - heal_brute = 7 + heal_brute = 12 /obj/item/stack/medical/ointment/aloe @@ -161,7 +174,7 @@ icon = 'icons/obj/hydroponics_products.dmi' icon_state = "ambrosia-product" color = "#4CC5C7" - heal_burn = 7 + heal_burn = 12 @@ -172,14 +185,14 @@ name = "medical splints" singular_name = "medical splint" icon_state = "splint" - amount = 5 - max_amount = 5 + unique_handling = 1 + self_delay = 100 -/obj/item/stack/medical/splint/attack(mob/living/carbon/M, mob/user) +/obj/item/stack/medical/splint/attack(mob/living/M, mob/user) if(..()) return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) var/limb = affecting.name @@ -187,36 +200,21 @@ to_chat(user, "You can't apply a splint there!") return if(affecting.status & ORGAN_SPLINTED) - to_chat(user, "[M]'s [limb] is already splinted!") - if(alert(user, "Would you like to remove the splint from [M]'s [limb]?", "Removing.", "Yes", "No") == "Yes") + to_chat(user, "[H]'s [limb] is already splinted!") + if(alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Removing.", "Yes", "No") == "Yes") affecting.status &= ~ORGAN_SPLINTED - to_chat(user, "You remove the splint from [M]'s [limb].") + to_chat(user, "You remove the splint from [H]'s [limb].") return - if(M != user) - user.visible_message("[user] starts to apply [src] to [M]'s [limb].", \ - "You start to apply [src] to [M]'s [limb].", \ + if(M == user) + user.visible_message("[user] starts to apply [src] to [H]'s [limb].", \ + "You start to apply [src] to [H]'s [limb].", \ "You hear something being wrapped.") - else - if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand"))) - to_chat(user, "You can't apply a splint to the arm you're using!") + if(!do_mob(user, H, self_delay)) return - user.visible_message("[user] starts to apply [src] to their [limb].", \ - "You start to apply [src] to your [limb].", \ - "You hear something being wrapped.") - if(do_after(user, 50, target = M)) - if(M != user) - user.visible_message("[user] finishes applying [src] to [M]'s [limb].", \ - "You finish applying [src] to [M]'s [limb].", \ - "You hear something being wrapped.") - else - if(prob(25)) - user.visible_message("[user] successfully applies [src] to their [limb].", \ - "You successfully apply [src] to your [limb].", \ - "You hear something being wrapped.") - else - user.visible_message("[user] fumbles [src].", - "You fumble [src].", - "You hear something being wrapped.") - return - affecting.status |= ORGAN_SPLINTED - use(1) + else + user.visible_message("[user] applies [src] to their [limb].", \ + "You apply [src] to your [limb].", \ + "You hear something being wrapped.") + + affecting.status |= ORGAN_SPLINTED + use(1) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 55fda54267f..f509f74d79b 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -125,11 +125,25 @@ var/global/list/datum/stack_recipe/mime_recipes = list ( \ origin_tech = "plasmatech=2;materials=2" sheettype = "plasma" materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT) + burn_state = FLAMMABLE + burntime = 5 /obj/item/stack/sheet/mineral/plasma/New() ..() recipes = plasma_recipes +/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/weapon/W, mob/user, params) + if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite + message_admins("Plasma sheets ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1) + log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])") + fire_act() + else + return ..() + +/obj/item/stack/sheet/mineral/plasma/fire_act() + atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10) + qdel(src) + /obj/item/stack/sheet/mineral/plastic name = "Plastic" icon_state = "sheet-plastic" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 98fa7a955ab..0b99edde497 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -10,80 +10,82 @@ /* * Metal */ -var/global/list/datum/stack_recipe/metal_recipes = list ( \ - new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("sofa (middle)", /obj/structure/stool/bed/chair/sofa, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("sofa (left)", /obj/structure/stool/bed/chair/sofa/left, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("sofa (right)", /obj/structure/stool/bed/chair/sofa/right, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("sofa (corner)", /obj/structure/stool/bed/chair/sofa/corner, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe_list("office chairs",list( \ - new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \ - ), 5), \ - new/datum/stack_recipe_list("comfy chairs", list( \ - new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \ - ), 2), \ - null, \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ - new/datum/stack_recipe("glass table frame parts", /obj/item/weapon/table_parts/glass, 2), \ - new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \ - new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \ - new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \ - null, \ - new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe_list("airlock assemblies", list( \ - new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \ -/* new/datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \ */ - new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - ), 4), \ - null, \ - new/datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1), \ - new/datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1), \ - null, \ - new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ - new/datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2), \ - new/datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1), \ - null, \ - new/datum/stack_recipe("apc frame", /obj/item/mounted/frame/apc_frame, 2), \ - new/datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2), \ - new/datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2), \ - new/datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2), \ - null, \ +var/global/list/datum/stack_recipe/metal_recipes = list( + new /datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("sofa (middle)", /obj/structure/stool/bed/chair/sofa, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("sofa (left)", /obj/structure/stool/bed/chair/sofa/left, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("sofa (right)", /obj/structure/stool/bed/chair/sofa/right, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("sofa (corner)", /obj/structure/stool/bed/chair/sofa/corner, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), + null, + new /datum/stack_recipe_list("office chairs",list( + new /datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), + ), 5), + + new /datum/stack_recipe_list("comfy chairs", list( + new /datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), + ), 2), + + null, + new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), + new /datum/stack_recipe("glass table frame parts", /obj/item/weapon/table_parts/glass, 2), + new /datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), + new /datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), + null, + new /datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), + null, + new /datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), + new /datum/stack_recipe/rods("metal rod", /obj/item/stack/rods, 1, 2, 60), + null, + new /datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), + null, + new /datum/stack_recipe_list("airlock assemblies", list( + new /datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), +/* new /datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), */ + new /datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), + ), 4), + null, + new /datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1), + new /datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1), + null, + new /datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), + new /datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2), + new /datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1), + null, + new /datum/stack_recipe("apc frame", /obj/item/mounted/frame/apc_frame, 2), + new /datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2), + new /datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2), + new /datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2), + null ) /obj/item/stack/sheet/metal @@ -106,13 +108,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ /* * Plasteel */ -var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ - new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ - new/datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \ - new/datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1), \ - - ) +var/global/list/datum/stack_recipe/plasteel_recipes = list( + new /datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), + new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), + new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1) +) /obj/item/stack/sheet/plasteel name = "plasteel" @@ -132,21 +133,21 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ /* * Wood */ -var/global/list/datum/stack_recipe/wood_recipes = list ( \ - new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ - new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \ - new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \ - new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40), \ - new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\ - new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\ - ) +var/global/list/datum/stack_recipe/wood_recipes = list( + new /datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), + new /datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), + new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), + new /datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), + new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40), + new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50), + new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10) +) /obj/item/stack/sheet/wood name = "wooden planks" @@ -155,6 +156,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ singular_name = "wood plank" icon_state = "sheet-wood" origin_tech = "materials=1;biotech=1" + burn_state = FLAMMABLE /obj/item/stack/sheet/wood/New(var/loc, var/amount=null) recipes = wood_recipes @@ -169,22 +171,23 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ singular_name = "cloth roll" icon_state = "sheet-cloth" origin_tech = "materials=2" + burn_state = FLAMMABLE /* * Cardboard */ -var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ - new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \ - new/datum/stack_recipe("large box", /obj/item/weapon/storage/box/large, 4), \ - new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \ - new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \ - new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \ - new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ - new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ - new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ - new/datum/stack_recipe("folder", /obj/item/weapon/folder), \ - new/datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube), \ - new/datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4), \ +var/global/list/datum/stack_recipe/cardboard_recipes = list ( + new /datum/stack_recipe("box", /obj/item/weapon/storage/box), + new /datum/stack_recipe("large box", /obj/item/weapon/storage/box/large, 4), + new /datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), + new /datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), + new /datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), + new /datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), + new /datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), + new /datum/stack_recipe("pizza box", /obj/item/pizzabox), + new /datum/stack_recipe("folder", /obj/item/weapon/folder), + new /datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube), + new /datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4), ) /obj/item/stack/sheet/cardboard //BubbleWrap @@ -193,7 +196,8 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ singular_name = "cardboard sheet" icon_state = "sheet-card" origin_tech = "materials=1" + burn_state = FLAMMABLE -/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) - recipes = cardboard_recipes - return ..() +/obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null) + recipes = cardboard_recipes + return ..() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 5b78e8587d9..917d030cd63 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -10,156 +10,171 @@ */ /obj/item/stack origin_tech = "materials=1" - var/list/datum/stack_recipe/recipes + var/list/recipes = list() // /datum/stack_recipe var/singular_name var/amount = 1 var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount -/obj/item/stack/New(var/loc, var/amount=null) +/obj/item/stack/New(var/loc, var/amt = null) ..() - if(amount!=null) //Allow for stacks with the amount=0 - src.amount=amount - return + if(amt != null) //Allow for stacks with the amount=0 + amount = amt /obj/item/stack/Destroy() - if(usr && usr.machine==src) + if(usr && usr.machine == src) usr << browse(null, "window=stack") return ..() /obj/item/stack/examine(mob/user) if(..(user, 1)) - to_chat(user, "There are [src.amount] [src.singular_name]\s in the stack.") + to_chat(user, "There are [amount] [singular_name]\s in the stack.") - -/obj/item/stack/attack_self(mob/user as mob) +/obj/item/stack/attack_self(mob/user) list_recipes(user) -/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist) +/obj/item/stack/proc/list_recipes(mob/user, recipes_sublist) if(!recipes) return - if(!src || amount<=0) + + if(amount <= 0) user << browse(null, "window=stack") + return + user.set_machine(src) //for correct work of onclose + var/list/recipe_list = recipes if(recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list)) var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist] recipe_list = srl.recipes + var/t1 = "Amount Left: [amount]
" - for(var/i=1;i<=recipe_list.len,i++) + for(var/i in 1 to recipe_list.len) var/E = recipe_list[i] if(isnull(E)) t1 += "
" continue - if(i>1 && !isnull(recipe_list[i-1])) - t1+="
" + if(i > 1 && !isnull(recipe_list[i - 1])) + t1 += "
" if(istype(E, /datum/stack_recipe_list)) var/datum/stack_recipe_list/srl = E - if(src.amount >= srl.req_amount) - t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)" + if(amount >= srl.req_amount) + t1 += "[srl.title] ([srl.req_amount] [singular_name]\s)" else - t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)
" + t1 += "[srl.title] ([srl.req_amount] [singular_name]\s)
" if(istype(E, /datum/stack_recipe)) var/datum/stack_recipe/R = E var/max_multiplier = round(src.amount / R.req_amount) - var/title as text + var/title var/can_build = 1 - can_build = can_build && (max_multiplier>0) + can_build = can_build && (max_multiplier > 0) /* if(R.one_per_turf) can_build = can_build && !(locate(R.result_type) in usr.loc) if(R.on_floor) can_build = can_build && istype(usr.loc, /turf/simulated/floor) */ - if(R.res_amount>1) - title+= "[R.res_amount]x [R.title]\s" + if(R.res_amount > 1) + title += "[R.res_amount]x [R.title]\s" else - title+= "[R.title]" - title+= " ([R.req_amount] [src.singular_name]\s)" + title += "[R.title]" + title += " ([R.req_amount] [src.singular_name]\s)" if(can_build) - t1 += text("[title] ") + t1 += "[title] " else - t1 += text("[]", title) + t1 += "[title]" continue if(R.max_res_amount>1 && max_multiplier>1) - max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount)) + max_multiplier = min(max_multiplier, round(R.max_res_amount / R.res_amount)) t1 += " |" var/list/multipliers = list(5,10,25) for(var/n in multipliers) if(max_multiplier>=n) - t1 += " [n*R.res_amount]x" + t1 += " [n * R.res_amount]x" if(!(max_multiplier in multipliers)) - t1 += " [max_multiplier*R.res_amount]x" + t1 += " [max_multiplier * R.res_amount]x" var/datum/browser/popup = new(user, "stack", name, 400, 400) popup.set_content(t1) popup.open(0) onclose(user, "stack") - return /obj/item/stack/Topic(href, href_list) ..() - if((usr.restrained() || usr.stat || usr.get_active_hand() != src)) - return + if(usr.incapacitated() || usr.get_active_hand() != src) + return 0 if(href_list["sublist"] && !href_list["make"]) list_recipes(usr, text2num(href_list["sublist"])) if(href_list["make"]) - if(src.amount < 1) del(src) //Never should happen + if(amount < 1) + del(src) //Never should happen var/list/recipes_list = recipes if(href_list["sublist"]) var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])] recipes_list = srl.recipes + var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) - if(!multiplier) multiplier = 1 - if(src.amount < R.req_amount*multiplier) - if(R.req_amount*multiplier>1) - to_chat(usr, "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!") + if(!multiplier) + multiplier = 1 + + if(amount < R.req_amount * multiplier) + if(R.req_amount * multiplier>1) + to_chat(usr, "You haven't got enough [src] to build \the [R.req_amount * multiplier] [R.title]\s!") else - to_chat(usr, "\red You haven't got enough [src] to build \the [R.title]!") - return + to_chat(usr, "You haven't got enough [src] to build \the [R.title]!") + return 0 + if(R.one_per_turf && (locate(R.result_type) in usr.loc)) - to_chat(usr, "\red There is another [R.title] here!") - return + to_chat(usr, "There is another [R.title] here!") + return 0 + if(R.on_floor && !istype(usr.loc, /turf/simulated)) - to_chat(usr, "\red \The [R.title] must be constructed on the floor!") - return + to_chat(usr, "\The [R.title] must be constructed on the floor!") + return 0 + if(R.time) - to_chat(usr, "\blue Building [R.title] ...") + to_chat(usr, "Building [R.title] ...") if(!do_after(usr, R.time, target = usr)) - return - if(src.amount < R.req_amount*multiplier) + return 0 + + if(amount < R.req_amount * multiplier) return - var/atom/O = new R.result_type( usr.loc ) + + var/atom/O = new R.result_type(usr.loc) O.dir = usr.dir - if(R.max_res_amount>1) + if(R.max_res_amount > 1) var/obj/item/stack/new_item = O - new_item.amount = R.res_amount*multiplier + new_item.amount = R.res_amount * multiplier //new_item.add_to_stacks(usr) - src.amount-=R.req_amount*multiplier - if(src.amount < 1) // Just in case a stack's amount ends up fractional somehow + + R.post_build(src, O) + + amount -= R.req_amount * multiplier + if(amount < 1) // Just in case a stack's amount ends up fractional somehow var/oldsrc = src src = null //dont kill proc after del() usr.unEquip(oldsrc, 1) del(oldsrc) // Not qdel, because qdel'd stacks act strange for cyborgs - if(istype(O,/obj/item)) + if(istype(O, /obj/item)) usr.put_in_hands(O) + O.add_fingerprint(usr) //BubbleWrap - so newly formed boxes are empty - if( istype(O, /obj/item/weapon/storage) ) + if(istype(O, /obj/item/weapon/storage)) for(var/obj/item/I in O) del(I) //BubbleWrap END - if(src && usr.machine==src) //do not reopen closed window - spawn( 0 ) - src.interact(usr) + + if(src && usr.machine == src) //do not reopen closed window + spawn(0) + interact(usr) return - return /obj/item/stack/proc/use(var/used) if(amount < used) @@ -173,15 +188,15 @@ update_icon() return 1 -/obj/item/stack/proc/add_to_stacks(mob/usr as mob) +/obj/item/stack/proc/add_to_stacks(mob/usr) var/obj/item/stack/oldsrc = src src = null for(var/obj/item/stack/item in usr.loc) - if(item==oldsrc) + if(item == oldsrc) continue if(!istype(item, oldsrc.type)) continue - if(item.amount>=item.max_amount) + if(item.amount >= item.max_amount) continue oldsrc.attackby(item, usr) to_chat(usr, "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s.") @@ -204,7 +219,7 @@ use(amt) return F -/obj/item/stack/attack_hand(mob/user as mob) +/obj/item/stack/attack_hand(mob/user) if(user.get_inactive_hand() == src) var/obj/item/stack/F = split(user, 1) user.put_in_hands(F) @@ -214,14 +229,15 @@ else ..() -/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/stack/attackby(obj/item/W, mob/user, params) ..() - if(istype(W, src.type)) + if(istype(W, type)) var/obj/item/stack/S = W if(S.amount >= max_amount) return 1 - var/to_transfer as num - if(user.get_inactive_hand()==src) + + var/to_transfer + if(user.get_inactive_hand() == src) var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num if(!desired) return @@ -229,52 +245,22 @@ to_transfer = max(1,min(desired,S.max_amount-S.amount,src.amount)) else to_transfer = min(src.amount, S.max_amount-S.amount) - S.amount+=to_transfer - if(S && usr.machine==S) - spawn(0) S.interact(usr) - src.use(to_transfer) - if(src && usr.machine==src) - spawn(0) src.interact(usr) + + S.amount += to_transfer + if(S && usr.machine == S) + spawn(0) + S.interact(usr) + use(to_transfer) + if(src && usr.machine == src) + spawn(0) + interact(usr) S.update_icon() - else return ..() + else + return ..() -/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj) - src.blood_DNA = from.blood_DNA - src.fingerprints = from.fingerprints - src.fingerprintshidden = from.fingerprintshidden - src.fingerprintslast = from.fingerprintslast - //TODO bloody overlay - -/* - * Recipe datum - */ -/datum/stack_recipe - var/title = "ERROR" - var/result_type - var/req_amount = 1 - var/res_amount = 1 - var/max_res_amount = 1 - var/time = 0 - var/one_per_turf = 0 - var/on_floor = 0 - New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0) - src.title = title - src.result_type = result_type - src.req_amount = req_amount - src.res_amount = res_amount - src.max_res_amount = max_res_amount - src.time = time - src.one_per_turf = one_per_turf - src.on_floor = on_floor - -/* - * Recipe list datum - */ -/datum/stack_recipe_list - var/title = "ERROR" - var/list/recipes = null - var/req_amount = 1 - New(title, recipes, req_amount = 1) - src.title = title - src.recipes = recipes - src.req_amount = req_amount +/obj/item/stack/proc/copy_evidences(obj/item/stack/from) + blood_DNA = from.blood_DNA + fingerprints = from.fingerprints + fingerprintshidden = from.fingerprintshidden + fingerprintslast = from.fingerprintslast + //TODO bloody overlay \ No newline at end of file diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm new file mode 100644 index 00000000000..4fe283c6db6 --- /dev/null +++ b/code/game/objects/items/stacks/stack_recipe.dm @@ -0,0 +1,55 @@ + +/* + * Recipe datum + */ +/datum/stack_recipe + var/title = "ERROR" + var/result_type + var/req_amount = 1 + var/res_amount = 1 + var/max_res_amount = 1 + var/time = 0 + var/one_per_turf = 0 + var/on_floor = 0 + +/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0) + src.title = title + src.result_type = result_type + src.req_amount = req_amount + src.res_amount = res_amount + src.max_res_amount = max_res_amount + src.time = time + src.one_per_turf = one_per_turf + src.on_floor = on_floor + +/datum/stack_recipe/proc/post_build(var/obj/item/stack/S, var/obj/result) + return + +/* Special Recipes */ + +/datum/stack_recipe/cable_restraints +/datum/stack_recipe/cable_restraints/post_build(var/obj/item/stack/S, var/obj/result) + if(istype(result, /obj/item/weapon/restraints/handcuffs/cable)) + result.color = S.color + ..() + +/datum/stack_recipe/rods +/datum/stack_recipe/rods/post_build(var/obj/item/stack/S, var/obj/result) + if(istype(result, /obj/item/stack/rods)) + var/obj/item/stack/rods/R = result + R.update_icon() + ..() + +/* + * Recipe list datum + */ +/datum/stack_recipe_list + var/title = "ERROR" + var/list/recipes = null + var/req_amount = 1 + +/datum/stack_recipe_list/New(title, recipes, req_amount = 1) + src.title = title + src.recipes = recipes + src.req_amount = req_amount + diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index d7fcf1bcb53..bfbd0a4ccb6 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -37,6 +37,7 @@ icon_state = "tile_grass" origin_tech = "biotech=1" turf_type = /turf/simulated/floor/grass + burn_state = FLAMMABLE /* * Wood @@ -48,6 +49,7 @@ desc = "an easy to fit wood floor tile" icon_state = "tile-wood" turf_type = /turf/simulated/floor/wood + burn_state = FLAMMABLE /* * Carpets @@ -58,6 +60,7 @@ desc = "A piece of carpet. It is the same size as a floor tile" icon_state = "tile-carpet" turf_type = /turf/simulated/floor/carpet + burn_state = FLAMMABLE /* * Plasteel @@ -100,6 +103,7 @@ desc = "A piece of carpet with a convincing star pattern." icon_state = "tile_space" turf_type = /turf/simulated/floor/fakespace + burn_state = FLAMMABLE /obj/item/stack/tile/fakespace/loaded amount = 30 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index ec524314b71..7e38c7a6e4e 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -257,31 +257,31 @@ icon = 'icons/obj/toy.dmi' icon_state = "snappop" w_class = 1 + var/ash_type = /obj/effect/decal/cleanable/ash -/obj/item/toy/snappop/throw_impact(atom/hit_atom) - ..() - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(3, 1, src) +/obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1) + var/datum/effect/system/spark_spread/s = new() + s.set_up(n, c, src) s.start() - new /obj/effect/decal/cleanable/ash(src.loc) - visible_message("The [src.name] explodes!","You hear a snap!") + new ash_type(loc) + visible_message("[src] explodes!", + "You hear a snap!") playsound(src, 'sound/effects/snap.ogg', 50, 1) qdel(src) +/obj/item/toy/snappop/fire_act() + pop_burst() + +/obj/item/toy/snappop/throw_impact(atom/hit_atom) + ..() + pop_burst() + /obj/item/toy/snappop/Crossed(H as mob|obj) - if((ishuman(H))) //i guess carp and shit shouldn't set them off + if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off var/mob/living/carbon/M = H - if(M.m_intent == "run") - to_chat(M, "You step on the snap pop!") - - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 0, src) - s.start() - new /obj/effect/decal/cleanable/ash(src.loc) - visible_message("The [name] explodes!","You hear a snap!") - playsound(src, 'sound/effects/snap.ogg', 50, 1) - qdel(src) - + if(issilicon(H) || M.m_intent == "run") + to_chat(M, "You step on the snap pop!") + pop_burst(2, 0) /* @@ -394,6 +394,8 @@ obj/item/toy/cards + burn_state = FLAMMABLE + burntime = 5 var/parentdeck = null var/deckstyle = "nanotrasen" var/card_hitsound = null @@ -749,6 +751,7 @@ obj/item/toy/cards/deck/syndicate card_throw_speed = 3 card_throw_range = 20 card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut") + burn_state = FIRE_PROOF /* || Custom card decks || @@ -884,6 +887,7 @@ obj/item/toy/cards/deck/syndicate/black icon_state = "carpplushie" attack_verb = list("bitten", "eaten", "fin slapped") var/bitesound = 'sound/weapons/bite.ogg' + burn_state = FLAMMABLE // Attack mob /obj/item/toy/carpplushie/attack(mob/M as mob, mob/user as mob) @@ -946,6 +950,7 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/toy.dmi' var/poof_sound = 'sound/weapons/thudswoosh.ogg' attack_verb = list("poofed", "bopped", "whapped","cuddled","fluffed") + burn_state = FLAMMABLE /obj/item/toy/plushie/attack(mob/M as mob, mob/user as mob) playsound(loc, poof_sound, 20, 1) // Play the whoosh sound in local area @@ -1071,6 +1076,7 @@ obj/item/toy/cards/deck/syndicate/black item_state = "arm_blade" attack_verb = list("pricked", "absorbed", "gored") w_class = 2 + burn_state = FLAMMABLE /* * Toy/fake flash diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 928eba59a6a..dc538674993 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -6,6 +6,7 @@ icon = 'icons/obj/trash.dmi' w_class = 1 desc = "This is rubbish." + burn_state = FLAMMABLE /obj/item/trash/raisins name = "4no raisins" @@ -42,6 +43,7 @@ /obj/item/trash/plate name = "Plate" icon_state = "plate" + burn_state = FIRE_PROOF /obj/item/trash/snack_bowl name = "Snack bowl" @@ -58,6 +60,7 @@ /obj/item/trash/tray name = "Tray" icon_state = "tray" + burn_state = FIRE_PROOF /obj/item/trash/candle name = "candle" @@ -73,6 +76,7 @@ icon_state = "cola" var/is_glass = 0 var/is_plastic = 0 + burn_state = FIRE_PROOF /obj/item/trash/gum name = "chewed gum" diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 0ee843fe85c..d1721c5c247 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -105,13 +105,13 @@ var/photo var/dat var/stamped = 0 - + var/obj/item/weapon/card/id/guest/guest_pass = null // Guest pass attached to the ID /obj/item/weapon/card/id/New() ..() spawn(30) - if(ishuman(loc)) + if(ishuman(loc) && blood_type == "\[UNSET\]") var/mob/living/carbon/human/H = loc SetOwnerInfo(H) @@ -242,10 +242,10 @@ set name = "Remove Guest Pass" set category = "Object" set src in range(0) - + if(usr.stat || !usr.canmove || usr.restrained()) return - + if(guest_pass) to_chat(usr, "You remove the guest pass from this ID.") guest_pass.forceMove(get_turf(src)) @@ -253,6 +253,37 @@ else to_chat(usr, "There is no guest pass attached to this ID") +/obj/item/weapon/card/id/serialize() + var/list/data = ..() + + data["sex"] = sex + data["age"] = age + data["btype"] = blood_type + data["dna_hash"] = dna_hash + data["fprint_hash"] = fingerprint_hash + data["access"] = access + data["job"] = assignment + data["account"] = associated_account_number + data["owner"] = registered_name + data["mining"] = mining_points + return data + +/obj/item/weapon/card/id/deserialize(list/data) + sex = data["sex"] + age = data["age"] + blood_type = data["btype"] + dna_hash = data["dna_hash"] + fingerprint_hash = data["fprint_hash"] + access = data["access"] // No need for a copy, the list isn't getting touched + assignment = data["job"] + associated_account_number = data["account"] + registered_name = data["owner"] + mining_points = data["mining"] + // We'd need to use icon serialization(b64) to save the photo, and I don't feel like i + UpdateName() + RebuildHTML() + ..() + /obj/item/weapon/card/id/silver name = "identification card" desc = "A silver card which shows honour and dedication." @@ -767,4 +798,4 @@ if("TDgreen") return "Thunderdome Green" else - return capitalize(skin) \ No newline at end of file + return capitalize(skin) diff --git a/code/game/objects/items/weapons/cash.dm b/code/game/objects/items/weapons/cash.dm index 7c1432bb772..3608d7861f3 100644 --- a/code/game/objects/items/weapons/cash.dm +++ b/code/game/objects/items/weapons/cash.dm @@ -23,6 +23,7 @@ var/global/list/moneytypes=list( throw_speed = 1 throw_range = 2 w_class = 1 + burn_state = FLAMMABLE var/access = list() access = access_crate_cash var/worth = 1 // Per chip diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index a06619fcca4..8449e17a9db 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -59,6 +59,9 @@ LIGHTERS ARE IN LIGHTERS.DM return ..() +/obj/item/clothing/mask/cigarette/fire_act() + light() + /obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob, params) ..() if(istype(W, /obj/item/weapon/weldingtool)) @@ -110,7 +113,7 @@ LIGHTERS ARE IN LIGHTERS.DM to_chat(user, "[src] is full.") -/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].") +/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null) if(!src.lit) src.lit = 1 damtype = "fire" @@ -136,8 +139,9 @@ LIGHTERS ARE IN LIGHTERS.DM reagents.handle_reactions() icon_state = icon_on item_state = icon_on - var/turf/T = get_turf(src) - T.visible_message(flavor_text) + if(flavor_text) + var/turf/T = get_turf(src) + T.visible_message(flavor_text) set_light(2, 0.25, "#E38F46") processing_objects.Add(src) @@ -321,14 +325,15 @@ LIGHTERS ARE IN LIGHTERS.DM ..() reagents.add_reagent("nicotine", chem_volume) -/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].") +/obj/item/clothing/mask/cigarette/pipe/light(flavor_text = null) if(!src.lit) src.lit = 1 damtype = "fire" icon_state = icon_on item_state = icon_on - var/turf/T = get_turf(src) - T.visible_message(flavor_text) + if(flavor_text) + var/turf/T = get_turf(src) + T.visible_message(flavor_text) processing_objects.Add(src) /obj/item/clothing/mask/cigarette/pipe/process() diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index f070a1fe4ad..055faa03a8c 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -11,6 +11,7 @@ throwforce = 6.0 w_class = 2 attack_verb = list("bashed", "battered", "judged", "whacked") + burn_state = FLAMMABLE /obj/item/weapon/gavelhammer/suicide_act(mob/user) user.visible_message("[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.") @@ -25,6 +26,7 @@ force = 2.0 throwforce = 2.0 w_class = 1 + burn_state = FLAMMABLE /obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/gavelhammer)) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 0ec893b53a6..6dcbef385b0 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -13,6 +13,7 @@ icon = 'icons/obj/items.dmi' icon_state = "gift1" item_state = "gift1" + burn_state = FLAMMABLE /obj/item/weapon/a_gift/New() ..() @@ -139,6 +140,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 + burn_state = FLAMMABLE /obj/item/stack/wrapping_paper/attack_self(mob/user) to_chat(user, "You need to use it on a package that has already been wrapped!") diff --git a/code/game/objects/items/weapons/grenades/atmosgrenade.dm b/code/game/objects/items/weapons/grenades/atmosgrenade.dm new file mode 100644 index 00000000000..4bfda1ab659 --- /dev/null +++ b/code/game/objects/items/weapons/grenades/atmosgrenade.dm @@ -0,0 +1,24 @@ + + + +/obj/item/weapon/grenade/gas + name = "Plasma Fire Grenade" + desc = "A compressed plasma grenade, used to start horrific plasma fires." + origin_tech = "materials=3;magnets=4;syndicate=4" + icon = 'icons/obj/grenade.dmi' + icon_state = "syndicate" + item_state = "flashbang" + var/spawn_contents = SPAWN_HEAT | SPAWN_TOXINS + var/spawn_amount = 100 + +/obj/item/weapon/grenade/gas/prime() + var/turf/simulated/target_turf = get_turf(src) + if(istype(target_turf)) + target_turf.atmos_spawn_air(spawn_contents, spawn_amount) + target_turf.air_update_turf() + qdel(src) + +/obj/item/weapon/grenade/gas/knockout + name = "Knockout Grenade" + desc = "A grenade that completely removes all air and heat from its detonation area." + spawn_contents = SPAWN_20C | SPAWN_N2O \ No newline at end of file diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm index 8ba1782cf18..851c625b765 100644 --- a/code/game/objects/items/weapons/grenades/clusterbuster.dm +++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm @@ -242,6 +242,16 @@ desc = "Reserved for those pesky request." payload = /mob/living/simple_animal/crab +/obj/item/weapon/grenade/clusterbuster/plasma + name = "Plasma Cluster Grenade" + desc = "For when everything needs to die in a fire." + payload = /obj/item/weapon/grenade/gas + +/obj/item/weapon/grenade/clusterbuster/n2o + name = "N2O Cluster Grenade" + desc = "For when you need to knock out EVERYONE." + payload = /obj/item/weapon/grenade/gas/knockout + ////////////Clusterbuster of Clusterbusters//////////// /obj/item/weapon/grenade/clusterbuster/mega_fox diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 8cbd76041bd..af855e63016 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -9,6 +9,8 @@ throw_range = 20 flags = CONDUCT slot_flags = SLOT_BELT + burn_state = FLAMMABLE + burntime = 5 var/active = 0 var/det_time = 50 var/display_timer = 1 diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 2fb7b0de0b8..4e63ee67497 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -65,7 +65,7 @@ /obj/item/weapon/restraints/handcuffs/cable name = "cable restraints" desc = "Looks like some cables tied together. Could be used to tie something up." - icon_state = "cuff_red" + icon_state = "cuff_white" materials = list(MAT_METAL=150, MAT_GLASS=75) breakouttime = 300 //Deciseconds = 30s cuffsound = 'sound/weapons/cablecuff.ogg' diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 8b5baf79a35..12219eadd0b 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -11,6 +11,7 @@ throw_range = 7 w_class = 3 attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") + burn_state = FLAMMABLE var/mopping = 0 var/mopcount = 0 var/mopcap = 5 diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index a7741267d09..67d4f078264 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -8,6 +8,8 @@ item_state = "paintcan" materials = list(MAT_METAL=200) w_class = 3 + burn_state = FLAMMABLE + burntime = 5 amount_per_transfer_from_this = 5 possible_transfer_amounts = list(5,10,20,30,50,70) volume = 70 diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 90c98c6fdac..de419dc1b7d 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -9,6 +9,7 @@ throw_speed = 4 throw_range = 20 origin_tech = "bluespace=4" + burn_state = FLAMMABLE /obj/item/weapon/teleportation_scroll/apprentice name = "lesser scroll of teleportation" diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 809bf0d298d..be831bbe0d1 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -44,6 +44,7 @@ icon_state = "buckler" item_state = "buckler" materials = list() + burn_state = FLAMMABLE block_chance = 30 /obj/item/weapon/shield/energy diff --git a/code/game/objects/items/weapons/signs.dm b/code/game/objects/items/weapons/signs.dm index 00ac859528d..fa68b09135e 100644 --- a/code/game/objects/items/weapons/signs.dm +++ b/code/game/objects/items/weapons/signs.dm @@ -6,6 +6,7 @@ force = 5 w_class = 4 attack_verb = list("bashed","smacked") + burn_state = FLAMMABLE var/delayed = 0 //used to do delays diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm index ffaadb59d59..19c771873ce 100644 --- a/code/game/objects/items/weapons/staff.dm +++ b/code/game/objects/items/weapons/staff.dm @@ -10,6 +10,7 @@ w_class = 2 armour_penetration = 100 attack_verb = list("bludgeoned", "whacked", "disciplined") + burn_state = FLAMMABLE /obj/item/weapon/twohanded/staff/broom name = "broom" diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 323131845d2..960f01dc4af 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -15,6 +15,8 @@ max_w_class = 3 max_combined_w_class = 21 storage_slots = 21 + burn_state = FLAMMABLE + burntime = 20 species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/back.dmi' @@ -35,6 +37,7 @@ icon_state = "holdingpack" max_w_class = 5 max_combined_w_class = 35 + burn_state = FIRE_PROOF New() ..() @@ -123,12 +126,14 @@ desc = "It's a special backpack made exclusively for Nanotrasen officers." icon_state = "captainpack" item_state = "captainpack" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/industrial name = "industrial backpack" desc = "It's a tough backpack for the daily grind of station life." icon_state = "engiepack" item_state = "engiepack" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/botany name = "botany backpack" @@ -153,6 +158,7 @@ desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma." icon_state = "toxpack" item_state = "toxpack" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/virology name = "virology backpack" @@ -168,6 +174,7 @@ name = "leather satchel" desc = "It's a very fancy satchel made with fine leather." icon_state = "satchel" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/satcheldeluxe name = "leather satchel" @@ -188,6 +195,7 @@ name = "industrial satchel" desc = "A tough satchel with extra pockets." icon_state = "satchel-eng" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/satchel_med name = "medical satchel" @@ -213,6 +221,7 @@ name = "scientist satchel" desc = "Useful for holding research materials." icon_state = "satchel-tox" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/satchel_sec name = "security satchel" @@ -228,6 +237,7 @@ name = "captain's satchel" desc = "An exclusive satchel for Nanotrasen officers." icon_state = "satchel-cap" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/satchel_flat name = "smuggler's satchel" @@ -346,6 +356,7 @@ desc = "A duffelbag designed to hold large quantities of condoms." icon_state = "duffel-captain" item_state = "duffel-captain" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/duffel/security name = "security duffelbag" @@ -388,6 +399,7 @@ desc = "A duffelbag designed to hold tools." icon_state = "duffel-eng" item_state = "duffel-eng" + burn_state = FIRE_PROOF /obj/item/weapon/storage/backpack/duffel/hydro name = "hydroponics duffelbag" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index af4d9aa6008..395d27d0300 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -162,7 +162,7 @@ max_w_class = 3 w_class = 1 can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown", "/obj/item/stack/tile/grass","/obj/item/stack/medical/ointment/aloe","/obj/item/stack/medical/bruise_pack/comfrey", "/obj/item/weapon/reagent_containers/honeycomb") - + burn_state = FLAMMABLE /obj/item/weapon/storage/bag/plants/portaseeder name = "portable seed extractor" @@ -376,6 +376,7 @@ max_w_class = 3 w_class = 4 //Bigger than a book because physics can_hold = list("/obj/item/weapon/book", "/obj/item/weapon/storage/bible", "/obj/item/weapon/tome", "/obj/item/weapon/spellbook") + burn_state = FLAMMABLE /* * Trays - Agouri @@ -484,7 +485,7 @@ max_combined_w_class = 200 w_class = 1 can_hold = list("/obj/item/weapon/reagent_containers/food/pill","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle") - + burn_state = FLAMMABLE /* * Biowaste bag (mostly for xenobiologists) */ @@ -497,4 +498,5 @@ storage_slots = 25 max_combined_w_class = 200 w_class = 1 - can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector") \ No newline at end of file + can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector") + burn_state = FLAMMABLE \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index a0e3d4dd69e..23f8f9ea685 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -37,7 +37,9 @@ src.add_fingerprint(usr) return - +/obj/item/weapon/storage/belt/deserialize(list/data) + ..() + update_icon() /obj/item/weapon/storage/belt/utility name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing. diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 57332ae24d6..b98805e3275 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -5,6 +5,7 @@ throw_speed = 1 throw_range = 5 w_class = 3 + burn_state = FLAMMABLE var/mob/affecting = null var/deity_name = "Christ" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 76cbc9ab102..bfdc3a80727 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -24,6 +24,7 @@ desc = "It's just an ordinary box." icon_state = "box" item_state = "syringe_kit" + burn_state = FLAMMABLE foldable = /obj/item/stack/sheet/cardboard //BubbleWrap /obj/item/weapon/storage/box/large diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 543865aa592..7f2a91054c1 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -12,6 +12,8 @@ max_w_class = 3 max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") + burn_state = FLAMMABLE + burntime = 20 /obj/item/weapon/storage/briefcase/New() ..() \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 367874b0d7d..c4488216b12 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -17,6 +17,7 @@ icon = 'icons/obj/food/food.dmi' icon_state = "donutbox6" name = "donut box" + burn_state = FLAMMABLE var/icon_type = "donut" /obj/item/weapon/storage/fancy/update_icon(var/itemremoved = 0) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 0c03e65beab..03ba6bed54b 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -138,15 +138,15 @@ /obj/item/weapon/storage/firstaid/adv/New() ..() - if(empty) return - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/stack/medical/bruise_pack/advanced(src) + if(empty) + return + new /obj/item/stack/medical/bruise_pack(src) new /obj/item/stack/medical/bruise_pack/advanced(src) new /obj/item/stack/medical/bruise_pack/advanced(src) new /obj/item/stack/medical/ointment/advanced(src) new /obj/item/stack/medical/ointment/advanced(src) - new /obj/item/stack/medical/splint(src) - return + new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) + new /obj/item/device/healthanalyzer(src) /obj/item/weapon/storage/firstaid/adv/empty empty = 1 diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index e2324fcb434..c34b392430e 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -323,7 +323,7 @@ return 1 //Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target -/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location) +/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location, burn = 0) if(!istype(W)) return 0 if(istype(src, /obj/item/weapon/storage/fancy)) @@ -357,8 +357,14 @@ W.on_exit_storage(src) update_icon() W.mouse_opacity = initial(W.mouse_opacity) + if(burn) + W.fire_act() return 1 +/obj/item/weapon/storage/empty_object_contents(burn, loc) + for(var/obj/item/Item in contents) + remove_from_storage(Item, loc, burn) + //This proc is called when you want to place an item into the storage item. /obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob, params) ..() @@ -541,3 +547,34 @@ return depth +/obj/item/weapon/storage/serialize() + var data = ..() + var/list/content_list = list() + data["content"] = content_list + data["slots"] = storage_slots + data["max_w_class"] = max_w_class + data["max_c_w_class"] = max_combined_w_class + for(var/thing in contents) + var/atom/movable/AM = thing + // This code does not watch out for infinite loops + // But then again a tesseract would destroy the server anyways + // Also I wish I could just insert a list instead of it reading it the wrong way + content_list.len++ + content_list[content_list.len] = AM.serialize() + return data + +/obj/item/weapon/storage/deserialize(list/data) + if(isnum(data["slots"])) + storage_slots = data["slots"] + if(isnum(data["max_w_class"])) + max_w_class = data["max_w_class"] + if(isnum(data["max_c_w_class"])) + max_combined_w_class = data["max_c_w_class"] + for(var/thing in contents) + qdel(thing) // out with the old + for(var/thing in data["content"]) + if(islist(thing)) + list_to_object(thing, src) + else + log_debug("Non-list thing: [thing]. We are a [name]") + ..() diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 71d488672aa..ac994fe4b77 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -195,4 +195,13 @@ new /obj/item/ammo_casing/shotgun/dart/assassination(src) new /obj/item/ammo_casing/shotgun/dart/assassination(src) new /obj/item/ammo_casing/shotgun/dart/assassination(src) - new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane(src) \ No newline at end of file + new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane(src) + + +/obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades + name = "Atmos Grenades" + +/obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades/New() + ..() + new /obj/item/weapon/grenade/clusterbuster/plasma(src) + new /obj/item/weapon/grenade/clusterbuster/n2o(src) diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index e34f9687d7e..5bc1ae65e84 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/wallets.dmi' icon_state = "wallet" w_class = 2 + burn_state = FLAMMABLE can_hold = list( "/obj/item/weapon/spacecash", "/obj/item/weapon/card", diff --git a/code/game/objects/items/weapons/table_rack_parts.dm b/code/game/objects/items/weapons/table_rack_parts.dm index 62c2f7aabfd..3073125bae0 100644 --- a/code/game/objects/items/weapons/table_rack_parts.dm +++ b/code/game/objects/items/weapons/table_rack_parts.dm @@ -40,6 +40,7 @@ icon_state = "wood_tableparts" flags = null upgradable = 0 + burn_state = FLAMMABLE result = /obj/structure/table/woodentable parts = list( /obj/item/stack/sheet/wood, diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index e6e88563d4b..9068460ae80 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -373,7 +373,8 @@ V.visible_message("[V] was frozen shut!") for(var/mob/living/L in T) L.ExtinguishMob() - return + for(var/obj/item/Item in T) + Item.extinguish() /datum/effect/system/freezing_smoke_spread diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 4e318d26fed..7c5fe09dd06 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -16,7 +16,9 @@ var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it - + var/burn_state = FIRE_PROOF // LAVA_PROOF | FIRE_PROOF | FLAMMABLE | ON_FIRE + var/burntime = 10 //How long it takes to burn to ashes, in seconds + var/burn_world_time //What world time the object will burn up completely var/being_shocked = 0 var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart? @@ -288,4 +290,32 @@ a { being_shocked = 0 /obj/proc/CanAStarPass() - . = !density \ No newline at end of file + . = !density + +/obj/fire_act(global_overlay=1) + if(!burn_state) + burn_state = ON_FIRE + fire_master.burning += src + burn_world_time = world.time + burntime*rand(10,20) + if(global_overlay) + overlays += fire_overlay + return 1 + +/obj/proc/burn() + empty_object_contents(1, loc) + var/obj/effect/decal/cleanable/ash/A = new(loc) + A.desc = "Looks like this used to be a [name] some time ago." + fire_master.burning -= src + qdel(src) + +/obj/proc/extinguish() + if(burn_state == ON_FIRE) + burn_state = FLAMMABLE + overlays -= fire_overlay + fire_master.burning -= src + +/obj/proc/empty_object_contents(burn = 0, new_loc = loc) + for(var/obj/item/Item in contents) //Empty out the contents + Item.forceMove(new_loc) + if(burn) + Item.fire_act() //Set them on fire, too \ No newline at end of file diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 9251890dc6e..045f58d577d 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -15,6 +15,8 @@ icon = 'icons/obj/artstuff.dmi' icon_state = "easel" density = 1 + burn_state = FLAMMABLE + burntime = 15 var/obj/item/weapon/canvas/painting = null @@ -56,6 +58,7 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES] desc = "Draw out your soul on this canvas! Only crayons can draw on it. Examine it to focus on the canvas." icon = 'icons/obj/artstuff.dmi' icon_state = "11x11" + burn_state = FLAMMABLE var/whichGlobalBackup = 1 //List index /obj/item/weapon/canvas/nineteenXnineteen diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 31958409954..10f09401ba5 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -16,6 +16,7 @@ LINEN BINS throw_range = 2 w_class = 1 item_color = "white" + burn_state = FLAMMABLE slot_flags = SLOT_BACK @@ -161,6 +162,8 @@ LINEN BINS icon = 'icons/obj/structures.dmi' icon_state = "linenbin-full" anchored = 1 + burn_state = FLAMMABLE + burntime = 20 var/amount = 20 var/list/sheets = list() var/obj/item/hidden = null @@ -184,6 +187,16 @@ LINEN BINS else icon_state = "linenbin-full" +/obj/structure/bedsheetbin/fire_act() + if(!amount) + return + ..() + +/obj/structure/bedsheetbin/burn() + amount = 0 + extinguish() + update_icon() + /obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/weapon/bedsheet)) user.drop_item() diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 45c2f538e26..e859c0348f1 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -5,6 +5,8 @@ icon_opened = "cardboard_open" icon_closed = "cardboard" health = 10 + burn_state = FLAMMABLE + burntime = 20 sound = 'sound/effects/rustle2.ogg' material_drop = /obj/item/stack/sheet/cardboard cutting_sound = 'sound/items/poster_ripped.ogg' diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index 03337e6a260..c7aaa8cd84d 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -4,6 +4,8 @@ icon_state = "coffin" icon_closed = "coffin" icon_opened = "coffin_open" + burn_state = FLAMMABLE + burntime = 20 /obj/structure/closet/coffin/update_icon() if(!opened) diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index bff3228dbc9..169179ca375 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -4,6 +4,8 @@ icon_state = "cabinet_closed" icon_closed = "cabinet_closed" icon_opened = "cabinet_open" + burn_state = FLAMMABLE + burntime = 20 /obj/structure/closet/cabinet/update_icon() if(!opened) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm index af6424571ca..49006fb7fb5 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -7,6 +7,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" + burn_state = FLAMMABLE + burntime = 20 New() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 51e3e8d06c3..7eab1e6de85 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -33,6 +33,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" + burn_state = FLAMMABLE + burntime = 20 /obj/structure/closet/secure_closet/personal/cabinet/update_icon() if(broken) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 66c470882c8..7ca75725dd9 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -317,6 +317,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" + burn_state = FLAMMABLE + burntime = 20 New() ..() diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index e4f8acd2c5b..23c6e096748 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -1,3 +1,7 @@ +/obj/structure/flora + burn_state = FLAMMABLE + burntime = 30 + //trees /obj/structure/flora/tree name = "tree" @@ -230,6 +234,7 @@ desc = "a rock" icon_state = "rock1" icon = 'icons/obj/flora/rocks.dmi' + burn_state = FIRE_PROOF anchored = 1 /obj/structure/flora/rock/New() diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 9ce9e59e423..b9af7b2d032 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -219,6 +219,8 @@ /obj/structure/mineral_door/wood mineralType = "wood" hardness = 1 + burn_state = FLAMMABLE + burntime = 30 Open() isSwitchingStates = 1 diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 24ea6b5a358..bfb5d584965 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -41,6 +41,7 @@ desc = "" icon = 'icons/obj/decals.dmi' w_class = 3 //big + burn_state = FLAMMABLE var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index f13bffb9d44..c5a3b2f15ba 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -13,6 +13,8 @@ icon_state = "bed" can_buckle = 1 buckle_lying = 1 + burn_state = FLAMMABLE + burntime = 30 var/movable = 0 // For mobility checks /obj/structure/stool/bed/MouseDrop(atom/over_object) @@ -46,6 +48,7 @@ name = "roller bed" icon = 'icons/obj/rollerbed.dmi' icon_state = "down" + burn_state = FIRE_PROOF anchored = 0 /obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob, params) 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 a12f804d308..1c3c3f8e793 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -3,6 +3,7 @@ desc = "You sit in this. Either by will or force." icon_state = "chair" buckle_lying = 0 //you sit in a chair, not lay + burn_state = FIRE_PROOF var/propelled = 0 // Check for fire-extinguisher-driven chairs @@ -76,6 +77,8 @@ // Chair types /obj/structure/stool/bed/chair/wood + burn_state = FLAMMABLE + burntime = 20 // TODO: Special ash subtype that looks like charred chair legs /obj/structure/stool/bed/chair/wood/normal @@ -103,6 +106,8 @@ desc = "It looks comfy." icon_state = "comfychair" color = rgb(255,255,255) + burn_state = FLAMMABLE + burntime = 30 var/image/armrest = null /obj/structure/stool/bed/chair/comfy/New() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 285b1da8aa5..48193933a66 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -369,6 +369,8 @@ parts = /obj/item/weapon/table_parts/wood health = 50 canSmoothWith = list(/obj/structure/table/woodentable, /obj/structure/table/woodentable/poker) + burn_state = FLAMMABLE + burntime = 20 var/canPokerize = 1 /obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 5d8c98be329..b27d3f6e4f8 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -249,12 +249,16 @@ /obj/machinery/shower/proc/wash(atom/movable/O as obj|mob) if(!on) return + if(istype(O, /obj/item)) + var/obj/item/I = O + I.extinguish() + O.water_act(100, convertHeat(), src) if(isliving(O)) var/mob/living/L = O L.ExtinguishMob() - L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily + L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily to_chat(L, "You've been drenched in water!") if(iscarbon(O)) var/mob/living/carbon/M = O diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 7ae2ddcd27d..051dbe55495 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -425,11 +425,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f hit(round(exposed_volume / 1000), 0) ..() -/obj/structure/window/plasmabasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 32000) - hit(round(exposed_volume / 1000), 0) - ..() - /obj/structure/window/plasmabasic/BlockSuperconductivity() return 1 @@ -457,9 +452,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return -/obj/structure/window/plasmareinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - /obj/structure/window/plasmareinforced/BlockSuperconductivity() return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK diff --git a/code/game/sound.dm b/code/game/sound.dm index 7bf3af10e9c..915bc60f509 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -25,25 +25,28 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect var/turf/turf_source = get_turf(source) // Looping through the player list has the added bonus of working for mobs inside containers + var/sound/S = sound(soundin) + var/maxdistance = (world.view + extrarange) * 3 for(var/P in player_list) var/mob/M = P if(!M || !M.client) continue - var/distance = get_dist(M, turf_source) - if(distance <= (world.view + extrarange) * 3) + + if(distance <= maxdistance) var/turf/T = get_turf(M) if(T && T.z == turf_source.z) - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global) + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, S) var/const/FALLOFF_SOUNDS = 0.5 -/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global) - if(!src.client || ear_deaf > 0) return - soundin = get_sfx(soundin) +/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, sound/S) + if(!src.client || ear_deaf > 0) + return - var/sound/S = sound(soundin) + if(!S) + S = sound(get_sfx(soundin)) S.wait = 0 //No queue S.channel = 0 //Any channel S.volume = vol diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 3c73c0789e7..b8a6635225a 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -80,17 +80,6 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," src.hotspot_expose(1000,CELL_VOLUME) return -/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(!burnt && prob(5)) - burn_tile() - -/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) - var/dir_to = get_dir(src, adj_turf) - - for(var/obj/structure/window/W in src) - if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile) - W.fire_act(adj_air, adj_temp, adj_volume) - /turf/simulated/floor/is_shielded() for(var/obj/structure/A in contents) if(A.level == 3) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 4d7c8ccd5da..f38f21dbac4 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -110,13 +110,7 @@ update_icon() return -/* -/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume) - if(adj_temp > max_temperature) - take_damage(rand(10, 20) * (adj_temp / max_temperature)) - return ..() -*/ /turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) if(istype(src,/turf/simulated/wall/r_wall)) if(!devastated) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d76791e7f97..93b9c339652 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -135,9 +135,6 @@ loopsanity-- A.HasProximity(M, 1) -/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume) - return - /turf/proc/levelupdate() for(var/obj/O in src) if(O.level == 1) @@ -166,6 +163,7 @@ var/list/old_affecting_lights = affecting_lights var/old_lighting_overlay = lighting_overlay var/old_blueprint_data = blueprint_data + var/old_obscured = obscured if(air_master) air_master.remove_from_active(src) @@ -188,6 +186,8 @@ lighting_build_overlays() else lighting_clear_overlays() + + obscured = old_obscured return W diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 90ad26039db..aed9270bf57 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -113,7 +113,8 @@ var/list/admin_verbs_event = list( var/list/admin_verbs_spawn = list( /datum/admins/proc/spawn_atom, /*allows us to spawn instances*/ - /client/proc/respawn_character + /client/proc/respawn_character, + /client/proc/admin_deserialize ) var/list/admin_verbs_server = list( /client/proc/ToRban, @@ -161,7 +162,9 @@ var/list/admin_verbs_debug = list( /proc/machine_upgrade, /client/proc/map_template_load, /client/proc/map_template_upload, - /client/proc/view_runtimes + /client/proc/view_runtimes, + /client/proc/admin_serialize, + /client/proc/admin_deserialize ) var/list/admin_verbs_possess = list( /proc/possess, diff --git a/code/modules/admin/verbs/serialization.dm b/code/modules/admin/verbs/serialization.dm new file mode 100644 index 00000000000..41ba5d11aa1 --- /dev/null +++ b/code/modules/admin/verbs/serialization.dm @@ -0,0 +1,26 @@ +/client/proc/admin_serialize() + set name = "Serialize Marked Datum" + set desc = "Turns your marked object into a JSON string you can later use to re-create the object" + set category = "Debug" + + if(!check_rights(R_ADMIN)) + return + + if(!istype(holder.marked_datum, /atom/movable)) + to_chat(src, "The marked datum is not an atom/movable!") + return + + var/atom/movable/AM = holder.marked_datum + to_chat(src, json_encode(AM.serialize())) + +/client/proc/admin_deserialize() + set name = "Deserialize JSON datum" + set desc = "Creates an object from a JSON string" + set category = "Debug" + + if(!check_rights(R_ADMIN|R_DEBUG)) + return + + var/json_text = input("Enter the JSON code:","Text") as message|null + if(json_text) + json_to_object(json_text, get_turf(usr)) \ No newline at end of file diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index afc11b0acf8..379e4616e7b 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1,5 +1,6 @@ /obj/item/clothing name = "clothing" + burn_state = FLAMMABLE var/list/species_restricted = null //Only these species can wear this kit. var/rig_restrict_helmet = 0 // Stops the user from equipping a rig helmet without attaching it to the suit first. var/scan_reagents = 0 //Can the wearer see reagents while it's equipped? @@ -82,6 +83,7 @@ w_class = 1 throwforce = 2 slot_flags = SLOT_EARS + burn_state = FIRE_PROOF /obj/item/clothing/ears/attack_hand(mob/user as mob) if(!user) return @@ -139,6 +141,7 @@ flags = EARBANGPROTECT strip_delay = 15 put_on_delay = 25 + burn_state = FLAMMABLE //Glasses /obj/item/clothing/glasses @@ -155,6 +158,7 @@ var/color_view = null//overrides client.color while worn strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets put_on_delay = 25 + burn_state = FIRE_PROOF species_restricted = list("exclude","Kidan") /* SEE_SELF // can see self, no matter what @@ -179,6 +183,7 @@ BLIND // can't see anything attack_verb = list("challenged") var/transfer_prints = FALSE var/pickpocket = 0 //Master pickpocket? + var/clipped = 0 strip_delay = 20 put_on_delay = 40 species_fit = list("Vox") @@ -190,6 +195,21 @@ BLIND // can't see anything /obj/item/clothing/gloves/proc/Touch() return +/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/wirecutters)) + if(!clipped) + playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + user.visible_message("[user] snips the fingertips off [src].","You snip the fingertips off [src].") + clipped = 1 + name = "mangled [name]" + desc = "[desc] They have had the fingertips cut off of them." + update_icon() + else + to_chat(user, "[src] have already been clipped!") + return + else + ..() + /obj/item/clothing/under/proc/set_sensors(mob/user as mob) var/mob/M = user if(istype(M, /mob/dead/)) return @@ -510,6 +530,7 @@ BLIND // can't see anything flash_protect = 2 strip_delay = 50 put_on_delay = 50 + burn_state = FIRE_PROOF /obj/item/clothing/suit/space name = "Space suit" @@ -531,6 +552,7 @@ BLIND // can't see anything max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT strip_delay = 80 put_on_delay = 80 + burn_state = FIRE_PROOF species_restricted = list("exclude","Diona","Vox","Wryn") //Under clothing diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 76bfbdfd394..11503b40278 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -6,6 +6,7 @@ siemens_coefficient = 0 permeability_coefficient = 0.05 item_color="yellow" + burn_state = FIRE_PROOF /obj/item/clothing/gloves/color/yellow/power description_antag = "These are a pair of power gloves, and can be used to fire bolts of electricity while standing over powered power cables." @@ -45,6 +46,7 @@ siemens_coefficient = 1 //Set to a default of 1, gets overridden in New() permeability_coefficient = 0.05 item_color="yellow" + burn_state = FIRE_PROOF New() siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5) @@ -59,6 +61,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + burn_state = FIRE_PROOF var/can_be_cut = 1 @@ -80,6 +83,7 @@ if(pickpocket) F.pickpocket = 1 qdel(src) + return ..() /obj/item/clothing/gloves/color/orange @@ -101,6 +105,7 @@ desc = "These gloves will protect the wearer from electric shock." siemens_coefficient = 0 permeability_coefficient = 0.05 + burn_state = FIRE_PROOF /obj/item/clothing/gloves/color/rainbow name = "rainbow gloves" @@ -171,6 +176,7 @@ permeability_coefficient = 0.01 item_color="white" transfer_prints = TRUE + burn_state = FIRE_PROOF /obj/item/clothing/gloves/color/latex/nitrile name = "nitrile gloves" diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index feae32b9085..db9de4df740 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -9,6 +9,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT strip_delay = 40 put_on_delay = 20 + clipped = 1 /obj/item/clothing/gloves/cyborg desc = "beep boop borp" @@ -28,6 +29,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + burn_state = FIRE_PROOF /obj/item/clothing/gloves/botanic_leather desc = "These leather gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin." @@ -39,6 +41,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + burn_state = FIRE_PROOF /obj/item/clothing/gloves/batmangloves desc = "Used for handling all things bat related." diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 977a3969a93..bbaf5b34e8b 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -58,6 +58,7 @@ desc = "A Collectable Welding Helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this Helmet is done so at the owner's own risk!" icon_state = "welding" item_state = "welding" + burn_state = FIRE_PROOF species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', @@ -117,12 +118,14 @@ desc = "Go Red! I mean Green! I mean Red! No Green!" icon_state = "thunderdome" item_state = "thunderdome" + burn_state = FIRE_PROOF /obj/item/clothing/head/collectable/swat name = "collectable SWAT helmet" desc = "Now you can be in the Deathsquad too!" icon_state = "swat" item_state = "swat" + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi' diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 5cc5af80abb..c73a6f21306 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -10,6 +10,7 @@ armor = list(melee = 15, bullet = 5, laser = 20, energy = 10, bomb = 20, bio = 10, rad = 20) flags_inv = 0 actions_types = list(/datum/action/item_action/toggle_helmet_light) + burn_state = FIRE_PROOF /obj/item/clothing/head/hardhat/attack_self(mob/user) on = !on diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index b7b0cc71b81..f31a6434001 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -11,6 +11,7 @@ heat_protection = HEAD max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 60 + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 6e53e8a9b04..c6879cb2945 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -342,6 +342,7 @@ throw_range = 5 w_class = 2 attack_verb = list("warned", "cautioned", "smashed") + burn_state = FIRE_PROOF /obj/item/clothing/head/griffin name = "griffon head" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 703f36cf1fd..eb04efcc380 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -23,6 +23,7 @@ armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) actions_types = list(/datum/action/item_action/toggle) + burn_state = FIRE_PROOF species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/head.dmi', diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 5b3ab335cbe..295ec84c4af 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -8,6 +8,7 @@ gas_transfer_coefficient = 0.10 permeability_coefficient = 0.50 actions_types = list(/datum/action/item_action/adjust) + burn_state = FIRE_PROOF species_fit = list("Vox", "Vox Armalis", "Unathi", "Tajaran", "Vulpkanin") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 72b4b6febb7..0df0f7550fc 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -8,6 +8,7 @@ item_state = "gas_alt" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 + burn_state = FIRE_PROOF species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', @@ -95,6 +96,7 @@ icon_state = "clown" item_state = "clown_hat" flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | BLOCKHAIR + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user) @@ -130,24 +132,28 @@ desc = "A feminine clown mask for the dabbling crossdressers or female entertainers." icon_state = "sexyclown" item_state = "sexyclown" + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/mime name = "mime mask" desc = "The traditional mime's mask. It has an eerie facial posture." icon_state = "mime" item_state = "mime" + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/monkeymask name = "monkey mask" desc = "A mask used when acting as a monkey." icon_state = "monkeymask" item_state = "monkeymask" + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" desc = "A traditional female mime's mask." icon_state = "sexymime" item_state = "sexymime" + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/death_commando name = "Death Commando Mask" @@ -158,12 +164,14 @@ name = "cyborg visor" desc = "Beep boop" icon_state = "death" + burn_state = FLAMMABLE /obj/item/clothing/mask/gas/owl_mask name = "owl mask" desc = "Twoooo!" icon_state = "owl" flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | NODROP + burn_state = FLAMMABLE actions_types = list(/datum/action/item_action/hoot) /obj/item/clothing/mask/gas/owl_mask/attack_self() diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm index 190804d1a92..8655c2b7541 100644 --- a/code/modules/clothing/masks/voice.dm +++ b/code/modules/clothing/masks/voice.dm @@ -9,6 +9,7 @@ // desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics." var/obj/item/voice_changer/changer origin_tech = "syndicate=4" + burn_state = FIRE_PROOF /obj/item/clothing/mask/gas/voice/verb/Toggle_Voice_Changer() set category = "Object" diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 2c6bdeddf87..b036946e4ae 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -8,6 +8,7 @@ actions_types = list(/datum/action/item_action/toggle) strip_delay = 70 put_on_delay = 70 + burn_state = FIRE_PROOF /obj/item/clothing/shoes/magboots/attack_self(mob/user) if(magpulse) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 2330f439547..f9aef32e067 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -6,6 +6,7 @@ permeability_coefficient = 0.05 flags = NOSLIP origin_tech = "syndicate=3" + burn_state = FIRE_PROOF var/list/clothing_choices = list() silence_steps = 1 @@ -22,6 +23,7 @@ item_state = "jackboots" armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0) strip_delay = 70 + burn_state = FIRE_PROOF /obj/item/clothing/shoes/combat/swat //overpowered boots for death squads name = "\improper SWAT shoes" @@ -51,6 +53,7 @@ slowdown = SHOES_SLOWDOWN+1 strip_delay = 50 put_on_delay = 50 + burn_state = FIRE_PROOF /obj/item/clothing/shoes/galoshes/dry name = "absorbent galoshes" @@ -82,6 +85,7 @@ item_color = "hosred" strip_delay = 50 put_on_delay = 50 + burn_state = FIRE_PROOF var/footstep = 1 silence_steps = 1 shoe_sound = "jackboot" diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 8b5ea0d9af5..d46d7f83d1d 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -7,6 +7,7 @@ max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT strip_delay = 60 put_on_delay = 40 + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -148,6 +149,7 @@ cold_protection = UPPER_TORSO|LOWER_TORSO|HANDS heat_protection = UPPER_TORSO|LOWER_TORSO|HANDS strip_delay = 70 + burn_state = FLAMMABLE /obj/item/clothing/suit/armor/vest/warden/alt name = "warden's jacket" @@ -235,7 +237,7 @@ blood_overlay_type = "armor" flags_size = ONESIZEFITSALL allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) - + burn_state = FLAMMABLE //Reactive armor /obj/item/clothing/suit/armor/reactive diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 06fbf32b056..4286064262f 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -7,6 +7,7 @@ flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR | THICKMATERIAL armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + burn_state = FIRE_PROOF /obj/item/clothing/suit/bio_suit name = "bio suit" @@ -25,6 +26,7 @@ flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL strip_delay = 70 put_on_delay = 70 + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index a8fd6ea4c49..5124e1d1adf 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -189,6 +189,7 @@ item_state = "hazard" blood_overlay_type = "armor" allowed = list (/obj/item/device/flashlight, /obj/item/device/t_scanner, /obj/item/weapon/tank/emergency_oxygen) + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 676800f8f48..6a8908506b8 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -17,6 +17,7 @@ blood_overlay_type = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO allowed = list (/obj/item/weapon/gun/energy/laser/bluetag) + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -30,6 +31,7 @@ blood_overlay_type = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO allowed = list (/obj/item/weapon/gun/energy/laser/redtag) + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -136,6 +138,7 @@ w_class = 3 allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT + burn_state = FIRE_PROOF /obj/item/clothing/suit/hastur @@ -515,6 +518,7 @@ desc = "A long, thick black leather coat." icon_state = "leathercoat" item_state = "leathercoat" + burn_state = FIRE_PROOF /obj/item/clothing/suit/browncoat name = "brown leather coat" @@ -748,6 +752,7 @@ ignore_suitadjust = 1 actions_types = list() adjust_flavour = null + burn_state = FIRE_PROOF /obj/item/clothing/suit/officercoat name = "Clown Officer's Coat" diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 360c9b2915f..faf5f389e9d 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -50,3 +50,12 @@ if(istype(G.gift, /obj/item/weapon/storage)) L += G.gift:return_inv() return L + +/obj/item/clothing/suit/storage/serialize() + var/list/data = ..() + data["pockets"] = pockets.serialize() + return data + +/obj/item/clothing/suit/storage/deserialize(list/data) + qdel(pockets) + pockets = list_to_object(data["pockets"], src) diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 2178821e3fa..44a2f5b1c49 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -28,6 +28,7 @@ min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT strip_delay = 60 put_on_delay = 60 + burn_state = FIRE_PROOF /obj/item/clothing/suit/fire/firefighter icon_state = "firesuit" @@ -72,6 +73,7 @@ max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 70 put_on_delay = 70 + burn_state = FIRE_PROOF /obj/item/clothing/suit/bomb_suit name = "bomb suit" @@ -92,6 +94,7 @@ min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT strip_delay = 70 put_on_delay = 70 + burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -119,6 +122,7 @@ armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 60, rad = 100) strip_delay = 60 put_on_delay = 60 + burn_state = FIRE_PROOF /obj/item/clothing/suit/radiation name = "Radiation suit" @@ -135,4 +139,5 @@ armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 60, rad = 100) flags_inv = HIDEJUMPSUIT|HIDETAIL strip_delay = 60 - put_on_delay = 60 \ No newline at end of file + put_on_delay = 60 + burn_state = FIRE_PROOF \ No newline at end of file diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index c36a3f3ecea..b8ee1c3c896 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -6,6 +6,7 @@ permeability_coefficient = 0.01 armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20) unacidable = 1 + burn_state = FIRE_PROOF //Not given any special protective value since the magic robes are full-body protection --NEO strip_delay = 50 put_on_delay = 50 @@ -65,6 +66,7 @@ unacidable = 1 strip_delay = 50 put_on_delay = 50 + burn_state = FIRE_PROOF /obj/item/clothing/suit/wizrobe/red name = "red wizard robe" @@ -117,6 +119,7 @@ permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) unacidable = 0 + burn_state = FLAMMABLE /obj/item/clothing/head/wizard/marisa/fake name = "Witch Hat" @@ -126,6 +129,7 @@ permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) unacidable = 0 + burn_state = FLAMMABLE /obj/item/clothing/suit/wizrobe/marisa/fake name = "Witch Robe" @@ -135,4 +139,5 @@ gas_transfer_coefficient = 1 permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - unacidable = 0 \ No newline at end of file + unacidable = 0 + burn_state = FLAMMABLE \ No newline at end of file diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index e417c899f7f..8e8e046ef1b 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -166,6 +166,7 @@ icon_state = "bronze" item_color = "bronze" materials = list(MAT_METAL=1000) + burn_state = FIRE_PROOF /obj/item/clothing/accessory/medal/conduct name = "distinguished conduct medal" diff --git a/code/modules/clothing/under/chameleon.dm b/code/modules/clothing/under/chameleon.dm index 8f5a540f3c3..8d7a92e3e8a 100644 --- a/code/modules/clothing/under/chameleon.dm +++ b/code/modules/clothing/under/chameleon.dm @@ -7,6 +7,7 @@ desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." origin_tech = "syndicate=3" var/list/clothing_choices = list() + burn_state = FIRE_PROOF armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0) New() diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 886d48932aa..7b6b85326c3 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -17,6 +17,7 @@ item_state = "bl_suit" item_color = "black" flags_size = ONESIZEFITSALL + burn_state = FIRE_PROOF /obj/item/clothing/under/color/blackf name = "feminine black jumpsuit" diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index 9b604da7277..2e01d170f3d 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -7,6 +7,7 @@ item_color = "chief" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) flags_size = ONESIZEFITSALL + burn_state = FIRE_PROOF /obj/item/clothing/under/rank/chief_engineer/skirt desc = "It's a high visibility jumpskirt given to those engineers insane enough to achieve the rank of \"Chief engineer\". It has minor radiation shielding." @@ -23,6 +24,7 @@ item_state = "atmos_suit" item_color = "atmos" flags_size = ONESIZEFITSALL + burn_state = FIRE_PROOF /obj/item/clothing/under/rank/atmospheric_technician/skirt desc = "It's a jumpskirt worn by atmospheric technicians." @@ -40,6 +42,7 @@ item_color = "engine" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) flags_size = ONESIZEFITSALL + burn_state = FIRE_PROOF /obj/item/clothing/under/rank/engineer/skirt diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index 71eb07c89eb..31d36cdcb19 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -180,4 +180,12 @@ item_color = "brig_phys" permeability_coefficient = 0.50 armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) - flags_size = ONESIZEFITSALL \ No newline at end of file + flags_size = ONESIZEFITSALL + +//Pod Pilot +/obj/item/clothing/under/rank/security/pod_pilot + desc = "Suit for your regular pod pilot." + name = "pod pilot's jumpsuit" + icon_state = "pod_pilot" + item_state = "pod_pilot" + item_color = "pod_pilot" diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index d912a2e289d..c37d6340609 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -146,6 +146,7 @@ min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO | LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT + burn_state = FIRE_PROOF /obj/item/clothing/under/acj name = "administrative cybernetic jumpsuit" @@ -163,6 +164,7 @@ max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT slowdown = -10 siemens_coefficient = 0 + burn_state = LAVA_PROOF /obj/item/clothing/under/johnny name = "johnny~~ jumpsuit" @@ -334,6 +336,7 @@ item_state = "gladiator" item_color = "gladiator" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + burn_state = FIRE_PROOF //dress @@ -467,6 +470,7 @@ item_color = "roman" item_state = "armor" strip_delay = 100 + burn_state = FIRE_PROOF /obj/item/clothing/under/maid name = "maid costume" diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index c6f6944c915..5a892efb691 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -33,7 +33,7 @@ S.update_icon() S.power_change() - for(var/obj/machinery/power/apc/C in world) + for(var/obj/machinery/power/apc/C in apcs) var/area/current_area = get_area(C) if(current_area.type in skipped_areas_apc || !is_station_level(C.z)) continue @@ -46,7 +46,7 @@ if(announce) command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') - for(var/obj/machinery/power/apc/C in machines) + for(var/obj/machinery/power/apc/C in apcs) var/area/current_area = get_area(C) if(current_area.type in skipped_areas_apc || !is_station_level(C.z)) continue diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index aae17abc961..15ce27b7d5c 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -10,6 +10,7 @@ consume_sound = 'sound/items/drink.ogg' possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 + burn_state = FIRE_PROOF /obj/item/weapon/reagent_containers/food/drinks/New() ..() diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index ebdd151a4b5..bc1442038e9 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -10,6 +10,8 @@ lefthand_file = 'icons/goonstation/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/items_righthand.dmi' materials = list(MAT_GLASS=500) + burn_state = FLAMMABLE + burntime = 5 /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/egg)) //breaking eggs @@ -25,6 +27,15 @@ else ..() +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fire_act() + if(!reagents.total_volume) + return + ..() + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/burn() + reagents.clear_reagents() + extinguish() + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() // *scream if(reagents.reagent_list.len > 0) switch(reagents.get_master_reagent_id()) diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 3e0cfb8f867..f14c0d19254 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -11,6 +11,7 @@ var/apply_method = "swallow" var/transfer_efficiency = 1.0 var/instant_application = 0 //if we want to bypass the forcedfeed delay + burn_state = FLAMMABLE /obj/item/weapon/reagent_containers/food/New() ..() diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 706ea0e367b..381525a13ae 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -59,8 +59,8 @@ // Burns the food with a chance of starting a fire - for if you try cooking something that's already been cooked that way // if burns = 0 then it'll just tell you that the item is already that foodtype and it would do nothing -// if you wanted a different side effect set burns to 1 and override burn() -/obj/machinery/cooker/proc/burn(mob/user, obj/item/weapon/reagent_containers/props) +// if you wanted a different side effect set burns to 1 and override burn_food() +/obj/machinery/cooker/proc/burn_food(mob/user, obj/item/weapon/reagent_containers/props) var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/burnt = new(get_turf(src)) setRegents(props, burnt) to_chat(user, "You smell burning coming from the [src]!") @@ -130,7 +130,7 @@ return if(istype(I, /obj/item/weapon/reagent_containers/food/snacks)) if(checkCooked(I)) - burn(user, I) + burn_food(user, I) turnoff(I) return var/obj/item/weapon/reagent_containers/food/snacks/newfood = gettype() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 23a5447f1d4..81d489d9da1 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -10,6 +10,7 @@ var/datum/seed/seed var/potency = -1 var/awakening = 0 + burn_state = FLAMMABLE /obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc,planttype) diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index 39e94160275..d68740eaf47 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/weapons.dmi' var/plantname var/potency = 1 + burn_state = FLAMMABLE /obj/item/weapon/grown/New(newloc,planttype) @@ -170,8 +171,11 @@ to_chat(M, "[user] smacks you with a [name]!FLOWER POWER") to_chat(user, " Your [name]'s FLOWER POWER strikes [M]") if(istype(M, /mob/living)) - to_chat(M, "You are heated by the warmth of the of the [name]!") - M.bodytemperature += potency/2 * TEMPERATURE_DAMAGE_COEFFICIENT + to_chat(M, "You are lit on fire from the intense heat of the [name]!") + M.adjust_fire_stacks(potency / 20) + if(M.IgniteMob()) + message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire") + log_game("[key_name(user)] set [key_name(M)] on fire") /obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob) if(!user.gloves) diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 1749181b329..244b9fef8f3 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -6,7 +6,7 @@ var/global/list/plant_seed_sprites = list() icon = 'icons/obj/seeds.dmi' icon_state = "blank" w_class = 2 - + burn_state = FLAMMABLE var/seed_type var/datum/seed/seed var/modified = 0 diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index aa7d9ea4607..d4ccee6e50f 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -18,6 +18,8 @@ anchored = 1 density = 1 opacity = 1 + burn_state = FLAMMABLE + burntime = 30 var/health = 50 var/tmp/busy = 0 var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/bible, /obj/item/weapon/tome) //Things allowed in the bookcase @@ -167,6 +169,7 @@ throw_range = 5 w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) attack_verb = list("bashed", "whacked", "educated") + burn_state = FLAMMABLE var/dat // Actual page content var/due_date = 0 // Game time in 1/10th seconds diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 8972b675e1a..4a2acd645df 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -7,6 +7,8 @@ flags = CONDUCT force = 10.0 throwforce = 0 + burn_state = FLAMMABLE + burntime = 20 w_class = 4 /obj/item/weapon/moneybag/attack_hand(user as mob) diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm index 2abbbf91cbc..163ce8f7c8d 100644 --- a/code/modules/mob/living/carbon/_defines.dm +++ b/code/modules/mob/living/carbon/_defines.dm @@ -4,7 +4,7 @@ #define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point #define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point -#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point +#define HEAT_DAMAGE_LEVEL_3 10 //Amount of damage applied when your body temperature passes the 1000K point #define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point #define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 3c18cddb18f..a4381ebf7a6 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -551,12 +551,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, visible_message("[src] has thrown [thrown_thing].") newtonian_move(get_dir(target, src)) thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src) -/* -/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - ..() - src.IgniteMob() - bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10) -*/ + /mob/living/carbon/can_use_hands() if(handcuffed) return 0 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f9c448df5e3..c63c03d8321 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -8,7 +8,7 @@ //why are these here and not in human_defines.dm //var/list/hud_list[10] var/datum/species/species //Contains icon generation and language information, set during New(). - var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. + var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call. /mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna = 0) @@ -482,8 +482,8 @@ if(3 to 4) stunprob = 30 if(5 to 6) stunprob = 40 if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 + if(9) stunprob = 70 + if(10) stunprob = 95 if(prob(stunprob)) M.powerlevel -= 3 @@ -944,7 +944,7 @@ for(var/datum/data/record/R in data_core.security) if(R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"security")) - var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN)) if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) ) return var/counter = 1 @@ -1075,7 +1075,7 @@ for(var/datum/data/record/R in data_core.medical) if(R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"medical")) - var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)) + var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)) if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) ) return var/counter = 1 @@ -1285,8 +1285,8 @@ var/limb_path = organ_data["path"] var/obj/item/organ/external/O = new limb_path(temp_holder) if(H.get_limb_by_name(O.name)) //Check to see if the user already has an limb with the same name as the 'missing limb'. If they do, skip regrowth. - continue //In an example, this will prevent duplication of the mob's right arm if the mob is a Human and they have a Diona right arm, since, - //while the limb with the name 'right_arm' the mob has may not be listed in their species' bodyparts definition, it is still viable and has the appropriate limb name. + continue //In an example, this will prevent duplication of the mob's right arm if the mob is a Human and they have a Diona right arm, since, + //while the limb with the name 'right_arm' the mob has may not be listed in their species' bodyparts definition, it is still viable and has the appropriate limb name. else O = new limb_path(H) //Create the limb on the player. O.owner = H @@ -1704,7 +1704,7 @@ if((head_organ.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. hair += i - var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair + var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair if(incapacitated()) to_chat(src, "You were interrupted while changing your monitor display.") return @@ -1909,7 +1909,7 @@ if(current_size >= STAGE_THREE) var/list/handlist = list(l_hand, r_hand) for(var/obj/item/hand in handlist) - if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && unEquip(hand)) + if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && unEquip(hand)) step_towards(hand, src) to_chat(src, "\The [S] pulls \the [hand] from your grip!") apply_effect(current_size * 3, IRRADIATE) @@ -2031,3 +2031,103 @@ return 0 return . + +/mob/living/carbon/human/serialize() + // Currently: Limbs/organs only + var/list/data = ..() + var/list/limbs_list = list() + var/list/organs_list = list() + var/list/equip_list = list() + data["limbs"] = limbs_list + data["iorgans"] = organs_list + data["equip"] = equip_list + + data["dna"] = dna.serialize() + data["age"] = age + + // No being naked + data["ushirt"] = undershirt + data["socks"] = socks + data["uwear"] = underwear + + // Limbs + for(var/limb in organs_by_name) + var/obj/item/organ/O = organs_by_name[limb] + if(!O) + limbs_list[limb] = "missing" + continue + + limbs_list[limb] = O.serialize() + + // Internal organs/augments + for(var/organ in internal_organs) + var/obj/item/organ/O = organ + organs_list[O.name] = O.serialize() + + // Equipment + equip_list.len = slots_amt + for(var/i = 1, i < slots_amt, i++) + var/obj/item/thing = get_item_by_slot(i) + if(thing != null) + equip_list[i] = thing.serialize() + + return data + +/mob/living/carbon/human/deserialize(list/data) + var/list/limbs_list = data["limbs"] + var/list/organs_list = data["iorgans"] + var/list/equip_list = data["equip"] + var/turf/T = get_turf(src) + if(!islist(data["limbs"])) + throw EXCEPTION("Expected a limbs list, but found none") + + if(islist(data["dna"])) + dna.deserialize(data["dna"]) + real_name = dna.real_name + name = real_name + UpdateAppearance() + set_species(dna.species) + age = data["age"] + undershirt = data["ushirt"] + underwear = data["uwear"] + socks = data["socks"] + for(var/obj/item/organ/internal/iorgan in internal_organs) + qdel(iorgan) + + for(var/obj/item/organ/external/organ in organs) + qdel(organ) + + for(var/limb in limbs_list) + // Missing means skip this part - it's missing + if(limbs_list[limb] == "missing") + continue + // "New" code handles insertion and DNA sync'ing + var/obj/item/organ/external/E = list_to_object(limbs_list[limb], src) + E.sync_colour_to_dna() + + for(var/organ in organs_list) + // As above, "New" code handles insertion, DNA sync + list_to_object(organs_list[organ], src) + + + // De-serialize equipment + // #1: Jumpsuit + // #2: Outer suit + // #3+: Everything else + if(islist(equip_list[slot_w_uniform])) + var/obj/item/clothing/C = list_to_object(equip_list[slot_w_uniform], T) + equip_to_slot_if_possible(C, slot_w_uniform) + + if(islist(equip_list[slot_wear_suit])) + var/obj/item/clothing/C = list_to_object(equip_list[slot_wear_suit], T) + equip_to_slot_if_possible(C, slot_wear_suit) + + for(var/i = 1, i < slots_amt, i++) + if(i == slot_w_uniform || i == slot_wear_suit) + continue + if(islist(equip_list[i])) + var/obj/item/clothing/C = list_to_object(equip_list[i], T) + equip_to_slot_if_possible(C, i) + update_icons() + + ..() diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index d39aa319e51..81fe04bc9de 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -110,11 +110,8 @@ if(I_HARM) //Vampire code if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M) - if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH))) - to_chat(M, "Remove their mask!") - return - if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH))) - to_chat(M, "Remove your mask!") + if(species && species.flags & NO_BLOOD)//why this hell were we never checkinf for this? + to_chat(M, "They have no blood!") return if(mind && mind.vampire && (mind in ticker.mode.vampires)) to_chat(M, "Your fangs fail to pierce [src.name]'s cold flesh") diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b2b71d60545..1800adb31a8 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -487,14 +487,15 @@ return if(RESIST_HEAT in mutations) return - var/thermal_protection = get_thermal_protection() + if(on_fire) + var/thermal_protection = get_thermal_protection() - if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) - return - if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT) - bodytemperature += 11 - else - bodytemperature += BODYTEMP_HEATING_MAX + if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) + return + if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT) + bodytemperature += 11 + else + bodytemperature += (BODYTEMP_HEATING_MAX + (fire_stacks * 12)) /mob/living/carbon/human/proc/get_thermal_protection() var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 2049d5fd21d..50576bcecad 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -151,9 +151,13 @@ /mob/living/proc/IgniteMob() if(fire_stacks > 0 && !on_fire) on_fire = 1 + visible_message("[src] catches fire!", \ + "You're set on fire!") set_light(light_range + 3,l_color = "#ED9200") throw_alert("fire", /obj/screen/alert/fire) update_fire() + return 1 + return 0 /mob/living/proc/ExtinguishMob() if(on_fire) @@ -167,14 +171,20 @@ return /mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person - fire_stacks = Clamp(fire_stacks + add_fire_stacks, -20, 20) + fire_stacks = Clamp(fire_stacks + add_fire_stacks, -20, 20) + if(on_fire && fire_stacks <= 0) + ExtinguishMob() /mob/living/proc/handle_fire() - if(fire_stacks < 0) - fire_stacks++ //If we've doused ourselves in water to avoid fire, dry off slowly - fire_stacks = min(0, fire_stacks)//So we dry ourselves back to default, nonflammable. + if(fire_stacks < 0) //If we've doused ourselves in water to avoid fire, dry off slowly + fire_stacks = min(0, fire_stacks + 1)//So we dry ourselves back to default, nonflammable. if(!on_fire) return 1 + if(fire_stacks > 0) + adjust_fire_stacks(-0.1) //the fire is slowly consumed + else + ExtinguishMob() + return var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment if(G.oxygen < 1) ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire @@ -183,7 +193,7 @@ location.hotspot_expose(700, 50, 1) /mob/living/fire_act() - adjust_fire_stacks(0.5) + adjust_fire_stacks(3) IgniteMob() //Mobs on Fire end diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 471dcbec0bb..2c978579388 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -852,7 +852,13 @@ var/list/ai_verbs_default = list( if("ancient machine") holo_icon = getHologramIcon(icon('icons/mob/ancient_machine.dmi', "ancient_machine")) if("custom") - holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic.dmi', "[ckey]-ai-holo")) + if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic.dmi')) + holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic.dmi', "[ckey]-ai-holo")) + else if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic64.dmi')) + holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic64.dmi', "[ckey]-ai-holo")) + else + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) + return /mob/living/silicon/ai/proc/corereturn() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 3cf863a3591..5f38114a518 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -566,6 +566,9 @@ var/obj/item/weapon/holder/H = ..() if(!istype(H)) return + if(resting) + icon_state = "[chassis]" + resting = 0 H.icon_state = "pai-[icon_state]" H.item_state = "pai-[icon_state]" grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index d2dbd5f14f2..816ec1979a9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -407,26 +407,7 @@ return /mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri - if(istype(O, /obj/item/stack/medical) && healable) - if(stat != DEAD) - var/obj/item/stack/medical/MED = O - if(health < maxHealth) - if(MED.amount >= 1) - if(MED.heal_brute >= 1) - heal_organ_damage((MED.heal_brute * 1.66), (MED.heal_burn * 1.66)) - MED.use(1) - visible_message("[user] applies [MED] on [src]") - return - else - to_chat(user, "[MED] won't help at all.") - return - else - to_chat(user, "[src] is at full health.") - return - else - to_chat(user, "[src] is dead, medical items won't bring it back to life.") - return - else if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar)) + if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar)) var/obj/item/clothing/accessory/petcollar/C = O user.drop_item() C.forceMove(src) @@ -560,16 +541,24 @@ return 0 return 1 +/mob/living/simple_animal/handle_fire() + return + +/mob/living/simple_animal/update_fire() + return + +/mob/living/simple_animal/IgniteMob() + return 0 + +/mob/living/simple_animal/ExtinguishMob() + return + /mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE) if(damage <= force_threshold || !damage_coeff[damagetype]) visible_message("[src] looks unharmed from the damage.") else apply_damage(damage, damagetype) - -/mob/living/simple_animal/update_fire() - return - /mob/living/simple_animal/update_transform() var/matrix/ntransform = matrix(transform) //aka transform.Copy() var/changed = 0 diff --git a/code/modules/nano/interaction/base.dm b/code/modules/nano/interaction/base.dm index 0db9eb19eeb..113c9e2878b 100644 --- a/code/modules/nano/interaction/base.dm +++ b/code/modules/nano/interaction/base.dm @@ -12,9 +12,9 @@ return STATUS_CLOSE /mob/proc/shared_nano_interaction() - if(src.stat || !client) + if(stat || !client) return STATUS_CLOSE // no updates, close the interface - else if(restrained() || lying || stat || stunned || weakened) + else if(restrained() || lying || stunned || weakened) return STATUS_UPDATE // update only (orange visibility) return STATUS_INTERACTIVE diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index e8db4c58110..513233912f2 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -10,6 +10,7 @@ var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/toppaper //The topmost piece of paper. slot_flags = SLOT_BELT + burn_state = FLAMMABLE /obj/item/weapon/clipboard/New() update_icon() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 12f9e13a4e9..0dcff2dcee2 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -5,6 +5,7 @@ icon_state = "folder" w_class = 2 pressure_resistance = 2 + burn_state = FLAMMABLE /obj/item/weapon/folder/blue desc = "A blue folder." @@ -39,7 +40,7 @@ if(!n_name) return n_name = sanitize(copytext(n_name, 1, MAX_NAME_LEN)) - + if((loc == usr || Adjacent(usr)) && usr.stat == 0) name = "folder[(n_name ? text("- '[n_name]'") : null)]" return diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index a3ec39243a9..492ea726739 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -16,6 +16,8 @@ pressure_resistance = 0 slot_flags = SLOT_HEAD body_parts_covered = HEAD + burn_state = FLAMMABLE + burntime = 5 attack_verb = list("bapped") var/info //What's actually written on the paper. @@ -289,30 +291,6 @@ \[hr\] : Adds a horizontal rule. "}, "window=paper_help") -/obj/item/weapon/paper/proc/burnpaper(obj/item/weapon/lighter/P, mob/user) - var/class = "" - - if(P.lit && !user.restrained()) - if(istype(P, /obj/item/weapon/lighter/zippo)) - class = "" - - user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \ - "[class]You hold \the [P] up to \the [src], burning it slowly.") - - spawn(20) - if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) - user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ - "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") - - if(user.get_inactive_hand() == src) - user.unEquip(src) - - new /obj/effect/decal/cleanable/ash(get_turf(src)) - qdel(src) - - else - to_chat(user, "\red You must hold \the [P] steady to burn \the [src].") - /obj/item/weapon/paper/Topic(href, href_list) ..() if(!usr || (usr.stat || usr.restrained())) @@ -361,8 +339,12 @@ update_icon() -/obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob, params) +/obj/item/weapon/paper/attackby(obj/item/weapon/P, mob/living/user, params) ..() + + if(burn_state == ON_FIRE) + return + var/clown = 0 if(user.mind && (user.mind.assigned_role == "Clown")) clown = 1 @@ -443,11 +425,27 @@ to_chat(user, "You stamp the paper with your rubber stamp.") - else if(istype(P, /obj/item/weapon/lighter)) - burnpaper(P, user) + if(is_hot(P)) + if((CLUMSY in user.mutations) && prob(10)) + user.visible_message("[user] accidentally ignites themselves!", \ + "You miss the paper and accidentally light yourself on fire!") + user.unEquip(P) + user.adjust_fire_stacks(1) + user.IgniteMob() + return + + if(!Adjacent(user)) //to prevent issues as a result of telepathically lighting a paper + return + + user.unEquip(src) + user.visible_message("[user] lights [src] ablaze with [P]!", "You light [src] on fire!") + fire_act() add_fingerprint(user) - return + +/obj/item/weapon/paper/fire_act() + ..() + info = "[stars(info)]" /obj/item/weapon/paper/proc/stamp(var/obj/item/weapon/stamp/S) stamps += (!stamps || stamps == "" ? "
" : "") + "" diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 2c5c154bca8..9770fb8c523 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -8,23 +8,27 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 8 + burn_state = FLAMMABLE var/amount = 30 //How much paper is in the bin. - var/list/papers = new/list() //List of papers put in the bin for reference. -/* - autoignition_temperature = 519.15 // Kelvin + var/list/papers = list() //List of papers put in the bin for reference. + +/obj/item/weapon/paper_bin/fire_act() + if(!amount) + return + ..() + +/obj/item/weapon/paper_bin/Destroy() + if(papers) + for(var/i in papers) + qdel(i) + papers.Cut() + return ..() + +/obj/item/weapon/paper_bin/burn() + amount = 0 + extinguish() + update_icon() -/obj/item/weapon/paper_bin/ignite(var/temperature) - on_fire=1 - visible_message("\The [src]'s paper bursts into flame!") - overlays += fire_sprite - spawn(rand(3,10) SECONDS) - if(!on_fire) - return - new ashtype(src.loc) - papers=0 - amount=0 - update_icon() -*///LINDA shit figure out later /obj/item/weapon/paper_bin/MouseDrop(atom/over_object) var/mob/M = usr if(M.restrained() || M.stat || !Adjacent(M)) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index a09589f22ee..364f7b50f02 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -16,6 +16,7 @@ icon_state = "film" item_state = "electropack" w_class = 1 + burn_state = FLAMMABLE /******** @@ -27,6 +28,8 @@ icon_state = "photo" item_state = "paper" w_class = 2 + burn_state = FLAMMABLE + burntime = 5 var/icon/img //Big photo image var/scribble //Scribble on the back. var/icon/tiny @@ -106,7 +109,8 @@ icon = 'icons/obj/items.dmi' icon_state = "album" item_state = "briefcase" - can_hold = list("/obj/item/weapon/photo",) + can_hold = list("/obj/item/weapon/photo") + burn_state = FLAMMABLE /obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj) diff --git a/code/modules/persistence/persistence.dm b/code/modules/persistence/persistence.dm new file mode 100644 index 00000000000..cc5a7684947 --- /dev/null +++ b/code/modules/persistence/persistence.dm @@ -0,0 +1,38 @@ +/* +* Returns a byond list that can be passed to the "deserialize" proc +* to bring a new instance of this atom to its original state +* +* If we want to store this info, we can pass it to `json_encode` or some other +* interface that suits our fancy, to make it into an easily-handled string +*/ +/atom/movable/proc/serialize() + return list("type" = "[type]") + +/* +* This is given the byond list from above, to bring this atom to the state +* described in the list. +* This will be called after `New` but before `initialize`, so linking and stuff +* would probably be handled in `initialize` +* +* Also, this should only be called by `json_to_object` in persistence.dm - at least +* with current plans - that way it can actually initialize the type from the list +*/ +/atom/movable/proc/deserialize(var/data) + return + +/proc/json_to_object(var/json_data, var/loc) + var/data = json_decode(json_data) + return list_to_object(data, loc) + +/proc/list_to_object(var/list/data, var/loc) + if(!islist(data)) + throw EXCEPTION("You didn't give me a list, bucko") + if(!("type" in data)) + throw EXCEPTION("No 'type' field in the data") + var/path = text2path(data["type"]) + if(!path) + throw EXCEPTION("Path not found: [path]") + + var/atom/movable/thing = new path(loc) + thing.deserialize(data) + return thing diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c38a53437e5..5800747d367 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -976,8 +976,8 @@ return 0 else if(href_list["overload"]) - if(istype(usr, /mob/living/silicon) && !aidisabled) - src.overload_lighting() + if(issilicon(usr) && !aidisabled) + overload_lighting() else if(href_list["malfhack"]) var/mob/living/silicon/ai/malfai = usr @@ -1377,17 +1377,17 @@ // overload all the lights in this APC area -/obj/machinery/power/apc/proc/overload_lighting(var/chance = 100) - if(/* !get_connection() || */ !operating || shorted) +/obj/machinery/power/apc/proc/overload_lighting(chance = 100) + if(!operating || shorted) return - if( cell && cell.charge>=20) - cell.use(20); + if(cell && cell.charge >= 20) + cell.use(20) spawn(0) for(var/obj/machinery/light/L in area) if(prob(chance)) L.on = 1 L.broken() - sleep(1) + stoplag() /obj/machinery/power/apc/proc/setsubsystem(val) if(cell && cell.charge > 0) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 3bbfbb2248c..d2d2c619882 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -24,7 +24,7 @@ By design, d1 is the smallest direction and d2 is the highest /obj/structure/cable level = 1 - anchored =1 + anchored = 1 on_blueprints = TRUE var/datum/powernet/powernet name = "power cable" @@ -457,12 +457,13 @@ obj/structure/cable/proc/cableColor(var/colorC) #define MAXCOIL 30 -var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \ - new/datum/stack_recipe("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15), \ - ) +var/global/list/datum/stack_recipe/cable_coil_recipes = list( + new /datum/stack_recipe/cable_restraints("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15), +) /obj/item/stack/cable_coil name = "cable coil" + singular_name = "cable" icon = 'icons/obj/power.dmi' icon_state = "coil" item_state = "coil_red" diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index a96a4851c81..18a760f5f1d 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -514,8 +514,8 @@ status = LIGHT_EMPTY update() -/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = 0) - if(status == LIGHT_EMPTY) +/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0) + if(status == LIGHT_EMPTY || status == LIGHT_BROKEN) return if(!skip_sound_and_sparks) @@ -715,4 +715,4 @@ var/obj/item/organ/external/limb = user.get_organ(oname) if(limb) limb.droplimb(0, DROPLIMB_BURN) - return FIRELOSS \ No newline at end of file + return FIRELOSS diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index ce0d22c4165..e13e84de488 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -27,6 +27,7 @@ var/last_warning var/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six allow_spin = 0 + burn_state = LAVA_PROOF /obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0) //CARN: admin-alert for chuckle-fuckery. diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 5a8fa77e268..42a7c6a9c7b 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -11,6 +11,7 @@ hitsound = 'sound/weapons/pierce.ogg' var/hitsound_wall = "" pressure_resistance = INFINITY + burn_state = LAVA_PROOF var/def_zone = "" //Aiming at var/mob/firer = null//Who shot it var/obj/item/ammo_casing/ammo_casing = null diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index ecb54b9c1f0..8c40044ad2d 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -56,8 +56,8 @@ /obj/item/projectile/bullet/incendiary /obj/item/projectile/bullet/incendiary/on_hit(var/atom/target, var/blocked = 0) - ..() - if(istype(target, /mob/living/carbon)) + . = ..() + if(iscarbon(target)) var/mob/living/carbon/M = target M.adjust_fire_stacks(4) M.IgniteMob() diff --git a/code/modules/reagents/newchem/Blob-Reagents.dm b/code/modules/reagents/newchem/Blob-Reagents.dm index d3ebcc447b5..fa5e9747e34 100644 --- a/code/modules/reagents/newchem/Blob-Reagents.dm +++ b/code/modules/reagents/newchem/Blob-Reagents.dm @@ -31,7 +31,7 @@ /datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH) - M.adjust_fire_stacks(round(volume/12)) + M.adjust_fire_stacks(round(volume/10)) volume = ..() M.apply_damage(0.6*volume, BURN) M.IgniteMob() diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm index 7afdc564647..6dece72544c 100644 --- a/code/modules/reagents/newchem/pyro.dm +++ b/code/modules/reagents/newchem/pyro.dm @@ -37,8 +37,9 @@ min_temp = 424 /datum/reagent/clf3/on_mob_life(mob/living/M) - M.adjust_fire_stacks(4) - M.adjustFireLoss(0.35*M.fire_stacks) + M.adjust_fire_stacks(2) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) ..() /datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume) @@ -66,7 +67,7 @@ /datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH) - M.adjust_fire_stacks(5) + M.adjust_fire_stacks(min(volume/5, 10)) M.IgniteMob() M.bodytemperature += 30 @@ -416,10 +417,14 @@ for(var/turf/simulated/turf in range(min(created_volume/10,4),T)) new /obj/effect/hotspot(turf) +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) + M.IgniteMob() + ..() + /datum/reagent/phlogiston/on_mob_life(mob/living/M) M.adjust_fire_stacks(1) - M.IgniteMob() - M.adjustFireLoss(0.2*M.fire_stacks) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) ..() /datum/reagent/napalm @@ -436,7 +441,7 @@ /datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH) - M.adjust_fire_stacks(7) + M.adjust_fire_stacks(min(volume/4, 20)) /datum/chemical_reaction/napalm name = "Napalm" @@ -539,8 +544,11 @@ // Put out fire if(method == TOUCH) M.adjust_fire_stacks(-(volume / 5)) // more effective than water - if(M.fire_stacks <= 0) - M.ExtinguishMob() + M.ExtinguishMob() + +/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) + if(istype(O)) + O.extinguish() /datum/reagent/firefighting_foam/reaction_turf(turf/simulated/T, volume) if(!istype(T)) @@ -555,18 +563,6 @@ T.assume_air(lowertemp) qdel(hotspot) -/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) - var/turf/simulated/T = get_turf(O) - if(!istype(T)) - return - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles()) - lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) - /datum/chemical_reaction/clf3_firefighting name = "clf3_firefighting" id = "clf3_firefighting" diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/oldchem/reagents/reagents_water.dm index a2ec51f1811..ca3106e1815 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_water.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_water.dm @@ -20,9 +20,7 @@ // Put out fire if(method == TOUCH) M.adjust_fire_stacks(-(volume / 10)) - if(M.fire_stacks <= 0) - M.ExtinguishMob() - return + M.ExtinguishMob() /datum/reagent/water/reaction_turf(turf/simulated/T, volume) if(!istype(T)) @@ -42,15 +40,9 @@ qdel(hotspot) /datum/reagent/water/reaction_obj(obj/O, volume) - var/turf/simulated/T = get_turf(O) - if(istype(T)) - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles() ) - lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) + if(istype(O)) + O.extinguish() + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube)) var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O if(!cube.wrapped) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 9024904f7e3..39945505aed 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -64,7 +64,7 @@ // attack by item places it in to disposal /obj/machinery/disposal/attackby(var/obj/item/I, var/mob/user, params) - if(stat & BROKEN || !I || !user || ((I.flags & NODROP) && !istype(I, /obj/item/weapon/storage/bag/trash/cyborg))) + if(stat & BROKEN || !I || !user) return src.add_fingerprint(user) @@ -144,7 +144,8 @@ if(!I) return - user.drop_item() + if(!user.drop_item()) + return if(I) I.loc = src diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 02b13b903f2..ddcb3f2f399 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -117,6 +117,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 + burn_state = FLAMMABLE /obj/item/stack/packageWrap/afterattack(var/obj/target as obj, mob/user as mob, proximity) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index e3a59183abf..9c8d1cab95d 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -342,6 +342,7 @@ C.color = "#000080" C.max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT C.heat_protection = C.body_parts_covered + C.burn_state = FIRE_PROOF uses -- if(!uses) qdel(src) diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 5e49a97fc59..b49ccc6a838 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -343,3 +343,32 @@ I use this so that this can be made better once the organ overhaul rolls out -- if(!istype(owner)) // You're not the primary organ of ANYTHING, bucko return 0 return src == O.get_int_organ(organ_tag) + +/obj/item/organ/serialize() + var/data = ..() + if(status != 0) + data["status"] = status + if(robotic > 0) + data["robotic"] = robotic + + // Save the DNA datum if: The owner doesn't exist, or the dna doesn't match + // the owner + if(!(owner && dna.unique_enzymes == owner.dna.unique_enzymes)) + data["dna"] = dna.serialize() + return data + +/obj/item/organ/deserialize(var/data) + switch(data["robotic"]) + if(1) + mechassist() + if(2) + robotize() + else + // Nothing + if(isnum(data["status"])) + status = data["status"] + if(islist(data["dna"])) + // The only thing the official proc does is + //instantiate the list and call this proc + dna.deserialize(data["dna"]) + ..() diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 10d7fe724ea..1c3f05f5816 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -836,12 +836,7 @@ Note that amputating the affected organ does in fact remove the infection from t ..() if(company && istext(company)) - model = company - var/datum/robolimb/R = all_robolimbs[company] - if(R) - force_icon = R.icon - name = "[R.company] [initial(name)]" - desc = "[R.desc]" + set_company(company) cannot_break = 1 get_icon() @@ -849,6 +844,16 @@ Note that amputating the affected organ does in fact remove the infection from t if(T) T.robotize() + + +/obj/item/organ/external/proc/set_company(var/company) + model = company + var/datum/robolimb/R = all_robolimbs[company] + if(R) + force_icon = R.icon + name = "[R.company] [initial(name)]" + desc = "[R.desc]" + /obj/item/organ/external/proc/mutate() src.status |= ORGAN_MUTATED if(owner) owner.update_body() @@ -969,3 +974,19 @@ Note that amputating the affected organ does in fact remove the infection from t continue wounds -= W qdel(W) + + +/obj/item/organ/external/serialize() + var/list/data = ..() + if(robotic == 2) + data["company"] = model + // If we wanted to store wound information, here is where it would go + return data + +/obj/item/organ/external/deserialize(list/data) + var/company = data["company"] + if(company && istext(company)) + set_company(company) + ..() // Parent call loads in the DNA + if(data["dna"]) + sync_colour_to_dna() diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css index 3829cbd3f48..dab174587ec 100644 --- a/goon/browserassets/css/browserOutput.css +++ b/goon/browserassets/css/browserOutput.css @@ -245,8 +245,8 @@ em {font-style: normal; font-weight: bold;} .deptradio {color: #993399;} .comradio {color: #193A7A;} .syndradio {color: #6d3f40;} -.dsquadradio {color: #686868;} -.resteamradio {color: #18BC46;} +.dsquadradio {color: #686868;} +.resteamradio {color: #18BC46;} .airadio {color: #FF00FF;} .centradio {color: #5C5C8A;} .secradio {color: #A30000;} @@ -255,17 +255,17 @@ em {font-style: normal; font-weight: bold;} .sciradio {color: #993399;} .supradio {color: #5F4519;} .srvradio {color: #6eaa2c;} -.admin_channel {color: #9A04D1; font-weight: bold;} -.mod_channel {color: #402A14; font-weight: bold;} -.mod_channel_admin {color: #402A14; font-weight: bold;} +.admin_channel {color: #9A04D1; font-weight: bold;} +.mod_channel {color: #402A14; font-weight: bold;} +.mod_channel_admin {color: #402A14; font-weight: bold;} .djradio {color: #663300;} -.binaryradio {color: #0B0050; font-family: 'Courier New', Courier, monospace;} +.binaryradio {color: #0B0050; font-family: 'Courier New', Courier, monospace;} .mommiradio {color: navy;} .alert {color: #ff0000;} -h1.alert, h2.alert {color: #000000;} +h1.alert, h2.alert {color: #000000;} .ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;} .emote { font-style: italic;} -.selecteddna {color: #FFFFFF; background-color: #001B1B} +.selecteddna {color: #FFFFFF; background-color: #001B1B} .attack {color: #ff0000;} .moderate {color: #CC0000;} @@ -276,20 +276,20 @@ h1.alert, h2.alert {color: #000000;} .boldwarning {color: #ff0000; font-style: italic; font-weight: bold} .danger {color: #ff0000; font-weight: bold;} .userdanger {color: #ff0000; font-weight: bold; font-size: 120%;} -.biggerdanger {color: #ff0000; font-weight: bold; font-size: 150%;} +.biggerdanger {color: #ff0000; font-weight: bold; font-size: 150%;} .info {color: #0000CC;} .notice {color: #000099;} .bnotice {color: #000099; font-weight: bold;} -.boldnotice {color: #000099; font-weight: bold;} +.boldnotice {color: #000099; font-weight: bold;} .suicide {color: #ff5050; font-style: italic;} - +.green {color: #03ff39;} .announce {color: #228b22; font-weight: bold;} -.boldannounce {color: #ff0000; font-weight: bold;} -.greenannounce {color: #00ff00; font-weight: bold;} +.boldannounce {color: #ff0000; font-weight: bold;} +.greenannounce {color: #00ff00; font-weight: bold;} .alien {color: #543354;} -.noticealien {color: #00c000;} +.noticealien {color: #00c000;} .alertalien {color: #00c000; font-weight: bold;} .sinister {color: #800080; font-weight: bold; font-style: italic;} /* /vg/ */ @@ -334,12 +334,12 @@ h1.alert, h2.alert {color: #000000;} .orangei {color: #ffa500; font-style: italic;} .orangeb {color: #ffa500; font-weight: bold;} -.revennotice {color: #1d2953;} -.revenboldnotice {color: #1d2953; font-weight: bold;} -.revenbignotice {color: #1d2953; font-weight: bold; font-size: 3;} +.revennotice {color: #1d2953;} +.revenboldnotice {color: #1d2953; font-weight: bold;} +.revenbignotice {color: #1d2953; font-weight: bold; font-size: 3;} .revenminor {color: #823abb} -.revenwarning {color: #760fbb; font-style: italic;} -.revendanger {color: #760fbb; font-weight: bold; font-size: 3;} +.revenwarning {color: #760fbb; font-style: italic;} +.revendanger {color: #760fbb; font-weight: bold; font-size: 3;} /* /vg/ */ .good {color: green;} diff --git a/html/changelog.html b/html/changelog.html index 674ceedea5f..3fa716285a4 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,74 @@ -->
+

01 August 2016

+

Crazylemon64 updated:

+
    +
  • Admins are now able to print a map of the z levels.
  • +
  • Admins are now capable of scrambling the z levels' transitions.
  • +
  • Janiborg trash bags no longer fit down disposals when empty
  • +
+

Fethas updated:

+
    +
  • (Maybe?)..We actually check if the race HAS BLOOD before trying to suck them
  • +
  • Due to various complaints from tajarans having hand cramps, glove makers have removed plasteel from the fabric.
  • +
  • Plasmaman can no longer be vampires.
  • +
  • Removes the mask check on both victim AND vampire, also makes the message a bit more obscure, so it's up to your imagination of where you are biting them and with what.
  • +
+

Fox McCloud updated:

+
    +
  • Medical stacks now have 6 uses
  • +
  • Medical stacks now heal 25 burn/brute
  • +
  • Applying a medical stack to others is instant, no matter what
  • +
  • Applying any medical stack to yourself has a 2 second delay
  • +
  • Applying a splint to yourself has a 10 second delay
  • +
  • No more RNG fumbling of putting splints to yourself
  • +
  • Confirmation for applying medical stacks is now green
  • +
  • Advanced Medkits now have 2 trauma kits, 2 burn kits, a health analyzer, 1 roll of gauze, and medipen.
  • +
  • Amount of splints in medical vendors increased from 2 to 4
  • +
  • Fixes weird icon updates when getting healed by medical kits
  • +
  • Adds in object burning system that allows things to be lit on fire
  • +
  • being on fire should heat you up a bit quicker and do a bit more damage
  • +
  • Novaflowers ignite you rather than uselessly heating you up
  • +
  • Adjusts a few pyrotechnic chems to better fit with other tweaks to fire damage
  • +
+

IcyV updated:

+
    +
  • Adds a unique axe for Atmos-traitors
  • +
+

Krausus updated:

+
    +
  • Probably fixed some very specific items messing up View Variables for no adequately explicable reason.
  • +
  • Fixed round-end antagonist report failing to print due to null objectives.
  • +
+

Kyep updated:

+
    +
  • Added atmos grenade kit to traitor uplink.
  • +
  • Fixed bug with adv pinpointers and CMO hypospray theft objectives. Fixes #5232
  • +
+

TheBeoni updated:

+
    +
  • Adds "unique" jumpsuit for Pod Pilot so they can finally stop using security one Added picture because i do not like that red label
  • +
+

TheDZD updated:

+
    +
  • Shadowling ascendance and badmins pressing the "Destroy All Lights" button should no longer bring the server to its knees.
  • +
  • Broken lights will no longer re-break.
  • +
+

TullyBurnalot updated:

+
    +
  • Using ATMs leaves fingerprints behind
  • +
+

Twinmold updated:

+
    +
  • Nuke Ops airtank connected to pipenet now.
  • +
+

tigercat2000 updated:

+
    +
  • Readded colored cable-cuffs.
  • +
  • Making stacks of metal rods now updates the icon correctly.
  • +
+

28 July 2016

A Giant-Ass Mountain of Salt updated:

Name

Status

Location

Control

[Bot.hacked ? "(!) [Bot.name]" : Bot.name] ([Bot.model])