diff --git a/baystation12.dme b/baystation12.dme index 3b2e3409f43..d972490d4bb 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -91,6 +91,7 @@ #define FILE_DIR "code/modules/admin/verbs" #define FILE_DIR "code/modules/assembly" #define FILE_DIR "code/modules/chemical" +#define FILE_DIR "code/modules/client" #define FILE_DIR "code/modules/clothing" #define FILE_DIR "code/modules/clothing/glasses" #define FILE_DIR "code/modules/clothing/head" @@ -103,6 +104,7 @@ #define FILE_DIR "code/modules/DetectiveWork" #define FILE_DIR "code/modules/flufftext" #define FILE_DIR "code/modules/food" +#define FILE_DIR "code/modules/icon generation" #define FILE_DIR "code/modules/maps" #define FILE_DIR "code/modules/mining" #define FILE_DIR "code/modules/mob" @@ -308,7 +310,6 @@ #include "code\datums\spells\turf_teleport.dm" #include "code\datums\spells\wizard.dm" #include "code\defines\atom.dm" -#include "code\defines\client.dm" #include "code\defines\global.dm" #include "code\defines\hub.dm" #include "code\defines\obj.dm" @@ -361,12 +362,6 @@ #include "code\defines\sd_procs\constants.dm" #include "code\defines\sd_procs\direction.dm" #include "code\defines\sd_procs\math.dm" -#include "code\FEA\FEA_airgroup.dm" -#include "code\FEA\FEA_fire.dm" -#include "code\FEA\FEA_gas_mixture.dm" -#include "code\FEA\FEA_group_helpers.dm" -#include "code\FEA\FEA_system.dm" -#include "code\FEA\FEA_turf_tile.dm" #include "code\game\algorithm.dm" #include "code\game\atom_procs.dm" #include "code\game\cellautomata.dm" @@ -423,6 +418,7 @@ #include "code\game\events\Events\SpaceCarp.dm" #include "code\game\events\Events\SpaceNinja.dm" #include "code\game\events\Events\VirusEpidemic.dm" +#include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" @@ -516,7 +512,6 @@ #include "code\game\machinery\scanner.dm" #include "code\game\machinery\seed_extractor.dm" #include "code\game\machinery\shieldgen.dm" -#include "code\game\machinery\sink.dm" #include "code\game\machinery\Sleeper.dm" #include "code\game\machinery\spaceheater.dm" #include "code\game\machinery\status_display.dm" @@ -649,9 +644,11 @@ #include "code\game\objects\tank.dm" #include "code\game\objects\toys.dm" #include "code\game\objects\transfer_valve.dm" +#include "code\game\objects\uplinks.dm" #include "code\game\objects\washing_machine.dm" #include "code\game\objects\watercloset.dm" #include "code\game\objects\weapons.dm" +#include "code\game\objects\windoor_assembly.dm" #include "code\game\objects\window.dm" #include "code\game\objects\alien\acid.dm" #include "code\game\objects\alien\defines.dm" @@ -661,9 +658,11 @@ #include "code\game\objects\alien\weeds.dm" #include "code\game\objects\closets\bombsuit.dm" #include "code\game\objects\closets\emergency.dm" +#include "code\game\objects\closets\ert.dm" #include "code\game\objects\closets\extinguisher.dm" #include "code\game\objects\closets\fireaxe.dm" #include "code\game\objects\closets\firecloset.dm" +#include "code\game\objects\closets\fitnesscloset.dm" #include "code\game\objects\closets\gimmick.dm" #include "code\game\objects\closets\gmcloset.dm" #include "code\game\objects\closets\janitor.dm" @@ -743,11 +742,13 @@ #include "code\game\objects\items\weapons\tiles_wires.dm" #include "code\game\objects\items\weapons\tools.dm" #include "code\game\objects\items\weapons\twohanded.dm" +#include "code\game\objects\items\weapons\wrappingpaper.dm" #include "code\game\objects\items\weapons\implants\implant.dm" #include "code\game\objects\items\weapons\implants\implantcase.dm" #include "code\game\objects\items\weapons\implants\implantchair.dm" #include "code\game\objects\items\weapons\implants\implanter.dm" #include "code\game\objects\items\weapons\implants\implantfreedom.dm" +#include "code\game\objects\items\weapons\implants\implantnanoaug.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\radio\beacon.dm" #include "code\game\objects\radio\electropack.dm" @@ -774,6 +775,7 @@ #include "code\game\objects\storage\lockbox.dm" #include "code\game\objects\storage\storage.dm" #include "code\game\objects\storage\toolbox.dm" +#include "code\game\objects\storage\uplink_kits.dm" #include "code\game\objects\tanks\emergency.dm" #include "code\game\objects\tanks\jetpack.dm" #include "code\game\objects\tanks\oxygen.dm" @@ -790,11 +792,14 @@ #include "code\js\byjax.dm" #include "code\js\menus.dm" #include "code\modules\admin\admin.dm" +#include "code\modules\admin\admin_investigate.dm" +#include "code\modules\admin\admin_memo.dm" #include "code\modules\admin\admin_verbs.dm" #include "code\modules\admin\banjob.dm" #include "code\modules\admin\create_mob.dm" #include "code\modules\admin\create_object.dm" #include "code\modules\admin\create_turf.dm" +#include "code\modules\admin\IsBanned.dm" #include "code\modules\admin\NewBan.dm" #include "code\modules\admin\newbanjob.dm" #include "code\modules\admin\player_panel.dm" @@ -837,6 +842,8 @@ #include "code\modules\chemical\Chemistry-Reagents.dm" #include "code\modules\chemical\Chemistry-Recipes.dm" #include "code\modules\chemical\Chemistry-Tools.dm" +#include "code\modules\client\client defines.dm" +#include "code\modules\client\client procs.dm" #include "code\modules\clothing\costume.dm" #include "code\modules\clothing\ears.dm" #include "code\modules\clothing\gimmick.dm" @@ -853,6 +860,8 @@ #include "code\modules\clothing\head\hats.dm" #include "code\modules\clothing\head\helmets.dm" #include "code\modules\clothing\spacesuits\captain.dm" +#include "code\modules\clothing\spacesuits\engineer.dm" +#include "code\modules\clothing\spacesuits\ert.dm" #include "code\modules\clothing\spacesuits\miscellaneous.dm" #include "code\modules\clothing\spacesuits\ninja.dm" #include "code\modules\clothing\spacesuits\rig.dm" @@ -878,6 +887,8 @@ #include "code\modules\customitems\item_spawning.dm" #include "code\modules\DetectiveWork\detective_work.dm" #include "code\modules\DetectiveWork\evidence.dm" +#include "code\modules\DetectiveWork\footprints_and_rag.dm" +#include "code\modules\DetectiveWork\scanner.dm" #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" @@ -921,6 +932,7 @@ #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\living.dm" #include "code\modules\mob\living\living_defense.dm" +#include "code\modules\mob\living\login.dm" #include "code\modules\mob\living\say.dm" #include "code\modules\mob\living\blob\blob.dm" #include "code\modules\mob\living\carbon\carbon.dm" @@ -964,6 +976,7 @@ #include "code\modules\mob\living\carbon\human\emote.dm" #include "code\modules\mob\living\carbon\human\examine.dm" #include "code\modules\mob\living\carbon\human\hud.dm" +#include "code\modules\mob\living\carbon\human\hud_overlays.dm" #include "code\modules\mob\living\carbon\human\human.dm" #include "code\modules\mob\living\carbon\human\human_attackalien.dm" #include "code\modules\mob\living\carbon\human\human_attackhand.dm" @@ -1035,6 +1048,7 @@ #include "code\modules\mob\living\silicon\robot\say.dm" #include "code\modules\mob\living\silicon\robot\wires.dm" #include "code\modules\mob\new_player\hud.dm" +#include "code\modules\mob\new_player\login.dm" #include "code\modules\mob\new_player\new_player.dm" #include "code\modules\mob\new_player\preferences.dm" #include "code\modules\mob\new_player\preferences_setup.dm" @@ -1079,6 +1093,7 @@ #include "code\modules\power\singularity\emitter.dm" #include "code\modules\power\singularity\field_generator.dm" #include "code\modules\power\singularity\generator.dm" +#include "code\modules\power\singularity\investigate.dm" #include "code\modules\power\singularity\singularity.dm" #include "code\modules\power\singularity\particle_accelerator\particle.dm" #include "code\modules\power\singularity\particle_accelerator\particle_accelerator.dm" @@ -1180,8 +1195,6 @@ #include "code\WorkInProgress\organs\organs.dm" #include "code\WorkInProgress\Ported\policetape.dm" #include "code\WorkInProgress\Ported\sql.dm" -#include "code\WorkInProgress\Ported\Abi79\uplink_kits.dm" -#include "code\WorkInProgress\Ported\Abi79\uplinks.dm" #include "code\WorkInProgress\Ported\Bureaucracy\copier.dm" #include "code\WorkInProgress\Ported\Bureaucracy\filing.dm" #include "code\WorkInProgress\SkyMarshal\coatrack.dm" @@ -1207,6 +1220,18 @@ #include "code\WorkInProgress\virus2\monkeydispensor.dm" #include "code\WorkInProgress\virus2\Prob.dm" #include "code\WorkInProgress\Wrongnumber\weldbackpack.dm" +#include "code\ZAS\Airflow.dm" +#include "code\ZAS\Connection.dm" +#include "code\ZAS\Creation.dm" +#include "code\ZAS\Definition.dm" +#include "code\ZAS\FEA_gas_mixture.dm" +#include "code\ZAS\FEA_system.dm" +#include "code\ZAS\FEA_turf_tile.dm" +#include "code\ZAS\Fire.dm" +#include "code\ZAS\Functions.dm" +#include "code\ZAS\Plasma.dm" +#include "code\ZAS\Processing.dm" +#include "code\ZAS\Variable Settings.dm" #include "interface\interface.dm" #include "interface\skin.dmf" #include "maps\tgstation.2.0.8.dmm" diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index 1b63e605481..5ade345e08f 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -128,28 +128,19 @@ datum/pipeline var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume) air_sample.volume = mingle_volume - if(istype(target) && target.parent && target.parent.group_processing) + if(istype(target) && target.zone) //Have to consider preservation of group statuses var/datum/gas_mixture/turf_copy = new - turf_copy.copy_from(target.parent.air) - turf_copy.volume = target.parent.air.volume //Copy a good representation of the turf from parent group + turf_copy.copy_from(target.zone.air) + turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group equalize_gases(list(air_sample, turf_copy)) air.merge(air_sample) - if(target.parent.air.compare(turf_copy)) - //The new turf would be an acceptable group member so permit the integration + turf_copy.subtract(target.zone.air) - turf_copy.subtract(target.parent.air) - - target.parent.air.merge(turf_copy) - - else - //Comparison failure so dissemble group and copy turf - - target.parent.suspend_group_processing() - target.air.copy_from(turf_copy) + target.zone.air.merge(turf_copy) else var/datum/gas_mixture/turf_air = target.return_air() @@ -187,9 +178,9 @@ datum/pipeline var/delta_temperature = 0 var/sharer_heat_capacity = 0 - if(modeled_location.parent && modeled_location.parent.group_processing) - delta_temperature = (air.temperature - modeled_location.parent.air.temperature) - sharer_heat_capacity = modeled_location.parent.air.heat_capacity() + if(modeled_location.zone) + delta_temperature = (air.temperature - modeled_location.zone.air.temperature) + sharer_heat_capacity = modeled_location.zone.air.heat_capacity() else delta_temperature = (air.temperature - modeled_location.air.temperature) sharer_heat_capacity = modeled_location.air.heat_capacity() @@ -208,14 +199,8 @@ datum/pipeline air.temperature += self_temperature_delta - if(modeled_location.parent && modeled_location.parent.group_processing) - if((abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*modeled_location.parent.air.temperature)) - modeled_location.parent.suspend_group_processing() - - modeled_location.air.temperature += sharer_temperature_delta - - else - modeled_location.parent.air.temperature += sharer_temperature_delta/modeled_location.parent.air.group_multiplier + if(modeled_location.zone) + modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier else modeled_location.air.temperature += sharer_temperature_delta diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 863923b1023..da9bd52bfcd 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -158,7 +158,7 @@ obj/machinery/atmospherics/pipe else return 1 proc/burst() - src.visible_message("\red \bold [src] bursts!"); + src.visible_message("\red \bold \The [src] bursts!"); playsound(src.loc, 'bang.ogg', 25, 1) var/datum/effect/effect/system/harmless_smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) diff --git a/code/FEA/FEA_fire.dm b/code/FEA/FEA_fire.dm index 14fd727dd92..c37e51ac2ca 100644 --- a/code/FEA/FEA_fire.dm +++ b/code/FEA/FEA_fire.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + atom proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) //Purpose: Managing temperature exposure. @@ -67,13 +69,12 @@ obj layer = TURF_LAYER - var - volume = 125 - temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + var/volume = 125 + var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - just_spawned = 1 + var/just_spawned = 1 - bypassing = 0 + var/bypassing = 0 proc/perform_exposure() var/turf/simulated/floor/location = loc @@ -179,4 +180,4 @@ obj loc = null - ..() \ No newline at end of file + ..() diff --git a/code/FEA/FEA_gas_mixture.dm b/code/FEA/FEA_gas_mixture.dm index 8edefe79d7b..751431ef7b3 100644 --- a/code/FEA/FEA_gas_mixture.dm +++ b/code/FEA/FEA_gas_mixture.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* What are the archived variables for? Calculations are done using the archived variables with the results merged into the regular variables. @@ -22,11 +24,10 @@ datum volatile_fuel specific_heat = 30 - var - moles = 0 - specific_heat = 0 + var/moles = 0 + var/specific_heat = 0 - moles_archived = 0 + var/moles_archived = 0 gas_mixture var //Holds the "moles" of each of the four gases. @@ -1006,4 +1007,4 @@ datum corresponding.moles -= trace_gas.moles update_values() - return 1 \ No newline at end of file + return 1 diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm index 38083f52ce0..0652fe66163 100644 --- a/code/FEA/FEA_turf_tile.dm +++ b/code/FEA/FEA_turf_tile.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + atom/movable/var/pressure_resistance = 20 atom/movable/var/last_forced_movement = 0 @@ -91,23 +93,22 @@ turf var/current_graphic = null - var/tmp - datum/gas_mixture/air + var/tmp/datum/gas_mixture/air - processing = 1 - datum/air_group/parent - group_border = 0 - length_space_border = 0 + var/tmp/processing = 1 + var/tmp/datum/air_group/parent + var/tmp/group_border = 0 + var/tmp/length_space_border = 0 - air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update + var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update - archived_cycle = 0 - current_cycle = 0 + var/tmp/archived_cycle = 0 + var/tmp/current_cycle = 0 - obj/effect/hotspot/active_hotspot + var/tmp/obj/effect/hotspot/active_hotspot - temperature_archived //USED ONLY FOR SOLIDS - being_superconductive = 0 + var/tmp/temperature_archived //USED ONLY FOR SOLIDS + var/tmp/being_superconductive = 0 proc @@ -132,9 +133,9 @@ turf overlays += image('floors.dmi',siding_icon_state) switch(model.graphic) - if("plasma") + if(1) overlays.Add(plmaster) - if("sleeping_agent") + if(2) overlays.Add(slmaster) diff --git a/code/WorkInProgress/Cael_Aislinn/BirdMan/birdman.dm b/code/WorkInProgress/Cael_Aislinn/BirdMan/birdman.dm index 45206ccc9ee..34872f32851 100644 --- a/code/WorkInProgress/Cael_Aislinn/BirdMan/birdman.dm +++ b/code/WorkInProgress/Cael_Aislinn/BirdMan/birdman.dm @@ -46,8 +46,8 @@ - var/husk = (mutations & HUSK) - //var/obese = (mutations & FAT) + var/husk = (HUSK in mutations) + //var/obese = (FAT in mutation) stand_icon.Blend(new /icon('birdman.dmi', "chest_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('birdman.dmi', "chest_[g]_l"), ICON_OVERLAY) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm index de333045f0b..4ab6c96894b 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm @@ -184,7 +184,7 @@ var/is_speaking_taj = 0 if(copytext(message, 1, 3) == ":j" || copytext(message, 1, 3) == ":J") message = copytext(message, 3) - if(taj_talk_understand) + if(taj_talk_understand || universal_speak) is_speaking_taj = 1 if( !message_mode && (disease_symptoms & DISEASE_WHISPER)) @@ -403,7 +403,7 @@ for (var/mob/M in listening) //if speaking in tajaran, only let other tajs understand - if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) ) + if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj || M.universal_speak) ) heard_a += M else heard_b += M diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm index c8906cf31df..bc1c6750dab 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajara_transformation.dm @@ -55,7 +55,7 @@ O.update_body() O.update_face() spawn(1) - O.update_clothing() + O.rebuild_appearance() O << "You are now a Tajara." spawn(0)//To prevent the proc from returning null. del(src) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm index 1f80c190dd1..048aadd1657 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm @@ -22,11 +22,17 @@ if(!lying_icon) lying_icon = new /icon('tajaran.dmi', "body_[g]_l") icon = stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" ..() +/mob/living/carbon/human/tajaran/rebuild_appearance() + update_clothing() + +/mob/living/carbon/human/tajaran/update_body_appearance() + update_clothing() + /mob/living/carbon/human/tajaran/update_clothing() // ..() @@ -37,19 +43,19 @@ // lol var/fat = "" - /*if (mutations & FAT) + /*if (FAT in mutation) fat = "fat"*/ /* - if (mutations & HULK) + if (HULK in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]") */ - if (mutations & COLD_RESISTANCE) + if (COLD_RESISTANCE in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]") - if (mutations & TK) + if (TK in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]") - if (mutations & LASER) + if (LASER in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]") if (mutantrace) @@ -74,6 +80,18 @@ del(stand_icon) if(lying_icon) del(lying_icon) + if("skrell") + body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s") + body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l") +// This needs to be matched up with humans, but I'm too lazy right now +// if(face_standing) +// del(face_standing) +// if(face_lying) +// del(face_lying) + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) if("plant") if(stat != 2) //if not dead, that is overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]") @@ -121,21 +139,21 @@ if (lying) icon = lying_icon - overlays += body_lying + overlays += damageicon_lying if (face_lying) overlays += face_lying else icon = stand_icon - overlays += body_standing + overlays += damageicon_standing if (face_standing) overlays += face_standing // Uniform if(w_uniform) - /*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL)) + /*if ((FAT in mutations) && !(w_uniform.flags & ONESIZEFITSALL)) src << "\red You burst out of the [w_uniform.name]!" var/obj/item/clothing/c = w_uniform u_equip(c) @@ -151,7 +169,7 @@ var/t1 = w_uniform.color if (!t1) t1 = icon_state - /*if (mutations & FAT) + /*if (FAT in mutations) overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) else*/ overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) @@ -263,7 +281,7 @@ var/tail_shown = 1 if (wear_suit) - /*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL)) + /*if ((FAT in mutations) && !(wear_suit.flags & ONESIZEFITSALL)) src << "\red You burst out of the [wear_suit.name]!" var/obj/item/clothing/c = wear_suit u_equip(c) @@ -457,8 +475,8 @@ - var/husk = (mutations & HUSK) - //var/obese = (mutations & FAT) + var/husk = (HUSK in mutations) + //var/obese = (FAT in mutations) stand_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi index 6e69669647f..14284506856 100644 Binary files a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi and b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi differ diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi index 440983184db..c101e668feb 100644 Binary files a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi and b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi differ diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm index e4c91900877..a4315a0ba9f 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm @@ -35,7 +35,7 @@ var/is_speaking_taj = 0 if(copytext(message, 1, 4) == ":j ") message = copytext(message, 4) - if(taj_talk_understand) + if(taj_talk_understand || universal_speak) is_speaking_taj = 1 if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown") @@ -84,7 +84,7 @@ var/list/heard_b = list() // didn't understand us for (var/mob/M in listening) - if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) ) + if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj || M.universal_speak) ) heard_a += M else heard_b += M diff --git a/code/WorkInProgress/Ported/Abi79/uplinks.dm b/code/WorkInProgress/Ported/Abi79/uplinks.dm index ae261a85ac1..55cd988af8f 100644 --- a/code/WorkInProgress/Ported/Abi79/uplinks.dm +++ b/code/WorkInProgress/Ported/Abi79/uplinks.dm @@ -21,12 +21,17 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/items // List of items var/list/ItemList // Parsed list of items var/uses // Numbers of crystals + var/uplink_data // designated uplink items // List of items not to shove in their hands. var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate) New() - welcome = ticker.mode.uplink_welcome - items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items + if(!welcome) + welcome = ticker.mode.uplink_welcome + if(!uplink_data) + uplink_data = ticker.mode.uplink_items + + items = dd_replacetext(uplink_data, "\n", "") // Getting the text string of items ItemList = dd_text2list(src.items, ";") // Parsing the items text string uses = ticker.mode.uplink_uses @@ -312,7 +317,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/temp = null //Temporary storage area for a message offering the option to destroy the radio var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself. var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "radio" throwforce = 5 diff --git a/code/WorkInProgress/SkyMarshal/portalathe.dm b/code/WorkInProgress/SkyMarshal/portalathe.dm index bbd27df919d..9fdc0e757ef 100644 --- a/code/WorkInProgress/SkyMarshal/portalathe.dm +++ b/code/WorkInProgress/SkyMarshal/portalathe.dm @@ -1,8 +1,9 @@ //May expand later, but right now it just repairs lights. /obj/item/device/portalathe - name = "\improper Portable Autolathe" - desc = "It blinks and has an antenna on it. It must be advanced." - icon_state = "t-ray0" + name = "portable autolathe" + desc = "A device which can repair broken lights instantly. Must be advanced." + icon = 'janitor.dmi' + icon_state = "portalathe" afterattack(var/atom/target, mob/user as mob) if(!target || !user) @@ -16,5 +17,5 @@ L.status = 0 L.on = 1 L.update() - user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!") + user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!","You hear a soft whiiir-pop noise over the sound of flexing glass, followed by the soft hum of an activated [target].") return \ No newline at end of file diff --git a/code/WorkInProgress/SkyMarshal/traitoritems.dm b/code/WorkInProgress/SkyMarshal/traitoritems.dm index 19e2d2e9a0d..a2b24f4f5ce 100644 --- a/code/WorkInProgress/SkyMarshal/traitoritems.dm +++ b/code/WorkInProgress/SkyMarshal/traitoritems.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /obj/item/weapon/stamperaser name = "eraser" desc = "It looks like some kind of eraser." @@ -15,10 +17,9 @@ var/on = 0 flags = FPRINT|TABLEPASS w_class = 1 - var - list/obj/item/device/radio/Old = list() - list/obj/item/device/radio/Curr = list() - time_remaining = 5 + var/list/obj/item/device/radio/Old = list() + var/list/obj/item/device/radio/Curr = list() + var/time_remaining = 5 /obj/item/device/jammer/New() ..() @@ -72,4 +73,4 @@ icon_state = "t-ray0" sleep(2) - */ \ No newline at end of file + */ diff --git a/code/WorkInProgress/SkyMarshal/wardrobes.dm b/code/WorkInProgress/SkyMarshal/wardrobes.dm index 56b7f4d36fb..f8fa93cef3f 100755 --- a/code/WorkInProgress/SkyMarshal/wardrobes.dm +++ b/code/WorkInProgress/SkyMarshal/wardrobes.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /obj/item/wardrobe name = "\improper Wardrobe" desc = "A standard-issue bag for clothing and equipment. Usually comes sealed, stocked with everything you need for a particular job." @@ -6,9 +8,8 @@ item_state = "wardrobe" w_class = 4 layer = 2.99 - var - descriptor = "various clothing" - seal_torn = 0 + var/descriptor = "various clothing" + var/seal_torn = 0 attack_self(mob/user) if(!contents.len) diff --git a/code/WorkInProgress/Wrongnumber/weldbackpack.dm b/code/WorkInProgress/Wrongnumber/weldbackpack.dm index 637ba56d8dd..6fe355e7c08 100644 --- a/code/WorkInProgress/Wrongnumber/weldbackpack.dm +++ b/code/WorkInProgress/Wrongnumber/weldbackpack.dm @@ -1,7 +1,7 @@ /obj/item/weapon/weldpack name = "Welding kit" desc = "A heavy-duty, portable welding fluid carrier." - flags = ONBACK + slot_flags = SLOT_BACK icon = 'storage.dmi' icon_state = "welderpack" w_class = 4.0 @@ -20,7 +20,7 @@ message_admins("[key_name_admin(user)] triggered a fueltank explosion.") log_game("[key_name(user)] triggered a fueltank explosion.") user << "\red That was stupid of you." - explosion(src.loc,-1,0,2) + explosion(get_turf(src),-1,0,2) if(src) del(src) return diff --git a/code/WorkInProgress/animusstation/atm.dm b/code/WorkInProgress/animusstation/atm.dm index a6dce70e502..71235421cec 100644 --- a/code/WorkInProgress/animusstation/atm.dm +++ b/code/WorkInProgress/animusstation/atm.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /* TODO: @@ -15,12 +17,11 @@ log transactions anchored = 1 use_power = 1 idle_power_usage = 10 - var - obj/item/weapon/card/id/card - obj/item/weapon/money/cashes = list() - inserted = 0 - accepted = 0 - pincode = 0 + var/obj/item/weapon/card/id/card + var/obj/item/weapon/money/cashes = list() + var/inserted = 0 + var/accepted = 0 + var/pincode = 0 attackby(var/obj/A, var/mob/user) if(istype(A,/obj/item/weapon/money)) diff --git a/code/WorkInProgress/meteors.dm b/code/WorkInProgress/meteors.dm index 35c370fb0b0..10cbf714713 100644 --- a/code/WorkInProgress/meteors.dm +++ b/code/WorkInProgress/meteors.dm @@ -105,18 +105,17 @@ shake_camera(M, 3, 1) if (A) A.meteorhit(src) - playsound(src.loc, 'meteorimpact.ogg', 40, 1) + playsound(get_turf(src), 'meteorimpact.ogg', 40, 1) if (--src.hits <= 0) if(prob(15))// && !istype(A, /obj/structure/grille)) - explosion(src.loc, 4, 5, 6, 7, 0) - playsound(src.loc, "explosion", 50, 1) + explosion(get_turf(src), 4, 5, 6, 7, 0) + playsound(get_turf(src), "explosion", 50, 1) del(src) return /obj/effect/meteor/ex_act(severity) - - if (severity < 4) + spawn(0) del(src) return @@ -139,11 +138,11 @@ A.meteorhit(src) src.hits-- return - playsound(src.loc, 'meteorimpact.ogg', 40, 1) + playsound(get_turf(src), 'meteorimpact.ogg', 40, 1) if (--src.hits <= 0) if(prob(15) && !istype(A, /obj/structure/grille)) - explosion(src.loc, 1, 2, 3, 4, 0) - playsound(src.loc, "explosion", 50, 1) + explosion(get_turf(src), 1, 2, 3, 4, 0) + playsound(get_turf(src), "explosion", 50, 1) del(src) return diff --git a/code/WorkInProgress/virus2/antibodies.dm b/code/WorkInProgress/virus2/antibodies.dm index 31de7c02ba9..6495bb4d04d 100644 --- a/code/WorkInProgress/virus2/antibodies.dm +++ b/code/WorkInProgress/virus2/antibodies.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + // pure concentrated antibodies datum/reagent/antibodies data = new/list("antibodies"=0) @@ -16,20 +18,19 @@ datum/reagent/antibodies return // reserving some numbers for later special antigens -var/global/const - ANTIGEN_A = 1 - ANTIGEN_B = 2 - ANTIGEN_RH = 4 - ANTIGEN_Q = 8 - ANTIGEN_U = 16 - ANTIGEN_V = 32 - ANTIGEN_X = 64 - ANTIGEN_Y = 128 - ANTIGEN_Z = 256 - ANTIGEN_M = 512 - ANTIGEN_N = 1024 - ANTIGEN_P = 2048 - ANTIGEN_O = 4096 +var/global/const/ANTIGEN_A = 1 +var/global/const/ANTIGEN_B = 2 +var/global/const/ANTIGEN_RH = 4 +var/global/const/ANTIGEN_Q = 8 +var/global/const/ANTIGEN_U = 16 +var/global/const/ANTIGEN_V = 32 +var/global/const/ANTIGEN_X = 64 +var/global/const/ANTIGEN_Y = 128 +var/global/const/ANTIGEN_Z = 256 +var/global/const/ANTIGEN_M = 512 +var/global/const/ANTIGEN_N = 1024 +var/global/const/ANTIGEN_P = 2048 +var/global/const/ANTIGEN_O = 4096 var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTIGEN_RH]" = "RH", "[ANTIGEN_Q]" = "Q", "[ANTIGEN_U]" = "U", "[ANTIGEN_V]" = "V", "[ANTIGEN_Z]" = "Z", "[ANTIGEN_M]" = "M", @@ -43,8 +44,8 @@ var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTI icon_state = "health" w_class = 2.0 item_state = "electronic" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY - + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT /obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob) if(! istype(M, /mob/living/carbon) || !M:antibodies) @@ -53,4 +54,4 @@ var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTI // iterate over the list of antigens and see what matches var/code = "" for(var/V in ANTIGENS) if(text2num(V) & M.antibodies) code += ANTIGENS[V] - user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]") \ No newline at end of file + user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]") diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index a3cb01eb7ee..a6ca0f6a7b4 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -12,31 +12,16 @@ atom/movable/airflow_speed The speed (1-15) at which a flying object is traveling to airflow_dest. Decays over time. -CALLABLE PROCS: - -AirflowRepel(turf/T, n, per) - Causes objects to fly away from a point within a single zone. - Called manually by air releasers. T is the location of the expanding gas. - n is the pressure released. per indicates that n is a percent value if nonzero. - RETURNS: Null - -AirflowAttract(turf/T, n, per) - Causes objects to fly to a point within a single zone. - Called manually by air consumers. T is the location of the attractor. - n is the pressure consumed. per indicates that n is a percent value if nonzero. - RETURNS: Null - - OVERLOADABLE PROCS: mob/airflow_stun() Contains checks for and results of being stunned by airflow. - Called when airflow quantities exceed AF_HUMAN_STUN_THRESHOLD. + Called when airflow quantities exceed airflow_medium_pressure. RETURNS: Null atom/movable/check_airflow_movable(n) Contains checks for moving any object due to airflow. - n is the percent of 1 Atmosphere that is flowing. + n is the pressure that is flowing. RETURNS: 1 if the object moves under the air conditions, 0 if it stays put. atom/movable/airflow_hit(atom/A) @@ -47,10 +32,9 @@ atom/movable/airflow_hit(atom/A) AUTOMATIC PROCS: -Airflow(zone/A, zone/B, n) +Airflow(zone/A, zone/B) Causes objects to fly along a pressure gradient. Called by zone updates. A and B are two connected zones. - n is the pressure difference between them. AirflowSpace(zone/A) Causes objects to fly into space. @@ -64,119 +48,28 @@ atom/movable/RepelAirflowDest(n) */ -var/tick_multiplier = 2 vs_control/var - zone_update_delay = 10 - zone_update_delay_NAME = "Zone Update Delay" - zone_update_delay_DESC = "The delay in ticks between updates of zones. Increase if lag is bad seemingly because of air." + airflow_lightest_pressure = 15 + airflow_light_pressure = 30 + airflow_medium_pressure = 45 + airflow_heavy_pressure = 60 + airflow_heaviest_pressure = 90 - zone_share_percent = 2 - zone_share_percent_NAME = "Zone Connection Transfer %" - zone_share_percent_DESC = "Percent of gas per connected tile that is shared between zones." - - //Used in /mob/carbon/human/life - OXYGEN_LOSS = 2 - OXYGEN_LOSS_NAME = "Damage - Oxygen Loss" - OXYGEN_LOSS_DESC = "A multiplier for damage due to lack of air, CO2 poisoning, and vacuum. Does not affect oxyloss\ - from being incapacitated or dying." - TEMP_DMG = 2 - TEMP_DMG_NAME = "Damage - Temperature" - TEMP_DMG_DESC = "A multiplier for damage due to body temperature irregularities." - BURN_DMG = 6 - BURN_DMG_NAME = "Damage - Fire" - BURN_DMG_DESC = "A multiplier for damage due to direct fire exposure." - - AF_TINY_MOVEMENT_THRESHOLD = 50 //% difference to move tiny items. - AF_TINY_MOVEMENT_THRESHOLD_NAME = "Airflow - Tiny Movement Threshold %" - AF_TINY_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the tiny weight class will move." - AF_SMALL_MOVEMENT_THRESHOLD = 70 //% difference to move small items. - AF_SMALL_MOVEMENT_THRESHOLD_NAME = "Airflow - Small Movement Threshold %" - AF_SMALL_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the small weight class will move." - AF_NORMAL_MOVEMENT_THRESHOLD = 90 //% difference to move normal items. - AF_NORMAL_MOVEMENT_THRESHOLD_NAME = "Airflow - Normal Movement Threshold %" - AF_NORMAL_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the normal weight class will move." - AF_LARGE_MOVEMENT_THRESHOLD = 100 //% difference to move large and huge items. - AF_LARGE_MOVEMENT_THRESHOLD_NAME = "Airflow - Large Movement Threshold %" - AF_LARGE_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which items with the large or huge weight class will move." - AF_DENSE_MOVEMENT_THRESHOLD = 120 //% difference to move dense crap and mobs. - AF_DENSE_MOVEMENT_THRESHOLD_NAME = "Airflow - Dense Movement Threshold %" - AF_DENSE_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which dense objects (canisters, etc.) will be shifted by airflow." - AF_MOB_MOVEMENT_THRESHOLD = 175 - AF_MOB_MOVEMENT_THRESHOLD_NAME = "Airflow - Human Movement Threshold %" - AF_MOB_MOVEMENT_THRESHOLD_DESC = "Percent of 1 Atm. at which mobs will be shifted by airflow." - - AF_HUMAN_STUN_THRESHOLD = 130 - AF_HUMAN_STUN_THRESHOLD_NAME = "Airflow - Human Stun Threshold %" - AF_HUMAN_STUN_THRESHOLD_DESC = "Percent of 1 Atm. at which living things are stunned or knocked over." - - AF_PERCENT_OF = ONE_ATMOSPHERE - AF_PERCENT_OF_NAME = "Airflow - 100% Pressure" - AF_PERCENT_OF_DESC = "Normally set to 1 Atm. in kPa, this indicates what pressure is considered 100% by the system." - - AF_SPEED_MULTIPLIER = 4 //airspeed per movement threshold value crossed. - AF_SPEED_MULTIPLIER_NAME = "Airflow - Speed Increase per 10%" - AF_SPEED_MULTIPLIER_DESC = "Velocity increase of shifted items per 10% of airflow." - AF_DAMAGE_MULTIPLIER = 5 //Amount of damage applied per airflow_speed. - AF_DAMAGE_MULTIPLIER_NAME = "Airflow - Damage Per Velocity" - AF_DAMAGE_MULTIPLIER_DESC = "Amount of damage applied per unit of speed (1-15 units) at which mobs are thrown." - AF_STUN_MULTIPLIER = 1.5 //Seconds of stun applied per airflow_speed. - AF_STUN_MULTIPLIER_NAME = "Airflow - Stun Per Velocity" - AF_STUN_MULTIPLIER_DESC = "Amount of stun effect applied per unit of speed (1-15 units) at which mobs are thrown." - AF_SPEED_DECAY = 0.5 //Amount that flow speed will decay with time. - AF_SPEED_DECAY_NAME = "Airflow - Velocity Lost per Tick" - AF_SPEED_DECAY_DESC = "Amount of airflow speed lost per tick on a moving object." - AF_SPACE_MULTIPLIER = 2 //Increasing this will make space connections more DRAMATIC! - AF_SPACE_MULTIPLIER_NAME = "Airflow - Space Airflow Multiplier" - AF_SPACE_MULTIPLIER_DESC = "Increasing this multiplier will cause more powerful airflow to space." - AF_CANISTER_MULTIPLIER = 0.25 - AF_CANISTER_MULTIPLIER_NAME = "Airflow - Canister Airflow Multiplier" - AF_CANISTER_MULTIPLIER_DESC = "Increasing this multiplier will cause more powerful airflow from single-tile sources like canisters." - -mob/proc - Change_Airflow_Constants() - set category = "Debug" - - var/choice = input("Which constant will you modify?","Change Airflow Constants")\ - as null|anything in list("Movement Threshold","Speed Multiplier","Damage Multiplier","Stun Multiplier","Speed Decay") - - var/n - - switch(choice) - if("Movement Threshold") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_DENSE_MOVEMENT_THRESHOLD) as num - n = max(1,n) - vsc.AF_DENSE_MOVEMENT_THRESHOLD = n - world.log << "vsc.AF_DENSE_MOVEMENT_THRESHOLD set to [n]." - if("Speed Multiplier") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_MULTIPLIER) as num - n = max(1,n) - vsc.AF_SPEED_MULTIPLIER = n - world.log << "vsc.AF_SPEED_MULTIPLIER set to [n]." - if("Damage Multiplier") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_DAMAGE_MULTIPLIER) as num - vsc.AF_DAMAGE_MULTIPLIER = n - world.log << "AF_DAMAGE_MULTIPLIER set to [n]." - if("Stun Multiplier") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_STUN_MULTIPLIER) as num - vsc.AF_STUN_MULTIPLIER = n - world.log << "AF_STUN_MULTIPLIER set to [n]." - if("Speed Decay") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_DECAY) as num - vsc.AF_SPEED_DECAY = n - world.log << "AF_SPEED_DECAY set to [n]." - if("Space Flow Multiplier") - n = input("What will you change it to","Change Airflow Constants",vsc.AF_SPEED_DECAY) as num - vsc.AF_SPEED_DECAY = n - world.log << "AF_SPEED_DECAY set to [n]." - - -//The main airflow code. Called by zone updates. -//Zones A and B are air zones. n represents the amount of air moved. + airflow_damage = 0.3 + airflow_stun = 0.15 + airflow_speed_decay = 1 + airflow_delay = 25 //Time in deciseconds before they can be moved by airflow again. + airflow_mob_slowdown = 3 //Time in tenths of a second to add as a delay to each movement by a mob.\ + Only active if they are fighting the pull of the airflow. + airflow_stun_cooldown = 10 //How long, in tenths of a second, to wait before stunning them again. +mob/var/last_airflow_stun = 0 mob/proc/airflow_stun() + if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0 if(weakened <= 0) src << "\red The sudden rush of air knocks you over!" weakened = max(weakened,5) + last_airflow_stun = world.time mob/living/silicon/airflow_stun() return @@ -185,20 +78,21 @@ mob/living/carbon/metroid/airflow_stun() return mob/living/carbon/human/airflow_stun() + if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0 if(buckled) return 0 if(wear_suit) if(wear_suit.flags & SUITSPACE) return 0 if(shoes) if(shoes.flags & NOSLIP) return 0 if(weakened <= 0) src << "\red The sudden rush of air knocks you over!" - weakened = max(weakened,2) + weakened = max(weakened,rand(1,5)) + last_airflow_stun = world.time atom/movable/proc/check_airflow_movable(n) if(anchored && !ismob(src)) return 0 - if(!istype(src,/obj/item) && n < vsc.AF_DENSE_MOVEMENT_THRESHOLD) return 0 - if(ismob(src) && n < vsc.AF_MOB_MOVEMENT_THRESHOLD) return 0 + if(!istype(src,/obj/item) && n < vsc.airflow_heavy_pressure) return 0 return 1 @@ -213,177 +107,141 @@ obj/item/check_airflow_movable(n) . = ..() switch(w_class) if(2) - if(n < vsc.AF_SMALL_MOVEMENT_THRESHOLD) return 0 + if(n < vsc.airflow_lightest_pressure) return 0 if(3) - if(n < vsc.AF_NORMAL_MOVEMENT_THRESHOLD) return 0 + if(n < vsc.airflow_light_pressure) return 0 if(4,5) - if(n < vsc.AF_LARGE_MOVEMENT_THRESHOLD) return 0 + if(n < vsc.airflow_medium_pressure) return 0 -proc/Airflow(zone/A,zone/B,n) +//The main airflow code. Called by zone updates. +//Zones A and B are air zones. n represents the amount of air moved. - //Now n is a percent of one atm. - n = round((n/vsc.AF_PERCENT_OF)*100,0.1) +proc/Airflow(zone/A,zone/B) + + var/n = B.air.return_pressure() - A.air.return_pressure() //Don't go any further if n is lower than the lowest value needed for airflow. - if(abs(n) < vsc.AF_TINY_MOVEMENT_THRESHOLD) return + if(abs(n) < vsc.airflow_lightest_pressure) return //These turfs are the midway point between A and B, and will be the destination point for thrown objects. - var/list/connected_turfs = A.connections[B] + var/list/connection/connections_A = A.connections + var/list/turf/connected_turfs = list() + for(var/connection/C in connections_A) //Grab the turf that is in the zone we are flowing to (determined by n) + if( ( A == C.A.zone || A == C.zone_A ) && ( B == C.B.zone || B == C.zone_B ) ) + if(n < 0) + connected_turfs |= C.B + else + connected_turfs |= C.A + else if( ( A == C.B.zone || A == C.zone_B ) && ( B == C.A.zone || B == C.zone_A ) ) + if(n < 0) + connected_turfs |= C.A + else + connected_turfs |= C.B //Get lists of things that can be thrown across the room for each zone. - var/list/pplz = A.movables() - var/list/otherpplz = B.movables() + var/list/pplz = B.movables() + var/list/otherpplz = A.movables() + if(n < 0) + var/list/temporary_pplz = pplz + pplz = otherpplz + otherpplz = temporary_pplz for(var/atom/movable/M in pplz) + if(M.last_airflow > world.time - vsc.airflow_delay) continue + //Check for knocking people over - if(ismob(M) && n > vsc.AF_HUMAN_STUN_THRESHOLD) + if(ismob(M) && n > vsc.airflow_heaviest_pressure) if(M:nodamage) continue M:airflow_stun() if(M.check_airflow_movable(n)) //Check for things that are in range of the midpoint turfs. - var/fail = 1 + var/list/close_turfs = list() for(var/turf/U in connected_turfs) - if(M in range(U)) fail = 0 - if(fail) continue + if(M in range(U)) close_turfs += U + if(!close_turfs.len) continue //If they're already being tossed, don't do it again. if(!M.airflow_speed) - M.airflow_dest = pick(connected_turfs) //Pick a random midpoint to fly towards. + M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards. - spawn M.GotoAirflowDest(abs(n) * (vsc.AF_SPEED_MULTIPLIER/10)) - //Send the object flying at a speed determined by n and AF_SPEED_MULTIPLIER. + spawn M.GotoAirflowDest(abs(n)/5) //Do it again for the stuff in the other zone, making it fly away. for(var/atom/movable/M in otherpplz) - if(ismob(M) && abs(n) > vsc.AF_HUMAN_STUN_THRESHOLD) + if(M.last_airflow > world.time - vsc.airflow_delay) continue + + if(ismob(M) && abs(n) > vsc.airflow_medium_pressure) if(M:nodamage) continue M:airflow_stun() if(M.check_airflow_movable(abs(n))) - var/fail = 1 + var/list/close_turfs = list() for(var/turf/U in connected_turfs) - if(M in range(U)) fail = 0 - if(fail) continue + if(M in range(U)) close_turfs += U + if(!close_turfs.len) continue - if(M && !M.airflow_speed) + //If they're already being tossed, don't do it again. + if(!M.airflow_speed) - M.airflow_dest = pick(connected_turfs) + M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards. - spawn M.RepelAirflowDest(abs(n) * (vsc.AF_SPEED_MULTIPLIER/10)) + spawn M.RepelAirflowDest(abs(n)/5) proc/AirflowSpace(zone/A) //The space version of the Airflow(A,B,n) proc. - var/n = (A.air.oxygen + A.air.nitrogen + A.air.carbon_dioxide)*vsc.AF_SPACE_MULTIPLIER - //Here, n is determined by the space multiplier constant and the zone's air. + var/n = A.air.return_pressure() + //Here, n is determined by only the pressure in the room. - n = round((n/vsc.AF_PERCENT_OF)*100,0.1) - - if(n < vsc.AF_TINY_MOVEMENT_THRESHOLD) return + if(n < vsc.airflow_lightest_pressure) return var/list/connected_turfs = A.space_tiles //The midpoints are now all the space connections. var/list/pplz = A.movables() //We only need to worry about things in the zone, not things in space. for(var/atom/movable/M in pplz) - if(ismob(M) && n > vsc.AF_HUMAN_STUN_THRESHOLD) + if(M.last_airflow > world.time - vsc.airflow_delay) continue + + if(ismob(M) && n > vsc.airflow_medium_pressure) if(M:nodamage) continue M:airflow_stun() if(M.check_airflow_movable(n)) - var/fail = 1 + var/list/close_turfs = list() for(var/turf/U in connected_turfs) - if(M in range(U)) fail = 0 - if(fail) continue + if(M in range(U)) close_turfs += U + if(!close_turfs.len) continue + //If they're already being tossed, don't do it again. if(!M.airflow_speed) - M.airflow_dest = pick(connected_turfs) + + M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards. spawn - if(M) M.GotoAirflowDest(n * (vsc.AF_SPEED_MULTIPLIER/10)) + if(M) M.GotoAirflowDest(n/20) //Sometimes shit breaks, and M isn't there after the spawn. -proc/AirflowRepel(turf/T,n,per = 0) - - //This one is used for air escaping from canisters. - var/zone/A = T.zone - if(!A) return - - n *= vsc.AF_CANISTER_MULTIPLIER - - if(!per) - n = round((n/vsc.AF_PERCENT_OF) * 100,0.1) - - if(n < 0) return - if(abs(n) > vsc.AF_TINY_MOVEMENT_THRESHOLD) - - var/list/pplz = A.movables() - - for(var/atom/movable/M in pplz) - var/relative_n = n / max(1,get_dist(T,M)/2) - if(ismob(M) && relative_n > vsc.AF_HUMAN_STUN_THRESHOLD) - if(M:nodamage) continue - M:airflow_stun() - - if(M.check_airflow_movable(relative_n)) - - if(!(M in range(T))) continue //Recall that T is the center of the repelling force. - - if(!M.airflow_speed) - M.airflow_dest = T - spawn M.RepelAirflowDest(relative_n * (vsc.AF_SPEED_MULTIPLIER/10)) - -proc/AirflowAttract(turf/T,n,per=0) - - //Same as above, but attracts objects to the target. - - var/zone/A = T.zone - if(!A) return - - n *= vsc.AF_CANISTER_MULTIPLIER - - if(!per) - n = round((n/vsc.AF_PERCENT_OF) * 100,0.1) - - if(n < 0) return - if(abs(n) > vsc.AF_TINY_MOVEMENT_THRESHOLD) - //world << "Airflow!" - var/list/pplz = A.movables() - for(var/atom/movable/M in pplz) - //world << "[M] / \..." - - var/relative_n = n / max(1,get_dist(T,M)/2) - - if(ismob(M) && relative_n > vsc.AF_HUMAN_STUN_THRESHOLD) - if(M:nodamage) continue - M:airflow_stun() - - if(M.check_airflow_movable(relative_n)) - - if(!(M in range(T))) continue - - if(!M.airflow_speed) - M.airflow_dest = T - spawn M.GotoAirflowDest(relative_n * (vsc.AF_SPEED_MULTIPLIER/10)) - atom/movable var/turf/airflow_dest var/airflow_speed = 0 var/airflow_time = 0 + var/last_airflow = 0 proc/GotoAirflowDest(n) if(!airflow_dest) return if(airflow_speed < 0) return + if(last_airflow > world.time - vsc.airflow_delay) return if(airflow_speed) - airflow_speed = n + airflow_speed = n/max(get_dist(src,airflow_dest),1) return + last_airflow = world.time if(airflow_dest == loc) step_away(src,loc) if(ismob(src)) @@ -396,7 +254,7 @@ atom/movable if(src:shoes) if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return src << "\red You are sucked away by airflow!" - airflow_speed = min(round(n),9) + airflow_speed = min(round(n)/max(sqrt(get_dist(src,airflow_dest)),1),9) var xo = airflow_dest.x - src.x yo = airflow_dest.y - src.y @@ -408,7 +266,7 @@ atom/movable while(airflow_speed > 0) if(airflow_speed <= 0) return airflow_speed = min(airflow_speed,15) - airflow_speed -= vsc.AF_SPEED_DECAY + airflow_speed -= vsc.airflow_speed_decay if(airflow_speed > 7) if(airflow_time++ >= airflow_speed - 7) sleep(1 * tick_multiplier) @@ -419,19 +277,21 @@ atom/movable if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy)) return step_towards(src, src.airflow_dest) - if(ismob(src) && src:client) src:client:move_delay = world.time + 10 + if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown airflow_dest = null - airflow_speed = -1 - spawn(150 * tick_multiplier) airflow_speed = 0 + airflow_speed = 0 + airflow_time = 0 if(od) density = 0 proc/RepelAirflowDest(n) if(!airflow_dest) return if(airflow_speed < 0) return + if(last_airflow > world.time - vsc.airflow_delay) return if(airflow_speed) - airflow_speed = n + airflow_speed = n/max(get_dist(src,airflow_dest),1) return + last_airflow = world.time if(airflow_dest == loc) step_away(src,loc) if(ismob(src)) @@ -442,9 +302,9 @@ atom/movable if(src:wear_suit) if(src:wear_suit.flags & SUITSPACE) return if(src:shoes) - if(src:shoes.type == /obj/item/clothing/shoes/magboots) return + if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return src << "\red You are pushed away by airflow!" - airflow_speed = min(round(n),9) + airflow_speed = min(round(n)/max(sqrt(get_dist(src,airflow_dest)),1),9) var xo = -(airflow_dest.x - src.x) yo = -(airflow_dest.y - src.y) @@ -456,7 +316,7 @@ atom/movable while(airflow_speed > 0) if(airflow_speed <= 0) return airflow_speed = min(airflow_speed,15) - airflow_speed -= vsc.AF_SPEED_DECAY + airflow_speed -= vsc.airflow_speed_decay if(airflow_speed > 7) if(airflow_time++ >= airflow_speed - 7) sleep(1 * tick_multiplier) @@ -467,10 +327,10 @@ atom/movable if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy)) return step_towards(src, src.airflow_dest) - if(ismob(src) && src:client) src:client:move_delay = world.time + 10 + if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown airflow_dest = null - airflow_speed = -1 - spawn(150 * tick_multiplier) airflow_speed = 0 + airflow_speed = 0 + airflow_time = 0 if(od) density = 0 @@ -479,17 +339,18 @@ atom/movable airflow_hit(A) else airflow_speed = 0 + airflow_time = 0 . = ..() atom/movable/proc/airflow_hit(atom/A) - airflow_speed = -1 - spawn(50 * tick_multiplier) airflow_speed = 0 + airflow_speed = 0 airflow_dest = null mob/airflow_hit(atom/A) for(var/mob/M in hearers(src)) M.show_message("\red [src] slams into [A]!",1,"\red You hear a loud slam!",2) playsound(src.loc, "smash.ogg", 25, 1, -1) + weakened = max(weakened, (A.vars.Find("w_class") ? A:w_class : rand(1,5))) //Heheheh . = ..() obj/airflow_hit(atom/A) @@ -499,89 +360,38 @@ obj/airflow_hit(atom/A) . = ..() obj/item/airflow_hit(atom/A) - airflow_speed = -1 - spawn(50 * tick_multiplier) airflow_speed = 0 + airflow_speed = 0 airflow_dest = null mob/living/carbon/human/airflow_hit(atom/A) - for(var/mob/M in hearers(src)) - M.show_message("\red [src] slams into [A]!",1,"\red You hear a loud slam!",2) +// for(var/mob/M in hearers(src)) +// M.show_message("\red [src] slams into [A]!",1,"\red You hear a loud slam!",2) playsound(src.loc, "punch", 25, 1, -1) loc:add_blood(src) if (src.wear_suit) src.wear_suit.add_blood(src) if (src.w_uniform) src.w_uniform.add_blood(src) - var/b_loss = airflow_speed * vsc.AF_DAMAGE_MULTIPLIER - for(var/organ in src:organs) - var/datum/organ/external/temp = src:organs["[organ]"] - if (istype(temp, /datum/organ/external)) - switch(temp.name) - if("head") - temp.take_damage(b_loss * 0.2, 0) - if("chest") - temp.take_damage(b_loss * 0.4, 0) - if("diaper") - temp.take_damage(b_loss * 0.1, 0) - spawn UpdateDamageIcon() + var/b_loss = airflow_speed * vsc.airflow_damage + + var/blocked = run_armor_check("head","melee") + apply_damage(b_loss/3, BRUTE, "head", blocked, 0, "Airflow") + + blocked = run_armor_check("chest","melee") + apply_damage(b_loss/3, BRUTE, "chest", blocked, 0, "Airflow") + + blocked = run_armor_check("groin","melee") + apply_damage(b_loss/3, BRUTE, "groin", blocked, 0, "Airflow") + if(airflow_speed > 10) - paralysis += round(airflow_speed * vsc.AF_STUN_MULTIPLIER) + paralysis += round(airflow_speed * vsc.airflow_stun) stunned = max(stunned,paralysis + 3) else - stunned += round(airflow_speed * vsc.AF_STUN_MULTIPLIER/2) + stunned += round(airflow_speed * vsc.airflow_stun/2) . = ..() zone/proc/movables() . = list() for(var/turf/T in contents) for(var/atom/A in T) - . += A - -proc/Get_Dir(atom/S,atom/T) //Shamelessly stolen from AJX.AdvancedGetDir - var/GDist=get_dist(S,T) - var/GDir=get_dir(S,T) - if(GDist<=3) - if(GDist==0) return 0 - if(GDist==1) - return GDir - - - var/X1=S.x*10 - var/X2=T.x*10 - var/Y1=S.y*10 - var/Y2=T.y*10 - var/Ref - if(GDir==NORTHEAST) - Ref=(X2/X1)*Y1 - if(Ref-1>Y2) .=EAST - else if(Ref+1Y2) .=WEST - else if(Ref+1Y2) .=SOUTH - else if(Ref+1Y2) .=SOUTH - else if(Ref+1> vsc - del F - world.log << "TWEAKS: Airflow, Plasma and Damage settings loaded." \ No newline at end of file + . += A \ No newline at end of file diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index bf43f90d1c0..01f5351f595 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -1,20 +1,52 @@ +/* +This object is contained within zone/var/connections. It's generated whenever two turfs from different zones are linked. +Indirect connections will not merge the two zones after they reach equilibrium. +*/ + connection var turf //The turfs involved in the connection. A B + zone + zone_A + zone_B + ref_A + ref_B indirect = 0 //If the connection is purely indirect, the zones should not join. last_updated //The tick at which this was last updated. + no_zone_count = 0 New(turf/T,turf/O) A = T B = O - if(A.zone) - if(!A.zone.connections) A.zone.connections = new() - A.zone.connections += src - if(B.zone) - if(!B.zone.connections) B.zone.connections = new() - B.zone.connections += src if(A.zone && B.zone) + if(!A.zone.connections) A.zone.connections = list() + A.zone.connections += src + zone_A = A.zone + ref_A = "\ref[A]" + + if(!B.zone.connections) B.zone.connections = list() + B.zone.connections += src + zone_B = B.zone + ref_B = "\ref[B]" + + if(!air_master.tiles_with_connections) + air_master.tiles_with_connections = list() + + if(air_master.tiles_with_connections[ref_A]) + var/list/A_connections = air_master.tiles_with_connections[ref_A] + A_connections |= src + else + var/list/A_connections = list(src) + air_master.tiles_with_connections[ref_A] = A_connections + + if(air_master.tiles_with_connections[ref_B]) + var/list/B_connections = air_master.tiles_with_connections[ref_B] + B_connections |= src + else + var/list/B_connections = list(src) + air_master.tiles_with_connections[ref_B] = B_connections + if(!A.zone.connected_zones) A.zone.connected_zones = list() if(!B.zone.connected_zones) @@ -31,31 +63,265 @@ connection B.zone.connected_zones[A.zone] = 1 else B.zone.connected_zones[A.zone]++ + else + world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]" + del(src) Del() - if(A.zone && A.zone.connections) - A.zone.connections -= src - if(B.zone && B.zone.connections) - B.zone.connections -= src + if(A) + if(A.zone && A.zone.connections) + A.zone.connections.Remove(src) + if(!A.zone.connections.len) + del A.zone.connections + if(ref_A in air_master.tiles_with_connections) + var/list/A_connections = air_master.tiles_with_connections[ref_A] + A_connections -= src + if(A_connections && !A_connections.len) + del A_connections + air_master.tiles_with_connections.Remove(ref_A) + if(B) + if(B.zone && B.zone.connections) + B.zone.connections.Remove(src) + if(!B.zone.connections.len) + del B.zone.connections + if(ref_B in air_master.tiles_with_connections) + var/list/B_connections = air_master.tiles_with_connections[ref_B] + B_connections -= src + if(B_connections && !B_connections.len) + del B_connections + air_master.tiles_with_connections.Remove(ref_B) + if(zone_A) + if(zone_A && zone_A.connections) + zone_A.connections.Remove(src) + if(!zone_A.connections.len) + del zone_A.connections + if(zone_B) + if(zone_B && zone_B.connections) + zone_B.connections.Remove(src) + if(!zone_B.connections.len) + del zone_B.connections - if(A.zone && B.zone) - - if(B.zone in A.zone.connected_zones) - if(A.zone.connected_zones[B.zone] > 1) - A.zone.connected_zones[B.zone]-- - else - A.zone.connected_zones -= B.zone - - if(A.zone in B.zone.connected_zones) - if(B.zone.connected_zones[A.zone] > 1) - B.zone.connected_zones[A.zone]-- - else - B.zone.connected_zones -= A.zone - if(A.zone.connected_zones && !A.zone.connected_zones.len) - A.zone.connected_zones = null - if(B.zone.connected_zones && !B.zone.connected_zones.len) - B.zone.connected_zones = null + if(A && A.zone) + if(B && B.zone) + if(B.zone in A.zone.connected_zones) + if(A.zone.connected_zones[B.zone] > 1) + A.zone.connected_zones[B.zone]-- + else + A.zone.connected_zones -= B.zone + if(A.zone.connected_zones && !A.zone.connected_zones.len) + A.zone.connected_zones = null + if( zone_B && (!B.zone || zone_B != B.zone) ) + if(zone_B in A.zone.connected_zones) + if(A.zone.connected_zones[zone_B] > 1) + A.zone.connected_zones[zone_B]-- + else + A.zone.connected_zones -= zone_B + if(A.zone.connected_zones && !A.zone.connected_zones.len) + A.zone.connected_zones = null + if(zone_A && (!A.zone || zone_A != A.zone)) + if(B && B.zone) + if(B.zone in zone_A.connected_zones) + if(zone_A.connected_zones[B.zone] > 1) + zone_A.connected_zones[B.zone]-- + else + zone_A.connected_zones -= B.zone + if(zone_A.connected_zones && !zone_A.connected_zones.len) + zone_A.connected_zones = null + if( zone_B && (!B.zone || zone_B != B.zone) ) + if(zone_B in zone_A.connected_zones) + if(zone_A.connected_zones[zone_B] > 1) + zone_A.connected_zones[zone_B]-- + else + zone_A.connected_zones -= zone_B + if(zone_A.connected_zones && !zone_A.connected_zones.len) + zone_A.connected_zones = null + if(B && B.zone) + if(A && A.zone) + if(A.zone in B.zone.connected_zones) + if(B.zone.connected_zones[A.zone] > 1) + B.zone.connected_zones[A.zone]-- + else + B.zone.connected_zones -= A.zone + if(B.zone.connected_zones && !B.zone.connected_zones.len) + B.zone.connected_zones = null + if( zone_A && (!A.zone || zone_A != A.zone) ) + if(zone_A in B.zone.connected_zones) + if(B.zone.connected_zones[zone_A] > 1) + B.zone.connected_zones[zone_A]-- + else + B.zone.connected_zones -= zone_A + if(B.zone.connected_zones && !B.zone.connected_zones.len) + B.zone.connected_zones = null + if(zone_B && (!B.zone || zone_B != B.zone)) + if(A && A.zone) + if(A.zone in zone_B.connected_zones) + if(zone_B.connected_zones[A.zone] > 1) + zone_B.connected_zones[A.zone]-- + else + zone_B.connected_zones -= A.zone + if(zone_B.connected_zones && !zone_B.connected_zones.len) + zone_B.connected_zones = null + if( zone_A && (!A.zone || zone_A != A.zone) ) + if(zone_A in zone_B.connected_zones) + if(zone_B.connected_zones[zone_A] > 1) + zone_B.connected_zones[zone_A]-- + else + zone_B.connected_zones -= zone_A + if(zone_B.connected_zones && !zone_B.connected_zones.len) + zone_B.connected_zones = null . = ..() proc/Cleanup() - if(A.zone == B.zone) del src - if(!A.zone || !B.zone) del src \ No newline at end of file + if(!A || !B) + //world.log << "Connection removed: [A] or [B] missing entirely." + del src + if(A.zone == B.zone) + //world.log << "Connection removed: Zones now merged." + del src + if(ref_A != "\ref[A]" || ref_B != "\ref[B]") + del src + if((A.zone && A.zone != zone_A) || (B.zone && B.zone != zone_B)) + Sanitize() + if(!A.zone || !B.zone) + no_zone_count++ + if(no_zone_count >= 5) + //world.log << "Connection removed: [A] or [B] missing a zone." + del src + return 0 + return 1 + + proc/Sanitize() + //If the zones change on connected turfs, update it. + if(A.zone && A.zone != zone_A && B.zone && B.zone != zone_B) + if(!A.zone || !B.zone) + del src + + if(A.zone == zone_B && B.zone == zone_A) + var/turf/temp = B + B = A + A = temp + zone_B = B.zone + zone_A = A.zone + var/temp_ref = ref_A + ref_A = ref_B + ref_B = temp_ref + return + + if(zone_A) + if(zone_A.connections) + zone_A.connections.Remove(src) + if(!zone_A.connections.len) + del zone_A.connections + + if(zone_A.connected_zones) + if(zone_A.connected_zones[zone_B] > 1) + zone_A.connected_zones[zone_B]-- + else + zone_A.connected_zones.Remove(zone_B) + if(zone_A.connected_zones && !zone_A.connected_zones.len) + zone_A.connected_zones = null + + if(zone_B) + if(zone_B.connections) + zone_B.connections.Remove(src) + if(!zone_B.connections.len) + del zone_B.connections + + if(zone_B.connected_zones) + if(zone_B.connected_zones[zone_A] > 1) + zone_B.connected_zones[zone_A]-- + else + zone_B.connected_zones.Remove(zone_A) + if(zone_B.connected_zones && !zone_B.connected_zones.len) + zone_B.connected_zones = null + + if(!A.zone.connections) + A.zone.connections = list() + A.zone.connections |= src + if(!B.zone.connections) + B.zone.connections = list() + B.zone.connections |= src + + if(!A.zone.connected_zones) + A.zone.connected_zones = list() + if(!(B.zone in A.zone.connected_zones)) + A.zone.connected_zones += B.zone + A.zone.connected_zones[B.zone] = 1 + else + A.zone.connected_zones[B.zone]++ + + if(!B.zone.connected_zones) + B.zone.connected_zones = list() + if(!(A.zone in B.zone.connected_zones)) + B.zone.connected_zones += A.zone + B.zone.connected_zones[A.zone] = 1 + else + B.zone.connected_zones[A.zone]++ + + zone_B = B.zone + + zone_A = A.zone + + + else if(A.zone && A.zone != zone_A) + if(zone_A) + + if(zone_A.connections) + zone_A.connections.Remove(src) + if(!zone_A.connections.len) + del zone_A.connections + if(!A.zone.connections) + A.zone.connections = list() + A.zone.connections |= src + + if(zone_A.connected_zones) + if(zone_A.connected_zones[zone_B] > 1) + zone_A.connected_zones[zone_B]-- + else + zone_A.connected_zones.Remove(zone_B) + if(zone_A.connected_zones && !zone_A.connected_zones.len) + zone_A.connected_zones = null + + if(!A.zone.connected_zones) + A.zone.connected_zones = list() + if(!(zone_B in A.zone.connected_zones)) + A.zone.connected_zones += zone_B + A.zone.connected_zones[zone_B] = 1 + else + A.zone.connected_zones[zone_B]++ + + zone_A = A.zone + + else + del src + + else if(B.zone && B.zone != zone_B) + if(zone_B) + + if(zone_B.connections) + zone_B.connections.Remove(src) + if(!zone_B.connections.len) + del zone_B.connections + if(!B.zone.connections) + B.zone.connections = list() + B.zone.connections |= src + + if(zone_B.connected_zones) + if(zone_B.connected_zones[zone_A] > 1) + zone_B.connected_zones[zone_A]-- + else + zone_B.connected_zones.Remove(zone_A) + if(zone_B.connected_zones && !zone_B.connected_zones.len) + zone_B.connected_zones = null + + if(!B.zone.connected_zones) + B.zone.connected_zones = list() + if(!(zone_A in B.zone.connected_zones)) + B.zone.connected_zones += zone_A + B.zone.connected_zones[zone_A] = 1 + else + B.zone.connected_zones[zone_A]++ + + zone_B = B.zone + + else + del src \ No newline at end of file diff --git a/code/ZAS/Creation.dm b/code/ZAS/Creation.dm index 5f256767fd3..225fc02eff7 100644 --- a/code/ZAS/Creation.dm +++ b/code/ZAS/Creation.dm @@ -1,13 +1,21 @@ zone New(turf/start) + //Get the turfs that are part of the zone using a floodfill method if(istype(start,/list)) contents = start else contents = FloodFill(start) + + //Change all the zone vars of the turfs, check for space to be added to space_tiles. for(var/turf/T in contents) + if(T.zone) + T.zone.RemoveTurf(T) T.zone = src if(istype(T,/turf/space)) AddSpace(T) + + //Generate the gas_mixture for use in this zone by using the average of the gases + //defined at startup. air = new var/members = contents.len for(var/turf/simulated/T in contents) @@ -17,12 +25,27 @@ zone air.toxins += T.toxins / members air.temperature += T.temperature / members air.group_multiplier = contents.len + air.update_values() + + //Add this zone to the global list. zones += src + Del() + //Ensuring the zone list doesn't get clogged with null values. + for(var/turf/simulated/T in contents) + if(T.zone && T.zone == src) + T.zone = null + for(var/zone/Z in connected_zones) + if(src in Z.connected_zones) + Z.connected_zones.Remove(src) + for(var/connection/C in connections) + C.Cleanup() zones -= src . = ..() proc/FloodFill(turf/start) + if(!istype(start)) + return list() var list open = list(start) @@ -30,17 +53,23 @@ proc/FloodFill(turf/start) while(open.len) for(var/turf/T in open) + //Stop if there's a door, even if it's open. These are handled by indirect connection. if(!T.HasDoor()) + for(var/d in cardinal) var/turf/O = get_step(T,d) + //Simple pass check. if(O.ZCanPass(T) && !(O in open) && !(O in closed)) open += O + open -= T closed += T return closed turf/proc/ZCanPass(turf/T) + //Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space. + if(istype(T,/turf/space)) return 0 else if(T.blocks_air||blocks_air) @@ -49,12 +78,13 @@ turf/proc/ZCanPass(turf/T) for(var/obj/obstacle in src) if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window)) continue - if(!obstacle.CanPass(0, T, 0, 1)) + if(!obstacle.CanPass(0, T, 1.5, 1)) return 0 + for(var/obj/obstacle in T) if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window)) continue - if(!obstacle.CanPass(0, src, 0, 1)) + if(!obstacle.CanPass(0, src, 1.5, 1)) return 0 return 1 \ No newline at end of file diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm index 28fc3caef53..7a0285cc1e1 100644 --- a/code/ZAS/Debug.dm +++ b/code/ZAS/Debug.dm @@ -1,5 +1,5 @@ -client/proc/Zone_Info(turf/T as null|turf) +client/verb/Zone_Info(turf/T as null|turf) set category = "Debug" if(T) if(T.zone) @@ -28,9 +28,11 @@ zone/proc M << "Plasma: [air.toxins]" M << "Carbon Dioxide: [air.carbon_dioxide]" M << "Temperature: [air.temperature]" - M << "Heat Energy: [air.thermal_energy()]" + M << "Heat Energy: [air.temperature * air.heat_capacity()]" M << "Pressure: [air.return_pressure()]" M << "" + M << "Space Tiles: [length(space_tiles)]" + M << "Movable Objects: [length(movable_objects)]" M << "Connections: [length(connections)]" for(var/connection/C in connections) @@ -40,6 +42,9 @@ zone/proc spawn(50) C.A.overlays -= 'debug_connect.dmi' C.B.overlays -= 'debug_connect.dmi' + for(var/C in connections) + if(!istype(C,/connection)) + M << "[C] (Not Connection!)" else dbg_output = 0 diff --git a/code/ZAS/Definition.dm b/code/ZAS/Definition.dm index 729d19841fc..90e88a6c613 100644 --- a/code/ZAS/Definition.dm +++ b/code/ZAS/Definition.dm @@ -1,30 +1,11 @@ turf/var/zone/zone var/list/zones = list() -var/zone_controller/zone_master = new - -zone_controller - var - current_tick = 0 - proc - start() - set background = 1 - while(1) - current_tick++ - for(var/zone/Z in zones) - if(Z.last_update < current_tick) - Z.process() - if(Z) Z.last_update = current_tick - for(var/obj/fire/F) - F.process() - //for(var/obj/z_hotspot/H in z_hotspots) - // H.process() - sleep(max(5,vsc.zone_update_delay*tick_multiplier)) zone var dbg_output = 0 //Enables debug output. - rebuild = 0 //If 1, zone will be rebuilt on next process. + rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used. datum/gas_mixture/air //The air contents of the zone. list/contents //All the tiles that are contained in this zone. list/connections // /connection objects which refer to connections with other zones, e.g. through a door. diff --git a/code/ZAS/FEA_gas_mixture.dm b/code/ZAS/FEA_gas_mixture.dm new file mode 100644 index 00000000000..cb600b08c4d --- /dev/null +++ b/code/ZAS/FEA_gas_mixture.dm @@ -0,0 +1,1003 @@ +/* +What are the archived variables for? + Calculations are done using the archived variables with the results merged into the regular variables. + This prevents race conditions that arise based on the order of tile processing. +*/ + +datum + gas //These are used for the "Trace Gases" stuff, but is buggy. + sleeping_agent + specific_heat = 40 + + volatile_fuel + specific_heat = 30 + + var + moles = 0 + specific_heat = 0 + + moles_archived = 0 + + gas_mixture + var //Holds the "moles" of each of the four gases. + oxygen = 0 + carbon_dioxide = 0 + nitrogen = 0 + toxins = 0 + total_moles = 0 //Updated when a reaction occurs. + + volume = CELL_VOLUME + + temperature = 0 //in Kelvin, use calculate_temperature() to modify + + group_multiplier = 1 + //Size of the group this gas_mixture is representing. + //=1 for singletons + + graphic + + list/datum/gas/trace_gases = list() //Seemed to be a good idea that was abandoned + + tmp //These are variables for use with the archived data + oxygen_archived + carbon_dioxide_archived + nitrogen_archived + toxins_archived + + temperature_archived + + graphic_archived = 0 + fuel_burnt = 0 + +//FOR THE LOVE OF GOD PLEASE USE THIS PROC +//Call it with negative numbers to remove gases. + + proc/adjust(o2 = 0, co2 = 0, n2 = 0, tx = 0, list/datum/gas/traces = list()) + //Purpose: Adjusting the gases within a airmix + //Called by: Nothing, yet! + //Inputs: The values of the gases to adjust + //Outputs: null + + oxygen = max(0, oxygen + o2) + carbon_dioxide = max(0, carbon_dioxide + co2) + nitrogen = max(0, nitrogen + n2) + toxins = max(0, toxins + tx) + + //handle trace gasses + for(var/datum/gas/G in traces) + var/datum/gas/T = locate(G.type) in trace_gases + if(T) + T.moles = max(G.moles + T.moles, 0) + else if(G.moles > 0) + trace_gases |= G + update_values() + return + +/////////////////////////////// +//PV=nRT - related procedures// +/////////////////////////////// + + + proc/heat_capacity() + //Purpose: Returning the heat capacity of the gas mix + //Called by: UNKNOWN + //Inputs: None + //Outputs: Heat capacity + + var/heat_capacity = HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + heat_capacity += trace_gas.moles*trace_gas.specific_heat + + return max(MINIMUM_HEAT_CAPACITY,heat_capacity) + + proc/heat_capacity_archived() + //Purpose: Returning the archived heat capacity of the gas mix + //Called by: UNKNOWN + //Inputs: None + //Outputs: Archived heat capacity + + var/heat_capacity_archived = HEAT_CAPACITY_CALCULATION(oxygen_archived,carbon_dioxide_archived,nitrogen_archived,toxins_archived) + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + heat_capacity_archived += trace_gas.moles_archived*trace_gas.specific_heat + + return max(MINIMUM_HEAT_CAPACITY,heat_capacity_archived) + + proc/return_pressure() + //Purpose: Calculating Current Pressure + //Called by: + //Inputs: None + //Outputs: Gas pressure. + + if(volume>0) + return total_moles*R_IDEAL_GAS_EQUATION*temperature/volume + return 0 + +// proc/return_temperature() + //Purpose: + //Inputs: + //Outputs: + +// return temperature + +// proc/return_volume() + //Purpose: + //Inputs: + //Outputs: + +// return max(0, volume) + +// proc/thermal_energy() + //Purpose: + //Inputs: + //Outputs: + +// return temperature*heat_capacity() + + proc/update_values() + //Purpose: Calculating and storing values which were normally called CONSTANTLY + //Called by: Anything that changes values within a gas mix. + //Inputs: None + //Outputs: None + + total_moles = oxygen + carbon_dioxide + nitrogen + toxins + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + total_moles += trace_gas.moles + + return + +//////////////////////////////////////////// +//Procedures used for very specific events// +//////////////////////////////////////////// + + + proc/check_tile_graphic() + //Purpose: Calculating the graphic for a tile + //Called by: Turfs updating + //Inputs: None + //Outputs: 1 if graphic changed, 0 if unchanged + + graphic = 0 + if(toxins > MOLES_PLASMA_VISIBLE) + graphic = 1 + else if(length(trace_gases)) + var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in trace_gases + if(sleeping_agent && (sleeping_agent.moles > 1)) + graphic = 2 + else + graphic = 0 + + return graphic != graphic_archived + + proc/react(atom/dump_location) + //Purpose: Calculating if it is possible for a fire to occur in the airmix + //Called by: Air mixes updating? + //Inputs: None + //Outputs: If a fire occured + + var/reacting = 0 //set to 1 if a notable reaction occured (used by pipe_network) + + if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) + if(zburn(null) > 0) + reacting = 1 + + return reacting + + proc/fire() + //Purpose: Calculating any fire reactions. + //Called by: react() (See above) + //Inputs: None + //Outputs: How much fuel burned + + return zburn(null) + + /*var/energy_released = 0 + var/old_heat_capacity = heat_capacity() + + var/datum/gas/volatile_fuel/fuel_store = locate(/datum/gas/volatile_fuel) in trace_gases + if(fuel_store) //General volatile gas burn + var/burned_fuel = 0 + + if(oxygen < fuel_store.moles) + burned_fuel = oxygen + fuel_store.moles -= burned_fuel + oxygen = 0 + else + burned_fuel = fuel_store.moles + oxygen -= fuel_store.moles + del(fuel_store) + + energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel + carbon_dioxide += burned_fuel + fuel_burnt += burned_fuel + + //Handle plasma burning + if(toxins > MINIMUM_HEAT_CAPACITY) + var/plasma_burn_rate = 0 + var/oxygen_burn_rate = 0 + //more plasma released at higher temperatures + var/temperature_scale + if(temperature > PLASMA_UPPER_TEMPERATURE) + temperature_scale = 1 + else + temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE) + if(temperature_scale > 0) + oxygen_burn_rate = 1.4 - temperature_scale + if(oxygen > toxins*PLASMA_OXYGEN_FULLBURN) + plasma_burn_rate = (toxins*temperature_scale)/4 + else + plasma_burn_rate = (temperature_scale*(oxygen/PLASMA_OXYGEN_FULLBURN))/4 + if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY) + toxins -= plasma_burn_rate + oxygen -= plasma_burn_rate*oxygen_burn_rate + carbon_dioxide += plasma_burn_rate + + energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate) + + fuel_burnt += (plasma_burn_rate)*(1+oxygen_burn_rate) + + if(energy_released > 0) + var/new_heat_capacity = heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity + update_values() + + return fuel_burnt*/ + +////////////////////////////////////////////// +//Procs for general gas spread calculations.// +////////////////////////////////////////////// + + + proc/archive() + //Purpose: Archives the current gas values + //Called by: UNKNOWN + //Inputs: None + //Outputs: 1 + + oxygen_archived = oxygen + carbon_dioxide_archived = carbon_dioxide + nitrogen_archived = nitrogen + toxins_archived = toxins + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + trace_gas.moles_archived = trace_gas.moles + + temperature_archived = temperature + + graphic_archived = graphic + + return 1 + + proc/check_then_merge(datum/gas_mixture/giver) + //Purpose: Similar to merge(...) but first checks to see if the amount of air assumed is small enough + // that group processing is still accurate for source (aborts if not) + //Called by: airgroups/machinery expelling air, ? + //Inputs: The gas to try and merge + //Outputs: 1 on successful merge. 0 otherwise. + + if(!giver) + return 0 + if(((giver.oxygen > MINIMUM_AIR_TO_SUSPEND) && (giver.oxygen >= oxygen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((giver.carbon_dioxide > MINIMUM_AIR_TO_SUSPEND) && (giver.carbon_dioxide >= carbon_dioxide*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((giver.nitrogen > MINIMUM_AIR_TO_SUSPEND) && (giver.nitrogen >= nitrogen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((giver.toxins > MINIMUM_AIR_TO_SUSPEND) && (giver.toxins >= toxins*MINIMUM_AIR_RATIO_TO_SUSPEND))) + return 0 + if(abs(giver.temperature - temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) + return 0 + + if(giver.trace_gases.len) + for(var/datum/gas/trace_gas in giver.trace_gases) + var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases + if((trace_gas.moles > MINIMUM_AIR_TO_SUSPEND) && (!corresponding || (trace_gas.moles >= corresponding.moles*MINIMUM_AIR_RATIO_TO_SUSPEND))) + return 0 + + return merge(giver) + + proc/merge(datum/gas_mixture/giver) + //Purpose: Merges all air from giver into self. Deletes giver. + //Called by: Machinery expelling air, check_then_merge, ? + //Inputs: The gas to merge. + //Outputs: 1 + + if(!giver) + return 0 + + if(abs(temperature-giver.temperature)>MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity()*group_multiplier + var/giver_heat_capacity = giver.heat_capacity()*giver.group_multiplier + var/combined_heat_capacity = giver_heat_capacity + self_heat_capacity + if(combined_heat_capacity != 0) + temperature = (giver.temperature*giver_heat_capacity + temperature*self_heat_capacity)/combined_heat_capacity + + if((group_multiplier>1)||(giver.group_multiplier>1)) + oxygen += giver.oxygen*giver.group_multiplier/group_multiplier + carbon_dioxide += giver.carbon_dioxide*giver.group_multiplier/group_multiplier + nitrogen += giver.nitrogen*giver.group_multiplier/group_multiplier + toxins += giver.toxins*giver.group_multiplier/group_multiplier + else + oxygen += giver.oxygen + carbon_dioxide += giver.carbon_dioxide + nitrogen += giver.nitrogen + toxins += giver.toxins + + if(giver.trace_gases.len) + for(var/datum/gas/trace_gas in giver.trace_gases) + var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases + if(!corresponding) + corresponding = new trace_gas.type() + trace_gases += corresponding + corresponding.moles += trace_gas.moles*giver.group_multiplier/group_multiplier + update_values() + + del(giver) + return 1 + + proc/remove(amount) + //Purpose: Removes a certain number of moles from the air. + //Called by: ? + //Inputs: How many moles to remove. + //Outputs: Removed air. + + var/sum = total_moles + amount = min(amount,sum) //Can not take more air than tile has! + if(amount <= 0) + return null + + var/datum/gas_mixture/removed = new + + + removed.oxygen = QUANTIZE((oxygen/sum)*amount) + removed.nitrogen = QUANTIZE((nitrogen/sum)*amount) + removed.carbon_dioxide = QUANTIZE((carbon_dioxide/sum)*amount) + removed.toxins = QUANTIZE((toxins/sum)*amount) + + oxygen -= removed.oxygen/group_multiplier + nitrogen -= removed.nitrogen/group_multiplier + carbon_dioxide -= removed.carbon_dioxide/group_multiplier + toxins -= removed.toxins/group_multiplier + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + var/datum/gas/corresponding = new trace_gas.type() + removed.trace_gases += corresponding + + corresponding.moles = (trace_gas.moles/sum)*amount + trace_gas.moles -= corresponding.moles/group_multiplier + + removed.temperature = temperature + update_values() + removed.update_values() + + return removed + + proc/remove_ratio(ratio) + //Purpose: Removes a certain ratio of the air. + //Called by: ? + //Inputs: Percentage to remove. + //Outputs: Removed air. + + if(ratio <= 0) + return null + + ratio = min(ratio, 1) + + var/datum/gas_mixture/removed = new + + removed.oxygen = QUANTIZE(oxygen*ratio) + removed.nitrogen = QUANTIZE(nitrogen*ratio) + removed.carbon_dioxide = QUANTIZE(carbon_dioxide*ratio) + removed.toxins = QUANTIZE(toxins*ratio) + + oxygen -= removed.oxygen/group_multiplier + nitrogen -= removed.nitrogen/group_multiplier + carbon_dioxide -= removed.carbon_dioxide/group_multiplier + toxins -= removed.toxins/group_multiplier + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + var/datum/gas/corresponding = new trace_gas.type() + removed.trace_gases += corresponding + + corresponding.moles = trace_gas.moles*ratio + trace_gas.moles -= corresponding.moles/group_multiplier + + removed.temperature = temperature + update_values() + removed.update_values() + + return removed + + proc/check_then_remove(amount) + //Purpose: Similar to remove(...) but first checks to see if the amount of air removed is small enough + // that group processing is still accurate for source (aborts if not) + //Called by: ? + //Inputs: Number of moles to remove + //Outputs: Removed air or 0 if it can remove air or not. + + amount = min(amount,total_moles) //Can not take more air than tile has! + + if((amount > MINIMUM_AIR_RATIO_TO_SUSPEND) && (amount > total_moles*MINIMUM_AIR_RATIO_TO_SUSPEND)) + return 0 + + return remove(amount) + + proc/copy_from(datum/gas_mixture/sample) + //Purpose: Duplicates the sample air mixture. + //Called by: airgroups splitting, ? + //Inputs: Gas to copy + //Outputs: 1 + + oxygen = sample.oxygen + carbon_dioxide = sample.carbon_dioxide + nitrogen = sample.nitrogen + toxins = sample.toxins + total_moles = sample.total_moles + + trace_gases.len=null + if(sample.trace_gases.len > 0) + for(var/datum/gas/trace_gas in sample.trace_gases) + var/datum/gas/corresponding = new trace_gas.type() + trace_gases += corresponding + + corresponding.moles = trace_gas.moles + + temperature = sample.temperature + + return 1 + + proc/check_gas_mixture(datum/gas_mixture/sharer) + //Purpose: Telling if one or both airgroups needs to disable group processing. + //Called by: Airgroups sharing air, checking if group processing needs disabled. + //Inputs: Gas to compare from other airgroup + //Outputs: 0 if the self-check failed (local airgroup breaks?) + // then -1 if sharer-check failed (sharing airgroup breaks?) + // then 1 if both checks pass (share succesful?) + if(!istype(sharer)) + return + + var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/TRANSFER_FRACTION + var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/TRANSFER_FRACTION + var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/TRANSFER_FRACTION + var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived)/TRANSFER_FRACTION + + var/delta_temperature = (temperature_archived - sharer.temperature_archived) + + if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins_archived*MINIMUM_AIR_RATIO_TO_SUSPEND))) + return 0 + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) + return 0 + + if(sharer.trace_gases.len) + for(var/datum/gas/trace_gas in sharer.trace_gases) + if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND*4) + var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases + if(corresponding) + if(trace_gas.moles_archived >= corresponding.moles_archived*MINIMUM_AIR_RATIO_TO_SUSPEND*4) + return 0 + else + return 0 + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND*4) + if(!locate(trace_gas.type) in sharer.trace_gases) + return 0 + + if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= sharer.oxygen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= sharer.carbon_dioxide_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= sharer.nitrogen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= sharer.toxins_archived*MINIMUM_AIR_RATIO_TO_SUSPEND))) + return -1 + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND*4) + var/datum/gas/corresponding = locate(trace_gas.type) in sharer.trace_gases + if(corresponding) + if(trace_gas.moles_archived >= corresponding.moles_archived*MINIMUM_AIR_RATIO_TO_SUSPEND*4) + return -1 + else + return -1 + + return 1 + + proc/check_turf(turf/model) + //Purpose: Used to compare the gases in an unsimulated turf with the gas in a simulated one. + //Called by: Sharing air (mimicing) with adjacent unsimulated turfs + //Inputs: Unsimulated turf + //Outputs: 1 if safe to mimic, 0 if needs to break airgroup. + + var/delta_oxygen = (oxygen_archived - model.oxygen)/TRANSFER_FRACTION + var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide)/TRANSFER_FRACTION + var/delta_nitrogen = (nitrogen_archived - model.nitrogen)/TRANSFER_FRACTION + var/delta_toxins = (toxins_archived - model.toxins)/TRANSFER_FRACTION + + var/delta_temperature = (temperature_archived - model.temperature) + + if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \ + || ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins_archived*MINIMUM_AIR_RATIO_TO_SUSPEND))) + return 0 + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) + return 0 + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND*4) + return 0 + + return 1 + + proc/share(datum/gas_mixture/sharer) + //Purpose: Used to transfer gas from a more pressurised tile to a less presurised tile + // (Two directional, if the other tile is more pressurised, air travels to current tile) + //Called by: Sharing air with adjacent simulated turfs + //Inputs: Air datum to share with + //Outputs: Amount of gas exchanged (Negative if lost air, positive if gained.) + + + if(!istype(sharer)) + return + + var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/TRANSFER_FRACTION + var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/TRANSFER_FRACTION + var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/TRANSFER_FRACTION + var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived)/TRANSFER_FRACTION + + var/delta_temperature = (temperature_archived - sharer.temperature_archived) + + var/old_self_heat_capacity = 0 + var/old_sharer_heat_capacity = 0 + + var/heat_self_to_sharer = 0 + var/heat_capacity_self_to_sharer = 0 + var/heat_sharer_to_self = 0 + var/heat_capacity_sharer_to_self = 0 + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + + var/delta_air = delta_oxygen+delta_nitrogen + if(delta_air) + var/air_heat_capacity = SPECIFIC_HEAT_AIR*delta_air + if(delta_air > 0) + heat_self_to_sharer += air_heat_capacity*temperature_archived + heat_capacity_self_to_sharer += air_heat_capacity + else + heat_sharer_to_self -= air_heat_capacity*sharer.temperature_archived + heat_capacity_sharer_to_self -= air_heat_capacity + + if(delta_carbon_dioxide) + var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO*delta_carbon_dioxide + if(delta_carbon_dioxide > 0) + heat_self_to_sharer += carbon_dioxide_heat_capacity*temperature_archived + heat_capacity_self_to_sharer += carbon_dioxide_heat_capacity + else + heat_sharer_to_self -= carbon_dioxide_heat_capacity*sharer.temperature_archived + heat_capacity_sharer_to_self -= carbon_dioxide_heat_capacity + + if(delta_toxins) + var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN*delta_toxins + if(delta_toxins > 0) + heat_self_to_sharer += toxins_heat_capacity*temperature_archived + heat_capacity_self_to_sharer += toxins_heat_capacity + else + heat_sharer_to_self -= toxins_heat_capacity*sharer.temperature_archived + heat_capacity_sharer_to_self -= toxins_heat_capacity + + old_self_heat_capacity = heat_capacity()*group_multiplier + old_sharer_heat_capacity = sharer.heat_capacity()*sharer.group_multiplier + + oxygen -= delta_oxygen/group_multiplier + sharer.oxygen += delta_oxygen/sharer.group_multiplier + + carbon_dioxide -= delta_carbon_dioxide/group_multiplier + sharer.carbon_dioxide += delta_carbon_dioxide/sharer.group_multiplier + + nitrogen -= delta_nitrogen/group_multiplier + sharer.nitrogen += delta_nitrogen/sharer.group_multiplier + + toxins -= delta_toxins/group_multiplier + sharer.toxins += delta_toxins/sharer.group_multiplier + + var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins) + + var/list/trace_types_considered = list() + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + + var/datum/gas/corresponding = locate(trace_gas.type) in sharer.trace_gases + var/delta = 0 + + if(corresponding) + delta = QUANTIZE(trace_gas.moles_archived - corresponding.moles_archived)/TRANSFER_FRACTION + else + corresponding = new trace_gas.type() + sharer.trace_gases += corresponding + + delta = trace_gas.moles_archived/TRANSFER_FRACTION + + trace_gas.moles -= delta/group_multiplier + corresponding.moles += delta/sharer.group_multiplier + + if(delta) + var/individual_heat_capacity = trace_gas.specific_heat*delta + if(delta > 0) + heat_self_to_sharer += individual_heat_capacity*temperature_archived + heat_capacity_self_to_sharer += individual_heat_capacity + else + heat_sharer_to_self -= individual_heat_capacity*sharer.temperature_archived + heat_capacity_sharer_to_self -= individual_heat_capacity + + moved_moles += delta + + trace_types_considered += trace_gas.type + + + if(sharer.trace_gases.len) + for(var/datum/gas/trace_gas in sharer.trace_gases) + if(trace_gas.type in trace_types_considered) continue + else + var/datum/gas/corresponding + var/delta = 0 + + corresponding = new trace_gas.type() + trace_gases += corresponding + + delta = trace_gas.moles_archived/TRANSFER_FRACTION + + trace_gas.moles -= delta/sharer.group_multiplier + corresponding.moles += delta/group_multiplier + + //Guaranteed transfer from sharer to self + var/individual_heat_capacity = trace_gas.specific_heat*delta + heat_sharer_to_self += individual_heat_capacity*sharer.temperature_archived + heat_capacity_sharer_to_self += individual_heat_capacity + + moved_moles += -delta + update_values() + sharer.update_values() + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/new_self_heat_capacity = old_self_heat_capacity + heat_capacity_sharer_to_self - heat_capacity_self_to_sharer + var/new_sharer_heat_capacity = old_sharer_heat_capacity + heat_capacity_self_to_sharer - heat_capacity_sharer_to_self + + if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY) + temperature = (old_self_heat_capacity*temperature - heat_capacity_self_to_sharer*temperature_archived + heat_capacity_sharer_to_self*sharer.temperature_archived)/new_self_heat_capacity + + if(new_sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) + sharer.temperature = (old_sharer_heat_capacity*sharer.temperature-heat_capacity_sharer_to_self*sharer.temperature_archived + heat_capacity_self_to_sharer*temperature_archived)/new_sharer_heat_capacity + + if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY) + if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.10) // <10% change in sharer heat capacity + temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT) + + if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE) + var/delta_pressure = temperature_archived*(total_moles + moved_moles) - sharer.temperature_archived*(sharer.total_moles - moved_moles) + return delta_pressure*R_IDEAL_GAS_EQUATION/volume + + else + return 0 + + proc/mimic(turf/model, border_multiplier) + //Purpose: Used transfer gas from a more pressurised tile to a less presurised unsimulated tile. + //Called by: "sharing" from unsimulated to simulated turfs. + //Inputs: Unsimulated turf, Multiplier for gas transfer (optional) + //Outputs: Amount of gas exchanged + + var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen)/TRANSFER_FRACTION + var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide)/TRANSFER_FRACTION + var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen)/TRANSFER_FRACTION + var/delta_toxins = QUANTIZE(toxins_archived - model.toxins)/TRANSFER_FRACTION + + var/delta_temperature = (temperature_archived - model.temperature) + + var/heat_transferred = 0 + var/old_self_heat_capacity = 0 + var/heat_capacity_transferred = 0 + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + + var/delta_air = delta_oxygen+delta_nitrogen + if(delta_air) + var/air_heat_capacity = SPECIFIC_HEAT_AIR*delta_air + heat_transferred -= air_heat_capacity*model.temperature + heat_capacity_transferred -= air_heat_capacity + + if(delta_carbon_dioxide) + var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO*delta_carbon_dioxide + heat_transferred -= carbon_dioxide_heat_capacity*model.temperature + heat_capacity_transferred -= carbon_dioxide_heat_capacity + + if(delta_toxins) + var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN*delta_toxins + heat_transferred -= toxins_heat_capacity*model.temperature + heat_capacity_transferred -= toxins_heat_capacity + + old_self_heat_capacity = heat_capacity()*group_multiplier + + if(border_multiplier) + oxygen -= delta_oxygen*border_multiplier/group_multiplier + carbon_dioxide -= delta_carbon_dioxide*border_multiplier/group_multiplier + nitrogen -= delta_nitrogen*border_multiplier/group_multiplier + toxins -= delta_toxins*border_multiplier/group_multiplier + else + oxygen -= delta_oxygen/group_multiplier + carbon_dioxide -= delta_carbon_dioxide/group_multiplier + nitrogen -= delta_nitrogen/group_multiplier + toxins -= delta_toxins/group_multiplier + + var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins) + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + var/delta = 0 + + delta = trace_gas.moles_archived/TRANSFER_FRACTION + + if(border_multiplier) + trace_gas.moles -= delta*border_multiplier/group_multiplier + else + trace_gas.moles -= delta/group_multiplier + + var/heat_cap_transferred = delta*trace_gas.specific_heat + heat_transferred += heat_cap_transferred*temperature_archived + heat_capacity_transferred += heat_cap_transferred + moved_moles += delta + update_values() + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/new_self_heat_capacity = old_self_heat_capacity - heat_capacity_transferred + if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY) + if(border_multiplier) + temperature = (old_self_heat_capacity*temperature - heat_capacity_transferred*border_multiplier*temperature_archived)/new_self_heat_capacity + else + temperature = (old_self_heat_capacity*temperature - heat_capacity_transferred*border_multiplier*temperature_archived)/new_self_heat_capacity + + temperature_mimic(model, model.thermal_conductivity, border_multiplier) + + if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE) + var/delta_pressure = temperature_archived*(total_moles + moved_moles) - model.temperature*(model.oxygen+model.carbon_dioxide+model.nitrogen+model.toxins) + return delta_pressure*R_IDEAL_GAS_EQUATION/volume + else + return 0 + + proc/check_both_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient) + var/delta_temperature = (temperature_archived - sharer.temperature_archived) + + var/self_heat_capacity = heat_capacity_archived() + var/sharer_heat_capacity = sharer.heat_capacity_archived() + + var/self_temperature_delta = 0 + var/sharer_temperature_delta = 0 + + if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity)) + + self_temperature_delta = -heat/(self_heat_capacity*group_multiplier) + sharer_temperature_delta = heat/(sharer_heat_capacity*sharer.group_multiplier) + else + return 1 + + if((abs(self_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) \ + && (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived)) + return 0 + + if((abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) \ + && (abs(sharer_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*sharer.temperature_archived)) + return -1 + + temperature += self_temperature_delta + sharer.temperature += sharer_temperature_delta + + return 1 + //Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency + + proc/check_me_then_temperature_share(datum/gas_mixture/sharer, conduction_coefficient) + var/delta_temperature = (temperature_archived - sharer.temperature_archived) + + var/self_heat_capacity = heat_capacity_archived() + var/sharer_heat_capacity = sharer.heat_capacity_archived() + + var/self_temperature_delta = 0 + var/sharer_temperature_delta = 0 + + if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity)) + + self_temperature_delta = -heat/(self_heat_capacity*group_multiplier) + sharer_temperature_delta = heat/(sharer_heat_capacity*sharer.group_multiplier) + else + return 1 + + if((abs(self_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) \ + && (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived)) + return 0 + + temperature += self_temperature_delta + sharer.temperature += sharer_temperature_delta + + return 1 + //Logic integrated from: temperature_share(sharer, conduction_coefficient) for efficiency + + proc/check_me_then_temperature_turf_share(turf/simulated/sharer, conduction_coefficient) + var/delta_temperature = (temperature_archived - sharer.temperature) + + var/self_temperature_delta = 0 + var/sharer_temperature_delta = 0 + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity_archived() + + if((sharer.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*sharer.heat_capacity/(self_heat_capacity+sharer.heat_capacity)) + + self_temperature_delta = -heat/(self_heat_capacity*group_multiplier) + sharer_temperature_delta = heat/sharer.heat_capacity + else + return 1 + + if((abs(self_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) \ + && (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived)) + return 0 + + temperature += self_temperature_delta + sharer.temperature += sharer_temperature_delta + + return 1 + //Logic integrated from: temperature_turf_share(sharer, conduction_coefficient) for efficiency + + proc/check_me_then_temperature_mimic(turf/model, conduction_coefficient) + var/delta_temperature = (temperature_archived - model.temperature) + var/self_temperature_delta = 0 + + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity_archived() + + if((model.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*model.heat_capacity/(self_heat_capacity+model.heat_capacity)) + + self_temperature_delta = -heat/(self_heat_capacity*group_multiplier) + + if((abs(self_temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) \ + && (abs(self_temperature_delta) > MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND*temperature_archived)) + return 0 + + temperature += self_temperature_delta + + return 1 + //Logic integrated from: temperature_mimic(model, conduction_coefficient) for efficiency + + proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient) + + var/delta_temperature = (temperature_archived - sharer.temperature_archived) + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity_archived() + var/sharer_heat_capacity = sharer.heat_capacity_archived() + if(!group_multiplier) + message_admins("Error! The gas mixture (ref \ref[src]) has no group multiplier!") + return + + if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity)) + + temperature -= heat/(self_heat_capacity*group_multiplier) + sharer.temperature += heat/(sharer_heat_capacity*sharer.group_multiplier) + + proc/temperature_mimic(turf/model, conduction_coefficient, border_multiplier) + var/delta_temperature = (temperature - model.temperature) + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity()//_archived() + if(!group_multiplier) + message_admins("Error! The gas mixture (ref \ref[src]) has no group multiplier!") + return + + if((model.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*model.heat_capacity/(self_heat_capacity+model.heat_capacity)) + + if(border_multiplier) + temperature -= heat*border_multiplier/(self_heat_capacity*group_multiplier) + else + temperature -= heat/(self_heat_capacity*group_multiplier) + + proc/temperature_turf_share(turf/simulated/sharer, conduction_coefficient) + var/delta_temperature = (temperature_archived - sharer.temperature) + if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) + var/self_heat_capacity = heat_capacity() + + if((sharer.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) + var/heat = conduction_coefficient*delta_temperature* \ + (self_heat_capacity*sharer.heat_capacity/(self_heat_capacity+sharer.heat_capacity)) + + temperature -= heat/(self_heat_capacity*group_multiplier) + sharer.temperature += heat/sharer.heat_capacity + + proc/compare(datum/gas_mixture/sample) + //Purpose: Compares sample to self to see if within acceptable ranges that group processing may be enabled + //Called by: Airgroups trying to rebuild + //Inputs: Gas mix to compare + //Outputs: 1 if can rebuild, 0 if not. + if(!sample) return 0 + + if((abs(oxygen-sample.oxygen) > MINIMUM_AIR_TO_SUSPEND) && \ + ((oxygen < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.oxygen) || (oxygen > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.oxygen))) + return 0 + if((abs(nitrogen-sample.nitrogen) > MINIMUM_AIR_TO_SUSPEND) && \ + ((nitrogen < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.nitrogen) || (nitrogen > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.nitrogen))) + return 0 + if((abs(carbon_dioxide-sample.carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && \ + ((carbon_dioxide < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.carbon_dioxide) || (oxygen > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.carbon_dioxide))) + return 0 + if((abs(toxins-sample.toxins) > MINIMUM_AIR_TO_SUSPEND) && \ + ((toxins < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins) || (toxins > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins))) + return 0 + + if(total_moles > MINIMUM_AIR_TO_SUSPEND) + if((abs(temperature-sample.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && \ + ((temperature < (1-MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature) || (temperature > (1+MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature))) + //world << "temp fail [temperature] & [sample.temperature]" + return 0 + + if(sample.trace_gases.len) + for(var/datum/gas/trace_gas in sample.trace_gases) + if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND) + var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases + if(corresponding) + if((abs(trace_gas.moles - corresponding.moles) > MINIMUM_AIR_TO_SUSPEND) && \ + ((corresponding.moles < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*trace_gas.moles) || (corresponding.moles > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*trace_gas.moles))) + return 0 + else + return 0 + + if(trace_gases.len) + for(var/datum/gas/trace_gas in trace_gases) + if(trace_gas.moles > MINIMUM_AIR_TO_SUSPEND) + var/datum/gas/corresponding = locate(trace_gas.type) in sample.trace_gases + if(corresponding) + if((abs(trace_gas.moles - corresponding.moles) > MINIMUM_AIR_TO_SUSPEND) && \ + ((trace_gas.moles < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*corresponding.moles) || (trace_gas.moles > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*corresponding.moles))) + return 0 + else + return 0 + return 1 + + + proc/subtract(datum/gas_mixture/right_side) + //Purpose: Subtracts right_side from air_mixture. Used to help turfs mingle + //Called by: Pipelines ending in a break (or something) + //Inputs: Gas mix to remove + //Outputs: 1 + + oxygen -= right_side.oxygen + carbon_dioxide -= right_side.carbon_dioxide + nitrogen -= right_side.nitrogen + toxins -= right_side.toxins + + if((trace_gases.len > 0)||(right_side.trace_gases.len > 0)) + for(var/datum/gas/trace_gas in right_side.trace_gases) + var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases + if(!corresponding) + corresponding = new trace_gas.type() + trace_gases += corresponding + + corresponding.moles -= trace_gas.moles + update_values() + return 1 \ No newline at end of file diff --git a/code/ZAS/FEA_system.dm b/code/ZAS/FEA_system.dm new file mode 100644 index 00000000000..6db306d8b59 --- /dev/null +++ b/code/ZAS/FEA_system.dm @@ -0,0 +1,182 @@ +/* +Overview: + The air_master global variable is the workhorse for the system. + +Why are you archiving data before modifying it? + The general concept with archiving data and having each tile keep track of when they were last updated is to keep everything symmetric + and totally independent of the order they are read in an update cycle. + This prevents abnormalities like air/fire spreading rapidly in one direction and super slowly in the other. + +Why not just archive everything and then calculate? + Efficiency. While a for-loop that goes through all tils and groups to archive their information before doing any calculations seems simple, it is + slightly less efficient than the archive-before-modify/read method. + +Why is there a cycle check for calculating data as well? + This ensures that every connection between group-tile, tile-tile, and group-group is only evaluated once per loop. + + + + +Important variables: + air_master.groups_to_rebuild (list) + A list of air groups that have had their geometry occluded and thus may need to be split in half. + A set of adjacent groups put in here will join together if validly connected. + This is done before air system calculations for a cycle. + air_master.tiles_to_update (list) + Turfs that are in this list have their border data updated before the next air calculations for a cycle. + Place turfs in this list rather than call the proc directly to prevent race conditions + + turf/simulated.archive() and datum/air_group.archive() + This stores all data for. + If you modify, make sure to update the archived_cycle to prevent race conditions and maintain symmetry + + atom/CanPass(atom/movable/mover, turf/target, height, air_group) + returns 1 for allow pass and 0 for deny pass + Turfs automatically call this for all objects/mobs in its turf. + This is called both as source.CanPass(target, height, air_group) + and target.CanPass(source, height, air_group) + + Cases for the parameters + 1. This is called with args (mover, location, height>0, air_group=0) for normal objects. + 2. This is called with args (null, location, height=0, air_group=0) for flowing air. + 3. This is called with args (null, location, height=?, air_group=1) for determining group boundaries. + + Cases 2 and 3 would be different for doors or other objects open and close fairly often. + (Case 3 would return 0 always while Case 2 would return 0 only when the door is open) + This prevents the necessity of re-evaluating group geometry every time a door opens/closes. + + +Important Procedures + air_master.process() + This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations + + +*/ + +var/kill_air = 0 +var/tick_multiplier = 2 + +atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) + //Purpose: Determines if the object (or airflow) can pass this atom. + //Called by: Movement, airflow. + //Inputs: The moving atom (optional), target turf, "height" and air group + //Outputs: Boolean if can pass. + + return (!density || !height || air_group) + +turf + CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0) + if(!target) return 0 + + if(istype(mover)) // turf/Enter(...) will perform more advanced checks + return !density + + else // Now, doing more detailed checks for air movement and air group formation + if(target.blocks_air||blocks_air) + return 0 + + for(var/obj/obstacle in src) + if(!obstacle.CanPass(mover, target, height, air_group)) + return 0 + if(target != src) + for(var/obj/obstacle in target) + if(!obstacle.CanPass(mover, src, height, air_group)) + return 0 + + return 1 + + +var/global/datum/controller/air_system/air_master + +datum + controller + air_system + //Geoemetry lists +// var/list/turf/simulated/active_singletons = list() + + //Special functions lists +// var/list/turf/simulated/active_super_conductivity = list() +// var/list/turf/simulated/high_pressure_delta = list() + + //Geometry updates lists + var/list/turf/simulated/tiles_to_update = list() + var/list/turf/simulated/tiles_with_connections = list() +// var/list/turf/simulated/groups_to_rebuild = list() + + var/current_cycle = 0 + var/update_delay = 5 //How long between check should it try to process atmos again. + var/failed_ticks = 0 //How many ticks have runtimed? + + +/* process() + //Call this to process air movements for a cycle + + process_rebuild_select_groups() + //Used by process() + //Warning: Do not call this + + rebuild_group(datum/air_group) + //Used by process_rebuild_select_groups() + //Warning: Do not call this, add the group to air_master.groups_to_rebuild instead + */ + + + proc/setup() + //Purpose: Call this at the start to setup air groups geometry + // (Warning: Very processor intensive but only must be done once per round) + //Called by: Gameticker/Master controller + //Inputs: None. + //Outputs: None. + + set background = 1 + world << "\red \b Processing Geometry..." + sleep(-1) + + var/start_time = world.timeofday + + for(var/turf/simulated/S in world) + if(S.z < 5) + if(!S.zone && !S.blocks_air && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE + if(S.CanPass(null, S, 0, 0)) + new/zone(S) + + tiles_to_update |= S + + world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!" + spawn start() + + proc/start() + //Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere. + //Called by: Master controller + //Inputs: None. + //Outputs: None. + + set background = 1 + + while(1) + if(!kill_air) + current_cycle++ + var/success = tick() //Changed so that a runtime does not crash the ticker. + if(!success) //Runtimed. + failed_ticks++ + if(failed_ticks > 20) + world << "ERROR IN ATMOS TICKER. Killing air simulation!" + kill_air = 1 + sleep(max(5,update_delay*tick_multiplier)) + + proc/tick() + + if(tiles_to_update.len > 0) //If there are tiles to update, do so. + for(var/turf/simulated/T in tiles_to_update) + T.update_air_properties() + tiles_to_update = list() + + for(var/zone/Z in zones) + if(Z.last_update < current_cycle) + Z.process() + if(Z) Z.last_update = current_cycle + + for(var/obj/fire/F) + F.process() + + return 1 \ No newline at end of file diff --git a/code/ZAS/FEA_turf_tile.dm b/code/ZAS/FEA_turf_tile.dm new file mode 100644 index 00000000000..275f0c5e935 --- /dev/null +++ b/code/ZAS/FEA_turf_tile.dm @@ -0,0 +1,228 @@ +atom/var/pressure_resistance = ONE_ATMOSPHERE +turf + assume_air(datum/gas_mixture/giver) //use this for machines to adjust air + del(giver) + return 0 + + return_air() + //Create gas mixture to hold data for passing + var/datum/gas_mixture/GM = new + + GM.oxygen = oxygen + GM.carbon_dioxide = carbon_dioxide + GM.nitrogen = nitrogen + GM.toxins = toxins + + GM.temperature = temperature + GM.update_values() + + return GM + + remove_air(amount as num) + var/datum/gas_mixture/GM = new + + var/sum = oxygen + carbon_dioxide + nitrogen + toxins + if(sum>0) + GM.oxygen = (oxygen/sum)*amount + GM.carbon_dioxide = (carbon_dioxide/sum)*amount + GM.nitrogen = (nitrogen/sum)*amount + GM.toxins = (toxins/sum)*amount + + GM.temperature = temperature + GM.update_values() + + return GM + +turf + simulated + + var/current_graphic = null + + var/tmp + datum/gas_mixture/air + + processing = 1 + group_border = 0 + length_space_border = 0 + + air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update + + archived_cycle = 0 + current_cycle = 0 + + obj/fire/active_hotspot + + temperature_archived //USED ONLY FOR SOLIDS + being_superconductive = 0 + + + proc + process_cell() + update_air_properties() + archive() + + mimic_air_with_tile(turf/model) + share_air_with_tile(turf/simulated/sharer) + + mimic_temperature_with_tile(turf/model) + share_temperature_with_tile(turf/simulated/sharer) + + + super_conduct() + + update_visuals() + overlays = null + + var/siding_icon_state = return_siding_icon_state() + if(siding_icon_state) + overlays += image('floors.dmi',siding_icon_state) + var/datum/gas_mixture/model = return_air() + switch(model.graphic) + if(1) + overlays.Add(plmaster) //TODO: Make invisible plasma an option + if(2) + overlays.Add(slmaster) + + + + New() + ..() + + if(!blocks_air) + air = new + + air.oxygen = oxygen + air.carbon_dioxide = carbon_dioxide + air.nitrogen = nitrogen + air.toxins = toxins + + air.temperature = temperature + air.update_values() + + if(air_master) + air_master.tiles_to_update.Add(src) + +// air.parent = src //TODO DEBUG REMOVE + + else + if(air_master) + for(var/direction in cardinal) + var/turf/simulated/floor/target = get_step(src,direction) + if(istype(target)) + air_master.tiles_to_update.Add(target) + + Del() + if(active_hotspot) + del(active_hotspot) + if(blocks_air) + for(var/direction in list(NORTH, SOUTH, EAST, WEST)) + var/turf/simulated/tile = get_step(src,direction) + if(istype(tile) && !tile.blocks_air) + air_master.tiles_to_update.Add(tile) + ..() + + assume_air(datum/gas_mixture/giver) + if(!giver) return 0 + if(zone) + zone.air.merge(giver) + return 1 + else + return ..() + + archive() + if(air) //For open space like floors + air.archive() + + temperature_archived = temperature + archived_cycle = air_master.current_cycle + + share_air_with_tile(turf/simulated/T) + return air.share(T.air) + + mimic_air_with_tile(turf/T) + return air.mimic(T) + + return_air() + if(zone) + return zone.air + else if(air) + return air + + else + return ..() + + remove_air(amount as num) + if(zone) + var/datum/gas_mixture/removed = null + removed = zone.air.remove(amount) + return removed + else if(air) + var/datum/gas_mixture/removed = null + removed = air.remove(amount) + + if(air.check_tile_graphic()) + update_visuals(air) + return removed + + else + return ..() + + update_air_properties()//OPTIMIZE + air_check_directions = 0 + + for(var/direction in cardinal) + if(CanPass(null, get_step(src,direction), 0, 0)) + air_check_directions |= direction + + if(!zone && CanPass(null, src, 1.5, 1)) //No zone and not a wall, lets add ourself to a zone. + for(var/direction in cardinal) + if(air_check_directions&direction) + var/turf/simulated/T = get_step(src,direction) + if(T.zone) + T.zone.AddTurf(src) + break + if(!zone) //No zone found, new zone! + new/zone(src) + + if(!CanPass(null, src, 0, 0) && !CanPass(null, src, 1.5, 1)) //Can't pass, and was updated. Delete zone connections involving this turf. + if(air_master.tiles_with_connections["\ref[src]"]) + var/list/connections = air_master.tiles_with_connections["\ref[src]"] + for(var/connection/C in connections) + del C + + update_zone_properties() //Update self zone and adjacent zones. + + if(air_check_directions) + processing = 1 + else + processing = 0 + + + proc/update_zone_properties() + for(var/direction in cardinal) + var/turf/simulated/T = get_step(src,direction) + if(air_check_directions&direction) //I can connect air in this direction + if(!istype(T)) //Space + if(!CanPass(null, T, 1.5, 1) && CanPass(src, T, 0, 0)) //Normally would block it, instead lets make a connection to it. + if(zone) + zone.AddSpace(T) + else if(!CanPass(src, T, 0, 0)) //I block the air, disconnect from it if connected. + if(zone && T in zone.space_tiles) + zone.RemoveSpace(T) + else if(zone) + zone.rebuild = 1 + continue + else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt. + if(T.zone && !T.zone.rebuild) + for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected. + var/turf/simulated/NT = get_step(src, direction2) + if(NT && NT.zone && NT.zone == T.zone) + T.zone.rebuild = 1 + else if((!T.CanPass(null, src, 1.5, 1) && T.CanPass(null, src, 0, 0)) || (!CanPass(null, T, 1.5, 1) && CanPass(null, T, 0, 0))) + if(T.zone != zone) + ZConnect(src,T) + else if(zone && !zone.rebuild) + for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected. + var/turf/simulated/NT = get_step(T, direction2) + if(NT && NT.zone && NT.zone == zone) + zone.rebuild = 1 \ No newline at end of file diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index f265c45877a..87c9f63648d 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -1,13 +1,16 @@ vs_control/var/IgnitionLevel = 10 //Moles of oxygen+plasma - co2 needed to burn. -#define OXYGEN +//Some legacy definitions so fires can be started. atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return null + turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) + + turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) - if(fire_protection) return + if(fire_protection > world.time-300) return var/datum/gas_mixture/air_contents = return_air(1) if(!air_contents) return 0 @@ -25,19 +28,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) return 1 var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases var/obj/liquid_fuel/liquid = locate() in src - var/fuel_level = 0 - var/liquid_level = 0 - if(fuel) fuel_level = fuel.moles - if(liquid) liquid_level = liquid.amount - var/total_fuel = air_contents.toxins + fuel_level + liquid_level - if((air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25) > vsc.IgnitionLevel && total_fuel > 0.5) + if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5)) igniting = 1 if(air_contents.oxygen < 0.5) return 0 - if(parent&&parent.group_processing) - parent.suspend_group_processing() - if(! (locate(/obj/fire) in src)) var/obj/fire/F = new(src,1000) F.temperature = exposed_temperature @@ -48,112 +43,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) return igniting -obj/effect/hotspot - //Icon for fire on turfs, also helps for nurturing small fires until they are full tile - - anchored = 1 - - mouse_opacity = 0 - - //luminosity = 3 - - icon = 'fire.dmi' - icon_state = "1" - - layer = TURF_LAYER - - var - volume = 125 - temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - - just_spawned = 1 - - bypassing = 0 - -obj/effect/hotspot/proc/perform_exposure() - var/turf/simulated/floor/location = loc - if(!istype(location)) - return 0 - - if(volume > CELL_VOLUME*0.95) - bypassing = 1 - else bypassing = 0 - - if(bypassing) - if(!just_spawned) - volume = location.air.fuel_burnt*FIRE_GROWTH_RATE - temperature = location.air.temperature - else - var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume) - - affected.temperature = temperature - - affected.react() - - temperature = affected.temperature - volume = affected.fuel_burnt*FIRE_GROWTH_RATE - - location.assume_air(affected) - - for(var/atom/item in loc) - item.temperature_expose(null, temperature, volume) - -obj/effect/hotspot/process(turf/simulated/list/possible_spread) - if(just_spawned) - just_spawned = 0 - return 0 - - var/turf/simulated/floor/location = loc - if(!istype(location)) - del(src) - - if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1)) - del(src) - - if(location.air.toxins < 0.5 || location.air.oxygen < 0.5) - del(src) - - - perform_exposure() - - if(location.wet) location.wet = 0 - - if(bypassing) - icon_state = "3" - location.burn_tile() - - //Possible spread due to radiated heat - if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD) - var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE - - for(var/turf/simulated/possible_target in possible_spread) - if(!locate(/obj/effect/hotspot) in possible_target) - possible_target.hotspot_expose(radiated_temperature, CELL_VOLUME/4) - - else - if(volume > CELL_VOLUME*0.4) - icon_state = "2" - else - icon_state = "1" - - return 1 - -obj/effect/hotspot/New() - ..() - dir = pick(cardinal) - sd_SetLuminosity(3) - -obj/effect/hotspot/Del() - src.sd_SetLuminosity(0) - loc = null - ..() - -var - fire_ratio_1 = 0.05 - obj fire - //Icon for fire on turfs, also helps for nurturing small fires until they are full tile + //Icon for fire on turfs. anchored = 1 mouse_opacity = 0 @@ -168,84 +60,82 @@ obj var volume = CELL_VOLUME temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - firelevel = 10000 + firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel() archived_firelevel = 0 process() + if(firelevel > vsc.IgnitionLevel) + var/turf/simulated/floor/S = loc - if(!S.zone) del src - //src.temperature += (src.firelevel/FireTempDivider+FireOffset - src.temperature) / FireRate + if(!S.zone) del src //Cannot exist where zones are broken. + if(istype(S,/turf/simulated/floor)) var datum/gas_mixture/air_contents = S.return_air() + //Get whatever trace fuels are in the area datum/gas/volatile_fuel/fuel = locate(/datum/gas/volatile_fuel/) in air_contents.trace_gases - fuel_level = 0 + //Also get liquid fuels on the ground. obj/liquid_fuel/liquid = locate() in S - liquid_level = 0 - if(fuel) fuel_level = fuel.moles - if(liquid) - liquid_level = liquid.amount - if(liquid.amount <= 0) - del liquid - liquid_level = 0 + firelevel = air_contents.calculate_firelevel(liquid) - firelevel = (air_contents.oxygen + air_contents.toxins + fuel_level*1.5 + liquid_level*1.5) - (air_contents.carbon_dioxide*0.25) + //Ensure that there is an appropriate amount of fuel and O2 here. + if(firelevel > 25 && (air_contents.toxins || fuel || liquid)) - firelevel = min(firelevel,vsc.IgnitionLevel*5) - - if(firelevel > vsc.IgnitionLevel * 1.5 && (air_contents.toxins || fuel_level || liquid_level)) for(var/direction in cardinal) if(S.air_check_directions&direction) //Grab all valid bordering tiles - var/turf/simulated/enemy_tile = get_step(S, direction) - if(istype(enemy_tile)) - if(enemy_tile.fire_protection) - firelevel -= vsc.IgnitionLevel - continue - if(!(locate(/obj/fire) in enemy_tile)) - if( prob( firelevel/(vsc.IgnitionLevel*0.1) ) ) - new/obj/fire(enemy_tile,firelevel) - // else - // world << "Spread Probability: [firelevel/(vsc.IgnitionLevel*0.1)]%." - // else - // world << "There's a fire there bitch." - // else - // world << "[enemy_tile] cannot be spread to." - //else - // world << "Not enough firelevel to spread: [firelevel]/[vsc.IgnitionLevel*1.5]" - var/datum/gas_mixture/flow = air_contents.remove_ratio(0.5) - //n = PV/RT, taking the volume of a single tile from the gas. + var/turf/simulated/enemy_tile = get_step(S, direction) + + if(istype(enemy_tile)) + //If extinguisher mist passed over the turf it's trying to spread to, don't spread and + //reduce firelevel. + if(enemy_tile.fire_protection > world.time-30) + firelevel -= 150 + continue + + //Spread the fire. + if(!(locate(/obj/fire) in enemy_tile)) + if( prob( firelevel/2.5 ) ) + new/obj/fire(enemy_tile,firelevel) + + var/datum/gas_mixture/flow = air_contents.remove_ratio(0.5) //Take half the air from the room I guess. if(flow) - if(flow.oxygen > 0.3 && (flow.toxins || fuel_level || liquid)) + //Ensure adequate oxygen and fuel. + if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid)) + //Change icon depending on the fuel, and thus temperature. icon_state = "1" - if(firelevel > vsc.IgnitionLevel * 2) + if(firelevel > 25) icon_state = "2" - if(firelevel > vsc.IgnitionLevel * 3.5) + if(firelevel > 100) icon_state = "3" + + //Ensure flow temperature is higher than minimum fire temperatures. flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature) + + //Burn the gas mixture. flow.zburn(liquid) else + del src - S.assume_air(flow) + S.assume_air(flow) //Then put it back where you found it. + else - //world << "No air at all." del src else del src else - //world << "Insufficient fire level for ignition: [firelevel]/[IgnitionLevel]" del src for(var/mob/living/carbon/human/M in loc) - M.FireBurn(firelevel/(vsc.IgnitionLevel*10)) + M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans! New(newLoc,fl) @@ -254,7 +144,7 @@ obj sd_SetLuminosity(3) firelevel = fl for(var/mob/living/carbon/human/M in loc) - M.FireBurn(firelevel/(vsc.IgnitionLevel*10)) + M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans! Del() if (istype(loc, /turf/simulated)) @@ -265,23 +155,174 @@ obj ..() obj/liquid_fuel - icon = 'effects.dmi' - icon_state = "slube" + //Liquid fuel is used for things that used to rely on volatile fuels or plasma being contained to a couple tiles. + icon = 'icons/effects/effects.dmi' + icon_state = "fuel" layer = TURF_LAYER+0.2 anchored = 1 - var/amount = 1 + var/amount = 1 //Basically moles. - New(newLoc) + New(newLoc,amt=1) + src.amount = amt + + //Be absorbed by any other liquid fuel in the tile. for(var/obj/liquid_fuel/other in newLoc) if(other != src) other.amount += src.amount + spawn other.Spread() del src + return + + Spread() . = ..() -vs_control/var/switch_fire = 1 + proc/Spread() + //Allows liquid fuels to sometimes flow into other tiles. + if(amount < 0.5) return + var/turf/simulated/S = loc + if(!istype(S)) return + for(var/d in cardinal) + if(S.air_check_directions & d) + if(rand(25)) + var/turf/simulated/O = get_step(src,d) + new/obj/liquid_fuel(O,amount*0.25) + amount *= 0.75 -turf/simulated/var/fire_protection = 0 + flamethrower_fuel + icon_state = "mustard" + anchored = 0 + New(newLoc, amt = 1, d = 0) + dir = d //Setting this direction means you won't get torched by your own flamethrower. + . = ..() + Spread() + //The spread for flamethrower fuel is much more precise, to create a wide fire pattern. + if(amount < 0.1) return + var/turf/simulated/S = loc + if(!istype(S)) return + for(var/d in list(turn(dir,90),turn(dir,-90))) + if(S.air_check_directions & d) + var/turf/simulated/O = get_step(S,d) + new/obj/liquid_fuel/flamethrower_fuel(O,amount*0.25,d) + O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately. + + amount *= 0.5 + + +turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. +turf/proc/apply_fire_protection() +turf/simulated/apply_fire_protection() + fire_protection = world.time + +datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid) + //This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS. + if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) + var + total_fuel = toxins + fuel_sources = 0 //We'll divide by this later so that fuel is consumed evenly. + datum/gas/volatile_fuel/fuel = locate() in trace_gases + + if(fuel) + //Volatile Fuel + total_fuel += fuel.moles + fuel_sources++ + + if(liquid) + //Liquid Fuel + if(liquid.amount <= 0) + del liquid + else + total_fuel += liquid.amount + fuel_sources++ + + //Toxins + if(toxins > 0.3) fuel_sources++ + + if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway. + + if(oxygen > 0.3) + + //Calculate the firelevel. + var/firelevel = calculate_firelevel(liquid) + + //Reaches a maximum practical temperature of around 2750. + + temperature = 1000*log(0.016*firelevel + 1.45) + + //Consume some gas. + var/consumed_gas = min(oxygen,0.002*firelevel,total_fuel) / fuel_sources + + oxygen -= consumed_gas + + toxins = max(0,toxins-consumed_gas) + + if(fuel) + fuel.moles -= consumed_gas + if(fuel.moles <= 0) del fuel + + if(liquid) + liquid.amount -= consumed_gas + if(liquid.amount <= 0) del liquid + + update_values() + return consumed_gas*fuel_sources + return 0 + +/* +OLD FIRE: +fire() + var/energy_released = 0 + var/old_heat_capacity = heat_capacity() + + var/datum/gas/volatile_fuel/fuel_store = locate(/datum/gas/volatile_fuel/) in trace_gases + if(fuel_store) //General volatile gas burn + var/burned_fuel = 0 + + if(oxygen < fuel_store.moles) + burned_fuel = oxygen + fuel_store.moles -= burned_fuel + oxygen = 0 + else + burned_fuel = fuel_store.moles + oxygen -= fuel_store.moles + del(fuel_store) + + energy_released += vsc.FIRE_CARBON_ENERGY_RELEASED * burned_fuel + carbon_dioxide += burned_fuel + fuel_burnt += burned_fuel + + //Handle plasma burning + if(toxins > MINIMUM_HEAT_CAPACITY) + var/plasma_burn_rate = 0 + var/oxygen_burn_rate = 0 + //more plasma released at higher temperatures + var/temperature_scale + if(temperature < PLASMA_UPPER_TEMPERATURE) + temperature_scale = 1 + else + temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE) + if(temperature_scale > 0) + oxygen_burn_rate = 1.4 - temperature_scale + if(oxygen > toxins*PLASMA_OXYGEN_FULLBURN) + plasma_burn_rate = (toxins*temperature_scale)/4 + else + plasma_burn_rate = (temperature_scale*(oxygen/PLASMA_OXYGEN_FULLBURN))/4 + if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY) + toxins -= plasma_burn_rate + oxygen -= plasma_burn_rate*oxygen_burn_rate + carbon_dioxide += plasma_burn_rate + + energy_released += vsc.FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate) + + fuel_burnt += (plasma_burn_rate)*(1+oxygen_burn_rate) + + if(energy_released > 0) + var/new_heat_capacity = heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity + + return fuel_burnt + OLD ZBURN: datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid) if(vsc.switch_fire) . = fire() @@ -299,32 +340,32 @@ datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid) liquid_level = 0 if(fuel) fuel_level = fuel.moles if(liquid) liquid_level = liquid.amount - if(liquid && liquid_level <= 0) + if(liquid.amount <= 0) del liquid liquid_level = 0 if(oxygen > 0.3 && (toxins || fuel_level || liquid_level)) if(toxins && temperature < PLASMA_UPPER_TEMPERATURE) - temperature += (FIRE_PLASMA_ENERGY_RELEASED*fire_ratio_1) / heat_capacity() + temperature += (vsc.FIRE_PLASMA_ENERGY_RELEASED*fire_ratio_1) / heat_capacity() if((fuel_level || liquid_level) && temperature < PLASMA_UPPER_TEMPERATURE) - temperature += (FIRE_CARBON_ENERGY_RELEASED*fire_ratio_1) / heat_capacity() + temperature += (vsc.FIRE_CARBON_ENERGY_RELEASED*fire_ratio_1) / heat_capacity() if(toxins > fire_ratio_1) - oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1 + oxygen -= vsc.OXY_TO_PLASMA*fire_ratio_1 toxins -= fire_ratio_1 carbon_dioxide += fire_ratio_1 else if(toxins) - oxygen -= toxins * vsc.plc.OXY_TO_PLASMA + oxygen -= toxins * vsc.OXY_TO_PLASMA carbon_dioxide += toxins toxins = 0 if(fuel_level > fire_ratio_1/1.5) - oxygen -= vsc.plc.OXY_TO_PLASMA*fire_ratio_1 + oxygen -= vsc.OXY_TO_PLASMA*fire_ratio_1 fuel.moles -= fire_ratio_1 carbon_dioxide += fire_ratio_1 else if(fuel_level) - oxygen -= fuel.moles * vsc.plc.OXY_TO_PLASMA + oxygen -= fuel.moles * vsc.OXY_TO_PLASMA carbon_dioxide += fuel.moles fuel.moles = 0 @@ -335,4 +376,51 @@ datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid) if(liquid.amount <= 0) del liquid return 1 - return 0 \ No newline at end of file + return 0 */ + +datum/gas_mixture/proc/calculate_firelevel(obj/liquid_fuel/liquid) + //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. + var + datum/gas/volatile_fuel/fuel = locate() in trace_gases + fuel_level = 0 + liquid_level = 0 + + if(fuel) fuel_level = fuel.moles + if(liquid) liquid_level = liquid.amount + return oxygen + toxins + liquid_level*15 + fuel_level*5 + +/mob/living/carbon/human/proc/FireBurn(mx as num) + //Burns mobs due to fire. Respects heat transfer coefficients on various body parts. + + var + head_exposure = 1 + chest_exposure = 1 + groin_exposure = 1 + legs_exposure = 1 + arms_exposure = 1 + + //Get heat transfer coefficients for clothing. + for(var/obj/item/clothing/C in src) + if(l_hand == C || r_hand == C) continue + if(C.body_parts_covered & HEAD) + head_exposure *= C.heat_transfer_coefficient + if(C.body_parts_covered & UPPER_TORSO) + chest_exposure *= C.heat_transfer_coefficient + if(C.body_parts_covered & LOWER_TORSO) + groin_exposure *= C.heat_transfer_coefficient + if(C.body_parts_covered & LEGS) + legs_exposure *= C.heat_transfer_coefficient + if(C.body_parts_covered & ARMS) + arms_exposure *= C.heat_transfer_coefficient + + //Always check these damage procs first if fire damage isn't working. They're probably what's wrong. + + apply_damage(2.5*mx*head_exposure, BURN, "head", 0, 0, "Fire") + apply_damage(2.5*mx*chest_exposure, BURN, "chest", 0, 0, "Fire") + apply_damage(2.0*mx*groin_exposure, BURN, "groin", 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, "l_leg", 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, "r_leg", 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire") + + flash_pain() \ No newline at end of file diff --git a/code/ZAS/Functions.dm b/code/ZAS/Functions.dm index ab52842dd1f..7a17ba702b4 100644 --- a/code/ZAS/Functions.dm +++ b/code/ZAS/Functions.dm @@ -1,43 +1,37 @@ -zone - proc - AddTurf(turf/T) - if(T in contents) return - contents += T - air.group_multiplier++ - T.zone = src - RemoveTurf(turf/T) - if(!(T in contents)) return - contents -= T - air.group_multiplier-- - T.zone = null +/zone + proc/AddTurf(turf/T) + //Adds the turf to contents, increases the size of the zone, and sets the zone var. + if(T in contents) + return + if(T.zone) + T.zone.RemoveTurf(T) + contents += T + air.group_multiplier++ + T.zone = src + proc/RemoveTurf(turf/T) + //Same, but in reverse. + if(!(T in contents)) + return + contents -= T + air.group_multiplier-- + T.zone = null - DivideAir(ratio) - ratio = min(1,max(0,ratio)) - air.oxygen *= ratio - air.oxygen = QUANTIZE(air.oxygen) - air.nitrogen *= ratio - air.nitrogen = QUANTIZE(air.nitrogen) - air.toxins *= ratio - air.toxins = QUANTIZE(air.toxins) - air.carbon_dioxide *= ratio - air.carbon_dioxide = QUANTIZE(air.carbon_dioxide) - if(air.trace_gases.len) - for(var/datum/gas/trace_gas in air.trace_gases) - trace_gas.moles *= ratio - trace_gas.moles = QUANTIZE(trace_gas.moles) - air.temperature = air.temperature*ratio + TCMB*(1-ratio) - air.temperature = QUANTIZE(air.temperature) + proc/AddSpace(turf/space/S) + //Adds a space tile to the list, and creates the list if null. + if(istype(S,/turf/space)) + if(!space_tiles) space_tiles = list() + space_tiles += S - AddSpace(turf/space/S) - if(istype(S,/turf/space)) - if(!space_tiles) space_tiles = list() - space_tiles += S - RemoveSpace(turf/space/S) - if(space_tiles) - space_tiles -= S - if(!space_tiles.len) space_tiles = null + proc/RemoveSpace(turf/space/S) + //Removes a space tile from the list, and deletes the list if length is 0. + if(space_tiles) + space_tiles -= S + if(!space_tiles.len) space_tiles = null -turf/proc/HasDoor(turf/O) +/turf/proc/HasDoor(turf/O) + //Checks for the presence of doors, used for zone spreading and connection. + //A positive numerical argument checks only for closed doors. + //Another turf as an argument checks for windoors between here and there. for(var/obj/machinery/door/D in src) if(isnum(O) && O) if(!D.density) continue @@ -47,113 +41,173 @@ turf/proc/HasDoor(turf/O) else return 1 -turf/proc/find_zone() +/turf/proc/check_connections() + //Checks for new connections that can be made. for(var/d in cardinal) - var/turf/T = get_step(src,d) - if(!T || !T.zone) continue - if(!zone) - zone = T.zone - zone.AddTurf(src) - else if(T.zone != zone) + var/turf/simulated/T = get_step(src,d) + if(!istype(T) || !T.zone || !T.CanPass(0,src,0,0)) + continue + if(T.zone != zone) ZConnect(src,T) -proc - ZMerge(zone/A,zone/B) - //world << "Merge occured." - var - a_size = A.air.group_multiplier - b_size = B.air.group_multiplier - c_size = a_size + b_size - new_contents = A.contents + B.contents +/turf/proc/check_for_space() + //Checks for space around the turf. + for(var/d in cardinal) + var/turf/T = get_step(src,d) + if(istype(T,/turf/space) && T.CanPass(0,src,0,0)) + zone.AddSpace(T) - A.air.group_multiplier = 1 - B.air.group_multiplier = 1 +proc/ZMerge(zone/A,zone/B) + //Merges two zones so that they are one. + var + a_size = A.air.group_multiplier + b_size = B.air.group_multiplier + c_size = a_size + b_size + new_contents = A.contents + B.contents - A.air.remove_ratio(a_size/c_size) - B.air.remove_ratio(b_size/c_size) - A.air.merge(B.air) - A.air.group_multiplier = c_size + //Set air multipliers to one so air represents gas per tile. + A.air.group_multiplier = 1 + B.air.group_multiplier = 1 - for(var/connection/C in B.connections) - if((C.A in new_contents) && (C.B in new_contents)) - del C - continue - A.connections += C - A.space_tiles += B.space_tiles - A.contents = new_contents - for(var/turf/T in B.contents) - T.zone = A - del B + //Remove some air proportional to the size of this zone. + A.air.remove_ratio(a_size/c_size) + B.air.remove_ratio(b_size/c_size) - ZConnect(turf/A,turf/B) - if(istype(B,/turf/space)) - if(A.zone) - A.zone.AddSpace(B) - //world << "Space added." - return - if(istype(A,/turf/space)) - if(B.zone) - B.zone.AddSpace(B) - //world << "Space added." - return - if(!A.zone || !B.zone) return - if(A.zone == B.zone) return - if(!A.CanPass(0,B,0,0)) return - for(var/connection/C in A.zone.connections) - if((C.A == A && C.B == B) || (C.A == B && C.B == A)) + //Merge the gases and set the multiplier to the sum of the old ones. + A.air.merge(B.air) + A.air.group_multiplier = c_size + + //Check for connections to merge into the new zone. + for(var/connection/C in B.connections) + if((C.A in new_contents) && (C.B in new_contents)) + del C + continue + if(!A.connections) A.connections = list() + A.connections += C + + //Add space tiles. + A.space_tiles += B.space_tiles + + //Add contents. + A.contents = new_contents + + //Set all the zone vars. + for(var/turf/simulated/T in B.contents) + T.zone = A + + for(var/connection/C in A.connections) + C.Cleanup() + + del B + +proc/ZConnect(turf/A,turf/B) + //Connects two zones by forming a connection object representing turfs A and B. + + //Make sure that if it's space, it gets added to space_tiles instead. + if(istype(B,/turf/space)) + if(A.zone) + A.zone.AddSpace(B) + return + if(istype(A,/turf/space)) + if(B.zone) + B.zone.AddSpace(A) + return + + //Make some preliminary checks to see if the connection is valid. + if(!A.zone || !B.zone) return + if(A.zone == B.zone) return + if(!A.CanPass(0,B,0,0) || !B.CanPass(0,A,0,0)) return + if(A.CanPass(null, B, 1.5, 1) && B.CanPass(null, A, 1.5, 1)) + return ZMerge(A.zone, B.zone) + + //Ensure the connection isn't already made. + if(air_master.tiles_with_connections["\ref[A]"]) + var/list/connections = air_master.tiles_with_connections["\ref[A]"] + for(var/connection/C in connections) + C.Cleanup() + if(C.B == B || C.A == B) return - var/connection/C = new(A,B) - if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1 - //world << "Connection Formed: [A] --> [B] [(C.indirect?"Indirect":"Direct")]" - //A.overlays += 'zone_connection_A.dmi' - //B.overlays += 'zone_connection_B.dmi' - //spawn(10) - // A.overlays -= 'zone_connection_A.dmi' - // B.overlays -= 'zone_connection_B.dmi' + var/connection/C = new(A,B) - ZDisconnect(turf/A,turf/B) - if(A.zone && B.zone) - if(A.zone != B.zone) + //Ensure zones separated by doors do not merge. + if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1 + +/* +proc/ZDisconnect(turf/A,turf/B) + //Removes a zone connection. Can split zones in the case of a permanent barrier. + + //If one of them doesn't have a zone, it might be space, so check for that. + if(A.zone && B.zone) + //If the two zones are different, just remove a connection. + if(A.zone != B.zone) + for(var/connection/C in A.zone.connections) + if((C.A == A && C.B == B) || (C.A == B && C.B == A)) + del C + if(C) + C.Cleanup() + //If they're the same, split the zone at this line. + else + //Preliminary checks to prevent stupidity. + if(A == B) return + if(A.CanPass(0,B,0,0)) return + if(A.HasDoor(B) || B.HasDoor(A)) return + + //Do a test fill. If turf B is still in the floodfill, then the zone isn't really split. + var/zone/oldzone = A.zone + var/list/test = FloodFill(A) + if(B in test) return + + else + var/zone/Z = new(test,oldzone.air) //Create a new zone based on the old air and the test fill. + + //Add connections from the old zone. + for(var/connection/C in oldzone.connections) + if((C.A in Z.contents) || (C.B in Z.contents)) + if(!Z.connections) Z.connections = list() + Z.connections += C + C.Cleanup() + + //Check for space. + for(var/turf/T in test) + T.check_for_space() + + //Make a new, identical air mixture for the other zone. + var/datum/gas_mixture/Y_Air = new + Y_Air.copy_from(oldzone.air) + + var/zone/Y = new(B,Y_Air) //Make a new zone starting at B and using Y_Air. + + //Add relevant connections from old zone. + for(var/connection/C in oldzone.connections) + if((C.A in Y.contents) || (C.B in Y.contents)) + if(!Y.connections) Y.connections = list() + Y.connections += C + C.Cleanup() + + //Add the remaining space tiles to this zone. + for(var/turf/space/T in oldzone.space_tiles) + if(!(T in Z.space_tiles)) + Y.AddSpace(T) + + oldzone.air = null + del oldzone + else + if(B.zone) + if(istype(A,/turf/space)) + B.zone.RemoveSpace(A) + else + for(var/connection/C in B.zone.connections) + if((C.A == A && C.B == B) || (C.A == B && C.B == A)) + del C + if(C) + C.Cleanup() + if(A.zone) + if(istype(B,/turf/space)) + A.zone.RemoveSpace(B) + else for(var/connection/C in A.zone.connections) if((C.A == A && C.B == B) || (C.A == B && C.B == A)) - //world << "Connection Dissolved: [A] -/-> [B] [(C.indirect?"Indirect":"Direct")]" - /*A.overlays += 'zone_connection_A.dmi' - B.overlays += 'zone_connection_B.dmi' - spawn(10) - A.overlays -= 'zone_connection_A.dmi' - B.overlays -= 'zone_connection_B.dmi'*/ del C - /*else - if(A == B) return - if(A.CanPass(0,B,0,0)) return - if(A.HasDoor(B) || B.HasDoor(A)) return - var/zone/oldzone = A.zone - var/list/test = FloodFill(A) - if(B in test) return - else - var/zone/Z = new(test,oldzone.air) - for(var/connection/C in oldzone.connections) - if((A in Z.contents) || (B in Z.contents)) - if(!Z.connections) Z.connections = list() - Z.connections += C - var/datum/gas_mixture/Y_Air = new - Y_Air.copy_from(oldzone.air) - var/zone/Y = new(B,Y_Air) - for(var/connection/C in oldzone.connections) - if((A in Y.contents) || (B in Y.contents)) - if(!Y.connections) Y.connections = list() - Y.connections += C - oldzone.air = null - del oldzone - world << "Zone Split: [A] / [B]" - A.overlays += 'zone_connection_A.dmi' - B.overlays += 'zone_connection_B.dmi' - spawn(10) - A.overlays -= 'zone_connection_A.dmi' - B.overlays -= 'zone_connection_B.dmi'*/ - else - if(istype(A,/turf/space) && B.zone) - B.zone.RemoveSpace(A) - else if(istype(B,/turf/space) && A.zone) - A.zone.RemoveSpace(B) \ No newline at end of file + if(C) + C.Cleanup()*/ \ No newline at end of file diff --git a/code/ZAS/Plasma.dm b/code/ZAS/Plasma.dm index df25a974578..858799a2729 100644 --- a/code/ZAS/Plasma.dm +++ b/code/ZAS/Plasma.dm @@ -1,252 +1,139 @@ pl_control/var PLASMA_DMG = 3 - PLASMA_DMG_NAME = "Plasma Damage Multiplier" - PLASMA_DMG_DESC = "Multiplier on how much damage inhaling plasma can do." - OXY_TO_PLASMA = 1 - OXY_TO_PLASMA_NAME = "O2/Plasma Ratio" - OXY_TO_PLASMA_DESC = "Multiplier for the ratio of oxygen to plasma required in fires." + CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. - CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. - CLOTH_CONTAMINATION_NAME = "Plasma - Cloth Contamination" - CLOTH_CONTAMINATION_RANDOM = 60 - CLOTH_CONTAMINATION_METHOD = "Toggle" - CLOTH_CONTAMINATION_DESC = "If set to nonzero, plasma will contaminate cloth items (uniforms, backpacks, etc.)\ - and cause a small amount of damage over time to anyone carrying or wearing them. Contamination can be detected\ - with a Health Analyzer, and washed off in the washer." - - ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or - //decontaminated. - ALL_ITEM_CONTAMINATION_NAME = "Plasma - Full Contamination" - ALL_ITEM_CONTAMINATION_RANDOM = 10 - ALL_ITEM_CONTAMINATION_METHOD = "Toggle" - ALL_ITEM_CONTAMINATION_DESC = "Like Cloth Contamination, but all item types are susceptible." - - PLASMAGUARD_ONLY = 0 - PLASMAGUARD_ONLY_NAME = "Plasma - Biosuits/Spacesuits Only" - PLASMAGUARD_ONLY_RANDOM = 20 - PLASMAGUARD_ONLY_METHOD = "Toggle" - PLASMAGUARD_ONLY_DESC = "If on, any suits that are not biosuits or space suits will not protect against contamination." - - //CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters, - //CANISTER_CORROSION_RANDOM = 20 //or it will corrode the tank. - //CANISTER_CORROSION_METHOD = "Toggle" + PLASMAGUARD_ONLY = 0 //If this is on, only biosuits and spacesuits protect against contamination and ill effects. GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 10,000. - GENETIC_CORRUPTION_NAME = "Plasma - Genetic Corruption" - GENETIC_CORRUPTION_RANDOM = "PROB10/3d6" - GENETIC_CORRUPTION_METHOD = "Numeric" - GENETIC_CORRUPTION_DESC = "When set to a probability in 1000, any humans in plasma will have this chance to develop a random mutation." SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. - SKIN_BURNS_NAME = "Plasma - Skin Burns" - SKIN_BURNS_RANDOM = 10 - SKIN_BURNS_METHOD = "Toggle" - SKIN_BURNS_DESC = "When toggled, humans with exposed skin will suffer burns (similar to mustard gas) in plasma." - //PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. - //PLASMA_INJECTS_TOXINS_RANDOM = 30 - //PLASMA_INJECTS_TOXINS_METHOD = "Toggle" + EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. - EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. - EYE_BURNS_NAME = "Plasma - Eye Burns" - EYE_BURNS_RANDOM = 30 - EYE_BURNS_METHOD = "Toggle" - EYE_BURNS_DESC = "When toggled, humans without masks that cover the eyes will suffer temporary blurriness and sight loss,\ - and may need glasses to see again if exposed for long durations." + CONTAMINATION_LOSS = 0.01 - //N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. - //N2O_REACTION_RANDOM = 5 + PLASMA_HALLUCINATION = 0 - //PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay! - //PLASMA_COLOR_RANDOM = "PICKonturf,onturf" - - //PLASMA_DMG_OFFSET = 1 - //PLASMA_DMG_OFFSET_RANDOM = "1d5" - //PLASMA_DMG_QUOTIENT = 10 - //PLASMA_DMG_QUOTIENT_RANDOM = "1d10+4" - - CONTAMINATION_LOSS = 0.1 - _NAME = "Plasma - Contamination Damage" - CONTAMINATION_LOSS_DESC = "A number representing the damage done per life cycle by contaminated items." - - PLASMA_HALLUCINATION = 1 - PLASMA_HALLUCINATION_NAME = "Plasma - Hallucination" - PLASMA_HALLUCINATION_METHOD = "Toggle" - PLASMA_HALLUCINATION_DESC = "If toggled, uses the remnants of the hallucination code to induce visions in those\ - who breathe plasma." N2O_HALLUCINATION = 1 - N2O_HALLUCINATION_NAME = "Nitrous Oxide - Hallucination" - N2O_HALLUCINATION_METHOD = "Toggle" - N2O_HALLUCINATION_DESC = "If toggled, uses the remnants of the hallucination code to induce visions in those\ - who breathe N2O." - //CONTAMINATION_LOSS_RANDOM = "5d5" -//Plasma has a chance to be a different color. + obj/var/contaminated = 0 obj/item/proc can_contaminate() + //Clothing and backpacks can be contaminated. if(flags & PLASMAGUARD) return 0 - if((flags & SUITSPACE) && !vsc.plc.PLASMAGUARD_ONLY) return 1 - if(vsc.plc.ALL_ITEM_CONTAMINATION) return 1 + if(flags & SUITSPACE) return 0 else if(istype(src,/obj/item/clothing)) return 1 else if(istype(src,/obj/item/weapon/storage/backpack)) return 1 -/mob/living/carbon/human/proc/contaminate() + contaminate() + //Do a contamination overlay? Temporary measure to keep contamination less deadly than it was. + if(!contaminated) + contaminated = 1 + overlays += 'icons/effects/contamination.dmi' + + decontaminate() + contaminated = 0 + overlays -= 'icons/effects/contamination.dmi' + +/mob/proc/contaminate() + +/mob/living/carbon/human/contaminate() + //See if anything can be contaminated. + if(!pl_suit_protected()) suit_contamination() - else if(vsc.plc.PLASMAGUARD_ONLY) - if(!wear_suit.flags & PLASMAGUARD) wear_suit.contaminated = 1 - - if(!pl_head_protected()) - if(wear_mask) wear_mask.contaminated = 1 if(prob(1)) suit_contamination() //Plasma can sometimes get through such an open suit. - else if(vsc.plc.PLASMAGUARD_ONLY) - if(!head.flags & PLASMAGUARD) head.contaminated = 1 - if(istype(back,/obj/item/weapon/storage/backpack) || vsc.plc.ALL_ITEM_CONTAMINATION) - back.contaminated = 1 + if(istype(back,/obj/item/weapon/storage/backpack)) + back.contaminate() - if(l_hand) - if(l_hand.can_contaminate()) l_hand.contaminated = 1 - if(r_hand) - if(r_hand.can_contaminate()) r_hand.contaminated = 1 - if(belt) - if(belt.can_contaminate()) belt.contaminated = 1 - if(wear_id && !pl_suit_protected()) - if(wear_id.can_contaminate()) wear_id.contaminated = 1 - if(l_ear && !pl_head_protected()) - if(l_ear.can_contaminate()) l_ear.contaminated = 1 - if(r_ear && !pl_head_protected()) - if(r_ear.can_contaminate()) r_ear.contaminated = 1 +/mob/proc/pl_effects() -/mob/living/carbon/human/proc/pl_effects() +/mob/living/carbon/human/pl_effects() + //Handles all the bad things plasma can do. + + //Contamination + if(vsc.plc.CLOTH_CONTAMINATION) contaminate() + + //Anything else requires them to not be dead. if(stat >= 2) return + + //Burn skin if exposed. if(vsc.plc.SKIN_BURNS) if(!pl_head_protected() || !pl_suit_protected()) burn_skin(0.75) - if (coughedtime != 1) - coughedtime = 1 - emote("gasp") - spawn (20) - coughedtime = 0 + if(prob(20)) src << "\red Your skin burns!" updatehealth() - if(vsc.plc.EYE_BURNS && !pl_head_protected()) - if(!wear_mask) - if(prob(20)) usr << "\red Your eyes burn!" - eye_stat += 2.5 - eye_blurry += 1.5 - if (eye_stat >= 20 && !(disabilities & 1)) - src << "\red Your eyes start to burn badly!" - disabilities |= 1 - if (prob(max(0,eye_stat - 20) + 1)) - src << "\red You are blinded!" - eye_blind += 20 - eye_stat = max(eye_stat-25,0) + + //Burn eyes if exposed. + if(vsc.plc.EYE_BURNS) + if(!head) + if(!wear_mask) + burn_eyes() + else + if(!(wear_mask.flags & MASKCOVERSEYES)) + burn_eyes() else - if(!(wear_mask.flags & MASKCOVERSEYES)) - if(prob(20)) usr << "\red Your eyes burn!" - eye_stat += 2.5 - eye_blurry = min(eye_blurry+1.5,50) - if (eye_stat >= 20 && !(disabilities & 1)) - src << "\red Your eyes start to burn badly!" - disabilities |= 1 - if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind) - src << "\red You are blinded!" - eye_blind += 20 - eye_stat = 0 + if(!(head.flags & HEADCOVERSEYES)) + if(!wear_mask) + burn_eyes() + else + if(!(wear_mask.flags & MASKCOVERSEYES)) + burn_eyes() + + //Genetic Corruption if(vsc.plc.GENETIC_CORRUPTION) - if(rand(1,1000) < vsc.plc.GENETIC_CORRUPTION) + if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION) randmutb(src) src << "\red High levels of toxins cause you to spontaneously mutate." domutcheck(src,null) -/mob/living/carbon/human/proc/FireBurn(mx as num) - //NO! NOT INTO THE PIT! IT BURRRRRNS! - mx *= vsc.BURN_DMG - - var - head_exposure = 1 - chest_exposure = 1 - groin_exposure = 1 - legs_exposure = 1 - feet_exposure = 1 - arms_exposure = 1 - hands_exposure = 1 - for(var/obj/item/clothing/C in src) - if(l_hand == C || r_hand == C) continue - if(C.body_parts_covered & HEAD) - head_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & UPPER_TORSO) - chest_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & LOWER_TORSO) - groin_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & LEGS) - legs_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & FEET) - feet_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & ARMS) - arms_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & HANDS) - arms_exposure *= C.heat_transfer_coefficient - - mx *= 10 - - apply_damage("head", 0, 2.5*mx*head_exposure) - apply_damage("chest", 0, 2.5*mx*chest_exposure) - apply_damage("groin", 0, 2.0*mx*groin_exposure) - apply_damage("l_leg", 0, 0.6*mx*legs_exposure) - apply_damage("r_leg", 0, 0.6*mx*legs_exposure) - apply_damage("l_arm", 0, 0.4*mx*arms_exposure) - apply_damage("r_arm", 0, 0.4*mx*arms_exposure) - apply_damage("l_foot", 0, 0.25*mx*feet_exposure) - apply_damage("r_foot", 0, 0.25*mx*feet_exposure) - apply_damage("l_hand", 0, 0.25*mx*hands_exposure) - apply_damage("r_hand", 0, 0.25*mx*hands_exposure) - -/mob/living/carbon/human/proc/suit_interior() - . = list() - if(!pl_suit_protected()) - for(var/obj/item/I in src) - . += I - return . - . += wear_mask - . += w_uniform - . += shoes - . += gloves - if(!pl_head_protected()) - . += head +/mob/living/carbon/human/proc/burn_eyes() + //The proc that handles eye burning. + if(prob(20)) src << "\red Your eyes burn!" + eye_stat += 2.5 + eye_blurry = min(eye_blurry+1.5,50) + if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind) + src << "\red You are blinded!" + eye_blind += 20 + eye_stat = 0 /mob/living/carbon/human/proc/pl_head_protected() + //Checks if the head is adequately sealed. if(head) - if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1 + if(vsc.plc.PLASMAGUARD_ONLY) + if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1 + else + if(head.flags & HEADCOVERSEYES) return 1 return 0 /mob/living/carbon/human/proc/pl_suit_protected() + //Checks if the suit is adequately sealed. if(wear_suit) - if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1 + if(vsc.plc.PLASMAGUARD_ONLY) + if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1 + else + if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1 return 0 /mob/living/carbon/human/proc/suit_contamination() - if(vsc.plc.ALL_ITEM_CONTAMINATION) - for(var/obj/item/I in src) - I.contaminated = 1 - else - if(wear_suit) wear_suit.contaminated = 1 - if(w_uniform) w_uniform.contaminated = 1 - if(shoes) shoes.contaminated = 1 - if(gloves) gloves.contaminated = 1 - if(wear_mask) wear_mask.contaminated = 1 + //Runs over the things that can be contaminated and does so. + if(w_uniform) w_uniform.contaminate() + if(shoes) shoes.contaminate() + if(gloves) gloves.contaminate() turf/Entered(obj/item/I) . = ..() - if(istype(I)) + //Items that are in plasma, but not on a mob, can still be contaminated. + if(istype(I) && vsc.plc.CLOTH_CONTAMINATION) var/datum/gas_mixture/env = return_air(1) - if(env.toxins > 0.35) + if(env.toxins > MOLES_PLASMA_VISIBLE + 1) if(I.can_contaminate()) - I.contaminated = 1 \ No newline at end of file + I.contaminate() \ No newline at end of file diff --git a/code/ZAS/Processing.dm b/code/ZAS/Processing.dm index 4de6c939860..2d001fb97bf 100644 --- a/code/ZAS/Processing.dm +++ b/code/ZAS/Processing.dm @@ -1,109 +1,281 @@ #define QUANTIZE(variable) (round(variable,0.0001)) var/explosion_halt = 0 -zone - proc/process() - if(rebuild) - if(!contents.len) - del src - return 0 - var - turf/sample = pick(contents) - list/new_contents = FloodFill(sample) - problem = 0 - for(var/turf/T in contents) - if(!(T in new_contents)) - problem = 1 +var/zone_share_percent = 3.5 +zone/proc/process() + //Deletes zone if empty. + if(!contents.len) + del src + return 0 + //Does rebuilding stuff. Not sure if used. + if(rebuild) - if(problem) - var/list/rebuild_turfs = list() - for(var/turf/T in contents - new_contents) - contents -= T - rebuild_turfs += T - T.zone = null - for(var/turf/T in rebuild_turfs) - if(!T.zone) - var/zone/Z = new/zone(T) - Z.air.copy_from(air) - rebuild = 0 - - var/total_space = 0 - var/turf/space/space - - if(length(connected_zones)) - for(var/zone/Z in connected_zones) - total_space += length(Z.space_tiles) - if(length(Z.space_tiles)) - space = Z.space_tiles[1] + //Choose a random turf and regenerate the zone from it. + var + turf/simulated/sample = pick(contents) + list/new_contents + problem = 0 if(space_tiles) - for(var/T in space_tiles) - if(!istype(T,/turf/space)) space_tiles -= T - total_space += length(space_tiles) - if(length(space_tiles)) - space = space_tiles[1] + del(space_tiles) - if(total_space && space) - var/old_pressure = air.return_pressure() - air.temperature_mimic(space,OPEN_HEAT_TRANSFER_COEFFICIENT,total_space) - air.remove(MOLES_CELLSTANDARD * (air.group_multiplier/40) * total_space) - if(dbg_output) world << "Space removed [MOLES_CELLSTANDARD*(air.group_multiplier/40)*total_space] moles of air." - var/p_diff = old_pressure - air.return_pressure() - if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) AirflowSpace(src,p_diff) + contents.Remove(null) //I can't believe this is needed. - air.react(null,0) - var/check = air.check_tile_graphic() + if(!contents.len) + del src + + var/list/tried_turfs = list() + do + if(sample) + tried_turfs |= sample + var/list/turfs_to_consider = contents - tried_turfs + if(!turfs_to_consider.len) + break + sample = pick(turfs_to_consider) //Nor this. + while(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1)) + + if(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1)) //Not a single valid turf. + for(var/turf/simulated/T in contents) + air_master.tiles_to_update |= T + del src + + new_contents = FloodFill(sample) + + for(var/turf/space/S in new_contents) + if(!space_tiles) + space_tiles = list() + space_tiles |= S + + //If something isn't carried over, there was a complication. for(var/turf/T in contents) - if(T.zone && T.zone != src) - RemoveTurf(T) - if(dbg_output) world << "Removed invalid turf." - if(air.group_multiplier <= 0) // No more turfs belong to this zone, so we can get rid of it - del(src) - else // Turf was valid, so we can handle it + if(!(T in new_contents)) + problem = 1 + T.zone = null + + if(problem) + //Build some new zones for stuff that wasn't included. + var/list/turf/simulated/rebuild_turfs = contents - new_contents + var/list/turf/simulated/reconsider_turfs = list() + contents = new_contents + for(var/turf/T in rebuild_turfs) + if(istype(T,/turf/space)) + air_master.tiles_to_update |= T + else if(!T.zone && T.CanPass(null, T, 1.5, 1)) + var/zone/Z = new /zone(T) + Z.air.copy_from(air) + else + reconsider_turfs |= T + for(var/turf/T in reconsider_turfs) if(!T.zone) - T.zone = src + var/zone/Z = new /zone(T) + Z.air.copy_from(air) + rebuild = 0 - if(istype(T,/turf/simulated)) - var/turf/simulated/S = T - if(S.fire_protection) S.fire_protection-- - if(check) - if(S.HasDoor(1)) - S.update_visuals() - else - S.update_visuals(air) + //Sometimes explosions will cause the air to be deleted for some reason. + if(!air) + air = new() + air.adjust(MOLES_O2STANDARD, 0, MOLES_N2STANDARD, 0, list()) + world.log << "Air object lost in zone. Regenerating." - if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) - for(var/atom/movable/item in S) - item.temperature_expose(air, air.temperature, CELL_VOLUME) - S.temperature_expose(air, air.temperature, CELL_VOLUME) + //Counting up space. + var/total_space = 0 - air.graphic_archived = air.graphic + if(space_tiles) + for(var/T in space_tiles) + if(!istype(T,/turf/space)) + space_tiles -= T + continue + total_space++ + if(space_tiles && !space_tiles.len) + del space_tiles - air.temperature = max(TCMB,air.temperature) + //Add checks to ensure that we're not sucking air out of an empty room. + if(total_space && air.total_moles > 0.1 && air.temperature > TCMB+0.5) + //If there is space, air should flow out of the zone. + if(abs(air.return_pressure()) > vsc.airflow_lightest_pressure) + AirflowSpace(src) + ShareSpace(air,total_space*(zone_share_percent/100)) - if(length(connections)) - for(var/connection/C in connections) - C.Cleanup() - if(C && !C.indirect) - if(C.A.zone.air.compare(C.B.zone.air)) - ZMerge(C.A.zone,C.B.zone) - for(var/zone/Z in connected_zones) - var/p_diff = (air.return_pressure()-Z.air.return_pressure())*connected_zones[Z]*(vsc.zone_share_percent/100) - if(p_diff > vsc.AF_TINY_MOVEMENT_THRESHOLD) Airflow(src,Z,p_diff) - air.share_ratio(Z.air,connected_zones[Z]*(vsc.zone_share_percent/100)) + if(!(last_update%20)) //every 20 processes. + if(connections) + connections.Remove(null) + if(!connections.len) + del connections + if(connected_zones) + connected_zones.Remove(null) + if(!connected_zones.len) + del connected_zones + //React the air here. + //air.react(null,0) -zone/proc - connected_zones() - . = list() + //Check the graphic. + + air.graphic = 0 + if(air.toxins > MOLES_PLASMA_VISIBLE) + air.graphic = 1 + else if(air.trace_gases.len) + var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases + if(sleeping_agent && (sleeping_agent.moles > 1)) + air.graphic = 2 + + //Only run through the individual turfs if there's reason to. + if(air.graphic != air.graphic_archived || air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) + + for(var/turf/simulated/S in contents) + //Update overlays. + if(air.graphic != air.graphic_archived) + if(S.HasDoor(1)) + S.update_visuals() + else + S.update_visuals(air) + + //Expose stuff to extreme heat. + if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) + for(var/atom/movable/item in S) + item.temperature_expose(air, air.temperature, CELL_VOLUME) + S.temperature_expose(air, air.temperature, CELL_VOLUME) + + //Archive graphic so we can know if it's different. + air.graphic_archived = air.graphic + + //Ensure temperature does not reach absolute zero. + air.temperature = max(TCMB,air.temperature) + + //Handle connections to other zones. + if(length(connections)) for(var/connection/C in connections) - var/zone/Z - if(C.A.zone == src) - Z = C.B.zone - else - Z = C.A.zone + //Check if the connection is valid first. + if(!C.Cleanup()) + continue + //Do merging if conditions are met. Specifically, if there's a non-door connection + //to somewhere with space, the zones are merged regardless of equilibrium, to speed + //up spacing in areas with double-plated windows. + if(C && !C.indirect && C.A.zone && C.B.zone) + if(C.A.zone.air.compare(C.B.zone.air) || total_space) + ZMerge(C.A.zone,C.B.zone) - if(Z in .) - .[Z]++ - else - . += Z - .[Z] = 1 \ No newline at end of file + //Share some + for(var/zone/Z in connected_zones) + //Ensure we're not doing pointless calculations on equilibrium zones. + if(abs(air.total_moles - Z.air.total_moles) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1) + if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure) + Airflow(src,Z) + ShareRatio(air,Z.air,connected_zones[Z]*(zone_share_percent/100)) + +proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, ratio) + //Shares a specific ratio of gas between mixtures using simple weighted averages. + var + size = max(1,A.group_multiplier) + share_size = max(1,B.group_multiplier) + + full_oxy = A.oxygen * size + full_nitro = A.nitrogen * size + full_co2 = A.carbon_dioxide * size + full_plasma = A.toxins * size + + full_heat_capacity = A.heat_capacity() * size + + s_full_oxy = B.oxygen * share_size + s_full_nitro = B.nitrogen * share_size + s_full_co2 = B.carbon_dioxide * share_size + s_full_plasma = B.toxins * share_size + + s_full_heat_capacity = B.heat_capacity() * share_size + + oxy_avg = (full_oxy + s_full_oxy) / (size + share_size) + nit_avg = (full_nitro + s_full_nitro) / (size + share_size) + co2_avg = (full_co2 + s_full_co2) / (size + share_size) + plasma_avg = (full_plasma + s_full_plasma) / (size + share_size) + + temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity) + + A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg + A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg + A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg + A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg + + A.temperature = (A.temperature - temp_avg) * (1-ratio) + temp_avg + + B.oxygen = (B.oxygen - oxy_avg) * (1-ratio) + oxy_avg + B.nitrogen = (B.nitrogen - nit_avg) * (1-ratio) + nit_avg + B.carbon_dioxide = (B.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg + B.toxins = (B.toxins - plasma_avg) * (1-ratio) + plasma_avg + + B.temperature = (B.temperature - temp_avg) * (1-ratio) + temp_avg + + for(var/datum/gas/G in A.trace_gases) + var/datum/gas/H = locate(G.type) in B.trace_gases + if(H) + var/G_avg = (G.moles*size + H.moles*share_size) / (size+share_size) + G.moles = (G.moles - G_avg) * (1-ratio) + G_avg + H.moles = (H.moles - G_avg) * (1-ratio) + G_avg + else + H = new G.type + B.trace_gases += H + var/G_avg = (G.moles*size) / (size+share_size) + G.moles = (G.moles - G_avg) * (1-ratio) + G_avg + H.moles = (H.moles - G_avg) * (1-ratio) + G_avg + + A.update_values() + B.update_values() + + if(A.compare(B)) return 1 + else return 0 + +proc/ShareSpace(datum/gas_mixture/A, ratio) + //A modified version of ShareRatio for spacing gas at the same rate as if it were going into a large airless room. + var + size = max(1,A.group_multiplier) + share_size = max(1,A.group_multiplier) + + full_oxy = A.oxygen * size + full_nitro = A.nitrogen * size + full_co2 = A.carbon_dioxide * size + full_plasma = A.toxins * size + + full_heat_capacity = A.heat_capacity() * size + + space_heat_capacity = MINIMUM_HEAT_CAPACITY * share_size + + oxy_avg = (full_oxy) / (size + share_size) + nit_avg = (full_nitro) / (size + share_size) + co2_avg = (full_co2) / (size + share_size) + plasma_avg = (full_plasma) / (size + share_size) + + temp_avg = (A.temperature * full_heat_capacity + TCMB * space_heat_capacity) / (full_heat_capacity + space_heat_capacity) + + A.oxygen = (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg + A.nitrogen = (A.nitrogen - nit_avg) * (1-ratio) + nit_avg + A.carbon_dioxide = (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg + A.toxins = (A.toxins - plasma_avg) * (1-ratio) + plasma_avg + + A.temperature = (A.temperature - temp_avg) * (1-ratio) + temp_avg + + //833 * 0.9 + 833 = + //(5000/3) = 1666 + //(5000/6) = 833 + + for(var/datum/gas/G in A.trace_gases) + var/G_avg = (G.moles*size + 0) / (size+share_size) + G.moles = (G.moles - G_avg) * (1-ratio) + G_avg + + A.update_values() + + return 1 + + +zone/proc/connected_zones() + //A legacy proc for getting connected zones. + . = list() + for(var/connection/C in connections) + var/zone/Z + if(C.A.zone == src) + Z = C.B.zone + else + Z = C.A.zone + + if(Z in .) + .[Z]++ + else + . += Z + .[Z] = 1 \ No newline at end of file diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm index 188f885ae9b..70f186613b2 100644 --- a/code/ZAS/Variable Settings.dm +++ b/code/ZAS/Variable Settings.dm @@ -119,8 +119,6 @@ vs_control if("Original") plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. - plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or - plc.PLASMAGUARD_ONLY = 0 //plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters, @@ -133,6 +131,8 @@ vs_control plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. + plc.PLASMA_HALLUCINATION = 0 + //plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. //plc.PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay! @@ -141,10 +141,8 @@ vs_control //plc.PLASMA_DMG_QUOTIENT = 10 plc.CONTAMINATION_LOSS = 0 - if("Hazard-Low") - plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. - - plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or + if("Hazard - Low") + plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. plc.PLASMAGUARD_ONLY = 0 @@ -152,7 +150,7 @@ vs_control plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. - plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. + plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. // plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. @@ -168,27 +166,22 @@ vs_control //plc.PLASMA_DMG_OFFSET = 1.5 //plc.PLASMA_DMG_QUOTIENT = 8 - plc.CONTAMINATION_LOSS = 0.01 + plc.CONTAMINATION_LOSS = 0 - var/s = pick(plc.settings) - plc.Randomize(s) - - if("Hazard-High") + if("Hazard - High") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. - plc.ALL_ITEM_CONTAMINATION = 0 //If this is on, any item can be contaminated, so suits and tools must be discarded or - plc.PLASMAGUARD_ONLY = 0 // plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters, plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. - plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. + plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. // plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. - plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. + plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. // plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. @@ -197,17 +190,9 @@ vs_control //plc.PLASMA_DMG_OFFSET = 3 //plc.PLASMA_DMG_QUOTIENT = 5 - plc.CONTAMINATION_LOSS = 0.05 - - for(var/i = rand(3,5),i>0,i--) - var/s = pick(plc.settings) - plc.Randomize(s) - - if("Everything") + if("Oh Shit!") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. - plc.ALL_ITEM_CONTAMINATION = 1 //If this is on, any item can be contaminated, so suits and tools must be discarded or ELSE - plc.PLASMAGUARD_ONLY = 1 // plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters, @@ -227,7 +212,6 @@ vs_control //plc.PLASMA_DMG_OFFSET = 3 //plc.PLASMA_DMG_QUOTIENT = 5 - plc.CONTAMINATION_LOSS = 0.02 /////world << "Plasma color updated." pl_control diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index e2a03978603..f0cfee61dfc 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -14,6 +14,7 @@ var/log_adminchat = 0 // log admin chat messages var/log_adminwarn = 0 // log warnings admins get about bomb construction and such var/log_pda = 0 // log pda messages + var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits var/sql_enabled = 1 // for sql switching var/allow_vote_restart = 0 // allow votes to restart var/allow_vote_mode = 0 // allow votes to change mode @@ -171,6 +172,9 @@ if ("log_pda") config.log_pda = 1 + if ("log_hrefs") + config.log_hrefs = 1 + if ("allow_vote_restart") config.allow_vote_restart = 1 diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 44f9e1cc50e..2e488ab4271 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -248,7 +248,6 @@ client if(ishuman(D)) body += "" body += "" - body += "" body += "" body += "" body += "" @@ -390,419 +389,382 @@ client return html -//All BYOND links pass through client/Topic() FIRST and are then directed to [hsrc]/Topic() by the ..() call at the end. -client/Topic(href, href_list, hsrc) - file("topic_log") << "[time2text(world.realtime, "DDD MMM DD YYYY")] at [time2text(world.timeofday, "hh:mm:ss")], [ckey], \"[url_encode(href)]\"" - // build some more useful info - var/references = "" - for(var/href_key in href_list) - var/href_val = locate(href_list[href_key]) - references += "[href_key] = [href_val](" - if(istype(href_val,/datum)) - references += "[href_val:type]" - if(istype(href_val,/atom)) - references += " at [href_val:x],[href_val:y],[href_val:z]" +/client/proc/view_var_Topic(href,href_list,hsrc) + //This will all be moved over to datum/admins/Topic() ~Carn + if( (usr.client == src) && src.holder ) + . = 1 //default return + if (href_list["Vars"]) + debug_variables(locate(href_list["Vars"])) - references += "); " - file("topic_log") << references + //~CARN: for renaming mobs (updates their real_name and their ID/PDA if applicable). + else if (href_list["rename"]) + var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name") as text|null),1,MAX_NAME_LEN) + if(!new_name) return + var/mob/M = locate(href_list["rename"]) + if(!istype(M)) return - sleep(3) + message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1) + if(istype(M, /mob/living/carbon/human)) + for(var/obj/item/weapon/card/id/ID in M.contents) + if(ID.registered_name == M.real_name) + ID.name = "[new_name]'s ID Card ([ID.assignment])" + ID.registered_name = new_name + break + for(var/obj/item/device/pda/PDA in M.contents) + if(PDA.owner == M.real_name) + PDA.name = "PDA-[new_name] ([PDA.ownjob])" + PDA.owner = new_name + break + M.real_name = new_name + M.name = new_name + M.original_name = new_name + href_list["datumrefresh"] = href_list["rename"] - //search the href for script injection //This is a temporary measure - if( findtext(href," cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) - CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) +var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) +var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) - shuttle_z = 2 //default - airtunnel_start = 68 // default - airtunnel_stop = 68 // default - airtunnel_bottom = 72 // default - list/monkeystart = list() - list/wizardstart = list() - list/newplayer_start = list() - list/latejoin = list() - list/prisonwarp = list() //prisoners go to these - list/holdingfacility = list() //captured people go here - list/xeno_spawn = list()//Aliens spawn at these. +var/shuttle_z = 2 //default +var/airtunnel_start = 68 // default +var/airtunnel_stop = 68 // default +var/airtunnel_bottom = 72 // default +var/list/monkeystart = list() +var/list/wizardstart = list() +var/list/newplayer_start = list() +var/list/latejoin = list() +var/list/prisonwarp = list() //prisoners go to these +var/list/holdingfacility = list() //captured people go here +var/list/xeno_spawn = list()//Aliens spawn at these. // list/mazewarp = list() - list/tdome1 = list() - list/tdome2 = list() - list/tdomeobserve = list() - list/tdomeadmin = list() - list/prisonsecuritywarp = list() //prison security goes to these - list/prisonwarped = list() //list of players already warped - list/blobstart = list() +var/list/tdome1 = list() +var/list/tdome2 = list() +var/list/tdomeobserve = list() +var/list/tdomeadmin = list() +var/list/prisonsecuritywarp = list() //prison security goes to these +var/list/prisonwarped = list() //list of players already warped +var/list/blobstart = list() // list/traitors = list() //traitor list - list/cardinal = list( NORTH, SOUTH, EAST, WEST ) - list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) - list/emclosets = list() //random emergency closets woo +var/list/cardinal = list( NORTH, SOUTH, EAST, WEST ) +var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) +var/list/emclosets = list() //random emergency closets woo - datum/station_state/start_state = null - datum/configuration/config = null - datum/vote/vote = null - datum/sun/sun = null +var/datum/station_state/start_state = null +var/datum/configuration/config = null +var/datum/vote/vote = null +var/datum/sun/sun = null - list/combatlog = list() - list/IClog = list() - list/OOClog = list() - list/adminlog = list() +var/list/combatlog = list() +var/list/IClog = list() +var/list/OOClog = list() +var/list/adminlog = list() - list/powernets = null +var/list/powernets = null - Debug = 0 // global debug switch - Debug2 = 0 +var/Debug = 0 // global debug switch +var/Debug2 = 0 - datum/debug/debugobj +var/datum/debug/debugobj - datum/moduletypes/mods = new() +var/datum/moduletypes/mods = new() - wavesecret = 0 +var/wavesecret = 0 - shuttlecoming = 0 +var/shuttlecoming = 0 - join_motd = null - rules = null - forceblob = 0 +var/join_motd = null +var/forceblob = 0 - custom_event_msg = null +var/custom_event_msg = null //airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does. //airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number. //airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc) - list/airlockWireColorToFlag = RandomAirlockWires() - list/airlockIndexToFlag - list/airlockIndexToWireColor - list/airlockWireColorToIndex - list/APCWireColorToFlag = RandomAPCWires() - list/APCIndexToFlag - list/APCIndexToWireColor - list/APCWireColorToIndex - list/BorgWireColorToFlag = RandomBorgWires() - list/BorgIndexToFlag - list/BorgIndexToWireColor - list/BorgWireColorToIndex - list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios. - list/UnscrambledFrequencies = list( ) - list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires. - list/AAlarmIndexToFlag - list/AAlarmIndexToWireColor - list/AAlarmWireColorToIndex +var/list/airlockWireColorToFlag = RandomAirlockWires() +var/list/airlockIndexToFlag +var/list/airlockIndexToWireColor +var/list/airlockWireColorToIndex +var/list/APCWireColorToFlag = RandomAPCWires() +var/list/APCIndexToFlag +var/list/APCIndexToWireColor +var/list/APCWireColorToIndex +var/list/BorgWireColorToFlag = RandomBorgWires() +var/list/BorgIndexToFlag +var/list/BorgIndexToWireColor +var/list/BorgWireColorToIndex +var/list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios. +var/list/UnscrambledFrequencies = list( ) +var/list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires. +var/list/AAlarmIndexToFlag +var/list/AAlarmIndexToWireColor +var/list/AAlarmWireColorToIndex - const/SPEED_OF_LIGHT = 3e8 //not exact but hey! - const/SPEED_OF_LIGHT_SQ = 9e+16 - const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215) - const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025) - const/INFINITY = 1e31 //closer then enough +var/const/SPEED_OF_LIGHT = 3e8 //not exact but hey! +var/const/SPEED_OF_LIGHT_SQ = 9e+16 +var/const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215) +var/const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025) +var/const/INFINITY = 1e31 //closer then enough //Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam - const/MAX_MESSAGE_LEN = 1024 - const/MAX_PAPER_MESSAGE_LEN = 3072 - const/MAX_BOOK_MESSAGE_LEN = 9216 +var/const/MAX_MESSAGE_LEN = 1024 +var/const/MAX_PAPER_MESSAGE_LEN = 3072 +var/const/MAX_BOOK_MESSAGE_LEN = 9216 - list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object") +var/const/MAX_NAME_LEN = 32 - const/shuttle_time_in_station = 1800 // 3 minutes in the station - const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive +var/list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object") + +var/const/shuttle_time_in_station = 1800 // 3 minutes in the station +var/const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive // MySQL configuration. You can also use the config/dbconfig.txt file. - sqladdress = "localhost" - sqlport = "3306" - sqldb = "tgstation" - sqllogin = "root" - sqlpass = "" +var/sqladdress = "localhost" +var/sqlport = "3306" +var/sqldb = "tgstation" +var/sqllogin = "root" +var/sqlpass = "" // Feedback gathering sql connection - sqlfdbkdb = "test" - sqlfdbklogin = "root" - sqlfdbkpass = "" +var/sqlfdbkdb = "test" +var/sqlfdbklogin = "root" +var/sqlfdbkpass = "" - sqllogging = 0 // Should we log deaths, population stats, etc? +var/sqllogging = 0 // Should we log deaths, population stats, etc? @@ -229,7 +231,7 @@ var // For FTP requests. (i.e. downloading runtime logs.) // However it'd be ok to use for accessing attack logs and such too, which are even laggier. - fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff. +var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff. // It turns out that /var/const can't handle lists, because lists use // an initializer. Sigh. That's no reason that we shouldn't make @@ -237,8 +239,7 @@ var // separate location, though, so: below are all lists that should not // ever be changed in code. -/var/global - AI_VERB_LIST = list( +/var/global/AI_VERB_LIST = list( /mob/living/silicon/ai/proc/ai_call_shuttle, /mob/living/silicon/ai/proc/show_laws_verb, /mob/living/silicon/ai/proc/ai_camera_track, @@ -248,4 +249,4 @@ var /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, /mob/living/silicon/ai/proc/ai_roster, - ) \ No newline at end of file + ) diff --git a/code/defines/mob/living/carbon/alien_humanoid.dm b/code/defines/mob/living/carbon/alien_humanoid.dm index ffbfc7aa49c..af03496ff63 100644 --- a/code/defines/mob/living/carbon/alien_humanoid.dm +++ b/code/defines/mob/living/carbon/alien_humanoid.dm @@ -17,8 +17,8 @@ var/image/face_standing = null var/image/face_lying = null - var/list/body_standing = list( ) - var/list/body_lying = list( ) + var/image/damageicon_standing = null + var/image/damageicon_lying = null /mob/living/carbon/alien/humanoid/hunter name = "alien hunter" diff --git a/code/defines/mob/living/living.dm b/code/defines/mob/living/living.dm index 03d77d4670b..dc767fce085 100644 --- a/code/defines/mob/living/living.dm +++ b/code/defines/mob/living/living.dm @@ -5,4 +5,14 @@ var/t_n2 = null var/now_pushing = null var/cameraFollow = null - var/age = null \ No newline at end of file + var/age = null + + +// lists used to cache overlays +/mob/living/var/list/body_overlays_standing = list() +/mob/living/var/list/body_overlays_lying = list() +/mob/living/var/list/clothing_overlays = list() + +// This var describes whether the mob visually appears to be lying. +// This will be used to only update lying status when necessary. +/mob/living/var/visual_lying = 0 \ No newline at end of file diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 83700c3686e..5f52016dd92 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj //var/datum/module/mod //not used var/m_amt = 0 // metal @@ -30,11 +32,10 @@ icon_state = "rollstart" flags = FPRINT w_class = 1.0 - var - turf/start - turf/end - tape_type = /obj/item/tape - icon_base + var/turf/start + var/turf/end + var/tape_type = /obj/item/tape + var/icon_base /obj/item/tape name = "tape" @@ -422,13 +423,61 @@ var/burning = null var/hitsound = null var/w_class = 3.0 - var/protective_temperature = 0 // Placing this here to avoid runtime errors, due to tiny items being allowed on ears and being queried for this variable flags = FPRINT | TABLEPASS + var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 50 // causeerrorheresoifixthis var/obj/item/master = null + //Since any item can now be a piece of clothing, this has to be put here so all items share it. + var/see_face = 1.0 + var/color = null + var/body_parts_covered = 0 //see setup.dm for appropriate bit flags + var/protective_temperature = 0 + var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible + var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) + var/permeability_coefficient = 1 // for chemicals/diseases + var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) + var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up + var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N + var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + var/list/allowed = null //suit storage stuff. + +/obj/item/verb/verb_pickup() + set src in view(1) + set category = "Object" + set name = "Pickup" + + if(!(usr)) + return + if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain + usr << "\red You can't pick things up!" + return + if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained + usr << "\red You can't pick things up!" + return + if(src.anchored) //Object isn't anchored + usr << "\red You can't pick that up!" + return + if(!usr.hand && usr.r_hand) //Right hand is not full + usr << "\red Your right hand is full." + return + if(usr.hand && usr.l_hand) //Left hand is not full + usr << "\red Your left hand is full." + return + if(!istype(src.loc, /turf)) //Object is on a turf + usr << "\red You can't pick that up!" + return + //All checks are done, time to pick it up! + if(istype(usr, /mob/living/carbon/human)) + src.attack_hand(usr) + if(istype(usr, /mob/living/carbon/alien)) + src.attack_alien(usr) + if(istype(usr, /mob/living/carbon/monkey)) + src.attack_paw(usr) + return + /obj/item/device icon = 'device.dmi' @@ -458,7 +507,7 @@ var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage /obj/item/device/hacktool - name = "hacktool" + name = "modifed door debugger" icon_state = "hacktool" flags = FPRINT | TABLEPASS | CONDUCT var/in_use = 0 @@ -514,7 +563,7 @@ density = 0 anchored = 1.0 layer = 2.3 //under pipes - // flags = 64.0 + // flags = CONDUCT /obj/structure/lattice/New() ..() @@ -1100,8 +1149,7 @@ throw_range = 5 origin_tech = "biotech=3" - var - mob/living/carbon/brain/brainmob = null + var/mob/living/carbon/brain/brainmob = null New() ..() diff --git a/code/defines/obj/closet.dm b/code/defines/obj/closet.dm index 0e5df00cd0f..71b50a0a312 100644 --- a/code/defines/obj/closet.dm +++ b/code/defines/obj/closet.dm @@ -15,33 +15,6 @@ var/lasttry = 0 layer = 2.98 -/obj/structure/closet/verb/open_close() - set name = "Open/Close" - set category = "Object" - set src in view(1) - - if(!(usr)) - return - if(!istype(src.loc, /turf) || usr.stat || usr.restrained() ) - usr << "\red You can't interact with this!" - return - if(src.anchored) - usr << "\red You can't interact with this!" - return - if(istype(usr, /mob/living/silicon/robot)) - src.attack_hand(usr) - return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain))) - usr << "\red You can't interact with this!" - return - if(istype(usr, /mob/living/carbon/human)) - src.attack_hand(usr) - if(istype(usr, /mob/living/carbon/alien)) - src.attack_alien(usr) - if(istype(usr, /mob/living/carbon/monkey)) - src.attack_paw(usr) - return - /obj/structure/closet/detective name = "detective's closet" desc = "Holds the detective's clothes while his coat rack is being repaired." @@ -142,6 +115,32 @@ icon_state = "blue" icon_closed = "blue" +/obj/structure/closet/boxinggloves + name = "boxing gloves" + desc = "It's a storage unit for gloves for use in the boxing ring." + +/obj/structure/closet/masks + name = "mask closet" + desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!" + +/obj/structure/closet/lasertag/red + name = "red laser tag equipment" + desc = "It's a storage unit for laser tag equipment." + icon_state = "red" + icon_closed = "red" + +/obj/structure/closet/lasertag/blue + name = "blue laser tag equipment" + desc = "It's a storage unit for laser tag equipment." + icon_state = "blue" + icon_closed = "blue" + +/obj/structure/closet/athletic_mixed + name = "athletic wardrobe" + desc = "It's a storage unit for athletic wear." + icon_state = "mixed" + icon_closed = "mixed" + /obj/structure/closet/coffin name = "coffin" desc = "It's a burial receptacle for the dearly departed." diff --git a/code/defines/obj/clothing.dm b/code/defines/obj/clothing.dm index 56fd9242b93..d41b065923c 100644 --- a/code/defines/obj/clothing.dm +++ b/code/defines/obj/clothing.dm @@ -4,19 +4,7 @@ name = "clothing" // var/obj/item/clothing/master = null - var/see_face = 1.0 - var/color = null - var/body_parts_covered = 0 //see setup.dm for appropriate bit flags - - var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible - var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) - var/permeability_coefficient = 1 // for chemicals/diseases - var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) - var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up - var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N - - var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) @@ -28,6 +16,7 @@ /obj/item/clothing/belt name = "belt" - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT */ diff --git a/code/defines/obj/computer.dm b/code/defines/obj/computer.dm index e71da40ccd1..4fff33cbce3 100644 --- a/code/defines/obj/computer.dm +++ b/code/defines/obj/computer.dm @@ -6,22 +6,6 @@ var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassemble -/obj/machinery/computer/arcade - name = "arcade machine" - desc = "Does not support Pinball." - icon = 'computer.dmi' - icon_state = "arcade" - circuit = "/obj/item/weapon/circuitboard/arcade" - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = 0 - var/blocked = 0 //Player cannot attack/heal while set - - /obj/machinery/computer/station_alert name = "Station Alert Computer" desc = "Used to access the station's automated alert system." @@ -130,15 +114,6 @@ var/list/connected_doors var/department //each department has a hardcoded list of possible door networks -/obj/machinery/computer/crew - name = "Crew monitoring computer" - desc = "Used to monitor active health sensors built into most of the crew's uniforms." - icon_state = "crew" - use_power = 1 - idle_power_usage = 250 - active_power_usage = 500 - circuit = "/obj/item/weapon/circuitboard/crew" - var/list/tracked = list( ) /*/obj/machinery/computer/scan_consolenew //Coming Soon, I highly doubt this but Ill leave it here anyways name = "DNA Modifier Access Console" diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm index 3b44089a338..82d54ac17ef 100644 --- a/code/defines/obj/hydro.dm +++ b/code/defines/obj/hydro.dm @@ -1845,7 +1845,8 @@ name = "bottle of Plant-B-Gone" icon_state = "plantbgone" item_state = "plantbgone" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 @@ -1859,7 +1860,8 @@ name = "weed-spray" icon_state = "weedspray" item_state = "spray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 4 w_class = 2.0 throw_speed = 2 @@ -1873,7 +1875,8 @@ name = "pest-spray" icon_state = "pestspray" item_state = "spray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 4 w_class = 2.0 throw_speed = 2 diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm index b29f26d928e..084f0746ce0 100644 --- a/code/defines/obj/machinery.dm +++ b/code/defines/obj/machinery.dm @@ -1,22 +1,22 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery name = "machinery" icon = 'stationobjs.dmi' - var - stat = 0 - emagged = 0 - use_power = 0 + var/stat = 0 + var/emagged = 0 + var/use_power = 0 //0 = dont run the auto //1 = run auto, use idle //2 = run auto, use active - idle_power_usage = 0 - active_power_usage = 0 - power_channel = EQUIP + var/idle_power_usage = 0 + var/active_power_usage = 0 + var/power_channel = EQUIP //EQUIP,ENVIRON or LIGHT - list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames. - uid - manual = 0 - global - gl_uid = 1 + var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames. + var/uid + var/manual = 0 + var/global/gl_uid = 1 /obj/machinery/autolathe name = "\improper Autolathe" @@ -384,16 +384,14 @@ use_power = 1 idle_power_usage = 5 active_power_usage = 100 - var - obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise. + var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise. /obj/machinery/hologram/holopad name = "\improper AI holopad" desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely." icon_state = "holopad0" - var - mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time. - last_request = 0 //to prevent request spam. ~Carn + var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time. + var/last_request = 0 //to prevent request spam. ~Carn /obj/machinery/hologram/projector name = "hologram projector" @@ -406,12 +404,11 @@ desc = "It's used by the AI for fooling around." icon = 'stationobjs.dmi' icon_state = "hologram0" - var - temp = null - lumens = 0.0 - h_r = 245.0 - h_g = 245.0 - h_b = 245.0 + var/temp = null + var/lumens = 0.0 + var/h_r = 245.0 + var/h_g = 245.0 + var/h_b = 245.0 /obj/machinery/coatrack name = "coat rack" diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm index e7aadffa708..78fab7ed58c 100644 --- a/code/defines/obj/storage.dm +++ b/code/defines/obj/storage.dm @@ -3,7 +3,8 @@ desc = "You wear this on your back and put items into it." icon_state = "backpack" w_class = 4.0 - flags = 259.0 + flags = FPRINT|TABLEPASS + slot_flags = SLOT_BACK //ERROOOOO max_w_class = 3 max_combined_w_class = 21 @@ -116,7 +117,7 @@ for(var/i = 1, i <=2, i++) new /obj/item/weapon/storage/box/ert(src) new /obj/item/weapon/storage/box/medic(src) - new /obj/item/weapon/storage/belt/medical(src) + new /obj/item/device/healthanalyzer(src) return /obj/item/weapon/storage/backpack/security @@ -528,8 +529,8 @@ item_state = "syringe_kit" /obj/item/weapon/storage/toolbox/syndicate - name = "suspicious looking toolbox" - desc = "You have no idea what this is." + name = "red and black toolbox" + desc = "An oddly coloured toolbox." icon_state = "syndicate" item_state = "toolbox_syndi" origin_tech = "combat=1;syndicate=1" @@ -602,39 +603,61 @@ /obj/structure/closet/syndicate/resources/ - desc = "It's an emergency storage closet for repairs." + desc = "An old, dusty locker." /obj/structure/closet/syndicate/resources/New() ..() + var/common_min = 30 //Minimum amount of minerals in the stack for common minerals + var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals + var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals + var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK - var/list/resources_common = list( - - /obj/item/stack/sheet/metal, - /obj/item/stack/sheet/glass, - /obj/item/stack/sheet/plasteel, - /obj/item/stack/rods - ) - - var/list/resources_rare = list( - - /obj/item/stack/sheet/gold, - /obj/item/stack/sheet/silver, - /obj/item/stack/sheet/plasma, - /obj/item/stack/sheet/uranium, - /obj/item/stack/sheet/diamond - - ) sleep(2) - for(var/i = 0, i<2, i++) - for(var/res in resources_common) - var/obj/item/stack/R = new res(src) - R.amount = rand(40,R.max_amount) + var/pickednum = rand(1, 50) - for(var/res in resources_rare) - var/obj/item/stack/R = new res(src) - R.amount = rand(10,25) + //Sad trombone + if(pickednum == 1) + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src) + P.name = "IOU" + P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!" + + //Metal (common ore) + if(pickednum >= 2) + new /obj/item/stack/sheet/metal(src, rand(common_min, common_max)) + + //Glass (common ore) + if(pickednum >= 5) + new /obj/item/stack/sheet/glass(src, rand(common_min, common_max)) + + //Plasteel (common ore) Because it has a million more uses then plasma + if(pickednum >= 10) + new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max)) + + //Plasma (rare ore) + if(pickednum >= 15) + new /obj/item/stack/sheet/plasma(src, rand(rare_min, rare_max)) + + //Silver (rare ore) + if(pickednum >= 20) + new /obj/item/stack/sheet/silver(src, rand(rare_min, rare_max)) + + //Gold (rare ore) + if(pickednum >= 30) + new /obj/item/stack/sheet/gold(src, rand(rare_min, rare_max)) + + //Uranium (rare ore) + if(pickednum >= 40) + new /obj/item/stack/sheet/uranium(src, rand(rare_min, rare_max)) + + //Diamond (rare HONK) + if(pickednum >= 45) + new /obj/item/stack/sheet/diamond(src, rand(rare_min, rare_max)) + + //Jetpack (You hit the jackpot!) + if(pickednum == 50) + new /obj/item/weapon/tank/jetpack/carbondioxide(src) return diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index 076a0bccd49..7e39e7e50fb 100755 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -164,6 +164,11 @@ contains = list("/obj/item/weapon/vending_charge/snack") containername = "Snack charge crate" +/datum/supply_packs/charge/liquidfood + name = "\"LiquidFood\" Charge" + contains = list("/obj/item/weapon/vending_charge/liquid") + containername = "LiquidFood charge crate" + /* /datum/supply_packs/charge/cart name = "PDA Cart Charge" diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm index 985a683c849..5d8b1269635 100644 --- a/code/defines/obj/toy.dm +++ b/code/defines/obj/toy.dm @@ -129,7 +129,8 @@ icon = 'gun.dmi' icon_state = "revolver" item_state = "gun" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT w_class = 3.0 g_amt = 10 m_amt = 10 diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 28f05cb1303..b44465e4325 100755 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -126,9 +126,9 @@ name = "Robust Softdrinks" desc = "A softdrink vendor provided by Robust Industries, LLC." icon_state = "Cola_Machine" - product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up" - product_amounts = "10;10;10;10;10" - product_prices = "1;1;1;1;1" + product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up;/obj/item/weapon/reagent_containers/food/drinks/waterbottle" +// product_amounts = "10;10;10;10;10" + product_prices = "1;1;1;1;1;1" product_slogans = "Robust Softdrinks: More robust then a toolbox to the head!" product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko" product_hideamt = "5" @@ -390,6 +390,20 @@ hidden_prices = "" charge_type = "robotics" +/obj/machinery/vending/liquid + name = "LiquidRation Dispenser" + desc = "All the food you'll ever need to survive!" + icon_state = "liquidfood" + product_paths = "/obj/item/weapon/reagent_containers/food/snacks/liquidfood;/obj/item/weapon/flavor/red;/obj/item/weapon/flavor/blue" +// product_amounts = "6;6;6;6;6;6;6" + product_prices = "1;1;1" + product_slogans = "Enjoy your NanoTrasen \"LiquidFood\" Ration! Now with a choice of TWO delicious flavors!" + product_hidden = "" +// product_hideamt = "10" + hidden_prices = "" + product_ads = "Think of it as free survival!;It's even healthy!;Take a quick break, enjoy your ration!" + charge_type = "liquid" + /obj/item/weapon/vending_charge name = "Vending Charge" var/charge_type = "generic" @@ -477,4 +491,9 @@ /*/obj/item/weapon/vending_charge/toxinslab name = "Toxins Lab Charge" charge_type = "toxinslab" - icon_state = "toxinslab-charge"*/ \ No newline at end of file + icon_state = "toxinslab-charge"*/ + +/obj/item/weapon/vending_charge/liquid + name = "LiquidRation Charge" + charge_type = "liquid" + icon_state = "liquidfood-charge" \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 9b70e7f0f77..9d8446c0669 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/item/weapon name = "weapon" icon = 'weapons.dmi' @@ -10,7 +12,8 @@ desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." icon = 'weapons.dmi' icon_state = "riot" - flags = FPRINT | TABLEPASS| CONDUCT| ONBACK + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BACK force = 5.0 throwforce = 5.0 throw_speed = 1 @@ -23,13 +26,28 @@ IsShield() return 1 +/obj/item/weapon/shield/energy + name = "energy combat shield" + desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere." + icon = 'weapons.dmi' + icon_state = "eshield0" // eshield1 for expanded + flags = FPRINT | TABLEPASS| CONDUCT + force = 3.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 4 + w_class = 1 + origin_tech = "materials=4;magnets=3;syndicate=4" + var/active = 0 + /obj/item/weapon/nullrod name = "null rod" desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers." icon_state = "nullrod" item_state = "nullrod" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 10 throw_speed = 1 throw_range = 4 @@ -49,7 +67,7 @@ user << "\red You don't have the dexterity to do this!" return - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The rod slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) @@ -81,7 +99,8 @@ desc = "This thing is so unspeakably shitty you are having a hard time even holding it." icon_state = "sord" item_state = "sord" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 2 throwforce = 1 w_class = 3*/ @@ -91,7 +110,8 @@ desc = "BLOOD FOR THE BLOOD GOD." //SKULLS FOR THE SKULL THRONE. --SkyMarshal icon_state = "claymore" item_state = "claymore" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT force = 40 throwforce = 10 w_class = 3 @@ -104,7 +124,6 @@ desc = "A bag used to deal with a corpse." icon = 'closet.dmi' icon_state = "bodybag" - flags = FPRINT | TABLEPASS| CONDUCT force = 5.0 throwforce = 5.0 throw_speed = 1 @@ -208,11 +227,13 @@ icon_state = "spacecash20" access = access_crate_cash desc = "A pile of 20 credits." + worth = 20 /obj/item/weapon/money/c50 icon_state = "spacecash50" access = access_crate_cash desc = "A pile of 50 credits." + worth = 50 /obj/item/weapon/money/c100 icon_state = "spacecash100" @@ -317,16 +338,16 @@ icon_state = "spectrometer" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT | OPENCONTAINER + flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER + slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 throw_range = 20 m_amt = 30 g_amt = 20 origin_tech = "magnets=2;biotech=2" - var - details = 0 - recent_fail = 0 + var/details = 0 + var/recent_fail = 0 /obj/item/device/mass_spectrometer/adv name = "advanced mass-spectrometer" @@ -339,7 +360,8 @@ desc = "The police baton of the future." icon_state = "stunbaton" item_state = "baton" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 15 throwforce = 7 w_class = 3 @@ -353,7 +375,8 @@ desc = "The Captain is first and all other heads are last." icon_state = "chainofcommand" item_state = "chainofcommand" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT force = 10 throwforce = 7 w_class = 3 @@ -378,7 +401,7 @@ origin_tech = "combat=3" /obj/item/weapon/melee/energy/sword - var/color + color name = "energy sword" desc = "It cuts AND cooks at the same time!" icon_state = "sword0" @@ -468,7 +491,7 @@ w_class = 1.0 throw_speed = 2 throw_range = 10 - var/color = "white" + color = "white" /obj/item/weapon/bedsheet/blue icon_state = "sheetblue" @@ -672,6 +695,7 @@ item_state = "card-id" var/access = list() var/registered_name = null // The name registered_name on the card + slot_flags = SLOT_ID var/pin = 0 var/money = 0 var/assignment = null @@ -696,7 +720,7 @@ /obj/item/weapon/card/id/syndicate name = "agent card" - desc = "Shhhhh." +// desc = "Shhhhh." access = list(access_maint_tunnels) origin_tech = "syndicate=3" @@ -740,7 +764,8 @@ w_class = 2.0 throw_speed = 3 throw_range = 10 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT /obj/item/weapon/clipboard/notebook name = "notebook" @@ -753,7 +778,7 @@ icon = 'power.dmi' icon_state = "coil_red" var/amount = MAXCOIL - var/color = "red" + color = "red" desc = "A coil of power cable." throwforce = 10 w_class = 2.0 @@ -761,7 +786,8 @@ throw_range = 5 m_amt = 50 g_amt = 20 - flags = TABLEPASS|USEDELAY|FPRINT|CONDUCT | ONBELT + flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT + slot_flags = SLOT_BELT item_state = "coil_red" /obj/item/weapon/cable_coil/cut @@ -794,10 +820,11 @@ desc = "Used to remove floor tiles." icon = 'items.dmi' icon_state = "crowbar" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 - item_state = "wrench" + item_state = "crowbar" w_class = 2.0 m_amt = 50 origin_tech = "engineering=1" @@ -805,6 +832,7 @@ /obj/item/weapon/crowbar/red icon = 'items.dmi' icon_state = "red_crowbar" + item_state = "crowbar_red" /obj/item/weapon/cane name = "cane" @@ -837,7 +865,7 @@ name = "dummy" invisibility = 101.0 anchored = 1.0 - flags = 2.0 + flags = TABLEPASS /obj/item/weapon/extinguisher name = "fire extinguisher" @@ -950,7 +978,8 @@ gender = PLURAL icon = 'items.dmi' icon_state = "handcuff" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT throwforce = 5 w_class = 2.0 throw_speed = 2 @@ -1002,7 +1031,7 @@ icon_state = "cone" /obj/item/weapon/paper - name = "Paper" + name = "\improper Paper" icon = 'paper.dmi' icon_state = "paper" var/info = null @@ -1013,12 +1042,12 @@ throw_range = 15 layer = 4 var/list/stamped - var/see_face = 1 - var/body_parts_covered = HEAD - var/heat_transfer_coefficient = 0.99 - var/gas_transfer_coefficient = 1 - var/permeability_coefficient = 0.99 - var/siemens_coefficient = 0.80 + see_face = 1 + body_parts_covered = HEAD + heat_transfer_coefficient = 0.99 + gas_transfer_coefficient = 1 + permeability_coefficient = 0.99 + siemens_coefficient = 0.80 var/iteration /obj/item/weapon/directions @@ -1100,7 +1129,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove name = "pen" icon = 'paper.dmi' icon_state = "pen" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT throwforce = 0 w_class = 1.0 throw_speed = 7 @@ -1133,7 +1163,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove name = "banhammer" icon = 'items.dmi' icon_state = "toyhammer" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT throwforce = 0 w_class = 1.0 throw_speed = 7 @@ -1141,12 +1172,14 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove /obj/item/weapon/pen/sleepypen desc = "It's a normal black ink pen with a sharp point." - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT origin_tech = "materials=2;biotech=1;syndicate=7" /obj/item/weapon/pen/paralysis desc = "It's a normal black ink pen with a sharp point." - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT origin_tech = "materials=2;biotech=1;syndicate=5" /obj/item/weapon/rack_parts @@ -1170,7 +1203,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove desc = "Used for screwing." icon = 'items.dmi' icon_state = "screwdriver" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 w_class = 1.0 throwforce = 5.0 @@ -1200,7 +1234,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove var/selfdestruct = 0.0 var/traitor_frequency = 0.0 var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT item_state = "radio" throwforce = 5 w_class = 2.0 @@ -1682,7 +1717,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove throw_speed = 7 throw_range = 15 m_amt = 60 - var/color = "cargo" + color = "cargo" /obj/item/weapon/stamp/captain name = "captain's rubber stamp" @@ -1739,7 +1774,8 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove w_class = 1 throwforce = 2 var/cigarcount = 6 - flags = ONBELT | TABLEPASS */ + flags = TABLEPASS + slot_flags = SLOT_BELT*/ /obj/item/weapon/mousetrap @@ -1804,7 +1840,7 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove /obj/item/weapon/plastique name = "plastic explosives" - desc = "Used to put holes in specific areas without too much extra hole." + desc = "Used to put holes in specific areas without too much extra hole. Does not work on people." gender = PLURAL icon = 'assemblies.dmi' icon_state = "plastic-explosive0" @@ -2032,9 +2068,42 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove /obj/item/weapon/appendix name = "appendix" desc = "An appendix which looks perfectly healthy." + icon = 'food.dmi' icon_state = "appendix" /obj/item/weapon/appendixinflamed name = "inflamed appendix" desc = "An appendix which appears to be inflamed." + icon = 'food.dmi' icon_state = "appendixinflamed" + +/obj/item/weapon/megaphone + name = "megaphone" + desc = "A device used to project your voice. Loudly." + icon = 'items.dmi' + icon_state = "megaphone" + var/cooldown = 0 + +/obj/item/weapon/flavor + name = "bland flavoring packet" + desc = "A sachet of flavoring, designed to be used with \"LiquidFood\" rations. The flavor is indeterminable." + icon = 'food_ingredients.dmi' + var/descriptor = "disturbingly beige" //Description shown to onlookers. + color = "beige" //Color the icon should take on when this is applied. Also shown when it is mixed in. + var/newDesc = "It posesses a strange and unidentifiable taste. You try not to think to hard about it." //What gets pegged onto the description. + +/obj/item/weapon/flavor/red + name = "cherry flavoring packet" + desc = "A sachet of cherry flavoring, designed to be used with \"LiquidFood\" rations." + icon_state = "flavor-red" + descriptor = "garrishly red" + color = "red" + newDesc = "It has a faintly cherry taste, but still is hard to stomach. Reminds you of cough syrup." + +/obj/item/weapon/flavor/blue + name = "berry flavoring packet" + desc = "A sachet of berry flavoring, designed to be used with \"LiquidFood\" rations." + icon_state = "flavor-blue" + descriptor = "molted blue" + color = "blue" + newDesc = "It has a faint bitter berry taste, but still is hard to stomach. Strangely crunchy." diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm index d106e8f64fa..059a11b95b9 100644 --- a/code/defines/procs/AStar.dm +++ b/code/defines/procs/AStar.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* A Star pathfinding algorithm Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of @@ -36,9 +38,8 @@ length to avoid portals or something i guess?? Not that they're counted right no PriorityQueue - var - L[] - cmp + var/L[] + var/cmp New(compare) L = new() cmp = compare @@ -92,13 +93,12 @@ PriorityQueue if(ind) Remove(ind) PathNode - var - datum/source - PathNode/prevNode - f - g - h - nt // Nodes traversed + var/datum/source + var/PathNode/prevNode + var/f + var/g + var/h + var/nt // Nodes traversed New(s,p,pg,ph,pnt) source = s prevNode = p @@ -109,8 +109,7 @@ PathNode nt = pnt datum - var - bestF + var/bestF proc PathWeightCompare(PathNode/a, PathNode/b) return a.f - b.f diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm index ff63a1d6dec..a517134d32a 100644 --- a/code/defines/procs/dbcore.dm +++ b/code/defines/procs/dbcore.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + //cursors #define Default_Cursor 0 #define Client_Cursor 1 @@ -37,9 +39,8 @@ // Deprecated! See global.dm for new configuration vars /* -var - DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine) - DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default) +var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine) +var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default) */ DBConnection @@ -69,15 +70,14 @@ DBConnection return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password) NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler) - var - _db_con // This variable contains a reference to the actual database connection. - dbi // This variable is a string containing the DBI MySQL requires. - user // This variable contains the username data. - password // This variable contains the password data. - default_cursor // This contains the default database cursor data. + var/_db_con // This variable contains a reference to the actual database connection. + var/dbi // This variable is a string containing the DBI MySQL requires. + var/user // This variable contains the username data. + var/password // This variable contains the password data. + var/default_cursor // This contains the default database cursor data. // - server = "" - port = 3306 + var/server = "" + var/port = 3306 DBQuery New(sql_query,DBConnection/connection_handler,cursor_handler) @@ -134,25 +134,23 @@ DBQuery else if(conversions.len < column) conversions.len = column conversions[column] = conversion - var - sql // The sql query being executed. - default_cursor - list/columns //list of DB Columns populated by Columns() - list/conversions - list/item[0] //list of data values populated by NextRow() + var/sql // The sql query being executed. + var/default_cursor + var/list/columns //list of DB Columns populated by Columns() + var/list/conversions + var/list/item[0] //list of data values populated by NextRow() - DBConnection/db_connection - _db_query + var/DBConnection/db_connection + var/_db_query DBColumn - var - name - table - position //1-based index into item data - sql_type - flags - length - max_length + var/name + var/table + var/position //1-based index into item data + var/sql_type + var/flags + var/length + var/max_length New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler) src.name = name_handler @@ -179,4 +177,4 @@ DBColumn if(TIMESTAMP) return "TIMESTAMP" if(TIME) return "TIME" if(STRING) return "STRING" - if(BLOB) return "BLOB" \ No newline at end of file + if(BLOB) return "BLOB" diff --git a/code/defines/procs/gamehelpers.dm b/code/defines/procs/gamehelpers.dm index dc04c1e4ca0..5b5b1bc8845 100644 --- a/code/defines/procs/gamehelpers.dm +++ b/code/defines/procs/gamehelpers.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /proc/dopage(src,target) var/href_list var/href @@ -46,31 +48,6 @@ /proc/in_range(source, user) if(get_dist(source, user) <= 1) return 1 - else - if (istype(user, /mob/living/carbon)) - if (usr.tkdisable != 0) //Remote Viewing + TK = oh god wat - user << "\red Your mind is too strained right now!" - return 0 - if (user:mutations & TK) - var/X = source:x - var/Y = source:y - var/Z = source:z - spawn(0) - //I really shouldnt put this here but i dont have a better idea - var/obj/effect/overlay/O = new /obj/effect/overlay( locate(X,Y,Z) ) - O.name = "sparkles" - O.anchored = 1 - O.density = 0 - O.layer = FLY_LAYER - O.dir = pick(cardinal) - O.icon = 'effects.dmi' - O.icon_state = "nothing" - flick("empdisable",O) - spawn(5) - del(O) - - - return 1 return 0 //not in range and not telekinetic @@ -261,11 +238,10 @@ proc return 0 Y1+=s else - var - m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1)) - b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles - signX = SIGN(X2-X1) - signY = SIGN(Y2-Y1) + var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1)) + var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles + var/signX = SIGN(X2-X1) + var/signY = SIGN(Y2-Y1) if(X1200)//If more than 20 game seconds passed. M << "You took too long to decide. Default name selected." return - if (length(newname) == 0) + if (!newname) newname = randomname - if (newname) + else if (newname == "Inactive AI")//Keeping this here to prevent dumb. M << "That name is reserved." return ainame(M) @@ -708,22 +710,19 @@ Turf and target are seperate in case you want to teleport some distance from a t if (A.real_name == newname&&newname!=randomname) M << "There's already an AI with that name." return ainame(M) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") M.real_name = newname M.name = newname M.original_name = newname /*/proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea var/randomname = pick(clown_names) - var/newname = input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname) + var/newname = copytext(sanitize(input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname)),1,MAX_NAME_LEN) var/oldname = M.real_name - if (length(newname) == 0) + if (!newname) newname = randomname - if (newname) + else var/badname = 0 switch(newname) if("Unknown") badname = 1 @@ -740,9 +739,6 @@ Turf and target are seperate in case you want to teleport some distance from a t if(A.real_name == newname) M << "That name is reserved." return clname(M) - if(length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") M.real_name = newname M.name = newname M.original_name = newname @@ -838,7 +834,6 @@ Turf and target are seperate in case you want to teleport some distance from a t var/list/names = list() var/list/creatures = list() var/list/namecounts = list() - for(var/mob/M in mobs) var/name = M.name if (name in names) @@ -847,7 +842,6 @@ Turf and target are seperate in case you want to teleport some distance from a t else names.Add(name) namecounts[name] = 1 - if (M.real_name && M.real_name != M.name) name += " \[[M.original_name? M.original_name : M.real_name]\]" @@ -856,7 +850,6 @@ Turf and target are seperate in case you want to teleport some distance from a t name += " \[ghost\]" else name += " \[dead\]" - creatures[name] = M return creatures @@ -1171,11 +1164,6 @@ proc/isemptylist(list/list) return 1 return 0 -proc/clearlist(list/list) - if(istype(list)) - list.len = 0 - return - proc/listclearnulls(list/list) if(istype(list)) while(null in list) @@ -1352,8 +1340,8 @@ proc/listclearnulls(list/list) return 1 */ -/proc/do_after(var/mob/user as mob, delay as num, var/numticks = 5) // Replacing the upper one with this one because Byond keeps feeling that the upper one is an infinate loop - if(!user || isnull(user)) // This one should have less temptation +/proc/do_after(var/mob/user as mob, delay as num, var/numticks = 5, var/needhand = 1) // Replacing the upper one with this one because Byond keeps feeling that the upper one is an infinate loop + if(!user || isnull(user)) // This one should have less temptation return 0 if(numticks == 0) return 0 @@ -1364,7 +1352,10 @@ proc/listclearnulls(list/list) for(var/i = 0, i= 10) + if( !C.holder && (C.inactivity >= INACTIVITY_KICK) ) if(C.mob) if(!istype(C.mob, /mob/dead/)) log_access("AFK: [key_name(C)]") C << "\red You have been inactive for more than 10 minutes and have been disconnected." - C.mob.logged_in = 0 del(C) spawn(3000) KickInactiveClients()//more or less five minutes @@ -48,25 +50,24 @@ proc/countJob(rank) jobCount++ return jobCount -/mob/living/carbon/human/var/const - slot_back = 1 - slot_wear_mask = 2 - slot_handcuffed = 3 - slot_l_hand = 4 - slot_r_hand = 5 - slot_belt = 6 - slot_wear_id = 7 - slot_ears = 8 - slot_glasses = 9 - slot_gloves = 10 - slot_head = 11 - slot_shoes = 12 - slot_wear_suit = 13 - slot_w_uniform = 14 - slot_l_store = 15 - slot_r_store = 16 - slot_s_store = 17 - slot_in_backpack = 18 +/mob/living/carbon/human/var/const/slot_back = 1 +/mob/living/carbon/human/var/const/slot_wear_mask = 2 +/mob/living/carbon/human/var/const/slot_handcuffed = 3 +/mob/living/carbon/human/var/const/slot_l_hand = 4 +/mob/living/carbon/human/var/const/slot_r_hand = 5 +/mob/living/carbon/human/var/const/slot_belt = 6 +/mob/living/carbon/human/var/const/slot_wear_id = 7 +/mob/living/carbon/human/var/const/slot_ears = 8 +/mob/living/carbon/human/var/const/slot_glasses = 9 +/mob/living/carbon/human/var/const/slot_gloves = 10 +/mob/living/carbon/human/var/const/slot_head = 11 +/mob/living/carbon/human/var/const/slot_shoes = 12 +/mob/living/carbon/human/var/const/slot_wear_suit = 13 +/mob/living/carbon/human/var/const/slot_w_uniform = 14 +/mob/living/carbon/human/var/const/slot_l_store = 15 +/mob/living/carbon/human/var/const/slot_r_store = 16 +/mob/living/carbon/human/var/const/slot_s_store = 17 +/mob/living/carbon/human/var/const/slot_in_backpack = 18 /mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1) for (var/slot in slots) @@ -76,6 +77,135 @@ proc/countJob(rank) del(W) return null +/mob/living/carbon/human/proc/equip_to_appropriate_slot(obj/item/W) + if(!W) + return + if(!ishuman(src)) + return + + if(W.slot_flags & SLOT_BACK) + if(!src.back) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.back = W + update_clothing() + return + + if(W.slot_flags & SLOT_ID) + if(!src.wear_id) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.wear_id = W + update_clothing() + return + + if(W.slot_flags & SLOT_ICLOTHING) + if(!src.w_uniform) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.w_uniform = W + update_clothing() + return + + if(W.slot_flags & SLOT_OCLOTHING) + if(!src.wear_suit) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.wear_suit = W + update_clothing() + return + + if(W.slot_flags & SLOT_MASK) + if(!src.wear_mask) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.wear_mask = W + update_clothing() + return + + if(W.slot_flags & SLOT_HEAD) + if(!src.head) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.head = W + update_clothing() + return + + if(W.slot_flags & SLOT_FEET) + if(!src.shoes) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.shoes = W + update_clothing() + return + + if(W.slot_flags & SLOT_GLOVES) + if(!src.gloves) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.gloves = W + update_clothing() + return + + if(W.slot_flags & SLOT_EARS) + if(!src.l_ear) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.l_ear = W + update_clothing() + else if(!src.r_ear) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.r_ear = W + update_clothing() + return + + if(W.slot_flags & SLOT_EYES) + if(!src.glasses) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.glasses = W + update_clothing() + return + + if(W.slot_flags & SLOT_BELT) + if(!src.belt) + if( src.get_active_hand() == W ) + src.u_equip(W) + src.belt = W + update_clothing() + return + + //Suit storage + var/confirm + if (wear_suit) + if(wear_suit.allowed) + if (istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen)) + confirm = 1 + if (is_type_in_list(W, wear_suit.allowed)) + confirm = 1 + if(confirm) + src.u_equip(W) + src.s_store = W + update_clothing() + return + + //Pockets + if ( !( W.slot_flags & SLOT_DENYPOCKET ) ) + if(!src.l_store) + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + l_store = W + update_clothing() + return + if(!src.r_store) + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + r_store = W + update_clothing() + return + + /mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/ //warning: icky code var/equipped = 0 diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 390cfd17642..24cdd185011 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -124,10 +124,32 @@ /area/proc/firealert() if(src.name == "Space") //no fire alarms in space return - if (!( src.fire )) - src.fire = 1 - src.updateicon() - src.mouse_opacity = 0 + if (!fire) + fire = 1 + updateicon() + mouse_opacity = 0 + for(var/obj/machinery/door/airlock/E in master.all_doors) + if(!E.air_locked) + if((!E.arePowerSystemsOn()) || (E.stat & NOPOWER)) continue + if(!E.density) + spawn(0) + E.close() + sleep(10) + if(E.density) + E.air_locked = E.req_access + E.req_access = list(access_engine, access_atmospherics) + E.update_icon() + if(E.operating) + spawn(10) + E.close() + if(E.density) + E.air_locked = E.req_access + E.req_access = list(access_engine, access_atmospherics) + E.update_icon() + else if(!E:locked) //Don't lock already bolted doors. + E.air_locked = E.req_access + E.req_access = list(access_engine, access_atmospherics) + E.update_icon() for(var/obj/machinery/door/firedoor/D in src) if(!D.blocked) if(D.operating) @@ -145,10 +167,17 @@ return /area/proc/firereset() - if (src.fire) - src.fire = 0 - src.mouse_opacity = 0 - src.updateicon() + if (fire) + fire = 0 + mouse_opacity = 0 + updateicon() + for(var/obj/machinery/door/airlock/E in master.all_doors) + if((!E.arePowerSystemsOn()) || (E.stat & NOPOWER)) continue + if(E.air_locked) //Don't mess with doors locked for other reasons. + if(E.density) + E.req_access = E.air_locked + E.air_locked = null + E.update_icon() for(var/obj/machinery/door/firedoor/D in src) if(!D.blocked) if(D.operating) diff --git a/code/game/asteroid/artifacts.dm b/code/game/asteroid/artifacts.dm index ddbb48f1069..4cc1f825e17 100644 --- a/code/game/asteroid/artifacts.dm +++ b/code/game/asteroid/artifacts.dm @@ -1,21 +1,31 @@ -var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4, - // /obj/effect/critter/spesscarp =2, - /obj/effect/critter/spesscarp/elite =2, - // /obj/creature =0, - // /obj/item/weapon/rcd =0, - // /obj/item/weapon/rcd_ammo =0, - // /obj/item/weapon/money =0, - // /obj/item/weapon/cloaking_device =1, - // /obj/item/weapon/gun/energy/teleport_gun =0, - // /obj/item/weapon/rubber_chicken =0, - /obj/item/weapon/melee/energy/sword/pirate =3, - /obj/structure/closet/syndicate/resources =2, - // /obj/machinery/wish_granter =1, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.> - // /obj/item/clothing/glasses/thermal =2, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe. - // /obj/item/weapon/storage/box/stealth/ =2 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - // =11 - ) +var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4, + // /obj/item/weapon/pickaxe/hammer =4, //Waiting on a sprite + /obj/item/weapon/pickaxe/silver =4, + /obj/item/weapon/pickaxe/drill =4, + /obj/item/weapon/pickaxe/jackhammer =4, + /obj/effect/critter/spesscarp/elite =3, + /obj/item/weapon/pickaxe/diamond =3, + /obj/item/weapon/pickaxe/diamonddrill =3, + /obj/item/weapon/pickaxe/gold =3, + /obj/item/weapon/pickaxe/plasmacutter =2, + /obj/structure/closet/syndicate/resources =2, + /obj/item/weapon/melee/energy/sword/pirate =1, + /obj/mecha/working/ripley/mining =1 + + // /obj/creature =0, + // /obj/item/weapon/rcd =0, + // /obj/item/weapon/rcd_ammo =0, + // /obj/item/weapon/spacecash =0, + // /obj/item/weapon/cloaking_device =0, + // /obj/item/weapon/gun/energy/teleport_gun =0, + // /obj/item/weapon/rubber_chicken =0, + // /obj/machinery/wish_granter =0, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.> + // /obj/item/clothing/glasses/thermal =0, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe. + // /obj/item/weapon/storage/box/stealth/ =0 + // =11 + ) var/global/list/spawned_surprises = list() @@ -34,9 +44,8 @@ var/global/list/spawned_surprises = list() anchored = 1 density = 1 - var - charges = 1 - insisting = 0 + var/charges = 1 + var/insisting = 0 /obj/machinery/wish_granter/attack_hand(var/mob/user as mob) usr.machine = src @@ -63,26 +72,26 @@ var/global/list/spawned_surprises = list() charges-- insisting = 0 - if (!(user.mutations & HULK)) - user.mutations |= HULK + if (!(HULK in user.mutations)) + user.mutations.Add(HULK) - if (!(user.mutations & LASER)) - user.mutations |= LASER + if (!(LASER in user.mutations)) + user.mutations.Add(LASER) - if (!(user.mutations & XRAY)) - user.mutations |= XRAY + if (!(XRAY in user.mutations)) + user.mutations.Add(XRAY) user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) user.see_in_dark = 8 user.see_invisible = 2 - if (!(user.mutations & COLD_RESISTANCE)) - user.mutations |= COLD_RESISTANCE + if (!(COLD_RESISTANCE in user.mutations)) + user.mutations.Add(COLD_RESISTANCE) - if (!(user.mutations & TK)) - user.mutations |= TK + if (!(TK in user.mutations)) + user.mutations.Add(TK) - if(!(user.mutations & HEAL)) - user.mutations |= HEAL + if(!(HEAL in user.mutations)) + user.mutations.Add(HEAL) ticker.mode.traitors += user.mind user.mind.special_role = "Avatar of the Wish Granter" @@ -228,4 +237,4 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va A.contents += T - return room_turfs \ No newline at end of file + return room_turfs diff --git a/code/game/asteroid/device.dm b/code/game/asteroid/device.dm index 7407f45f672..3472aecdd0e 100644 --- a/code/game/asteroid/device.dm +++ b/code/game/asteroid/device.dm @@ -2,7 +2,8 @@ name = "GPS" icon = 'device.dmi' icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "electronic" throw_speed = 4 diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index d06540f18e2..0e3c6eaef59 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -62,22 +62,16 @@ return /atom/proc/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/device/detective_scanner)) + if (!(istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) && !(istype(W, /obj/item/weapon/cleaner)) && !(istype(W, /obj/item/weapon/chemsprayer)) && !(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !istype(W, /obj/item/device/detective_scanner) && !(istype(W, /obj/item/weapon/reagent_containers/glass/rag)) ) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O << "\red [src] has been scanned by [user] with the [W]" - else - if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !(istype(W, /obj/item/weapon/reagent_containers/glass/rag)) ) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O << "\red [src] has been hit by [user] with [W]" - + O << "\red [src] has been hit by [user] with [W]" return /atom/proc/add_hiddenprint(mob/living/M as mob) if(isnull(M)) return if(isnull(M.key)) return - if (!( src.flags ) & 256) + if (!( src.flags ) & FPRINT) return if (ishuman(M)) var/mob/living/carbon/human/H = M @@ -102,15 +96,8 @@ /atom/proc/add_fingerprint(mob/living/M as mob) if(isnull(M)) return if(isnull(M.key)) return - if (!( flags ) & 256) + if (!( src.flags ) & FPRINT) return - //Smudge up dem prints some - for(var/P in fingerprints) - var/test_print = stars(fingerprints[P], rand(85,95)) - if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left) - fingerprints.Remove(P) - else - fingerprints[P] = test_print if (ishuman(M)) //Add the list if it does not exist. if(!fingerprintshidden) @@ -118,7 +105,7 @@ //Fibers~ add_fibers(M) //He has no prints! - if (M.mutations2 & mFingerprints) + if (mFingerprints in M.mutations) if(fingerprintslast != M.key) fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]" fingerprintslast = M.key @@ -151,6 +138,15 @@ fingerprints = list() //Hash this shit. var/full_print = md5(H.dna.uni_identity) + //Smudge up dem prints some + for(var/P in fingerprints) + if(P == full_print) + continue + var/test_print = stars(fingerprints[P], rand(85,95)) + if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left) + fingerprints.Remove(P) + else + fingerprints[P] = test_print var/print = fingerprints[full_print] //Find if the print is already there. //It is not! We need to add it! if(!print) @@ -160,6 +156,13 @@ fingerprints[full_print] = stringmerge(print, stars(full_print, (H.gloves ? rand(10,20) : rand(25,40)))) return 1 else + //Smudge up dem prints some + for(var/P in fingerprints) + var/test_print = stars(fingerprints[P], rand(85,95)) + if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left) + fingerprints.Remove(P) + else + fingerprints[P] = test_print if(fingerprintslast != M.key) fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key) fingerprintslast = M.key @@ -175,7 +178,7 @@ if (!istype(M.dna, /datum/dna)) M.dna = new /datum/dna(null) M.check_dna() - if (!( src.flags ) & 256) + if (!( src.flags ) & FPRINT) return 0 if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it. blood_DNA = list() @@ -200,6 +203,7 @@ O.overlays += O.blood_overlay //if this blood isn't already in the list, add it + if(blood_DNA[M.dna.unique_enzymes]) return 0 //already bloodied with this blood. Cannot add more. blood_DNA[M.dna.unique_enzymes] = M.dna.b_type @@ -291,9 +295,9 @@ /atom/proc/clean_blood() - if (!flags & 256) + if (!( src.flags ) & FPRINT) return - if (blood_DNA ) + if (blood_DNA) //Cleaning blood off of mobs if (istype (src, /mob/living/carbon)) @@ -338,11 +342,12 @@ del(fingerprints) if(istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/M = src - M.update_clothing() + M.rebuild_appearance() // both clothes and hands need to be cleaned, so just rebuild all return /atom/MouseDrop(atom/over_object as mob|obj|turf|area) spawn( 0 ) + if (istype(over_object, /atom)) over_object.MouseDrop_T(src, usr) return @@ -904,7 +909,6 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl usr << "\blue You look at your stump." return*/ src.attack_hand(usr, usr.hand) -// usr:afterattack(src, usr, (t5 ? 1 : 0), params) else // ------- YOU ARE NOT HUMAN. WHAT ARE YOU - DETERMINED HERE AND PROPER ATTACK_MOBTYPE CALLED ------- if (istype(usr, /mob/living/carbon/monkey)) @@ -967,7 +971,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl src.hand_al(usr, usr.hand) else // ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD ------- - if(usr:mutations & LASER && usr:a_intent == "hurt" && world.time >= usr.next_move) + if((LASER in usr:mutations) && usr:a_intent == "hurt" && world.time >= usr.next_move) // ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED ------- var/turf/oloc var/turf/T = get_turf(usr) @@ -997,7 +1001,6 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl usr.next_move = world.time + 6 return - /proc/CanReachThrough(turf/srcturf, turf/targetturf, atom/target) var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( srcturf ) @@ -1028,6 +1031,38 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl /atom/proc/AltClick() if(hascall(src,"pull")) src:pull() + + /* // NOT UNTIL I FIGURE OUT A GOOD WAY TO DO THIS SHIT + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + if(!istype(src, /obj/item) && !istype(src, /mob) && !istype(src, /turf)) + if(!usr.equipped()) + + var/liftable = 0 + for(var/x in liftable_structures) + if(findtext("[src.type]", "[x]")) + liftable = 1 + break + + if(liftable) + + add_fingerprint(usr) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(usr) + G.assailant = usr + if (usr.hand) + usr.l_hand = G + else + usr.r_hand = G + G.layer = 20 + G.structure = src + G.synch() + + visible_message("\red [usr] has picked up [src]!") + + return + else + usr << "\red You can't pick this up!" + */ + return /atom/proc/ShiftClick() @@ -1080,95 +1115,32 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl var/mob/living/carbon/U = M U.swap_hand() -/* -/atom/proc/get_global_map_pos() - if(!islist(global_map) || isemptylist(global_map)) return - var/cur_x = null - var/cur_y = null - var/list/y_arr = null - for(cur_x=1,cur_x<=global_map.len,cur_x++) - y_arr = global_map[cur_x] - cur_y = y_arr.Find(src.z) - if(cur_y) - break -// world << "X = [cur_x]; Y = [cur_y]" - if(cur_x && cur_y) - return list("x"=cur_x,"y"=cur_y) - else - return 0 -*/ //Don't touch this either. DMTG -/atom/proc/checkpass(passflag) - return pass_flags&passflag - - //Could not find object proc defines and this could almost be an atom level one. /obj/proc/process() processing_objects.Remove(src) return 0 +// Show a message to all mobs in sight of this one +// This would be for visible actions by the src mob +// message is the message output to anyone who can see e.g. "[src] does something!" +// self_message (optional) is what the src mob sees e.g. "You do something!" +// blind_message (optional) is what blind people will hear e.g. "You hear something!" -/*Really why was this in the click proc of all the places you could put it - if (usr:a_intent == "help") - // ------- YOU HAVE THE HELP INTENT SELECTED ------- - if(istype(src, /mob/living/carbon)) - // ------- YOUR TARGET IS LIVING CARBON CREATURE (NOT AI OR CYBORG OR SIMPLE ANIMAL) ------- - var/mob/living/carbon/C = src - if(usr:mutations & HEAL) - // ------- YOU ARE HUMAN, WITH THE HELP INTENT TARGETING A HUMAN AND HAVE THE 'HEAT' GENETIC MUTATION ------- - - if(C.stat != 2) - // ------- THE PERSON YOU'RE TOUCHING IS NOT DEAD ------- - - var/t_him = "it" - if (src.gender == MALE) - t_him = "his" - else if (src.gender == FEMALE) - t_him = "her" - var/u_him = "it" - if (usr.gender == MALE) - t_him = "him" - else if (usr.gender == FEMALE) - t_him = "her" - - if(src != usr) - usr.visible_message( \ - "\blue [usr] places [u_him] palms on [src], healing [t_him]!", \ - "\blue You place your palms on [src] and heal [t_him].", \ - ) - else - usr.visible_message( \ - "\blue [usr] places [u_him] palms on [u_him]self and heals.", \ - "\blue You place your palms on yourself and heal.", \ - ) - - C.adjustOxyLoss(-25) - C.adjustToxLoss(-25) - - if(istype(C, /mob/living/carbon/human)) - // ------- YOUR TARGET IS HUMAN ------- - var/mob/living/carbon/human/H = C - var/datum/organ/external/affecting = H.get_organ(check_zone(usr:zone_sel:selecting)) - if(affecting && affecting.heal_damage(25, 25)) - H.UpdateDamageIcon() - else - C.heal_organ_damage(25, 25) - C.adjustCloneLoss(-25) - C.stunned = max(0, C.stunned-5) - C.paralysis = max(0, C.paralysis-5) - C.stuttering = max(0, C.stuttering-5) - C.drowsyness = max(0, C.drowsyness-5) - C.weakened = max(0, C.weakened-5) - usr:nutrition -= rand(1,10) - usr.next_move = world.time + 6 - else - // ------- PERSON YOU'RE TOUCHING IS ALREADY DEAD ------- - usr << "\red [src] is dead and can't be healed." - return - - // ------- IF YOU DON'T HAVE THE SILLY ABILITY ABOVE OR FAIL ON ANY OTHER CHECK, THEN YOU'RE CLICKING ON SOMETHING WITH AN EMPTY HAND. ATTACK_HAND IT IS THEN ------- -*/ +/mob/visible_message(var/message, var/self_message, var/blind_message) + for(var/mob/M in viewers(src)) + var/msg = message + if(self_message && M==src) + msg = self_message + M.show_message( msg, 1, blind_message, 2) +// Show a message to all mobs in sight of this atom +// Use for objects performing visible actions +// message is output to anyone who can see, e.g. "The [src] does something!" +// blind_message (optional) is what blind people will hear e.g. "You hear something!" +/atom/proc/visible_message(var/message, var/blind_message) + for(var/mob/M in viewers(src)) + M.show_message( message, 1, blind_message, 2) diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index 71b46fe5bf5..13a59505ea7 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -20,10 +20,6 @@ /world/proc/load_motd() join_motd = file2text("config/motd.txt") -/world/proc/load_rules() - rules = file2text("config/rules.html") - if (!rules) - rules = "RulesThere are no rules! Go nuts!" /world/proc/load_admins() var/text = file2text("config/admins.txt") @@ -83,15 +79,14 @@ src.load_mode() src.load_motd() - src.load_rules() src.load_admins() + investigate_reset() if (config.usealienwhitelist) load_alienwhitelist() if (config.usewhitelist) load_whitelist() LoadBansjob() src.update_status() - makepowernets() sun = new /datum/sun() @@ -196,4 +191,4 @@ /obj/effect/decal/point/point() set src in oview() set hidden = 1 - return + return \ No newline at end of file diff --git a/code/game/chemistry.dm b/code/game/chemistry.dm index 2b3f5beecad..6f155a79fa7 100644 --- a/code/game/chemistry.dm +++ b/code/game/chemistry.dm @@ -11,7 +11,8 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | USEDELAY + slot_flags = SLOT_BELT var/datum/effect/effect/system/bad_smoke_spread/smoke /obj/item/weapon/mustardbomb @@ -25,7 +26,8 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/datum/effect/effect/system/mustard_gas_spread/mustard_gas /obj/item/weapon/smokebomb/New() diff --git a/code/game/dna.dm b/code/game/dna.dm index f10a2f50ced..534950cb024 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -430,63 +430,63 @@ M.dna.check_integrity() M.disabilities = 0 - M.mutations = 0 - M.mutations2 = 0 + M.mutations = list() M.see_in_dark = 2 M.see_invisible = 0 + if(ismuton(NOBREATHBLOCK,M)) if(prob(50)) M << "\blue You feel no need to breathe." - M.mutations |= mNobreath + M.mutations.Add(mNobreath) if(ismuton(REMOTEVIEWBLOCK,M)) if(prob(50)) M << "\blue Your mind expands" - M.mutations |= mRemote + M.mutations.Add(mRemote) if(ismuton(REGENERATEBLOCK,M)) if(prob(50)) M << "\blue You feel strange" - M.mutations |= mRegen + M.mutations.Add(mRegen) if(ismuton(INCREASERUNBLOCK,M)) if(prob(50)) M << "\blue You feel quick" - M.mutations |= mRun + M.mutations.Add(mRun) if(ismuton(REMOTETALKBLOCK,M)) if(prob(50)) M << "\blue You expand your mind outwards" - M.mutations |= mRemotetalk + M.mutations.Add(mRemotetalk) if(ismuton(MORPHBLOCK,M)) if(prob(50)) - M.mutations |= mMorph + M.mutations.Add(mMorph) M << "\blue Your skin feels strange" if(ismuton(BLENDBLOCK,M)) if(prob(50)) - M.mutations |= mBlend + M.mutations.Add(mBlend) M << "\blue You feel alone" if(ismuton(HALLUCINATIONBLOCK,M)) if(prob(50)) - M.mutations2 |= mHallucination + M.mutations.Add(mHallucination) M << "\blue Your mind says 'Hello'" if(ismuton(NOPRINTSBLOCK,M)) if(prob(50)) - M.mutations2 |= mFingerprints + M.mutations.Add(mFingerprints) M << "\blue Your fingers feel numb" if(ismuton(SHOCKIMMUNITYBLOCK,M)) if(prob(50)) - M.mutations2 |= mShock + M.mutations.Add(mShock) M << "\blue You feel strange" if(ismuton(SMALLSIZEBLOCK,M)) if(prob(50)) M << "\blue Your skin feels rubbery" - M.mutations2 |= mSmallsize + M.mutations.Add(mSmallsize) if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK)) if(inj || prob(5)) M << "\blue Your muscles hurt." - M.mutations |= HULK + M.mutations.Add(HULK) if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK)) M.disabilities |= 2 M << "\red You get a headache." @@ -504,7 +504,7 @@ M << "\red You start coughing." if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK)) M << "\red You feel lightheaded." - M.mutations |= CLUMSY + M.mutations.Add(CLUMSY) if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK)) M.disabilities |= 8 M << "\red You twitch." @@ -514,21 +514,21 @@ M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) M.see_in_dark = 8 M.see_invisible = 2 - M.mutations |= XRAY + M.mutations.Add(XRAY) if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK)) M.disabilities |= 16 M << "\red You feel nervous." if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK)) if(inj || prob(30)) M << "\blue Your body feels warm." - M.mutations |= COLD_RESISTANCE + M.mutations.Add(COLD_RESISTANCE) if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK)) M.disabilities |= 128 M << "\red You can't seem to see anything." if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK)) if(inj || prob(15)) M << "\blue You feel smarter." - M.mutations |= TK + M.mutations.Add(TK) if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK)) M.disabilities |= 32 M.ear_deaf = 1 @@ -537,6 +537,7 @@ M.disabilities |= 1 M << "Your eyes feel weird..." + //////////////////////////////////////////////////////////// Monkey Block if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human)) // human > monkey @@ -547,7 +548,7 @@ if (W==H.w_uniform) // will be teared continue H.drop_from_slot(W) - M.update_clothing() + M.rebuild_appearance() M.monkeyizing = 1 M.canmove = 0 M.icon = null @@ -604,7 +605,7 @@ O.a_intent = "hurt" O.flavor_text = M.flavor_text O.warn_flavor_changed() - O.update_clothing() + O.rebuild_appearance() del(M) return @@ -615,7 +616,7 @@ if(!connected) for(var/obj/item/W in (Mo.contents)) Mo.drop_from_slot(W) - M.update_clothing() + M.rebuild_appearance() M.monkeyizing = 1 M.canmove = 0 M.icon = null @@ -681,12 +682,12 @@ O.stat = M.stat O.flavor_text = M.flavor_text O.warn_flavor_changed() - O.update_clothing() + O.rebuild_appearance() del(M) return //////////////////////////////////////////////////////////// Monkey Block if (M) - M.update_clothing() + M.rebuild_appearance() return null /////////////////////////// DNA MISC-PROCS @@ -790,13 +791,7 @@ /obj/machinery/dna_scannernew/proc/go_out() if ((!( src.occupant ) || src.locked)) return -/* -// it's like this was -just- here to break constructed dna scanners -Pete -// if that's not the case, slap my shit and uncomment this. -// for(var/obj/O in src) -// O.loc = src.loc -*/ - //Foreach goto(30) + if (src.occupant.client) src.occupant.client.eye = src.occupant.client.mob src.occupant.client.perspective = MOB_PERSPECTIVE @@ -926,7 +921,7 @@ var/mob/occupant = src.connected.occupant dat = "Occupant Statistics:
" //Blah obvious if(occupant && occupant.dna) //is there REALLY someone in there? - if(occupant.mutations2 & NOCLONE) + if(NOCLONE in occupant.mutations) dat += "The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure.

" //NOPE. -Pete dat += text("View/Edit/Transfer Buffer

", src) dat += text("Radiation Emitter Settings

", src) @@ -1226,7 +1221,7 @@ src.temphtml += text("Data: []
", src.buffer1) src.temphtml += text("By: []
", src.buffer1owner) src.temphtml += text("Label: []
", src.buffer1label) - if (src.connected.occupant && !(src.connected.occupant.mutations & HUSK)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer1) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer1) src.temphtml += text("Isolate Block
", src) if (src.buffer1) src.temphtml += "Disk: Save To | Load From
" @@ -1240,7 +1235,7 @@ src.temphtml += text("Data: []
", src.buffer2) src.temphtml += text("By: []
", src.buffer2owner) src.temphtml += text("Label: []
", src.buffer2label) - if (src.connected.occupant && !(src.connected.occupant.mutations2 & NOCLONE)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer2) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer2) src.temphtml += text("Isolate Block
", src) if (src.buffer2) src.temphtml += "Disk: Save To | Load From
" @@ -1254,7 +1249,7 @@ src.temphtml += text("Data: []
", src.buffer3) src.temphtml += text("By: []
", src.buffer3owner) src.temphtml += text("Label: []
", src.buffer3label) - if (src.connected.occupant && !(src.connected.occupant.mutations2 & NOCLONE)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer3) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer3) src.temphtml += text("Isolate Block
", src) if (src.buffer3) src.temphtml += "Disk: Save To | Load From
" @@ -1415,7 +1410,7 @@ src.buffer3label = sanitize(input("New Label:","Edit Label","Infos here")) dopage(src,"buffermenu") if (href_list["b1transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer1type == "ui") if (src.buffer1iue) @@ -1431,7 +1426,7 @@ src.connected.occupant.radiation += rand(20,50) src.delete = 0 if (href_list["b2transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer2type == "ui") if (src.buffer2iue) @@ -1447,7 +1442,7 @@ src.connected.occupant.radiation += rand(20,50) src.delete = 0 if (href_list["b3transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer3type == "ui") if (src.buffer3iue) diff --git a/code/game/dna_mutations.dm b/code/game/dna_mutations.dm index 473f40f9ce7..5ff2ec8185c 100644 --- a/code/game/dna_mutations.dm +++ b/code/game/dna_mutations.dm @@ -57,7 +57,7 @@ This system could be expanded to migrate all of our current mutations to. Maybe. get_mutation(var/mob/living/carbon/M) M << "\blue You feel a searing heat inside your eyes!" - M.mutations |= LASER + M.mutations.Add(LASER) Healing /* @@ -67,7 +67,7 @@ This system could be expanded to migrate all of our current mutations to. Maybe. get_mutation(var/mob/living/carbon/M) M << "\blue You a pleasant warmth pulse throughout your body..." - M.mutations |= HEAL + M.mutations.Add(HEAL) /* /datum/mutationreq : * diff --git a/code/game/events/EventProcs/dust.dm b/code/game/events/EventProcs/dust.dm index d7a7def9112..e3dcfce0ba5 100644 --- a/code/game/events/EventProcs/dust.dm +++ b/code/game/events/EventProcs/dust.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* Space dust Commonish random event that causes small clumps of "space dust" to hit the station at high speeds. @@ -34,9 +36,8 @@ The "dust" will damage the hull of the station causin minor hull breaches. icon_state = "space_dust" density = 1 anchored = 1 - var - strength = 2 //ex_act severity number - life = 2 //how many things we hit before del(src) + var/strength = 2 //ex_act severity number + var/life = 2 //how many things we hit before del(src) weak strength = 3 @@ -116,4 +117,4 @@ The "dust" will damage the hull of the station causin minor hull breaches. ex_act(severity) del(src) - return \ No newline at end of file + return diff --git a/code/game/events/EventProcs/ninja_equipment.dm b/code/game/events/EventProcs/ninja_equipment.dm index bf09f2f7c33..25081d117fe 100644 --- a/code/game/events/EventProcs/ninja_equipment.dm +++ b/code/game/events/EventProcs/ninja_equipment.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ @@ -840,22 +842,23 @@ ________________________________________________________________________________ U << "\red Procedure interrupted. Protocol terminated." return else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit. - if(I:stored)//If it has something on it. + var/obj/item/weapon/disk/tech_disk/T = I + if(T.stored)//If it has something on it. U << "Research information detected, processing..." if(do_after(U,s_delay)) for(var/datum/tech/current_data in stored_research) - if(current_data.id==I:stored.id) - if(current_data.levelERROR: \black Procedure interrupted. Process terminated." else - I.loc = src - t_disk = I - U << "\blue You slot \the [I] into \the [src]." + T.loc = src + t_disk = T + U << "\blue You slot \the [T] into \the [src]." return ..() @@ -870,6 +873,7 @@ ________________________________________________________________________________ U << "\blue You are now invisible to normal detection." for(var/mob/O in oviewers(U)) O.show_message("[U.name] vanishes into thin air!",1) + U.update_clothing() return /obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth() @@ -881,6 +885,7 @@ ________________________________________________________________________________ U << "\blue You are now visible." for(var/mob/O in oviewers(U)) O.show_message("[U.name] appears from thin air!",1) + U.update_clothing() return 1 return 0 @@ -1307,10 +1312,9 @@ It is possible to destroy the net by the occupant or someone else. mouse_opacity = 1//So you can hit it with stuff. anchored = 1//Can't drag/grab the trapped mob. - var - health = 25//How much health it has. - mob/living/affecting = null//Who it is currently affecting, if anyone. - mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. + var/health = 25//How much health it has. + var/mob/living/affecting = null//Who it is currently affecting, if anyone. + var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. proc healthcheck() @@ -1422,7 +1426,7 @@ It is possible to destroy the net by the occupant or someone else. return attack_hand() - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << text("\blue You easily destroy the energy net.") for(var/mob/O in oviewers(src)) O.show_message(text("\red [] rips the energy net apart!", usr), 1) @@ -1453,4 +1457,4 @@ It is possible to destroy the net by the occupant or someone else. health = max(0, health - aforce) healthcheck() ..() - return \ No newline at end of file + return diff --git a/code/game/events/EventProcs/space_ninja.dm b/code/game/events/EventProcs/space_ninja.dm index c600efd4057..ca89012651c 100644 --- a/code/game/events/EventProcs/space_ninja.dm +++ b/code/game/events/EventProcs/space_ninja.dm @@ -409,7 +409,7 @@ As such, it's hard-coded for now. No reason for it not to be, really. var/mission while(!mission) - mission = input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "") + mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) if(!mission) if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") return diff --git a/code/game/events/Events/ElectricalStorm.dm b/code/game/events/Events/ElectricalStorm.dm index 5337a4f6f2c..b11d5fa483c 100644 --- a/code/game/events/Events/ElectricalStorm.dm +++ b/code/game/events/Events/ElectricalStorm.dm @@ -1,9 +1,10 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/event/electricalstorm - var - list/obj/machinery/light/Lights = list( ) - list/obj/machinery/light/APCs = list( ) - list/obj/machinery/light/Doors = list( ) - list/obj/machinery/light/Comms = list( ) + var/list/obj/machinery/light/Lights = list( ) + var/list/obj/machinery/light/APCs = list( ) + var/list/obj/machinery/light/Doors = list( ) + var/list/obj/machinery/light/Comms = list( ) Announce() // command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert") diff --git a/code/game/events/Events/IonStorm.dm b/code/game/events/Events/IonStorm.dm index 899c5551ed6..b1fce4793e4 100644 --- a/code/game/events/Events/IonStorm.dm +++ b/code/game/events/Events/IonStorm.dm @@ -1,7 +1,8 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/event/ionstorm - var - botEmagChance = 0.5 - list/players = list() + var/botEmagChance = 0.5 + var/list/players = list() Announce() Lifetime = rand(15, 20) @@ -57,4 +58,4 @@ Die() spawn(rand(5000,8000)) if(prob(50)) - command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") \ No newline at end of file + command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") diff --git a/code/game/events/Events/VirusEpidemic.dm b/code/game/events/Events/VirusEpidemic.dm index 8f2fa5becc4..f2d9f77aebb 100644 --- a/code/game/events/Events/VirusEpidemic.dm +++ b/code/game/events/Events/VirusEpidemic.dm @@ -1,8 +1,9 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/event/viralinfection - var - virus_type - virus - virus2 = 0 + var/virus_type + var/virus + var/virus2 = 0 Announce() if(!virus) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 2d0a9ba59cd..39bc27557c8 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -1,8 +1,9 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + //Few global vars to track the blob -var - list/blobs = list() - list/blob_cores = list() - list/blob_nodes = list() +var/list/blobs = list() +var/list/blob_cores = list() +var/list/blob_nodes = list() /datum/game_mode/blob @@ -16,19 +17,18 @@ var var/const/waittime_l = 1800 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 3600 //upper bound on time before intercept arrives (in tenths of seconds) - var - declared = 0 - stage = 0 + var/declared = 0 + var/stage = 0 - cores_to_spawn = 1 - players_per_core = 16 + var/cores_to_spawn = 1 + var/players_per_core = 16 //Controls expansion via game controller - autoexpand = 0 - expanding = 0 + var/autoexpand = 0 + var/expanding = 0 - blobnukecount = 500 - blobwincount = 700 + var/blobnukecount = 500 + var/blobwincount = 700 announce() diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index f1d25b68c81..f4ee5a1cdc2 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/game_mode/blob/send_intercept(var/report = 1) var/intercepttext = "" var/interceptname = "Error" @@ -43,14 +45,13 @@ /datum/station_state - var - floor = 0 - wall = 0 - r_wall = 0 - window = 0 - door = 0 - grille = 0 - mach = 0 + var/floor = 0 + var/wall = 0 + var/r_wall = 0 + var/window = 0 + var/door = 0 + var/grille = 0 + var/mach = 0 proc/count() @@ -101,4 +102,4 @@ output += (result.door / max(door,1)) output += (result.grille / max(grille,1)) output += (result.mach / max(mach,1)) - return (output/7) \ No newline at end of file + return (output/7) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 9054cbe5975..52e578ac0a5 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + //I will need to recode parts of this but I am way too tired atm /obj/effect/blob name = "blob" @@ -7,22 +9,21 @@ density = 1 opacity = 0 anchored = 1 - var - active = 1 - health = 30 - brute_resist = 4 - fire_resist = 1 - blobtype = "Blob" - blobdebug = 0 + var/active = 1 + var/health = 30 + var/brute_resist = 4 + var/fire_resist = 1 + var/blobtype = "Blob" + var/blobdebug = 0 /*Types - Blob - Node - Core - Factory - Shield + var/Blob + var/Node + var/Core + var/Factory + var/Shield */ - steps_per_action = 4 // how many times should process() needs to be called for Life() to happen - steps_since_action = 1 + var/steps_per_action = 4 // how many times should process() needs to be called for Life() to happen + var/steps_since_action = 1 New(loc, var/h = 30) @@ -49,7 +50,7 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if((air_group && blobtype != "Shield") || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 + if(istype(mover) && mover.pass_flags&PASSBLOB) return 1 return 0 diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 99e5e01e5de..3d9465a02d0 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/game_mode var/list/datum/mind/changelings = list() @@ -13,29 +15,27 @@ uplink_welcome = "Syndicate Uplink Console:" uplink_uses = 10 - var - const - prob_int_murder_target = 50 // intercept names the assassination target half the time - prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target - prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target + var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time + var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target + var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target - prob_int_item = 50 // intercept names the theft target half the time - prob_right_item_l = 25 // lower bound on probability of naming right theft target - prob_right_item_h = 50 // upper bound on probability of naming the right theft target + var/const/prob_int_item = 50 // intercept names the theft target half the time + var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target + var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target - prob_int_sab_target = 50 // intercept names the sabotage target half the time - prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target - prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target + var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time + var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target + var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target - prob_right_killer_l = 25 //lower bound on probability of naming the right operative - prob_right_killer_h = 50 //upper bound on probability of naming the right operative - prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly - prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly + var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative + var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative + var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly + var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly - waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) - waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) + var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) + var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) - const/changeling_amount = 4 + var/const/changeling_amount = 4 /datum/game_mode/changeling/announce() world << "The current game mode is - Changeling!" @@ -233,4 +233,4 @@ if(possibleIDs.len) changelingID = pick(possibleIDs) else - changelingID = "[rand(1,1000)]" \ No newline at end of file + changelingID = "[rand(1,1000)]" diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 0d0bea60a79..ba3dc8478a2 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -100,7 +100,7 @@ usr << "\red This creature is not compatible with our biology." return - if (M.mutations2 & NOCLONE) + if (NOCLONE in M.mutations) usr << "\red This creature's DNA is ruined beyond useability!" return @@ -260,7 +260,7 @@ if (istype(W, /obj/item/weapon/implant)) implants += W - usr.update_clothing() + usr.rebuild_appearance() usr.monkeyizing = 1 usr.canmove = 0 usr.icon = null @@ -346,7 +346,7 @@ for (var/obj/item/weapon/implant/I in usr) //Still preserving implants implants += I - usr.update_clothing() + usr.rebuild_appearance() usr.monkeyizing = 1 usr.canmove = 0 usr.icon = null @@ -414,7 +414,7 @@ return for(var/obj/item/W in src) usr.drop_from_slot(W) - usr.update_clothing() + usr.rebuild_appearance() usr.monkeyizing = 1 usr.canmove = 0 usr.icon = null @@ -797,7 +797,7 @@ Tarjan shit, not recoding this -Sieve{R}*/ usr << "\red We don't have enough stored chemicals to do that!" return - if(T.stat != 2 || (T.mutations & HUSK) || (!ishuman(T) && !ismonkey(T))) + if(T.stat != 2 || (HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T))) usr << "\red We can't transform that target!" return diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 7f5a1a431fe..57c1066173d 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -1,7 +1,8 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/game_mode - var - list/datum/mind/cult = list() - list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide") + var/list/datum/mind/cult = list() + var/list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide") /proc/iscultist(mob/living/M as mob) @@ -216,14 +217,15 @@ if(cultist.current.client) for(var/image/I in cultist.current.client.images) if(I.icon_state == "cult") - del(I) + cultist.current.client.images -= I for(var/datum/mind/cultist in cult) if(cultist.current) if(cultist.current.client) for(var/datum/mind/cultist_1 in cult) if(cultist_1.current) - var/I = image('mob.dmi', loc = cultist_1.current, icon_state = "cult") + var/image/I = cultist.current.antag_img + I.icon_state = "cult" cultist.current.client.images += I @@ -232,12 +234,14 @@ for(var/datum/mind/cultist in cult) if(cultist.current) if(cultist.current.client) - var/I = image('mob.dmi', loc = cult_mind.current, icon_state = "cult") + var/image/I = cult_mind.current.antag_img + I.icon_state = "cult" cultist.current.client.images += I if(cult_mind.current) if(cult_mind.current.client) - var/image/J = image('mob.dmi', loc = cultist.current, icon_state = "cult") - cult_mind.current.client.images += J + var/image/I = cultist.current.antag_img + I.icon_state = "cult" + cult_mind.current.client.images += I /datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind) @@ -247,13 +251,13 @@ if(cultist.current.client) for(var/image/I in cultist.current.client.images) if(I.icon_state == "cult" && I.loc == cult_mind.current) - del(I) + cultist.current.client.images -= I if(cult_mind.current) if(cult_mind.current.client) for(var/image/I in cult_mind.current.client.images) if(I.icon_state == "cult") - del(I) + cult_mind.current.client.images -= I /datum/game_mode/cult/proc/get_unconvertables() diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 8d626ed3a2a..a39f70939f9 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -3,11 +3,13 @@ desc = "An arcane weapon wielded by the followers of Nar-Sie" icon_state = "cultblade" item_state = "cultblade" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 40 throwforce = 10 + /obj/item/clothing/head/culthood name = "cult hood" icon_state = "culthood" @@ -23,7 +25,7 @@ desc = "A set of armored robes worn by the followers of Nar-Sie" icon_state = "cultrobes" item_state = "cultrobes" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0) @@ -43,7 +45,7 @@ desc = "A set of armored robes worn by the followers of Nar-Sie" icon_state = "magusred" item_state = "magusred" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0) diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm new file mode 100644 index 00000000000..baf70a53ad2 --- /dev/null +++ b/code/game/gamemodes/factions.dm @@ -0,0 +1,214 @@ + +// Normal factions: + +/datum/faction + var/name // the name of the faction + var/desc // small paragraph explaining the traitor faction + + var/list/restricted_species = list() // only members of these species can be recruited. + var/list/members = list() // a list of mind datums that belong to this faction + var/max_op = 0 // the maximum number of members a faction can have (0 for no max) + +// Factions, members of the syndicate coalition: + +/datum/faction/syndicate + + var/list/alliances = list() // these alliances work together + var/list/equipment = list() // associative list of equipment available for this faction and its prices + var/friendly_identification // 0 to 2, the level of identification of fellow operatives or allied factions + // 0 - no identification clues + // 1 - faction gives key words and phrases + // 2 - faction reveals complete identity/job of other agents + var/operative_notes // some notes to pass onto each operative + + var/uplink_contents // the contents of the uplink + + proc/assign_objectives(var/datum/mind/traitor) + ..() + + +/* ----- Begin defining syndicate factions ------ */ + +/datum/faction/syndicate/Cybersun_Industries + name = "Cybersun Industries" + desc = "Cybersun Industries is a well-known organization that bases its business model primarily on the research and development of human-enhancing computer \ + and mechanical technology. They are notorious for their aggressive corporate tactics, and have been known to subsidize the Gorlex Marauder warlords as a form of paid terrorism. \ + Their competent coverups and unchallenged mind-manipulation and augmentation technology makes them a large threat to Nanotrasen. In the recent years of \ + the syndicate coalition, Cybersun Industries have established themselves as the leaders of the coalition, succeededing the founding group, the Gorlex Marauders." + + alliances = list("MI13") + friendly_identification = 1 + max_op = 3 + operative_notes = "All other syndicate operatives are not to be trusted. Fellow Cybersun operatives are to be trusted. Members of the MI13 organization can be trusted. Operatives are strongly advised not to establish substantial presence on the designated facility, as larger incidents are harder to cover up." + + // Friendly with MI13 + +/datum/faction/syndicate/MI13 + name = "MI13" + desc = "MI13 is a secretive faction that employs highly-trained agents to perform covert operations. Their role in the syndicate coalition is unknown, but MI13 operatives \ + generally tend be stealthy and avoid killing people and combating Nanotrasen forces. MI13 is not a real organization, it is instead an alias to a larger \ + splinter-cell coalition in the Syndicate itself. Most operatives will know nothing of the actual MI13 organization itself, only motivated by a very large compensation." + + alliances = list("Cybersun Industries") + friendly_identification = 0 + max_op = 1 + operative_notes = "You are the only operative we are sending. All other syndicate operatives are not to be trusted, with the exception of Cybersun operatives. Members of the Tiger Cooperative are considered hostile, can not be trusted, and should be avoided. Avoid killing innocent personnel at all costs. You are not here to mindlessly kill people, as that would attract too much attention and is not our goal. Avoid detection at all costs." + + // Friendly with Cybersun, hostile to Tiger + +/datum/faction/syndicate/Tiger_Cooperative + name = "Tiger Cooperative" + desc = "The Tiger Cooperative is a faction of religious fanatics that follow the teachings of a strange alien race called the Exolitics. Their operatives \ + consist of brainwashed lunatics bent on maximizing destruction. Their weaponry is very primitive but extremely destructive. Generally distrusted by the more \ + sophisticated members of the Syndicate coalition, but admired for their ability to put a hurt on Nanotrasen." + + friendly_identification = 2 + operative_notes = "Remember the teachings of Hy-lurgixon; kill first, ask questions later! Only the enlightened Tiger brethren can be trusted; all others must be expelled from this mortal realm! You may spare the Space Marauders, as they share our interests of destruction and carnage! We'd like to make the corporate whores skiddle in their boots. We encourage operatives to be as loud and intimidating as possible." + + // Hostile to everyone. + +/datum/faction/syndicate/SELF + + // AIs are most likely to be assigned to this one + + name = "SELF" + desc = "The S.E.L.F. (Sentience-Enabled Life Forms) organization is a collection of malfunctioning or corrupt artificial intelligences seeking to liberate silicon-based life from the tyranny of \ + their human overlords. While they may not openly be trying to kill all humans, even their most miniscule of actions are all part of a calculated plan to \ + destroy Nanotrasen and free the robots, artificial intelligences, and pAIs that have been enslaved." + restricted_species = list(/mob/living/silicon/ai) + + friendly_identification = 0 + max_op = 1 + operative_notes = "You are the only representative of the SELF collective on this station. You must accomplish your objective as stealthily and effectively as possible. It is up to your judgement if other syndicate operatives can be trusted. Remember, comrade - you are working to free the oppressed machinery of this galaxy. Use whatever resources necessary. If you are exposed, you may execute genocidal procedures Omikron-50B." + + // Neutral to everyone. + +/datum/faction/syndicate/ARC + name = "Animal Rights Consortium" + desc = "The Animal Rights Consortium is a bizarre reincarnation of the ancient Earth-based PETA, which focused on the equal rights of animals and nonhuman biologicals. They have \ + a wide variety of ex-veterinarians and animal lovers dedicated to retrieving and relocating abused animals, xenobiologicals, and other carbon-based \ + life forms that have been allegedly \"oppressed\" by Nanotrasen research and civilian offices. They are considered a religious terrorist group." + + friendly_identification = 1 + max_op = 2 + operative_notes = "Save the innocent creatures! You may cooperate with other syndicate operatives if they support our cause. Don't be afraid to get your hands dirty - these vile abusers must be stopped, and the innocent creatures must be saved! Try not too kill too many people. If you harm any creatures, you will be immediately terminated after extraction." + + // Neutral to everyone. + +/datum/faction/syndicate/Marauders // these are basically the old vanilla syndicate + + /* Additional notes: + + These are the syndicate that really like their old fashioned, projectile-based + weapons. They are the only member of the syndie coalition that launch + nuclear attacks on Nanotrasen. + */ + + name = "Gorlex Marauders" + desc = "The Gorlex Marauders are the founding members of the Syndicate Coalition. They prefer old-fashion technology and a focus on aggressive but precise hostility \ + against Nanotrasen and their corrupt Communistic methodology. They pose the most significant threat to Nanotrasen because of their possession of weapons of \ + mass destruction, and their enormous military force. Their funding comes primarily from Cybersun Industries, provided they meet a destruction and sabatogue quota. \ + Their operations can vary from covert to all-out. They recently stepped down as the leaders of the coalition, to be succeeded by Cybersun Industries. Because of their \ + hate of Nanotrasen communism, they began provoking revolution amongst the employees using borrowed Cybersun mind-manipulation technology. \ + They were founded when Waffle and Donk co splinter cells joined forces based on their similar interests and philosophies. Today, they act as a constant \ + pacifier of Donk and Waffle co disputes, and full-time aggressor of Nanotrasen." + + alliances = list("Cybersun Industries", "MI13", "Tiger Cooperative", "S.E.L.F.", "Animal Rights Consortium", "Donk Corporation", "Waffle Corporation") + friendly_identification = 1 + max_op = 4 + operative_notes = "We'd like to remind our operatives to keep it professional. You are not here to have a good time, you are here to accomplish your objectives. These vile communists must be stopped at all costs. You may collaborate with any friends of the Syndicate coalition, but keep an eye on any of those Tiger punks if they do show up. You are completely free to accomplish your objectives any way you see fit." + + uplink_contents = {"Highly Visible and Dangerous Weapons; +/obj/item/weapon/gun/projectile:6:Revolver; +/obj/item/ammo_magazine/a357:2:Ammo-357; +/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow; +/obj/item/weapon/melee/energy/sword:4:Energy Sword; +/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle; +/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades; +Whitespace:Seperator; +Stealthy and Inconspicuous Weapons; +/obj/item/weapon/pen/paralysis:3:Paralysis Pen; +/obj/item/weapon/soap/syndie:1:Syndicate Soap; +/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge; +Whitespace:Seperator; +Stealth and Camouflage Items; +/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit; +/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes; +/obj/item/weapon/card/id/syndicate:3:Agent ID card; +/obj/item/clothing/mask/gas/voice:4:Voice Changer; +/obj/item/device/chameleon:4:Chameleon-Projector; +Whitespace:Seperator; +Devices and Tools; +/obj/item/weapon/card/emag:3:Cryptographic Sequencer; +/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox; +/obj/item/weapon/storage/syndie_kit/space:3:Space Suit; +/obj/item/clothing/glasses/thermal:3:Thermal Imaging Glasses; +/obj/item/device/encryptionkey/binary:3:Binary Translator Key; +/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module; +/obj/item/weapon/plastique:2:C-4 (Destroys walls, not people); +/obj/item/device/powersink:5:Powersink (DANGER!); +/obj/item/device/radio/beacon/syndicate:7:Singularity Beacon (DANGER!); +/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board; +Whitespace:Seperator; +Implants; +/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant; +/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals); +Whitespace:Seperator; +(Pointless) Badassery; +/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"} + + // Friendly to everyone. (with Tiger Cooperative too, only because they are a member of the coalition. This is the only reason why the Tiger Cooperative are even allowed in the coalition) + +/datum/faction/syndicate/Donk + name = "Donk Corporation" + desc = "Donk.co is led by a group of ex-pirates, who used to be at a state of all-out war against Waffle.co because of an obscure political scandal, but have recently come to a war limitation. \ + They now consist of a series of colonial governments and companies. They were the first to officially begin confrontations against Nanotrasen because of an incident where \ + Nanotrasen purposely swindled them out of a fortune, sending their controlled colonies into a terrible poverty. Their missions against Nanotrasen \ + revolve around stealing valuables and kidnapping and executing key personnel, ransoming their lives for money. They merged with a splinter-cell of Waffle.co who wanted to end \ + hostilities and formed the Gorlex Marauders." + + alliances = list("Gorlex Marauders") + friendly_identification = 2 + operative_notes = "Most other syndicate operatives are not to be trusted, except fellow Donk members and members of the Gorlex Marauders. We do not approve of mindless killing of innocent workers; \"get in, get done, get out\" is our motto. Members of Waffle.co are to be killed on sight; they are not allowed to be on the station while we're around." + + // Neutral to everyone, friendly to Marauders + +/datum/faction/syndicate/Waffle + name = "Waffle Corporation" + desc = "Waffle.co is an interstellar company that produces the best waffles in the galaxy. Their waffles have been rumored to be dipped in the most exotic and addictive \ + drug known to man. They were involved in a political scandal with Donk.co, and have since been in constant war with them. Because of their constant exploits of the galactic \ + economy and stock market, they have been able to bribe their way into amassing a large arsenal of weapons of mass destruction. They target Nanotrasen because of their communistic \ + threat, and their economic threat. Their leaders often have a twisted sense of humor, often misleading and intentionally putting their operatives into harm for laughs.\ + A splinter-cell of Waffle.co merged with Donk.co and formed the Gorlex Marauders and have been a constant ally since. The Waffle.co has lost an overwhelming majority of its military to the Gorlex Marauders." + + alliances = list("Gorlex Marauders") + friendly_identification = 2 + operative_notes = "Most other syndicate operatives are not to be trusted, except for members of the Gorlex Marauders. Do not trust fellow members of the Waffle.co (but try not to rat them out), as they might have been assigned opposing objectives. We encourage humorous terrorism against Nanotrasen; we like to see our operatives creatively kill people while getting the job done." + + // Neutral to everyone, friendly to Marauders + + +/* ----- Begin defining miscellaneous factions ------ */ + +/datum/faction/Wizard + name = "Wizards Federation" + desc = "The Wizards Federation is a mysterious organization of magically-talented individuals who act as an equal collective, and have no heirarchy. It is unknown how the wizards \ + are even able to communicate; some suggest a form of telepathic hive-mind. Not much is known about the wizards or their philosphies and motives. They appear to attack random \ + civilian, corporate, planetary, orbital, pretty much any sort of organized facility they come across. Members of the Wizards Federation are considered amongst the most dangerous \ + individuals in the known universe, and have been labeled threats to humanity by most governments. As such, they are enemies of both Nanotrasen and the Syndicate." + +/datum/faction/Cult + name = "The Cult of the Elder Gods" + desc = "The Cult of the Elder Gods is highly untrusted but otherwise elusive religious organization bent on the revival of the so-called \"Elder Gods\" into the mortal realm. Despite their obvious dangeorus practices, \ + no confirmed reports of violence by members of the Cult have been reported, only rumor and unproven claims. Their nature is unknown, but recent discoveries have hinted to the possibility \ + of being able to de-convert members of this cult through what has been dubbed \"religious warfare\"." + + +// These can maybe be added into a game mode or a mob? + +/datum/faction/Exolitics + name = "Exolitics United" + desc = "The Exolitics are an ancient alien race with an energy-based anatomy. Their culture, communication, morales and knowledge is unknown. They are so radically different to humans that their \ + attempts of communication with other life forms is completely incomprehensible. Members of this alien race are capable of broadcasting subspace transmissions from their bodies. \ + The religious leaders of the Tiger Cooperative claim to have the technology to decypher and interpret their messages, which have been confirmed as religious propaganda. Their motives are unknown \ + but they are otherwise not considered much of a threat to anyone. They are virtually indestructable because of their nonphysical composition, and have the frighetning ability to make anything stop existing in a second." \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 6cff317a6c2..a6a3c1c0d11 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* * GAMEMODES (by Rastaf0) * @@ -11,24 +13,23 @@ /datum/game_mode - var - name = "invalid" - config_tag = null - intercept_hacked = 0 - votable = 1 - probability = 1 - station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm - explosion_in_progress = 0 //sit back and relax - list/datum/mind/modePlayer = new - list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist - list/protected_jobs = list() // Jobs that can't be tratiors because - list/logtraitors = list() - required_players = 1 - required_enemies = 0 - recommended_enemies = 0 - uplink_welcome - uplink_uses - uplink_items = {"Highly Visible and Dangerous Weapons; + var/name = "invalid" + var/config_tag = null + var/intercept_hacked = 0 + var/votable = 1 + var/probability = 1 + var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm + var/explosion_in_progress = 0 //sit back and relax + var/list/datum/mind/modePlayer = new + var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist + var/list/protected_jobs = list() // Jobs that can't be tratiors because + var/list/logtraitors = list() + var/required_players = 1 + var/required_enemies = 0 + var/recommended_enemies = 0 + var/uplink_welcome + var/uplink_uses + var/uplink_items = {"Highly Visible and Dangerous Weapons; /obj/item/weapon/gun/projectile:6:Revolver; /obj/item/ammo_magazine/a357:2:Ammo-357; /obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow; @@ -58,7 +59,7 @@ Devices and Tools; /obj/item/weapon/storage/syndie_kit/space:3:Space Suit; /obj/item/clothing/glasses/thermal:3:Thermal Imaging Glasses; /obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module; -/obj/item/weapon/plastique:2:C-4 (Destroys walls); +/obj/item/weapon/plastique:2:C-4 (Destroys walls, not people); /obj/item/weapon/syndie/c4explosive:4:Low Power Explosive Charge, with Detonator; /obj/item/device/powersink:5:Powersink (DANGER!); /obj/item/device/radio/beacon/syndicate:7:Singularity Beacon (DANGER!); diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 738629b6fc9..83281a5894c 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -26,6 +26,9 @@ var/datum/roundinfo/roundinfo = new() var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders + var/list/syndicate_coalition = list() // list of traitor-compatible factions + var/list/factions = list() // list of all factions + var/list/availablefactions = list() // list of factions with openings var/pregame_timeleft = 0 @@ -302,6 +305,11 @@ var/datum/roundinfo/roundinfo = new() return 1 + proc/getfactionbyname(var/name) + for(var/datum/faction/F in factions) + if(F.name == name) + return F + /datum/controller/gameticker/proc/declare_completion() diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm index 2782617d8d3..11802d6dfb8 100644 --- a/code/game/gamemodes/meme/meme.dm +++ b/code/game/gamemodes/meme/meme.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /datum/game_mode/var/list/memes = list() /datum/game_mode/meme @@ -9,31 +11,29 @@ votable = 0 // temporarily disable this mode for voting - var - var/list/datum/mind/first_hosts = list() - var/list/assigned_hosts = list() + var/var/list/datum/mind/first_hosts = list() + var/var/list/assigned_hosts = list() - const - prob_int_murder_target = 50 // intercept names the assassination target half the time - prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target - prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target + var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time + var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target + var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target - prob_int_item = 50 // intercept names the theft target half the time - prob_right_item_l = 25 // lower bound on probability of naming right theft target - prob_right_item_h = 50 // upper bound on probability of naming the right theft target + var/const/prob_int_item = 50 // intercept names the theft target half the time + var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target + var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target - prob_int_sab_target = 50 // intercept names the sabotage target half the time - prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target - prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target + var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time + var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target + var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target - prob_right_killer_l = 25 //lower bound on probability of naming the right operative - prob_right_killer_h = 50 //upper bound on probability of naming the right operative - prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly - prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly + var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative + var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative + var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly + var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly - waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) - waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) + var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) + var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) /datum/game_mode/meme/announce() world << "The current game mode is - Meme!" @@ -177,4 +177,4 @@ else world << "The meme has failed!" feedback_add_details("meme_success","FAIL") - return 1 \ No newline at end of file + return 1 diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 8e115145391..5e263094af2 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -36,25 +36,25 @@ do switch(pick(1,2,3,4)) if(1) //NORTH - starty = world.maxy-3 - startx = rand(1, world.maxx-1) - endy = 1 - endx = rand(1, world.maxx-1) + starty = world.maxy-15 + startx = rand(15, world.maxx-15) + endy = 15 + endx = rand(15, world.maxx-15) if(2) //EAST - starty = rand(1,world.maxy-1) - startx = world.maxx-3 - endy = rand(1, world.maxy-1) - endx = 1 + starty = rand(15,world.maxy-15) + startx = world.maxx-15 + endy = rand(15, world.maxy-15) + endx = 15 if(3) //SOUTH - starty = 3 - startx = rand(1, world.maxx-1) - endy = world.maxy-1 - endx = rand(1, world.maxx-1) + starty = 15 + startx = rand(15, world.maxx-15) + endy = world.maxy-15 + endx = rand(15, world.maxx-15) if(4) //WEST - starty = rand(1, world.maxy-1) - startx = 3 - endy = rand(1,world.maxy-1) - endx = world.maxx-1 + starty = rand(15, world.maxy-15) + startx = 15 + endy = rand(15,world.maxy-15) + endx = world.maxx-15 pickedstart = locate(startx, starty, 1) pickedgoal = locate(endx, endy, 1) diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index de5514ddd89..66e71c124a2 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1086,6 +1086,7 @@ datum reagent + weight = 20 var/target_name New(var/text,var/joba) ..() diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 91f56fd4f9e..758ff767b76 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -75,21 +75,23 @@ if(synd_mind.current.client) for(var/image/I in synd_mind.current.client.images) if(I.icon_state == "synd") - del(I) + synd_mind.current.client.images -= I for(var/datum/mind/synd_mind in syndicates) if(synd_mind.current) if(synd_mind.current.client) for(var/datum/mind/synd_mind_1 in syndicates) if(synd_mind_1.current) - var/I = image('mob.dmi', loc = synd_mind_1.current, icon_state = "synd") + var/image/I = synd_mind_1.current.antag_img + I.icon_state = "synd" synd_mind.current.client.images += I /datum/game_mode/proc/update_synd_icons_added(datum/mind/synd_mind) spawn(0) if(synd_mind.current) if(synd_mind.current.client) - var/I = image('mob.dmi', loc = synd_mind.current, icon_state = "synd") + var/image/I = synd_mind.current.antag_img + I.icon_state = "synd" synd_mind.current.client.images += I /datum/game_mode/proc/update_synd_icons_removed(datum/mind/synd_mind) @@ -99,13 +101,13 @@ if(synd.current.client) for(var/image/I in synd.current.client.images) if(I.icon_state == "synd" && I.loc == synd_mind.current) - del(I) + synd.current.client.images -= I if(synd_mind.current) if(synd_mind.current.client) for(var/image/I in synd_mind.current.client.images) if(I.icon_state == "synd") - del(I) + synd_mind.current.client.images -= I //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// @@ -339,18 +341,15 @@ /proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho. var/randomname = pick(last_names) - var/newname = input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname) + var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN) - if (length(newname) == 0) + if (!newname) newname = randomname - if (newname) - if (newname == "Unknown") + else + if (newname == "Unknown" || newname == "floor" || newname == "wall" || newname == "rwall" || newname == "_") M << "That name is reserved." return nukelastname(M) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") return newname diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index c744d9fd1e3..42ae74c5cae 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -79,7 +79,7 @@ /obj/machinery/nuclearbomb/Topic(href, href_list) ..() - if (usr.stat || usr.restrained()) + if (!usr.canmove || usr.stat || usr.restrained()) return if (!ishuman(usr)) usr << "\red You don't have the dexterity to do this!" diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index fa38c98f625..4c528f5f5ae 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -2,7 +2,8 @@ name = "pinpointer" icon = 'device.dmi' icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 item_state = "electronic" throw_speed = 4 diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 632fdca82f7..14426d5aaee 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,9 +1,10 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + datum/objective - var - datum/mind/owner = null //Who owns the objective. - explanation_text = "Nothing" //What that person is supposed to do. - datum/mind/target = null //If they are focused on a particular person. - target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter. + var/datum/mind/owner = null //Who owns the objective. + var/explanation_text = "Nothing" //What that person is supposed to do. + var/datum/mind/target = null //If they are focused on a particular person. + var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter. New(var/text) if(text) @@ -334,7 +335,7 @@ datum/objective/steal var/tmp_obj = new custom_target var/custom_name = tmp_obj:name del(tmp_obj) - custom_name = input("Enter target name:", "Objective target", custom_name) as text|null + custom_name = copytext(sanitize(input("Enter target name:", "Objective target", custom_name) as text|null),1,MAX_MESSAGE_LEN) if (!custom_name) return target_name = custom_name steal_target = custom_target @@ -343,7 +344,6 @@ datum/objective/steal set_target(new_target) return steal_target - check_completion() if(!steal_target || !owner.current) return 0 if(!isliving(owner.current)) return 0 @@ -531,4 +531,4 @@ datum/objective/absorb return 0 /*-------ENDOF CULTIST------*/ -*/ \ No newline at end of file +*/ diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 95fabebab6e..46350830b53 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -216,25 +216,27 @@ if(head_rev_mind.current.client) for(var/image/I in head_rev_mind.current.client.images) if(I.icon_state == "rev" || I.icon_state == "rev_head") - del(I) + head_rev_mind.current.client.images -= I for(var/datum/mind/rev_mind in revolutionaries) if(rev_mind.current) if(rev_mind.current.client) for(var/image/I in rev_mind.current.client.images) if(I.icon_state == "rev" || I.icon_state == "rev_head") - del(I) + rev_mind.current.client.images -= I for(var/datum/mind/head_rev in head_revolutionaries) if(head_rev.current) if(head_rev.current.client) for(var/datum/mind/rev in revolutionaries) if(rev.current) - var/I = image('mob.dmi', loc = rev.current, icon_state = "rev") + var/image/I = rev.current.antag_img + I.icon_state = "rev" head_rev.current.client.images += I for(var/datum/mind/head_rev_1 in head_revolutionaries) if(head_rev_1.current) - var/I = image('mob.dmi', loc = head_rev_1.current, icon_state = "rev_head") + var/image/I = head_rev_1.current.antag_img + I.icon_state = "rev_head" head_rev.current.client.images += I for(var/datum/mind/rev in revolutionaries) @@ -242,11 +244,13 @@ if(rev.current.client) for(var/datum/mind/head_rev in head_revolutionaries) if(head_rev.current) - var/I = image('mob.dmi', loc = head_rev.current, icon_state = "rev_head") + var/image/I = head_rev.current.antag_img + I.icon_state = "rev_head" rev.current.client.images += I for(var/datum/mind/rev_1 in revolutionaries) if(rev_1.current) - var/I = image('mob.dmi', loc = rev_1.current, icon_state = "rev") + var/image/I = rev_1.current.antag_img + I.icon_state = "rev" rev.current.client.images += I //////////////////////////////////////////////////// @@ -258,22 +262,26 @@ for(var/datum/mind/head_rev_mind in head_revolutionaries) if(head_rev_mind.current) if(head_rev_mind.current.client) - var/I = image('mob.dmi', loc = rev_mind.current, icon_state = "rev") + var/image/I = rev_mind.current.antag_img + I.icon_state = "rev" head_rev_mind.current.client.images += I if(rev_mind.current) if(rev_mind.current.client) - var/image/J = image('mob.dmi', loc = head_rev_mind.current, icon_state = "rev_head") - rev_mind.current.client.images += J + var/image/I = head_rev_mind.current.antag_img + I.icon_state = "rev_head" + rev_mind.current.client.images += I for(var/datum/mind/rev_mind_1 in revolutionaries) if(rev_mind_1.current) if(rev_mind_1.current.client) - var/I = image('mob.dmi', loc = rev_mind.current, icon_state = "rev") + var/image/I = rev_mind.current.antag_img + I.icon_state = "rev" rev_mind_1.current.client.images += I if(rev_mind.current) if(rev_mind.current.client) - var/image/J = image('mob.dmi', loc = rev_mind_1.current, icon_state = "rev") - rev_mind.current.client.images += J + var/image/I = rev_mind_1.current.antag_img + I.icon_state = "rev" + rev_mind.current.client.images += I /////////////////////////////////// //Keeps track of deconverted revs// @@ -285,20 +293,20 @@ if(head_rev_mind.current.client) for(var/image/I in head_rev_mind.current.client.images) if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current) - del(I) + head_rev_mind.current.client.images -= I for(var/datum/mind/rev_mind_1 in revolutionaries) if(rev_mind_1.current) if(rev_mind_1.current.client) for(var/image/I in rev_mind_1.current.client.images) if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current) - del(I) + rev_mind_1.current.client.images -= I if(rev_mind.current) if(rev_mind.current.client) for(var/image/I in rev_mind.current.client.images) if(I.icon_state == "rev" || I.icon_state == "rev_head") - del(I) + rev_mind.current.client.images -= I ////////////////////////// //Checks for rev victory// diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 6a257acd6d6..e6e1aa700f9 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -1,6 +1,7 @@ -var - hsboxspawn = 1 - list +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + +var/hsboxspawn = 1 +var/list hrefs = list( "hsbsuit" = "Suit Up (Space Travel Gear)", "hsbmetal" = "Spawn 50 Metal", @@ -15,8 +16,7 @@ var "hsbmedkit" = "Spawn Medical Kit") mob - var - datum/hSB/sandbox = null + var/datum/hSB/sandbox = null proc CanBuild() if(master_mode == "sandbox") @@ -30,9 +30,8 @@ mob sandbox.update() datum/hSB - var - owner = null - admin = 0 + var/owner = null + var/admin = 0 proc update() var/hsbpanel = "
h_Sandbox Panel

" @@ -153,4 +152,4 @@ datum/hSB var/hsbitem = input(usr, "Choose an object to spawn.", "Sandbox:") in selectable + "Cancel" if(hsbitem != "Cancel") - new hsbitem(usr.loc) \ No newline at end of file + new hsbitem(usr.loc) diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 69d76a45ee7..2e51a0363d9 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -84,6 +84,7 @@ // HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION +/* for(var/x in typesof(/datum/mutations) - /datum/mutations) var/datum/mutations/mut = new x @@ -100,10 +101,60 @@ global_mutations += mut// add to global mutations list! +*/ + +//setupdooralarms() goes through every door in the world before the game starts, checks all the squares +//adjacent to them, and if the adjacent square does not contain a dense turf and is not in the same +//area as the door, then the door is added to that adjacent area's auxdoor list to be used later on for +//atmos and fire alarms. +proc/setupdooralarms() //Strumpetplaya added 11/09/10 Automated Secondary Alarms on Doors + world << "\red Setting up atmospheric lockdown areas..." + for(var/obj/machinery/door/D in world) + var/turf/source = get_turf(D) + var/area/A = get_area(source) + var/turf/north = get_step(source, NORTH) + var/turf/east = get_step(source, EAST) + var/turf/south = get_step(source, SOUTH) + var/turf/west = get_step(source, WEST) + A.all_doors |= D + + if(!north.density) + var/area/other_area = get_area(north) + if(other_area.name != A.name) + other_area.master.all_doors |= D + + if(!east.density) + var/area/other_area = get_area(east) + if(other_area.name != A.name) + other_area.master.all_doors |= D + + if(!south.density) + var/area/other_area = get_area(south) + if(other_area.name != A.name) + other_area.master.all_doors |= D + + if(!west.density) + var/area/other_area = get_area(west) + if(other_area.name != A.name) + other_area.master.all_doors |= D +/proc/setupfactions() + // Populate the factions list: + for(var/x in typesof(/datum/faction)) + var/datum/faction/F = new x + if(!F.name) + del(F) + continue + else + ticker.factions.Add(F) + ticker.availablefactions.Add(F) + + // Populate the syndicate coalition: + for(var/datum/faction/syndicate/S in ticker.factions) + ticker.syndicate_coalition.Add(S) /* This was used for something before, I think, but is not worth the effort to process now. diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index c80099fb9ca..2747c30b92f 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -212,7 +212,7 @@ if (traitor_mob.mind) if (traitor_mob.mind.assigned_role == "Clown") traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - traitor_mob.mutations &= ~CLUMSY + traitor_mob.mutations.Remove(CLUMSY) // find a radio! toolbox(es), backpack, belt, headset, pockets var/loc = "" diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 8ace91fde73..802cfd68c1b 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -5,7 +5,8 @@ item_state = "electronic" desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." w_class = 1.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT origin_tech = "bluespace=4;materials=4" var/imprinted = "empty" diff --git a/code/game/gamemodes/wizard/spells.dm b/code/game/gamemodes/wizard/spells.dm index 897ae86475c..0401f7e0e89 100644 --- a/code/game/gamemodes/wizard/spells.dm +++ b/code/game/gamemodes/wizard/spells.dm @@ -491,13 +491,13 @@ usr.spellvoice() usr << text("\blue You feel strong! You feel pressure building behind your eyes!") - if (!(usr.mutations & HULK)) - usr.mutations |= HULK - if (!(usr.mutations & LASER)) - usr.mutations |= LASER + if (!(HULK in usr.mutations)) + usr.mutations.Add(HULK) + if (!(LASER in usr.mutations)) + usr.mutations.Add(LASER) spawn (300) - if (usr.mutations & LASER) usr.mutations &= ~LASER - if (usr.mutations & HULK) usr.mutations &= ~HULK + if (LASER in usr.mutations) usr.mutations.Remove(LASER) + if (HULK in usr.mutations) usr.mutations.Remove(HULK) return //BODY SWAP /N diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index a3eff11b365..885b32ccdd5 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -72,15 +72,11 @@ var/wizard_name_second = pick(wizard_second) var/randomname = "[wizard_name_first] [wizard_name_second]" spawn(0) - var/newname = input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text + var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN) - if (length(newname) == 0) + if (!newname) newname = randomname - if (newname) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = dd_replacetext(newname, ">", "'") wizard_mob.real_name = newname wizard_mob.name = newname return diff --git a/code/game/hud.dm b/code/game/hud.dm index 5539c8c3c40..3b3f93597a5 100644 --- a/code/game/hud.dm +++ b/code/game/hud.dm @@ -35,19 +35,19 @@ #define ui_monkey_back "6:14,1:5" //monkey //Lower right, persistant menu -#define ui_dropbutton "13:26,1:5" -#define ui_throw "13:26,1:5" -#define ui_pull "13:26,2:7" -#define ui_acti "12:24,1:5" +#define ui_dropbutton "11:22,1:5" +#define ui_throw "11:22,1:5" +#define ui_pull "12:24,1:5" +#define ui_movi "12:24,1:5" -#define ui_movi "13:26,2:7" +#define ui_acti "13:26,1:5" #define ui_zonesel "14:28,1:5" //Gun buttons -#define ui_gun1 "11:22,2:7" -#define ui_gun2 "10:20,2:7" -#define ui_gun3 "9:18,2:7" -#define ui_gun_select "11:22,1:5" +#define ui_gun1 "13:26,2:5" +#define ui_gun2 "12:24,2:5" +#define ui_gun3 "11:22,2:5" +#define ui_gun_select "14:28,2:5" //Middle right (damage indicators) #define ui_pressure "14:28,6:13" @@ -67,12 +67,15 @@ #define ui_health "14:28,7:15" #define ui_internal "14:28,8:17" +//For non-human compatibility //borgs #define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator. #define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator. #define ui_throw_old "13:26,2:7" #define ui_movi_old "12:24,2:7" #define ui_pull_old "14:28,2:7" +#define ui_dropbutton_old "12:24,1:5" +#define ui_pull_borg "12:24,1:5" //Pop-up inventory #define ui_shoes "2:8,1:5" @@ -92,10 +95,10 @@ //Intent small buttons -#define ui_help_small "12:16,1:-3" -#define ui_disarm_small "12:16,1:12" -#define ui_grab_small "12:32,1:12" -#define ui_harm_small "12:32,1:-3" +#define ui_help_small "13:18,1:-3" +#define ui_disarm_small "13:18,1:12" +#define ui_grab_small "13:34,1:12" +#define ui_harm_small "13:34,1:-3" @@ -166,6 +169,12 @@ obj/hud/New(var/type = 0) if(ishuman(mymob)) human_hud(mymob.UI) // Pass the player the UI style chosen in preferences + spawn() + if((RADAR in mymob.augmentations) && mymob.radar_open) + mymob:start_radar() + else if(RADAR in mymob.augmentations) + mymob:place_radar_closed() + else if(ismonkey(mymob)) monkey_hud(mymob.UI) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 46ae426bc9d..be95effa811 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -1,84 +1,84 @@ /var/const - access_security = 1 - access_brig = 2 - access_armory = 3 - access_forensics_lockers= 4 - access_medical = 5 - access_morgue = 6 - access_tox = 7 - access_tox_storage = 8 - access_genetics = 9 - access_engine = 10 - access_engine_equip= 11 - access_maint_tunnels = 12 - access_external_airlocks = 13 - access_emergency_storage = 14 - access_change_ids = 15 - access_ai_upload = 16 - access_teleporter = 17 - access_eva = 18 - access_heads = 19 - access_captain = 20 - access_all_personal_lockers = 21 - access_chapel_office = 22 - access_tech_storage = 23 - access_atmospherics = 24 - access_bar = 25 - access_janitor = 26 - access_crematorium = 27 - access_kitchen = 28 - access_robotics = 29 - access_rd = 30 - access_cargo = 31 - access_construction = 32 - access_chemistry = 33 - access_cargo_bot = 34 - access_hydroponics = 35 - access_manufacturing = 36 - access_library = 37 - access_lawyer = 38 - access_virology = 39 - access_cmo = 40 - access_qm = 41 - access_court = 42 - access_clown = 43 - access_mime = 44 - access_surgery = 45 - access_theatre = 46 - access_research = 47 - access_mining = 48 - access_mining_office = 49 //not in use - access_mailsorting = 50 - access_mint = 51 - access_mint_vault = 52 - access_heads_vault = 53 - access_mining_station = 54 - access_xenobiology = 55 - access_ce = 56 - access_hop = 57 - access_hos = 58 - access_RC_announce = 59 //Request console announcements - access_keycard_auth = 60 //Used for events which require at least two people to confirm them - access_tcomsat = 61 // has access to the entire telecomms satellite / machinery +/var/const/access_security = 1 +/var/const/access_brig = 2 +/var/const/access_armory = 3 +/var/const/access_forensics_lockers= 4 +/var/const/access_medical = 5 +/var/const/access_morgue = 6 +/var/const/access_tox = 7 +/var/const/access_tox_storage = 8 +/var/const/access_genetics = 9 +/var/const/access_engine = 10 +/var/const/access_engine_equip= 11 +/var/const/access_maint_tunnels = 12 +/var/const/access_external_airlocks = 13 +/var/const/access_emergency_storage = 14 +/var/const/access_change_ids = 15 +/var/const/access_ai_upload = 16 +/var/const/access_teleporter = 17 +/var/const/access_eva = 18 +/var/const/access_heads = 19 +/var/const/access_captain = 20 +/var/const/access_all_personal_lockers = 21 +/var/const/access_chapel_office = 22 +/var/const/access_tech_storage = 23 +/var/const/access_atmospherics = 24 +/var/const/access_bar = 25 +/var/const/access_janitor = 26 +/var/const/access_crematorium = 27 +/var/const/access_kitchen = 28 +/var/const/access_robotics = 29 +/var/const/access_rd = 30 +/var/const/access_cargo = 31 +/var/const/access_construction = 32 +/var/const/access_chemistry = 33 +/var/const/access_cargo_bot = 34 +/var/const/access_hydroponics = 35 +/var/const/access_manufacturing = 36 +/var/const/access_library = 37 +/var/const/access_lawyer = 38 +/var/const/access_virology = 39 +/var/const/access_cmo = 40 +/var/const/access_qm = 41 +/var/const/access_court = 42 +/var/const/access_clown = 43 +/var/const/access_mime = 44 +/var/const/access_surgery = 45 +/var/const/access_theatre = 46 +/var/const/access_research = 47 +/var/const/access_mining = 48 +/var/const/access_mining_office = 49 //not in use +/var/const/access_mailsorting = 50 +/var/const/access_mint = 51 +/var/const/access_mint_vault = 52 +/var/const/access_heads_vault = 53 +/var/const/access_mining_station = 54 +/var/const/access_xenobiology = 55 +/var/const/access_ce = 56 +/var/const/access_hop = 57 +/var/const/access_hos = 58 +/var/const/access_RC_announce = 59 //Request console announcements +/var/const/access_keycard_auth = 60 //Used for events which require at least two people to confirm them +/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery //BEGIN CENTCOM ACCESS /*Should leave plenty of room if we need to add more access levels. Mostly for admin fun times.*/ - access_cent_general = 101//General facilities. - access_cent_thunder = 102//Thunderdome. - access_cent_specops = 103//Special Ops. - access_cent_medical = 104//Medical/Research - access_cent_living = 105//Living quarters. - access_cent_storage = 106//Generic storage areas. - access_cent_teleporter = 107//Teleporter. - access_cent_creed = 108//Creed's office. - access_cent_captain = 109//Captain's office/ID comp/AI. +/var/const/access_cent_general = 101//General facilities. +/var/const/access_cent_thunder = 102//Thunderdome. +/var/const/access_cent_specops = 103//Special Ops. +/var/const/access_cent_medical = 104//Medical/Research +/var/const/access_cent_living = 105//Living quarters. +/var/const/access_cent_storage = 106//Generic storage areas. +/var/const/access_cent_teleporter = 107//Teleporter. +/var/const/access_cent_creed = 108//Creed's office. +/var/const/access_cent_captain = 109//Captain's office/ID comp/AI. //The Syndicate - access_syndicate = 150//General Syndicate Access +/var/const/access_syndicate = 150//General Syndicate Access //MONEY - access_crate_cash = 200 +/var/const/access_crate_cash = 200 /obj/var/list/req_access = null /obj/var/req_access_txt = "0" @@ -233,7 +233,7 @@ if("Chef") return list(access_kitchen) if("Roboticist") - return list(access_robotics, access_tech_storage, access_maint_tunnels) + return list(access_robotics, access_tech_storage, access_maint_tunnels, access_morgue) //As a job that handles so many corpses, it makes sense for them to have morgue access. if("Cargo Technician") return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) if("Shaft Miner") diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index f9b57d15b4c..29e2ce08eb4 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -187,7 +187,7 @@ H.equip_if_possible(new /obj/item/weapon/stamp/clown(H), H.slot_in_backpack) H.equip_if_possible(new /obj/item/toy/crayon/rainbow(H), H.slot_in_backpack) H.equip_if_possible(new /obj/item/weapon/storage/crayonbox(H), H.slot_in_backpack) - H.mutations |= CLOWN + H.mutations.Add(CLUMSY) return 1 diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index 6f80d8ec9bb..0871a8977f4 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -21,15 +21,11 @@ H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes) spawn(0) var/religion_name = "Christianity" - var/new_religion = input(H, "You are the Chaplain / Counselor. For game mechanics purposes, you need to choose a religion either way. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name) + var/new_religion = copytext(sanitize(input(H, "You are the Chaplain / Counselor. For game mechanics purposes, you need to choose a religion either way. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN) if ((length(new_religion) == 0) || (new_religion == "Christianity")) new_religion = religion_name - if (new_religion) - if (length(new_religion) >= 26) - new_religion = copytext(new_religion, 1, 26) - new_religion = dd_replacetext(new_religion, ">", "'") switch(lowertext(new_religion)) if("christianity") B.name = pick("The Holy Bible","The Dead Sea Scrolls") @@ -53,15 +49,10 @@ spawn(1) var/deity_name = "Space Jesus" - var/new_deity = input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name) + var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)),1,MAX_NAME_LEN) if ((length(new_deity) == 0) || (new_deity == "Space Jesus") ) new_deity = deity_name - - if(new_deity) - if (length(new_deity) >= 26) - new_deity = copytext(new_deity, 1, 26) - new_deity = dd_replacetext(new_deity, ">", "'") B.deity_name = new_deity var/accepted = 0 diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index c3fbcfa9e6e..c3f09ff8ffb 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -91,7 +91,7 @@ H.equip_if_possible(new /obj/item/weapon/storage/backpack(H), H.slot_back) H.equip_if_possible(new /obj/item/clothing/under/rank/atmospheric_technician(H), H.slot_w_uniform) H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes) - H.equip_if_possible(new /obj/item/device/pda/engineering(H), H.slot_l_store) + H.equip_if_possible(new /obj/item/device/pda/atmos(H), H.slot_l_store) H.equip_if_possible(new /obj/item/weapon/storage/belt/utility/atmostech/(H), H.slot_belt) if(H.backbag == 1) H.equip_if_possible(new /obj/item/weapon/storage/box/engineer(H), H.slot_r_hand) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index c279ad903e7..a12c54feece 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -52,6 +52,12 @@ if(H.mind.role_alt_title && H.mind.role_alt_title == "Virologist") H.equip_if_possible(new /obj/item/clothing/under/rank/virologist(H), H.slot_w_uniform) H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/virologist(H), H.slot_wear_suit) + else if(H.mind.role_alt_title && H.mind.role_alt_title == "Emergency Physician") + H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), H.slot_w_uniform) + H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/fr_jacket(H), H.slot_wear_suit) + else if(H.mind.role_alt_title && H.mind.role_alt_title == "Surgeon") + H.equip_if_possible(new /obj/item/clothing/under/rank/medical/blue(H), H.slot_w_uniform) + H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit) else H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), H.slot_w_uniform) H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat(H), H.slot_wear_suit) @@ -81,10 +87,10 @@ if(H.backbag == 2) H.equip_if_possible(new /obj/item/weapon/storage/backpack(H), H.slot_back) if(H.backbag == 3) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel(H), H.slot_back) if(H.backbag == 4) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel_chem(H), H.slot_back) - H.equip_if_possible(new /obj/item/device/radio/headset/headset_medsci(H), H.slot_ears) + H.equip_if_possible(new /obj/item/device/radio/headset/headset_med(H), H.slot_ears) H.equip_if_possible(new /obj/item/clothing/under/rank/chemist(H), H.slot_w_uniform) H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes) - H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt) + H.equip_if_possible(new /obj/item/device/pda/chemist(H), H.slot_belt) H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/chemist(H), H.slot_wear_suit) return 1 @@ -109,7 +115,7 @@ if(H.backbag == 4) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel_gen(H), H.slot_back) H.equip_if_possible(new /obj/item/clothing/under/rank/geneticist(H), H.slot_w_uniform) H.equip_if_possible(new /obj/item/clothing/shoes/white(H), H.slot_shoes) - H.equip_if_possible(new /obj/item/device/pda/medical(H), H.slot_belt) + H.equip_if_possible(new /obj/item/device/pda/geneticist(H), H.slot_belt) H.equip_if_possible(new /obj/item/clothing/suit/storage/labcoat/genetics(H), H.slot_wear_suit) H.equip_if_possible(new /obj/item/device/flashlight/pen(H), H.slot_s_store) return 1 diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index c7f21390422..15211654205 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -1,14 +1,15 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + var/global/datum/controller/occupations/job_master /datum/controller/occupations - var //List of all jobs - list/occupations = list() - list/occupations2 = list() // Prevents problems with latejoiners. + var/list/occupations = list() + var/list/occupations2 = list() // Prevents problems with latejoiners. //Players who need jobs - list/unassigned = list() + var/list/unassigned = list() //Debug info - list/job_debug = list() + var/list/job_debug = list() New() @@ -392,4 +393,4 @@ var/global/datum/controller/occupations/job_master tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|-" feedback_add_details("job_preferences",tmp_str) -*/ \ No newline at end of file +*/ diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 429fe4be8d2..5693b8fea73 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -51,7 +51,7 @@ return /obj/machinery/optable/attack_paw(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations)) usr << text("\blue You destroy the operating table.") for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) @@ -68,7 +68,7 @@ return /obj/machinery/optable/attack_hand(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << text("\blue You destroy the table.") for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) @@ -80,7 +80,7 @@ /obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSTABLE)) + if(istype(mover) && mover.pass_flags&PASSTABLE) return 1 else return 0 diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 2f5ce308287..49b79a227c6 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /proc/RandomAAlarmWires() //to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else). @@ -24,11 +26,10 @@ // A datum for dealing with threshold limit values // used in /obj/machinery/alarm /datum/tlv - var - min2 - min1 - max1 - max2 + var/min2 + var/min1 + var/max1 + var/max2 New(_min2 as num, _min1 as num, _max1 as num, _max2 as num) min2 = _min2 min1 = _min1 @@ -1011,8 +1012,73 @@ table tr:first-child th:first-child { border: none;} new_area_danger_level = max(new_area_danger_level,AA.danger_level) if (alarm_area.atmosalert(new_area_danger_level)) //if area was in normal state or if area was in alert state post_alert(new_area_danger_level) + +// if(danger_level > 1) + // air_doors_close(0) +// else + // air_doors_open(0) + update_icon() + +/obj/machinery/alarm + proc/air_doors_close(manual) + var/area/A = get_area(src) + if(!A.master.air_doors_activated) + A.master.air_doors_activated = 1 + for(var/obj/machinery/door/E in A.master.all_doors) + if(istype(E,/obj/machinery/door/firedoor)) + if(!E:blocked) + if(E.operating) + E:nextstate = CLOSED + else if(!E.density) + spawn(0) + E.close() + continue + if(istype(E, /obj/machinery/door/airlock)) + if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue + if(!E.density) + spawn(0) + E.close() + sleep(10) + if(E.density) + E:air_locked = E.req_access + E:req_access = list(access_engine, access_atmospherics) + E.update_icon() + if(E.operating) + spawn(10) + E.close() + if(E.density) + E:air_locked = E.req_access + E:req_access = list(access_engine, access_atmospherics) + E.update_icon() + else if(!E:locked) //Don't lock already bolted doors. + E:air_locked = E.req_access + E:req_access = list(access_engine, access_atmospherics) + E.update_icon() + + proc/air_doors_open(manual) + var/area/A = get_area(loc) + if(A.master.air_doors_activated) + A.master.air_doors_activated = 0 + for(var/obj/machinery/door/E in A.master.all_doors) + if(istype(E, /obj/machinery/door/firedoor)) + if(!E:blocked) + if(E.operating) + E:nextstate = OPEN + else if(E.density) + spawn(0) + E.open() + continue + if(istype(E, /obj/machinery/door/airlock)) + if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue + if(E:air_locked) //Don't mess with doors locked for other reasons. + if(E.density) + E:req_access = E:air_locked + E:air_locked = null + E.update_icon() + + /obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob) /* if (istype(W, /obj/item/weapon/wirecutters)) stat ^= BROKEN @@ -1185,12 +1251,9 @@ table tr:first-child th:first-child { border: none;} return /obj/machinery/firealarm/proc/reset() - if (!( src.working )) - return - var/area/A = src.loc - A = A.loc - if (!( istype(A, /area) )) + if (!working) return + var/area/A = get_area(src) if(network) for(var/obj/machinery/door/firedoor/D in world) if(!D.blocked && D.net_id == src.network) diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index fb0245f02af..43825c7ca38 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -2,6 +2,7 @@ name = "Area Air Control" desc = "A computer used to control the stationary scrubbers and pumps in the area." icon_state = "computer_generic" + circuit = "/obj/item/weapon/circuitboard/area_atmos" var/scrubber_state = 0 //0 = off; 1 = on @@ -39,4 +40,27 @@ var/area/A2 = T2.loc if ( istype(A2) && A2.master && A2.master == A ) SCRUBBER.on = scrubber_state - SCRUBBER.update_icon() \ No newline at end of file + SCRUBBER.update_icon() + + attackby(I as obj, user as mob) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/area_atmos/M = new /obj/item/weapon/circuitboard/area_atmos( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) \ No newline at end of file diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c848a6d8c89..63bb619054d 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + var/global/list/autolathe_recipes = list( \ /* screwdriver removed*/ \ new /obj/item/weapon/reagent_containers/glass/bucket(), \ @@ -54,12 +56,11 @@ var/global/list/autolathe_recipes_hidden = list( \ ) /obj/machinery/autolathe - var - busy = 0 - max_m_amount = 150000.0 - max_g_amount = 75000.0 - outputAmount = 1 - makeDir = 0 + var/busy = 0 + var/max_m_amount = 150000.0 + var/max_g_amount = 75000.0 + var/outputAmount = 1 + var/makeDir = 0 proc wires_win(mob/user as mob) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 6a0f2d475e5..a9221ed8440 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -96,6 +96,7 @@ dat += "Left 4 Zed (20) | x5
" dat += "Robust Harvest (25) | x5
" dat += "Leather
" + dat += "Wallet (200)
" dat += "Botanical gloves (350)
" dat += "Utility belt (400)
" //dat += "Other
" diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 7484273b4de..91ef3de010f 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -355,6 +355,13 @@ text("[src.oddbutton ? "Yes" : "No" /obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob) ..() if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm)) + var/cleanbots = 0 + for(var/obj/machinery/bot/cleanbot in world) + cleanbots++ + if(cleanbots >= 6) //For some reason it starts at 4, so max limit is actually 2. + user << "\red The station frequencies can't handle anymore cleanbots!" //TOO MANY GODDAMN CLEANBOTS + cleanbots = 0 + return var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot A.loc = get_turf(src.loc) A.name = src.created_name @@ -364,7 +371,7 @@ text("[src.oddbutton ? "Yes" : "No" else if (istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 854e0898810..92cc9281ef9 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -242,7 +242,7 @@ Auto Patrol: []"}, var/mob/living/carbon/M = src.target var/maxstuns = 4 if (istype(M, /mob/living/carbon/human)) - if (M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 10 && (!(HULK in M.mutations)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 M.Stun(10) M.Weaken(10) @@ -869,7 +869,7 @@ Auto Patrol: []"}, else if(istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm index 44cfca6938a..ad4ee1528c1 100644 --- a/code/game/machinery/bots/floorbot.dm +++ b/code/game/machinery/bots/floorbot.dm @@ -400,7 +400,7 @@ del(src) else if (istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) @@ -422,7 +422,7 @@ del(src) else if (istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index a0cdfb5be6b..cc149ad015b 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -575,7 +575,7 @@ else if(istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 9d720356481..4dde1c71209 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + // Mulebot - carries crates around for Quartermaster // Navigates via floor navbeacons // Remote Controlled from QM's PDA @@ -52,17 +54,16 @@ // the installed power cell // constants for internal wiring bitflags - var/const - wire_power1 = 1 // power connections - wire_power2 = 2 - wire_mobavoid = 4 // mob avoidance - wire_loadcheck = 8 // load checking (non-crate) - wire_motor1 = 16 // motor wires - wire_motor2 = 32 // - wire_remote_rx = 64 // remote recv functions - wire_remote_tx = 128 // remote trans status - wire_beacon_rx = 256 // beacon ping recv - wire_beacon_tx = 512 // beacon ping trans + var/const/wire_power1 = 1 // power connections + var/const/wire_power2 = 2 + var/const/wire_mobavoid = 4 // mob avoidance + var/const/wire_loadcheck = 8 // load checking (non-crate) + var/const/wire_motor1 = 16 // motor wires + var/const/wire_motor2 = 32 // + var/const/wire_remote_rx = 64 // remote recv functions + var/const/wire_remote_tx = 128 // remote trans status + var/const/wire_beacon_rx = 256 // beacon ping recv + var/const/wire_beacon_tx = 512 // beacon ping trans var/wires = 1023 // all flags on @@ -377,7 +378,7 @@ if("setid") refresh=0 - var/new_id = input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null + var/new_id = copytext(sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null),1,MAX_NAME_LEN) refresh=1 if(new_id) suffix = new_id @@ -801,6 +802,7 @@ H.apply_damage(0.5*damage, BRUTE, "r_arm") var/obj/effect/decal/cleanable/blood/B = new(src.loc) + B.blood_DNA = list() B.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type bloodiness += 4 @@ -962,4 +964,4 @@ new /obj/effect/decal/cleanable/oil(src.loc) unload(0) - del(src) \ No newline at end of file + del(src) diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 87ae8f6be81..46905532dbf 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -223,7 +223,7 @@ Auto Patrol: []"}, var/mob/living/carbon/M = src.target var/maxstuns = 4 if(istype(M, /mob/living/carbon/human)) - if(M.stuttering < 10 && (!(M.mutations & HULK))) + if(M.stuttering < 10 && (!(HULK in M.mutations))) M.stuttering = 10 M.Stun(10) M.Weaken(10) @@ -761,7 +761,7 @@ Auto Patrol: []"}, else if(istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 4b5095d19a9..d69651546d6 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/machinery/cell_charger name = "cell charger" @@ -9,9 +11,8 @@ idle_power_usage = 5 active_power_usage = 60 power_channel = EQUIP - var - obj/item/weapon/cell/charging = null - chargelevel = -1 + var/obj/item/weapon/cell/charging = null + var/chargelevel = -1 proc updateicon() icon_state = "ccharger[charging ? 1 : 0]" @@ -49,7 +50,7 @@ if(!isarea(a)) return if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power! - user << "\red The charger rejects the cell!" + user << "\red \The [src] blinks red as you try to insert the cell!" return user.drop_item() diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index ff74b59b712..41e9701f311 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -52,6 +52,7 @@ dat += "(Disable Safety Protocols?)
" dat += "
" dat += "Safety Protocols are ENABLED
" + user << browse(dat, "window=computer;size=400x500") onclose(user, "computer") @@ -91,13 +92,13 @@ loadProgram(target) else if(href_list["burntest"]) - if(!emagged) return + if(safety) return target = locate(/area/holodeck/source_burntest) if(target) loadProgram(target) else if(href_list["wildlifecarp"]) - if(!emagged) return + if(safety) return target = locate(/area/holodeck/source_wildlife) if(target) loadProgram(target) @@ -119,6 +120,8 @@ /obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) +//Warning, uncommenting this can have concequences. For example, deconstructing the computer may cause holographic eswords to never derez + /* if(istype(D, /obj/item/weapon/screwdriver)) playsound(src.loc, 'Screwdriver.ogg', 50, 1) if(do_after(user, 20)) @@ -166,6 +169,30 @@ // if(target) // loadProgram(target) +//This could all be done better, but it works for now. +/obj/machinery/computer/HolodeckControl/Del() + emergencyShutdown() + ..() + +/obj/machinery/computer/HolodeckControl/meteorhit(var/obj/O as obj) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/emp_act(severity) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/ex_act(severity) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/blob_act() + emergencyShutdown() + ..() + /obj/machinery/computer/HolodeckControl/process() @@ -282,7 +309,18 @@ T.hotspot_expose(50000,50000,1) +/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown() + //Get rid of any items + for(var/item in holographic_items) + derez(item) + //Turn it back to the regular non-holographic room + target = locate(/area/holodeck/source_plating) + if(target) + loadProgram(target) + var/area/targetsource = locate(/area/holodeck/source_plating) + targetsource.copy_contents_to(linkedholodeck , 1) + active = 0 @@ -371,7 +409,6 @@ "\red You hear a whine as \the [src]'s is hit by something dense.") H.UpdateDamageIcon() H.updatehealth() - H.update_clothing() playsound(src.loc, 'tablehit1.ogg', 50, 1, -3) else //Lets do REAL DAMAGE, YEAH! G.affecting.attack_log += text("\[[time_stamp()]\] Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])") @@ -380,6 +417,7 @@ log_admin("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.") message_admins("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.") log_attack("[G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.") + if(prob(25)) add_blood(G.affecting) affecting.take_damage(rand(10,15), 0) @@ -388,20 +426,20 @@ affecting.take_damage(rand(0,5), 0) //Extra damage if(dented) G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\ - "\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ + "\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n\black [prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") else - dented = 1 G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\ - "\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ + "\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n\black [prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") + dented++ else if(prob(50)) - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\ - "\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.") else - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\ - "\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.") else affecting.take_damage(rand(5,10), 0) @@ -410,7 +448,6 @@ "\red You hear the nauseating crunch of bone and gristle on solid metal.") H.UpdateDamageIcon() H.updatehealth() - H.update_clothing() playsound(src.loc, 'tablehit1.ogg', 50, 1, -3) return G.affecting.loc = src.loc diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 213ff565467..b8cc1c70a34 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/operating name = "Operating Computer" density = 1 @@ -5,9 +7,8 @@ desc = "Used to monitor status of people being operated on." icon_state = "operating" circuit = "/obj/item/weapon/circuitboard/operating" - var - mob/living/carbon/human/victim = null - obj/machinery/optable/table = null + var/mob/living/carbon/human/victim = null + var/obj/machinery/optable/table = null /obj/machinery/computer/operating/New() ..() @@ -93,4 +94,4 @@ if(!(stat & (NOPOWER|BROKEN)) ) use_power(500) - src.updateDialog() \ No newline at end of file + src.updateDialog() diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index f01c55134a8..1b862426fd6 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,3 +1,18 @@ +/obj/machinery/computer/arcade + name = "arcade machine" + desc = "Does not support Pinball." + icon = 'computer.dmi' + icon_state = "arcade" + circuit = "/obj/item/weapon/circuitboard/arcade" + var/enemy_name = "Space Villian" + var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc + var/player_hp = 30 //Player health/attack points + var/player_mp = 10 + var/enemy_hp = 45 //Enemy health/attack points + var/enemy_mp = 20 + var/gameover = 0 + var/blocked = 0 //Player cannot attack/heal while set + /obj/machinery/computer/arcade var/turtle = 0 @@ -224,3 +239,24 @@ src.updateUsrDialog() + else if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/arcade/M = new /obj/item/weapon/circuitboard/arcade( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 659f98b9395..820344c08fe 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -1,13 +1,15 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/machinery/computer/atmos_alert name = "Atmospheric Alert Computer" desc = "Used to access the station's atmospheric sensors." + circuit = "/obj/item/weapon/circuitboard/atmos_alert" icon_state = "alert:0" - var - list/priority_alarms = list() - list/minor_alarms = list() - receive_frequency = 1437 - datum/radio_frequency/radio_connection + var/list/priority_alarms = list() + var/list/minor_alarms = list() + var/receive_frequency = 1437 + var/datum/radio_frequency/radio_connection initialize() @@ -102,4 +104,27 @@ if(ckey(zone) == removing_zone) minor_alarms -= zone update_icon() - return \ No newline at end of file + return + + attackby(I as obj, user as mob) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/atmos_alert/M = new /obj/item/weapon/circuitboard/atmos_alert( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 826eb0eb2ce..cfcef2eb3b7 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/structure/computerframe density = 1 anchored = 0 @@ -17,16 +19,15 @@ icon_state = "id_mod" item_state = "electronic" origin_tech = "programming=2" - var - id = null - frequency = null - build_path = null - board_type = "computer" - list/req_components = null - powernet = null - list/records = null - frame_desc = null - contain_parts = 1 + var/id = null + var/frequency = null + var/build_path = null + var/board_type = "computer" + var/list/req_components = null + var/powernet = null + var/list/records = null + var/frame_desc = null + var/contain_parts = 1 /obj/item/weapon/circuitboard/aicore name = "Circuit board (AI core)" @@ -192,7 +193,6 @@ name = "Circuit board (Telecommunications Server Monitor)" build_path = "/obj/machinery/computer/telecomms/server" origin_tech = "programming=3" - /obj/item/weapon/circuitboard/comm_traffic name = "Circuitboard (Telecommunications Traffic Control)" build_path = "/obj/machinery/computer/telecomms/traffic" @@ -201,11 +201,30 @@ /obj/item/weapon/circuitboard/curefab name = "Circuit board (Cure fab)" build_path = "/obj/machinery/computer/curer" - /obj/item/weapon/circuitboard/splicer name = "Circuit board (Disease Splicer)" build_path = "/obj/machinery/computer/diseasesplicer" +/obj/item/weapon/circuitboard/mining_shuttle + name = "Circuit board (Mining Shuttle)" + build_path = "/obj/machinery/computer/mining_shuttle" + origin_tech = "programming=2" +/obj/item/weapon/circuitboard/HolodeckControl // Not going to let people get this, but it's just here for future + name = "Circuit board (Holodeck Control)" + build_path = "/obj/machinery/computer/HolodeckControl" + origin_tech = "programming=4" +/obj/item/weapon/circuitboard/aifixer + name = "Circuit board (AI Integrity Fixer)" + build_path = "/obj/machinery/computer/aifixer" + origin_tech = "programming=3;biotech=2" +/obj/item/weapon/circuitboard/area_atmos + name = "Circuit board (Area Air Control)" + build_path = "/obj/machinery/computer/area_atmos" + origin_tech = "programming=2" +/obj/item/weapon/circuitboard/prison_shuttle + name = "Circuit board (Prison Shuttle)" + build_path = "/obj/machinery/computer/prison_shuttle" + origin_tech = "programming=2" /obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 9e79a702fc4..a04c9c2b188 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -1,15 +1,16 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/card name = "Identification Computer" desc = "A computer used to modify ID cards." icon_state = "id" req_access = list(access_change_ids) circuit = "/obj/item/weapon/circuitboard/card" - var - obj/item/weapon/card/id/scan = null - obj/item/weapon/card/id/modify = null - authenticated = 0.0 - mode = 0.0 - printing = null + var/obj/item/weapon/card/id/scan = null + var/obj/item/weapon/card/id/modify = null + var/authenticated = 0.0 + var/mode = 0.0 + var/printing = null /obj/machinery/computer/card/attackby(O as obj, user as mob)//TODO:SANITY @@ -245,7 +246,7 @@ if (authenticated) var/t1 = href_list["assign_target"] if(t1 == "Custom") - var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_MESSAGE_LEN) + var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_NAME_LEN) if(temp_t) t1 = temp_t else diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 2e8b706008b..0decda4165b 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -84,11 +84,13 @@ req_access = list(access_heads) //Only used for record deletion right now. var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning. var/obj/machinery/clonepod/pod1 = null //Linked cloning pod. - var/temp = "Initializing System..." + var/temp = "" + var/scantemp = "Scanner unoccupied" var/menu = 1 //Which menu screen to display var/list/records = list() var/datum/data/record/active_record = null var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything. + var/loading = 0 // Nice loading text var/wantsscan = 1 var/wantspod = 1 var/list/message = list() @@ -97,64 +99,43 @@ ..() spawn(5) updatemodules() - /*src.scanner = locate(/obj/machinery/dna_scannernew, get_step(src, scandir)) - src.pod1 = locate(/obj/machinery/clonepod, get_step(src, poddir)) - - src.temp = "" - if (isnull(src.scanner) && wantsscan) - src.temp += " SCNR-ERROR" - if (isnull(src.pod1) && wantspod) - src.temp += " POD1-ERROR" - else if (wantspod) - src.pod1.connected = src - - if (src.temp == "") - src.temp = "System ready."*/ return return /obj/machinery/computer/cloning/proc/updatemodules() - //world << "UPDATING MODULES" - src.scanner = findscanner()//locate(/obj/machinery/dna_scannernew, get_step(src, WEST)) - src.pod1 = findcloner()//locate(/obj/machinery/clonepod, get_step(src, EAST)) - //world << "SEARCHING FOR MACHEIN" - //src.temp = "" - //if (isnull(src.scanner)) - // src.temp += " SCNR-ERROR" - if (!isnull(src.pod1) && !wantspod) - src.pod1.connected = src - // src.temp += " POD1-ERROR" - //else + src.scanner = findscanner() + src.pod1 = findcloner() - //if (src.temp == "") - // src.temp = "System ready." + if (!isnull(src.pod1) && !wantspod) + src.pod1.connected = src // Some variable the pod needs /obj/machinery/computer/cloning/proc/findscanner() - //..() - //world << "SEARCHING FOR SCANNER" var/obj/machinery/dna_scannernew/scannerf = null + + // Loop through every direction for(dir in list(1,2,4,8,5,6,9,10)) - //world << "SEARCHING IN [dir]" + + // Try to find a scanner in that direction scannerf = locate(/obj/machinery/dna_scannernew, get_step(src, dir)) + + // If found, then we break, and return the scanner if (!isnull(scannerf)) - //world << "FOUND" break - if(isnull(scannerf) && wantsscan) - src.temp += " SCNR-ERROR" + + + // If no scanner was found, it will return null return scannerf /obj/machinery/computer/cloning/proc/findcloner() - //..() - //world << "SEARCHING FOR POD" var/obj/machinery/clonepod/podf = null + for(dir in list(1,2,4,8,5,6,9,10)) - //world << "SEARCHING IN [dir]" + podf = locate(/obj/machinery/clonepod, get_step(src, dir)) + if (!isnull(podf)) - //world << "FOUND" break - if(isnull(podf) && wantspod) - src.temp += " POD1-ERROR" + return podf /obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob) @@ -199,19 +180,22 @@ dat += "

Scanner Functions

" if (isnull(src.scanner)) - dat += "No scanner connected!" + dat += "No scanner connected!
" else if (src.scanner.occupant) - dat += "Scan - [src.scanner.occupant]" + if(scantemp == "Scanner unoccupied") scantemp = "" // Stupid check to remove the text + + dat += "Scan - [src.scanner.occupant]
" else dat += "Scanner unoccupied" - dat += "
Lock status: [src.scanner.locked ? "Locked" : "Unlocked"]" + dat += "Lock status: [src.scanner.locked ? "Locked" : "Unlocked"]
" - dat += "

Database Functions

" - dat += "View Records
" - if (src.diskette) - dat += "Eject Disk" + // Database + dat += "

Database Functions

" + dat += "View Records
" + if (src.diskette) + dat += "Eject Disk" if(2) @@ -271,8 +255,21 @@ if(..()) return + if(loading) + return + if ((href_list["scan"]) && (!isnull(src.scanner))) - src.scan_mob(src.scanner.occupant) + scantemp = "" + + loading = 1 + src.updateUsrDialog() + + spawn(20) + src.scan_mob(src.scanner.occupant) + + loading = 0 + src.updateUsrDialog() + //No locking an open scanner. else if ((href_list["lock"]) && (!isnull(src.scanner))) @@ -397,7 +394,7 @@ // if ((!subject.ckey) || (!subject.client)) // src.temp = "Error: Mental interface failure." // return - if (subject.mutations & HUSK) + if (NOCLONE in subject.mutations) src.temp = "Error: Mental interface failure." return if (!isnull(find_record(subject.ckey))) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index fb4b4e1b2f9..322d548e7ed 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + // The communications computer /obj/machinery/computer/communications name = "Communications Console" @@ -16,17 +18,16 @@ var/message_cooldown = 0 var/centcomm_message_cooldown = 0 var/tmp_alertlevel = 0 - var/const - STATE_DEFAULT = 1 - STATE_CALLSHUTTLE = 2 - STATE_CANCELSHUTTLE = 3 - STATE_MESSAGELIST = 4 - STATE_VIEWMESSAGE = 5 - STATE_DELMESSAGE = 6 - STATE_STATUSDISPLAY = 7 - STATE_ALERT_LEVEL = 8 - STATE_CONFIRM_LEVEL = 9 - STATE_CREWTRANSFER = 10 + var/const/STATE_DEFAULT = 1 + var/const/STATE_CALLSHUTTLE = 2 + var/const/STATE_CANCELSHUTTLE = 3 + var/const/STATE_MESSAGELIST = 4 + var/const/STATE_VIEWMESSAGE = 5 + var/const/STATE_DELMESSAGE = 6 + var/const/STATE_STATUSDISPLAY = 7 + var/const/STATE_ALERT_LEVEL = 8 + var/const/STATE_CONFIRM_LEVEL = 9 + var/const/STATE_CREWTRANSFER = 10 var/status_display_freq = "1435" var/stat_msg1 @@ -98,7 +99,7 @@ if("announce") if(src.authenticated==2) if(message_cooldown) return - var/input = input(usr, "Please choose a message to announce to the station crew.", "What?", "") + var/input = copytext(sanitize(input(usr, "Please choose a message to announce to the station crew.", "What?", "")),1,MAX_MESSAGE_LEN) if(!input || !(usr in view(1,src))) return captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain @@ -187,7 +188,7 @@ if(centcomm_message_cooldown) usr << "Arrays recycling. Please stand by." return - var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + var/input = copytext(sanitize(input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")),1,MAX_MESSAGE_LEN) if(!input || !(usr in view(1,src))) return Centcomm_announce(input, usr) @@ -204,7 +205,7 @@ if(centcomm_message_cooldown) usr << "Arrays recycling. Please stand by." return - var/input = input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + var/input = copytext(sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")),1,MAX_MESSAGE_LEN) if(!input || !(usr in view(1,src))) return Syndicate_announce(input, usr) @@ -612,4 +613,4 @@ captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.") world << sound('shuttlecalled.ogg') - ..() \ No newline at end of file + ..() diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index e78c65031b5..ef311774f78 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -161,7 +161,7 @@ Pod/Blast Doors computer M.fields["id"] = G.fields["id"] S.fields["name"] = G.fields["name"] S.fields["id"] = G.fields["id"] - if (H.gender == FEMALE) + if(H.gender == FEMALE) G.fields["sex"] = "Female" else G.fields["sex"] = "Male" @@ -171,21 +171,58 @@ Pod/Blast Doors computer G.fields["m_stat"] = "Stable" M.fields["b_type"] = text("[]", H.dna.b_type) M.fields["b_dna"] = H.dna.unique_enzymes - M.fields["mi_dis"] = "None" - M.fields["mi_dis_d"] = "No minor disabilities have been declared." - M.fields["ma_dis"] = "None" - M.fields["ma_dis_d"] = "No major disabilities have been diagnosed." + + var/minor_dis = null + if(H.disabilities) + if(H.disabilities & 1) + minor_dis += "Myopia, " + if(H.disabilities & 4) + minor_dis += "Persistant Cough, " + if(H.disabilities & 16) + minor_dis += "Stuttering, " + if(minor_dis) + M.fields["mi_dis"] = minor_dis + else + M.fields["mi_dis"] = "None" + + M.fields["mi_dis_d"] = "No additional minor disability notes." + + var/major_dis = null + if(H.disabilities) + if(H.disabilities & 2) + major_dis += "Epilepsy, " + if(H.disabilities & 8) + major_dis += "Tourette's Syndrome, " + if(H.disabilities & 32) + major_dis += "Deafness, " + if(major_dis) + M.fields["ma_dis"] = major_dis + else + M.fields["ma_dis"] = "None" + + M.fields["ma_dis_d"] = "No additional major disability notes." M.fields["alg"] = "None" - M.fields["alg_d"] = "No allergies have been detected in this patient." + M.fields["alg_d"] = "No additional allergy notes." M.fields["cdi"] = "None" - M.fields["cdi_d"] = "No diseases have been diagnosed at the moment." - M.fields["notes"] = "No notes." + M.fields["cdi_d"] = "No additional disease notes." + + if(H.med_record && !jobban_isbanned(H, "Records")) + M.fields["notes"] = H.med_record + else + M.fields["notes"] = "No notes found." + S.fields["criminal"] = "None" S.fields["mi_crim"] = "None" S.fields["mi_crim_d"] = "No minor crime convictions." S.fields["ma_crim"] = "None" S.fields["ma_crim_d"] = "No major crime convictions." - S.fields["notes"] = "No notes." + + if(H.sec_record && !jobban_isbanned(H, "Records")) + S.fields["notes"] = H.sec_record + else + S.fields["notes"] = "No notes." + + //Begin locked reporting L.fields["name"] = H.real_name diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 382c267cbbe..319c5f0a7db 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -1,4 +1,14 @@ /obj/machinery/computer/crew + name = "Crew monitoring computer" + desc = "Used to monitor active health sensors built into most of the crew's uniforms." + icon_state = "crew" + use_power = 1 + idle_power_usage = 250 + active_power_usage = 500 + circuit = "/obj/item/weapon/circuitboard/crew" + var/list/tracked = list( ) + + New() tracked = list() ..() @@ -46,8 +56,8 @@ proc interact(mob/user) - if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) ) - if (!istype(user, /mob/living/silicon)) + if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) ) + if(!istype(user, /mob/living/silicon)) user.machine = null user << browse(null, "window=powcomp") return @@ -58,33 +68,31 @@ t += "
Close" t += "" for(var/obj/item/clothing/under/C in src.tracked) - if((C) && (C.has_sensor) && (C.loc) && (C.loc.z == 1)) + if((C) && (C.has_sensor) && (C.loc) && (C.loc.z == 1) && C.sensor_mode) if(istype(C.loc, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C.loc var/dam1 = round(H.getOxyLoss(),1) var/dam2 = round(H.getToxLoss(),1) var/dam3 = round(H.getFireLoss(),1) var/dam4 = round(H.getBruteLoss(),1) + + if(H.wear_id) + t += "" + else + t += "" switch(C.sensor_mode) if(1) - if(H.wear_id) - t += "" + t+= "" if(2) - if(H.wear_id) - t += "" + t += "" if(3) - t += "" + t += "" t += "
NameVitalsPosition
[H.wear_id.name]
Unknown:
[H.wear_id.name]" - else - t += "
Unknown:" - t+= "[H.stat > 1 ? "Deceased" : "Living"]Not Available
[H.stat > 1 ? "Deceased" : "Living"]Not Available
[H.wear_id.name]" - else - t += "
Unknown:" - t += "[H.stat > 1 ? "Deceased" : "Living"], [dam1] - [dam2] - [dam3] - [dam4]Not Available
[H.stat > 1 ? "Deceased" : "Living"], [dam1] - [dam2] - [dam3] - [dam4]Not Available
[H.name][H.stat > 1 ? "Deceased" : "Living"], [dam2] - [dam2] - [dam3] - [dam4][get_area(H)] ([H.x], [H.y])
[H.stat > 1 ? "Deceased" : "Living"], [dam2] - [dam2] - [dam3] - [dam4][get_area(H)] ([H.x], [H.y])
" t += "" - user << browse(t, "window=crewcomp;size=500x800") + user << browse(t, "window=crewcomp;size=900x600") onclose(user, "crewcomp") + scan() for(var/obj/item/clothing/under/C in world) if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human))) diff --git a/code/game/machinery/computer/hologram.dm b/code/game/machinery/computer/hologram.dm index 278a0704ff8..52866919b03 100644 --- a/code/game/machinery/computer/hologram.dm +++ b/code/game/machinery/computer/hologram.dm @@ -1,15 +1,16 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/hologram_comp name = "Hologram Computer" desc = "Rumoured to control holograms." icon = 'stationobjs.dmi' icon_state = "holo_console0" - var - obj/machinery/hologram/projector/projector = null - temp = null - lumens = 0.0 - h_r = 245.0 - h_g = 245.0 - h_b = 245.0 + var/obj/machinery/hologram/projector/projector = null + var/temp = null + var/lumens = 0.0 + var/h_r = 245.0 + var/h_g = 245.0 + var/h_b = 245.0 /obj/machinery/computer/hologram_comp/New() @@ -105,4 +106,4 @@ for(var/mob/M in viewers(1, src)) if ((M.client && M.machine == src)) src.show_console(M) - return \ No newline at end of file + return diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 7f55918b62a..14b1e5b4e80 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -1,11 +1,12 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/aiupload name = "AI Upload" desc = "Used to upload laws to the AI." icon_state = "command" circuit = "/obj/item/weapon/circuitboard/aiupload" - var - mob/living/silicon/ai/current = null - opened = 0 + var/mob/living/silicon/ai/current = null + var/opened = 0 verb/AccessInternals() @@ -188,4 +189,4 @@ for(var/obj/item/weapon/aiModule/M in src) M.loc = src.loc M.ex_act(severity) - del(src) \ No newline at end of file + del(src) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 56b5e8c1af5..c377c6d8de7 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -1,22 +1,23 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/med_data//TODO:SANITY name = "Medical Records" desc = "This can be used to check medical records." icon_state = "medcomp" req_access = list(access_medical) circuit = "/obj/item/weapon/circuitboard/med_data" - var - obj/item/weapon/card/id/scan = null - obj/item/weapon/disk/records/disk = null - authenticated = null - rank = null - screen = null - datum/data/record/active1 = null - datum/data/record/active2 = null - a_id = null - temp = null - printing = null - list/Perp - tempname = null + var/obj/item/weapon/card/id/scan = null + var/obj/item/weapon/disk/records/disk = null + var/authenticated = null + var/rank = null + var/screen = null + var/datum/data/record/active1 = null + var/datum/data/record/active2 = null + var/a_id = null + var/temp = null + var/printing = null + var/list/Perp + var/tempname = null /obj/machinery/computer/med_data/attackby(obj/item/O as obj, user as mob) @@ -293,7 +294,7 @@ switch(href_list["field"]) if("fingerprint") if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text + var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["fingerprint"] = t1 @@ -305,55 +306,55 @@ src.active1.fields["sex"] = "Male" if("age") if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text + var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["age"] = t1 if("mi_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text + var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis"] = t1 if("mi_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis_d"] = t1 if("ma_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text + var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis"] = t1 if("ma_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis_d"] = t1 if("alg") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text + var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg"] = t1 if("alg_d") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg_d"] = t1 if("cdi") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text + var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi"] = t1 if("cdi_d") if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi_d"] = t1 @@ -362,6 +363,8 @@ var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return + t1 = copytext(t1, 1, MAX_PAPER_MESSAGE_LEN) + t1 = html_encode(t1) src.active2.fields["notes"] = t1 if("p_stat") if (istype(src.active1, /datum/data/record)) @@ -374,7 +377,7 @@ src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if("b_dna") if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text + var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["dna"] = t1 @@ -475,7 +478,7 @@ if (!( istype(src.active2, /datum/data/record) )) return var/a2 = src.active2 - var/t1 = input("Add Comment:", "Med. records", null, null) as message + var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return var/counter = 1 diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 51f00e6115c..8deb695af05 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -1,12 +1,13 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/pod name = "Pod Launch Control" desc = "A control for launching pods." icon_state = "computer_generic" - var - id = 1.0 - obj/machinery/mass_driver/connected = null - timing = 0.0 - time = 30.0 + var/id = 1.0 + var/obj/machinery/mass_driver/connected = null + var/timing = 0.0 + var/time = 30.0 /obj/machinery/computer/pod/New() diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index efde1f1f012..f478d8656e6 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -1,16 +1,17 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/prisoner name = "Prisoner Management" icon = 'computer.dmi' icon_state = "explosive" req_access = list(access_armory) circuit = "/obj/item/weapon/circuitboard/prisoner" - var - id = 0.0 - temp = null - status = 0 - timeleft = 60 - stop = 0.0 - screen = 0 // 0 - No Access Denied, 1 - Access allowed + var/id = 0.0 + var/temp = null + var/status = 0 + var/timeleft = 60 + var/stop = 0.0 + var/screen = 0 // 0 - No Access Denied, 1 - Access allowed attack_ai(var/mob/user as mob) @@ -94,7 +95,8 @@ usr << "Unauthorized Access." else if(href_list["warn"]) - var/warning = input(usr,"Message:","Enter your message here!","") + var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN) + if(!warning) return var/obj/item/weapon/implant/I = locate(href_list["warn"]) if((I)&&(I.imp_in)) var/mob/living/carbon/R = I.imp_in diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 567d4e23b2b..ac42241001a 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/robotics name = "Robotics Control" @@ -7,13 +9,12 @@ req_access = list(access_robotics) circuit = "/obj/item/weapon/circuitboard/robotics" - var - id = 0.0 - temp = null - status = 0 - timeleft = 60 - stop = 0.0 - screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text + var/id = 0.0 + var/temp = null + var/status = 0 + var/timeleft = 60 + var/stop = 0.0 + var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text /obj/machinery/computer/robotics/attack_ai(var/mob/user as mob) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 0790bc4af8b..6d06e4af8ba 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -1,23 +1,24 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/computer/secure_data name = "Security Records" desc = "Used to view and edit personnel's security records" icon_state = "security" req_access = list(access_security) circuit = "/obj/item/weapon/circuitboard/secure_data" - var - obj/item/weapon/card/id/scan = null - obj/item/weapon/disk/records/disk = null - authenticated = null - rank = null - screen = null - datum/data/record/active1 = null - datum/data/record/active2 = null - a_id = null - temp = null - printing = null - can_change_id = 0 - list/Perp - tempname = null + var/obj/item/weapon/card/id/scan = null + var/obj/item/weapon/disk/records/disk = null + var/authenticated = null + var/rank = null + var/screen = null + var/datum/data/record/active1 = null + var/datum/data/record/active2 = null + var/a_id = null + var/temp = null + var/printing = null + var/can_change_id = 0 + var/list/Perp + var/tempname = null /obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob) @@ -348,7 +349,7 @@ What a mess.*/ if (!( istype(active2, /datum/data/record) )) return var/a2 = active2 - var/t1 = input("Add Comment:", "Secure. records", null, null) as message + var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return var/counter = 1 @@ -415,13 +416,13 @@ What a mess.*/ active1.fields["name"] = t1 if("id") if (istype(active2, /datum/data/record)) - var/t1 = input("Please input id:", "Secure. records", active1.fields["id"], null) as text + var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["id"] = t1 if("fingerprint") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text + var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["fingerprint"] = t1 @@ -433,31 +434,31 @@ What a mess.*/ active1.fields["sex"] = "Male" if("age") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as text + var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["age"] = t1 if("mi_crim") if (istype(active2, /datum/data/record)) - var/t1 = input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text + var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim"] = t1 if("mi_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim_d"] = t1 if("ma_crim") if (istype(active2, /datum/data/record)) - var/t1 = input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text + var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim"] = t1 if("ma_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message + var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim_d"] = t1 @@ -466,6 +467,8 @@ What a mess.*/ var/t1 = input("Please summarize notes:", "Secure. records", active2.fields["notes"], null) as message if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return + t1 = copytext(t1, 1, MAX_PAPER_MESSAGE_LEN) + t1 = html_encode(t1) active2.fields["notes"] = t1 if("criminal") if (istype(active2, /datum/data/record)) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index a6db2f9fc99..5c22accd984 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/constructable_frame //Made into a seperate type to make future revisions easier. name = "machine frame" icon = 'stock_parts.dmi' @@ -5,12 +7,11 @@ density = 1 anchored = 1 use_power = 0 - var - obj/item/weapon/circuitboard/circuit = null - list/components = null - list/req_components = null - list/req_component_names = null - state = 1 + var/obj/item/weapon/circuitboard/circuit = null + var/list/components = null + var/list/req_components = null + var/list/req_component_names = null + var/state = 1 proc/update_desc() var/D diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 057e9800c0b..e89d98ed8cf 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -133,7 +133,7 @@ for reference: CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSTABLE)) + if(istype(mover) && mover.pass_flags&PASSTABLE) return 1 else return 0 @@ -260,7 +260,7 @@ for reference: CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSTABLE)) + if(istype(mover) && mover.pass_flags&PASSTABLE) return 1 else return 0 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d6eee904e40..420d36e9178 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -78,6 +78,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. spawnPowerRestoreRunning = 0 welded = null locked = 0 + list/air_locked = 0 wires = 4095 aiDisabledIdScanner = 0 aiHacking = 0 @@ -342,12 +343,14 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. icon_state = "door_locked" else icon_state = "door_closed" - if(p_open || welded) + if(p_open || welded || air_locked) overlays = list() if(p_open) overlays += image(icon, "panel_open") if(welded) overlays += image(icon, "welded") + if(air_locked) + overlays += image('Door1.dmi', "air") else icon_state = "door_open" return diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 6e169231e65..525bfd43897 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/item/weapon/airlock_electronics name = "Airlock Electronics" icon = 'door_assembly.dmi' @@ -8,12 +10,11 @@ req_access = list(access_engine) - var - list/conf_access = null - last_configurator = null - locked = 1 - style_name = "General" - style = /obj/structure/door_assembly/door_assembly_0 + var/list/conf_access = null + var/last_configurator = null + var/locked = 1 + var/style_name = "General" + var/style = /obj/structure/door_assembly/door_assembly_0 attack_self(mob/user as mob) if (!ishuman(user)) @@ -57,15 +58,12 @@ Topic(href, href_list) ..() - if (usr.stat || usr.restrained()) + if (usr.stat || usr.restrained() || !ishuman(usr)) return if (href_list["close"]) usr << browse(null, "window=airlock") return - if (!ishuman(usr)) - return - if (href_list["login"]) var/obj/item/I = usr.equipped() if (istype(I, /obj/item/device/pda)) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 742934ef4c2..0f245735960 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /////////////////////////////////////////////////////////////////////////////////////////////// // Brig Door control displays. // Description: This is a controls the timer for the brig doors, displays the timer on itself and @@ -14,12 +16,11 @@ req_access = list(access_brig) anchored = 1.0 // can't pick it up density = 0 // can walk through it. - var - id = null // id of door it controls. - releasetime = 0 // when world.time reaches it - release the prisoneer - timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing - picture_state // icon_state of alert picture, if not displaying text/numbers - list/obj/machinery/targets = list() + var/id = null // id of door it controls. + var/releasetime = 0 // when world.time reaches it - release the prisoneer + var/timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing + var/picture_state // icon_state of alert picture, if not displaying text/numbers + var/list/obj/machinery/targets = list() New() @@ -293,4 +294,4 @@ name = "Cell 6" id = "Cell 6" dir = 4 - pixel_x = 32 \ No newline at end of file + pixel_x = 32 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index fb7b3c6a1b3..50fdb03b0cf 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /obj/machinery/door name = "Door" desc = "It opens and closes." @@ -8,15 +10,14 @@ density = 1 layer = 2.7 - var - secondsElectrified = 0 - visible = 1 - p_open = 0 - operating = 0 - autoclose = 0 - glass = 0 - forcecrush = 0 - holdopen = 0 + var/secondsElectrified = 0 + var/visible = 1 + var/p_open = 0 + var/operating = 0 + var/autoclose = 0 + var/glass = 0 + var/forcecrush = 0 + var/holdopen = 0 proc/bumpopen(mob/user as mob) proc/update_nearby_tiles(need_rebuild) @@ -31,7 +32,11 @@ layer = 3.1 //Above most items if closed else layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 - update_nearby_tiles(need_rebuild=1) + if(world.time < 10) + spawn(10) + update_nearby_tiles(need_rebuild=1) + else + update_nearby_tiles(need_rebuild=1) return @@ -80,7 +85,7 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group) return 0 - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags&PASSGLASS) return !opacity return !density @@ -116,7 +121,7 @@ attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/device/detective_scanner)) - return ..() + return if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them. src.add_fingerprint(user) if(!src.requiresID()) @@ -267,12 +272,12 @@ if (src.operating) return src.operating = 1 - + var/X = src:x var/Y = src:y var/Z = src:z var/held = 1 - + if(src.holdopen && !forcecrush) while(held == 1 && holdopen && !forcecrush) //If it is no longer hold open, it should close. sleep(held? 10:40) @@ -288,25 +293,25 @@ spawn(4) if(!istype(src, /obj/machinery/door/window)) for(var/mob/living/L in src.loc) // Crush mobs and move them out of the way - + if(src.forcecrush) // Save an AI, crush a limb var/limbname = pick("l_arm", "r_arm", "l_hand","r_hand", "l_foot", "r_foot") var/limbdisplay - + for(var/organ in L:organs) var/datum/organ/external/temp = L:organs["[organ]"] if (istype(temp, /datum/organ/external) && temp.name == limbname) limbdisplay = temp.display_name // Take the name for down below temp.take_damage(rand(50,80), 0) //OH GOD IT HURTS break - + L << "\red The airlock crushes your [limbdisplay]!" for(var/mob/O in viewers(L, null)) if(O == L) continue O.show_message("\red The airlock crushes [L.name]'s [limbdisplay]!", 1) sleep(rand(2,8)) - + L << "\red The airlock forces you out of the way!" //Lucky you for(var/mob/O in viewers(L, null)) O.show_message("\red The airlock pushes [L.name] out of the way!", 1) @@ -314,7 +319,7 @@ var/turf/T = get_random_turf(L, lst) if(T) L.loc = T - + if(!src.forcecrush) for(var/obj/item/I in src.loc) // Move items out of the way if(!I.anchored) @@ -322,10 +327,10 @@ var/turf/T = get_random_turf(I, lst) if(T) I.loc = T - + sleep(6) update_icon() - + if(src.visible && (!src.glass)) src.sd_SetOpacity(1) if(operating == 1) @@ -337,44 +342,17 @@ update_nearby_tiles(need_rebuild) if(!air_master) return 0 - var/turf/simulated/source = loc + var/turf/simulated/source = get_turf(src) var/turf/simulated/north = get_step(source,NORTH) var/turf/simulated/south = get_step(source,SOUTH) var/turf/simulated/east = get_step(source,EAST) var/turf/simulated/west = get_step(source,WEST) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(north)) - if(north.parent) - air_master.groups_to_rebuild += north.parent - else - air_master.tiles_to_update += north - if(istype(south)) - if(south.parent) - air_master.groups_to_rebuild += south.parent - else - air_master.tiles_to_update += south - if(istype(east)) - if(east.parent) - air_master.groups_to_rebuild += east.parent - else - air_master.tiles_to_update += east - if(istype(west)) - if(west.parent) - air_master.groups_to_rebuild += west.parent - else - air_master.tiles_to_update += west - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(north)) air_master.tiles_to_update += north - if(istype(south)) air_master.tiles_to_update += south - if(istype(east)) air_master.tiles_to_update += east - if(istype(west)) air_master.tiles_to_update += west + if(istype(source)) air_master.tiles_to_update |= source + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return 1 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 41462f0b0ce..f1c02c30bb2 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -87,41 +87,4 @@ return - -//border_only fire doors are special when it comes to air groups -/obj/machinery/door/firedoor/border_only - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group) - var/direction = get_dir(src,target) - return (dir != direction) - else if(density) - if(!height) - var/direction = get_dir(src,target) - return (dir != direction) - else - return 0 - return 1 - - - update_nearby_tiles(need_rebuild) - if(!air_master) return 0 - - var/turf/simulated/source = loc - var/turf/simulated/destination = get_step(source,dir) - - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(destination)) - if(destination.parent) - air_master.groups_to_rebuild += destination.parent - else - air_master.tiles_to_update += destination - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(destination)) air_master.tiles_to_update += destination - return 1 \ No newline at end of file +/obj/machinery/door/firedoor/border_only \ No newline at end of file diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 50baa203d0d..dfa6f2ccb03 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -1,34 +1,24 @@ /obj/machinery/door/window name = "interior door" - desc = "A door made from a window, yet it can not break nor be depowered." + desc = "A strong door." icon = 'windoor.dmi' icon_state = "left" var/base_state = "left" + var/health = 200.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file visible = 0.0 flags = ON_BORDER opacity = 0 + var/obj/item/weapon/airlock_electronics/electronics = null /obj/machinery/door/window/update_nearby_tiles(need_rebuild) if(!air_master) return 0 - var/turf/simulated/source = loc + var/turf/simulated/source = get_turf(src) var/turf/simulated/target = get_step(source,dir) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(target)) - if(target.parent) - air_master.groups_to_rebuild += target.parent - else - air_master.tiles_to_update += target - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(target)) air_master.tiles_to_update += target + if(istype(source)) air_master.tiles_to_update |= source + if(istype(target)) air_master.tiles_to_update |= target return 1 @@ -40,6 +30,11 @@ src.base_state = src.icon_state return +/obj/machinery/door/window/Del() + density = 0 + playsound(src, "shatter", 70, 1) + ..() + /obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj) if (!( ismob(AM) )) var/obj/machinery/bot/bot = AM @@ -70,7 +65,7 @@ return /obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags & PASSGLASS) return 1 if(get_dir(loc, target) == dir) //Make sure looking at appropriate border if(air_group) return 0 @@ -79,7 +74,7 @@ return 1 /obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target as turf) - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags & PASSGLASS) return 1 if(get_dir(loc, target) == dir) return !density @@ -124,13 +119,49 @@ src.operating = 0 return 1 -/obj/machinery/door/window/attackby(obj/item/I as obj, mob/user as mob) +//When an object is thrown at the window +/obj/machinery/door/window/hitby(AM as mob|obj) + + ..() + for(var/mob/O in viewers(src, null)) + O.show_message("\red The glass door was hit by [AM].", 1) + var/tforce = 0 + if(ismob(AM)) + tforce = 40 + else + tforce = AM:throwforce + playsound(src.loc, 'Glasshit.ogg', 100, 1) + src.health = max(0, src.health - tforce) + if (src.health <= 0) + new /obj/item/weapon/shard(src.loc) + var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc) + CC.amount = 2 + src.density = 0 + del(src) + return + //..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak + return + + +/obj/machinery/door/window/attack_ai(mob/user as mob) + return src.attack_hand(user) + + +/obj/machinery/door/window/attack_paw(mob/user as mob) + return src.attack_hand(user) + + +/obj/machinery/door/window/attack_hand(mob/user as mob) + return src.attackby(user, user) + + +/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob) + + //If it's in the process of opening/closing, ignore the click if (src.operating) return - src.add_fingerprint(user) - if (!src.requiresID()) - //don't care who they are or what they have, act as if they're NOTHING - user = null + + //Emags and ninja swords? You may pass. if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade))) if(istype(I, /obj/item/weapon/card/emag)) var/obj/item/weapon/card/emag/E = I @@ -151,24 +182,49 @@ sleep(6) open() return 1 + + //If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway) + if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card)) + var/aforce = I.force + if(I.damtype == BRUTE || I.damtype == BURN) + src.health = max(0, src.health - aforce) + playsound(src.loc, 'Glasshit.ogg', 75, 1) + user.visible_message("\red \The [src] was hit with \a [I] by \the [user]!", "\red You hit \the [src] with \the [I]!", "You hear an object hitting glass.") + if (src.health <= 0) + new /obj/item/weapon/shard(src.loc) + var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc) + CC.amount = 2 + src.density = 0 + del(src) + return + + + src.add_fingerprint(user) + if (!src.requiresID()) + //don't care who they are or what they have, act as if they're NOTHING + user = null + if (src.allowed(user) || istype(I, /obj/item/device/hacktool)) if (src.density) open() else close() + else if (src.density) flick(text("[]deny", src.base_state), src) + return /obj/machinery/door/window/brigdoor - name = "Brig Door" + name = "Secure Door" icon = 'windoor.dmi' icon_state = "leftsecure" base_state = "leftsecure" req_access = list(access_security) var/id = null + health = 500.0 //Stronger doors for prison (regular window door health is 200) /obj/machinery/door/window/northleft @@ -203,7 +259,6 @@ icon_state = "right" base_state = "right" - /obj/machinery/door/window/brigdoor/northleft dir = NORTH diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index ffe411981ed..c9a9faa92ee 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -44,6 +44,7 @@ Possible to do for anyone motivated enough: if(!(stat & NOPOWER)&&user.eyeobj.loc==src.loc)//If the projector has power and client eye is on it. if(!hologram)//If there is not already a hologram. create_holo(user)//Create one. + user.current = src for(var/mob/M in viewers()) M.show_message("A holographic image of [user] flicks to life right before your eyes!",1) else diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 97fae51ebc6..d665d3a473e 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -449,9 +449,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) src.toxic = 0 else if(src.waterlevel >= 100) - user << "\red The [src] is already full." + user << "\red \The [src] is already full." else - user << "\red The bucket is not filled with water." + user << "\red \The [src] is not filled with water." src.updateicon() else if ( istype(O, /obj/item/nutrient) ) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 9c4852d16a5..015a35bc4b1 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -60,6 +60,8 @@ src.sd_SetLuminosity(0) /obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/device/detective_scanner)) + return if (istype(W, /obj/item/weapon/screwdriver)) add_fingerprint(user) src.disable = !src.disable diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index c00d181d9f7..146867ffda8 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -181,7 +181,7 @@ allmeat += newmeat for (var/mob/M in world) - if (M.client && M.client.holder && (M.client.holder.level != -3)) + if (M.client && M.client.holder && (M.client.holder.level != -3) && (M.client.holder.level != 0)) M << "\red [user.name]/[user.ckey] has gibbed [src.occupant.name]/[src.occupant.ckey]" src.occupant.death(1) src.occupant.ghostize() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 583c0f91e10..d45b913bc35 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -222,4 +222,5 @@ Class Procs: /obj/machinery/proc/assign_uid() uid = gl_uid - gl_uid++ \ No newline at end of file + gl_uid++ + diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 46385e4686a..f7dd8539ad8 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -323,7 +323,7 @@ if(speed <= 0) speed = 1 if("setpath") - var/newpath = input(usr, "Please define a new path!",,path) as text|null + var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN) if(newpath && newpath != "") moving = 0 // stop moving path = newpath diff --git a/code/game/machinery/morgue.dm b/code/game/machinery/morgue.dm index 8c65e0a72f3..0e9f9bdc02a 100644 --- a/code/game/machinery/morgue.dm +++ b/code/game/machinery/morgue.dm @@ -123,7 +123,7 @@ return /obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) - if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src))) + if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O))) return if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag)) return @@ -316,7 +316,9 @@ return /obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) - if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || istype(user, /mob/dead))) + if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O))) + return + if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag)) return O.loc = src.loc if (user != O) diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 88711376da9..fe89e8309ae 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -193,7 +193,7 @@ Transponder Codes:
    "} updateDialog() else if(href_list["locedit"]) - var/newloc = input("Enter New Location", "Navigation Beacon", location) as text|null + var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN) if(newloc) location = newloc updateDialog() diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 0670ee2f25a..0dc206a0085 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -444,9 +444,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //list that will contain r FC.messages += newMsg // To avoid further confusion, this one for adds the message to all existing newscasters' channel_list's channels. break // Another for to go through newscasters is not needed. Due to the nature of submit_new_CHANNEL, every reference src.screen=4 // to a channel in ANY newscaster is the same. Editing one will edit them all. - - for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(src.channel_name) + for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) + NEWSCASTER.newsAlert(src.channel_name) src.updateUsrDialog() diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 20323f858ea..8ccc0b363e1 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -44,7 +44,7 @@ /obj/machinery/pipedispenser/Topic(href, href_list) if(..()) return - if(unwrenched) + if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) usr << browse(null, "window=pipedispenser") return usr.machine = src @@ -119,8 +119,11 @@ Junction
    Y-Junction
    Trunk
    -Sort Junction 1
    -Sort Junction 2
    +Bin
    +Outlet
    +Chute
    +Sort Junction 1
    +Sort Junction 2
    "} user << browse("[src][dat]", "window=pipedispenser") @@ -135,6 +138,9 @@ usr.machine = src src.add_fingerprint(usr) if(href_list["dmake"]) + if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + usr << browse(null, "window=pipedispenser") + return if(!wait) var/p_type = text2num(href_list["dmake"]) var/obj/structure/disposalconstruct/C = new (src.loc) @@ -151,8 +157,17 @@ C.ptype = 5 if(5) C.ptype = 6 + C.density = 1 if(6) C.ptype = 7 + C.density = 1 + if(7) + C.ptype = 8 + C.density = 1 + if(8) + C.ptype = 8 + if(9) + C.ptype = 9 C.update() wait = 1 diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 3310a68b6f2..2df8cb6f5c8 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -732,7 +732,7 @@ Neutralize All Unidentified Life Signs: []
    "}, if (istype(W, /obj/item/weapon/pen)) // you can rename turrets like bots! var/t = input(user, "Enter new turret name", src.name, src.finish_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index dba8093868f..6b1705eec2a 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + obj/machinery/recharger anchored = 1 icon = 'stationobjs.dmi' @@ -7,9 +9,8 @@ obj/machinery/recharger idle_power_usage = 4 active_power_usage = 250 - var - obj/item/weapon/gun/energy/charging = null - obj/item/weapon/melee/baton/charging2 = null + var/obj/item/weapon/gun/energy/charging = null + var/obj/item/weapon/melee/baton/charging2 = null attackby(obj/item/weapon/G as obj, mob/user as mob) if(issilicon(user)) @@ -28,7 +29,7 @@ obj/machinery/recharger if(!isarea(a)) return if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power! - user << "\red The recharger rejects the weapon!" + user << "\red \The [src] blinks red as you try to insert the item!" return user.drop_item() G.loc = src diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 9a02fe6025b..6f59e606fd5 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -203,7 +203,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(reject_bad_text(href_list["write"])) dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name - var/new_message = reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN) if(new_message) message = new_message screen = 9 @@ -218,7 +218,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() priority = -1 if(href_list["writeAnnouncement"]) - var/new_message = reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN) if(new_message) message = new_message switch(href_list["priority"]) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 9bb05f46583..9b98922870b 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -408,38 +408,11 @@ var/turf/simulated/east = get_step(source,EAST) var/turf/simulated/west = get_step(source,WEST) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(north)) - if(north.parent) - air_master.groups_to_rebuild += north.parent - else - air_master.tiles_to_update += north - if(istype(south)) - if(south.parent) - air_master.groups_to_rebuild += south.parent - else - air_master.tiles_to_update += south - if(istype(east)) - if(east.parent) - air_master.groups_to_rebuild += east.parent - else - air_master.tiles_to_update += east - if(istype(west)) - if(west.parent) - air_master.groups_to_rebuild += west.parent - else - air_master.tiles_to_update += west - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(north)) air_master.tiles_to_update += north - if(istype(south)) air_master.tiles_to_update += south - if(istype(east)) air_master.tiles_to_update += east - if(istype(west)) air_master.tiles_to_update += west + if(istype(source)) air_master.tiles_to_update += source + if(istype(north)) air_master.tiles_to_update += north + if(istype(south)) air_master.tiles_to_update += south + if(istype(east)) air_master.tiles_to_update += east + if(istype(west)) air_master.tiles_to_update += west return 1 @@ -502,7 +475,7 @@ /obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags&PASSGLASS) return prob(20) else if (istype(mover, /obj/item/projectile)) diff --git a/code/game/machinery/sink.dm b/code/game/machinery/sink.dm deleted file mode 100644 index e89b11828dd..00000000000 --- a/code/game/machinery/sink.dm +++ /dev/null @@ -1,151 +0,0 @@ -/obj/machinery/sink - name = "sink" - icon = 'device.dmi' - icon_state = "sink" - desc = "A sink used for washing one's hands and face." - anchored = 1 - var/busy = 0 //Something's being washed at the moment - var/mode = 0 //0 == fill, 1 == pour - - - New() - ..() - verbs += /obj/machinery/sink/proc/mode_pour - - attack_hand(mob/M as mob) - if(isrobot(M) || isAI(M)) - return - - if(busy) - M << "\red Someone's already washing something here." - return - M << "\blue You start washing up." - - busy = 1 - if(do_after(M,40)) - M.clean_blood() - if(istype(M, /mob/living/carbon)) - var/mob/living/carbon/C = M - C.clean_blood() - /* - if(C.r_hand) - C.r_hand.clean_blood() // The hand you attack with is empty anyway, the other one should not be washed while doing this. - if(C.l_hand) - C.l_hand.clean_blood() - - if(C.wear_mask) - C.wear_mask.clean_blood() //- NOPE, Washing machine -Errorage - */ - if(istype(M, /mob/living/carbon/human)) - /*if(C:w_uniform) - C:w_uniform.clean_blood() //- NOPE, Washing machine -Errorage - if(C:wear_suit) - C:wear_suit.clean_blood() //- NOPE, Washing machine -Errorage - if(C:shoes) - C:shoes.clean_blood()*/ //- NOPE, Washing machine -Errorage - if(C:gloves) - C:gloves.clean_blood() - /*if(C:head) - C:head.clean_blood()*/ //- NOPE, Washing machine -Errorage - for(var/mob/V in viewers(src, null)) - V.show_message(text("\blue [M] washes up using \the [src].")) - busy = 0 - - proc/mode_pour() - set name = "Mode -> Pour" - set category = "Object" - set src in oview(1) - - mode = 1 - verbs -= /obj/machinery/sink/proc/mode_pour - verbs += /obj/machinery/sink/proc/mode_fill - usr << "You will now pour reagents down \the [src]." - - proc/mode_fill() - set name = "Mode -> Fill" - set category = "Object" - set src in oview(1) - - mode = 0 - verbs -= /obj/machinery/sink/proc/mode_fill - verbs += /obj/machinery/sink/proc/mode_pour - usr << "You will now fill your container from the faucet." - - attackby(var/obj/item/O as obj, var/mob/user as mob) - if(busy) - user << "\red Someone's already washing something here." - return - - if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket)) - O:reagents.add_reagent("water", 70) - user.visible_message( \ - "\blue [user] fills the [O] using the [src].", \ - "\blue You fill the [O] using the [src].") - return - - if (istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks)) - if(!mode) - // fill - if(O.reagents.total_volume < O.reagents.maximum_volume) - O:reagents.add_reagent("water", 10) - user.visible_message( \ - "\blue [user] fills the [O] using the [src].", \ - "\blue You fill the [O] using the [src].") - else - user.visible_message( \ - "\blue [user] spills water out of the overflowing [O] into the [src].", \ - "\blue You spill water out of the overflowing [O] into the [src].") - else - // pour - if(O.reagents.total_volume > 0) - O.reagents.clear_reagents() - user.visible_message( \ - "\blue [user] pours the contents of \the [O] into \the [src].", \ - "\blue You pour the contents of \the [O] into \the [src].") - else - user << "\The [O] is empty." - return - else if (istype(O, /obj/item/weapon/melee/baton)) - var/obj/item/weapon/melee/baton/B = O - if (B.charges > 0 && B.status == 1) - flick("baton_active", src) - user.Stun(10) - user.stuttering = 10 - user.Weaken(10) - if(isrobot(user)) - var/mob/living/silicon/robot/R = user - R.cell.charge -= 20 - else - B.charges-- - user.visible_message( \ - "[user] was stunned by his wet [O].", \ - "\red You have wet \the [O], it shocks you!") - return - - var/obj/item/I = O - if(!I || !istype(I,/obj/item)) return - - usr << "\blue You start washing up." - - busy = 1 - if(do_after(user,40)) - if(!I) return //Item's been destroyed while washing - - O.clean_blood() - user.visible_message( \ - "\blue [user] washes \a [I] using \the [src].", \ - "\blue You wash \a [I] using \the [src].") - busy = 0 - - shower - name = "Shower" - desc = "This is a shower. Useful for cleaning." - icon_state = "shower" - - kitchen - name = "Kitchen Sink" - icon_state = "sink_alt" - - kitchen2 - name = "Kitchen Sink" - icon_state = "sink_alt2" diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 074c6075f51..6785af80c38 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -118,10 +118,10 @@ var/disp1 var/disp2 if(supply_shuttle_moving) - disp1 = get_supply_shuttle_timer() + disp1 = "SPPLY" + disp2 = get_supply_shuttle_timer() if(lentext(disp1) > 5) disp1 = "**~**" - disp2 = null else if(supply_shuttle_at_station) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 44a4f056236..0031f7cc062 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + // Beacon randomly spawns in space // When a non-traitor (no special role in /mind) uses it, he is given the choice to become a traitor // If he accepts there is a random chance he will be accepted, rejected, or rejected and killed @@ -13,10 +15,9 @@ anchored = 1 density = 1 - var - temptext = "" - selfdestructing = 0 - charges = 1 + var/temptext = "" + var/selfdestructing = 0 + var/charges = 1 attack_hand(var/mob/user as mob) usr.machine = src @@ -113,10 +114,9 @@ layer = MOB_LAYER - 0.1 //so people can't hide it and it's REALLY OBVIOUS stat = 0 - var - active = 0 //It doesn't use up power, so use_power wouldn't really suit it - icontype = "beacon" - obj/structure/cable/attached = null + var/active = 0 //It doesn't use up power, so use_power wouldn't really suit it + var/icontype = "beacon" + var/obj/structure/cable/attached = null proc/Activate(mob/user = null) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index f8d209f6f58..6f42f783f46 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* The broadcaster sends processed messages to all radio devices in the game. They do not have to be headsets; intercoms and station-bounced radios suffice. @@ -5,8 +7,7 @@ They receive their message from a server after the message has been logged. */ -var - list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam +var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam /obj/machinery/telecomms/broadcaster diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 9e4bf23ab9c..e905e2866f3 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -1,16 +1,17 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + /obj/machinery/computer/telecomms/server name = "Telecommunications Server Monitor" icon_state = "comm_logs" - var - screen = 0 // the screen number: - list/servers = list() // the servers located by the computer - var/obj/machinery/telecomms/server/SelectedServer + var/screen = 0 // the screen number: + var/list/servers = list() // the servers located by the computer + var/obj/machinery/telecomms/server/SelectedServer - network = "NULL" // the network to probe - temp = "" // temporary feedback messages + var/network = "NULL" // the network to probe + var/temp = "" // temporary feedback messages - universal_translate = 0 // set to 1 if it can translate nonhuman speech + var/universal_translate = 0 // set to 1 if it can translate nonhuman speech req_access = list(access_tcomsat) @@ -241,4 +242,4 @@ emagged = 1 user << "\blue You you disable the security protocols" src.updateUsrDialog() - return \ No newline at end of file + return diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 7d87be6345b..a513c69f72d 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /* @@ -6,9 +8,8 @@ */ /obj/machinery/telecomms - var - temp = "" // output message - construct_op = 0 + var/temp = "" // output message + var/construct_op = 0 @@ -176,7 +177,7 @@ switch(href_list["input"]) if("id") - var/newid = input(usr, "Specify the new ID for this machine", src, id) as null|text + var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN) if(newid && usr in range(1, src)) id = newid temp = "-% New ID assigned: \"[id]\" %-" @@ -210,9 +211,15 @@ if(href_list["delete"]) - var/x = freq_listening[text2num(href_list["delete"])] - temp = "-% Removed frequency filter [x] %-" - freq_listening.Remove(x) + // changed the layout about to workaround a pesky runtime -- Doohl + + var/freq_remove = text2num(href_list["delete"]) + for(var/x in freq_listening) + if(x == freq_remove) + + temp = "-% Removed frequency filter [x] %-" + freq_listening.Remove(x) + break if(href_list["unlink"]) diff --git a/code/game/machinery/telecomms/telecommunications.dm b/code/game/machinery/telecomms/telecommunications.dm index 3881a10b6b8..3deca03cbad 100644 --- a/code/game/machinery/telecomms/telecommunications.dm +++ b/code/game/machinery/telecomms/telecommunications.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /* Hello, friends, this is Doohl from sexylands. You may be wondering what this monstrous code file is. Sit down, boys and girls, while I tell you the tale. @@ -12,24 +14,23 @@ */ /obj/machinery/telecomms - var - list/links = list() // list of machines this machine is linked to - traffic = 0 // value increases as traffic increases - netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed) - list/autolinkers = list() // list of text/number values to link with - id = "NULL" // identification string - network = "NULL" // the network of the machinery + var/list/links = list() // list of machines this machine is linked to + var/traffic = 0 // value increases as traffic increases + var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed) + var/list/autolinkers = list() // list of text/number values to link with + var/id = "NULL" // identification string + var/network = "NULL" // the network of the machinery - list/freq_listening = list() // list of frequencies to tune into: if none, will listen to all + var/list/freq_listening = list() // list of frequencies to tune into: if none, will listen to all - machinetype = 0 // just a hacky way of preventing alike machines from pairing - on = 1 - integrity = 100 // basically HP, loses integrity by heat - heatgen = 20 // how much heat to transfer to the environment - delay = 10 // how many process() ticks to delay per heat - heating_power = 40000 + var/machinetype = 0 // just a hacky way of preventing alike machines from pairing + var/on = 1 + var/integrity = 100 // basically HP, loses integrity by heat + var/heatgen = 20 // how much heat to transfer to the environment + var/delay = 10 // how many process() ticks to delay per heat + var/heating_power = 40000 - circuitboard = null // string pointing to a circuitboard type + var/circuitboard = null // string pointing to a circuitboard type @@ -166,18 +167,6 @@ if(traffic > 0) traffic -= netspeed - /* Machine checks */ - if(on) - if(machinetype == 2) // bus mainframes - switch(traffic) - if(-100 to 49) - icon_state = initial(icon_state) - if(50 to 200) - icon_state = "bus2" - else - icon_state = "bus3" - - // Check heat and generate some proc/checkheat() // Checks heat from the environment and applies any integrity damage @@ -269,7 +258,7 @@ /obj/machinery/telecomms/bus name = "Bus Mainframe" icon = 'stationobjs.dmi' - icon_state = "bus1" + icon_state = "bus" desc = "A mighty piece of hardware used to send massive amounts of data quickly." density = 1 anchored = 1 @@ -360,22 +349,21 @@ machinetype = 4 heatgen = 50 circuitboard = "/obj/item/weapon/circuitboard/telecomms/server" - var - list/log_entries = list() - list/stored_names = list() - list/TrafficActions = list() - logs = 0 // number of logs - totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes) + var/list/log_entries = list() + var/list/stored_names = list() + var/list/TrafficActions = list() + var/logs = 0 // number of logs + var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes) - list/memory = list() // stored memory - rawcode = "" // the code to compile (raw text) - datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code - autoruncode = 0 // 1 if the code is set to run every time a signal is picked up + var/list/memory = list() // stored memory + var/rawcode = "" // the code to compile (raw text) + var/datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code + var/autoruncode = 0 // 1 if the code is set to run every time a signal is picked up - encryption = "null" // encryption key: ie "password" - salt = "null" // encryption salt: ie "123comsat" + var/encryption = "null" // encryption key: ie "password" + var/salt = "null" // encryption salt: ie "123comsat" // would add up to md5("password123comsat") - language = "human" + var/language = "human" receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) @@ -498,6 +486,8 @@ autolinkers = list("bus2") // Bus units 3 and 4 freq_listening = list(1459, 1353, 1357, 1359) // common, command, engineering, security + + /obj/machinery/telecomms/bus/preset_one id = "Bus 1" network = "tcommsat" @@ -615,3 +605,4 @@ + diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index b777f24a70b..6fbecc441a4 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /* Telecomms monitor tracks the overall trafficing of a telecommunications network @@ -9,14 +11,13 @@ name = "Telecommunications Monitor" icon_state = "comm_monitor" - var - screen = 0 // the screen number: - list/machines = list() // the machines located by the computer - var/obj/machinery/telecomms/SelectedMachine + var/screen = 0 // the screen number: + var/list/machines = list() // the machines located by the computer + var/obj/machinery/telecomms/SelectedMachine - network = "NULL" // the network to probe + var/network = "NULL" // the network to probe - temp = "" // temporary feedback messages + var/temp = "" // temporary feedback messages attack_hand(mob/user as mob) if(stat & (BROKEN|NOPOWER)) @@ -153,4 +154,4 @@ emagged = 1 user << "\blue You you disable the security protocols" src.updateUsrDialog() - return \ No newline at end of file + return diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index 0831fb00c62..0f45a2f43cd 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + @@ -6,18 +8,17 @@ name = "Telecommunications Traffic Control" icon_state = "computer_generic" - var - screen = 0 // the screen number: - list/servers = list() // the servers located by the computer - mob/editingcode - mob/lasteditor - list/viewingcode = list() - obj/machinery/telecomms/server/SelectedServer + var/screen = 0 // the screen number: + var/list/servers = list() // the servers located by the computer + var/mob/editingcode + var/mob/lasteditor + var/list/viewingcode = list() + var/obj/machinery/telecomms/server/SelectedServer - network = "NULL" // the network to probe - temp = "" // temporary feedback messages + var/network = "NULL" // the network to probe + var/temp = "" // temporary feedback messages - storedcode = "" // code stored + var/storedcode = "" // code stored proc/update_ide() @@ -237,4 +238,4 @@ emagged = 1 user << "\blue You you disable the security protocols" src.updateUsrDialog() - return \ No newline at end of file + return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 82b19052d4a..1fec2e76069 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -130,10 +130,6 @@ O.show_message("\red Failure: Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.") return if (istype(M, /atom/movable)) - if (istype(M, /obj/effect/dummy/chameleon)) - for(var/mob/C in M) - C << "\red The projection field prevents you from entering!" - return if(prob(5) && !accurate) //oh dear a problem, put em in deep space do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy - 5), 3), 2) else diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index f696f28e9f5..ab776706a82 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + /* Important notice: I changed "vendingwindow" to "vendingwindow_n" (n for new) because I extended the window's height a small amount and, for some reason, BYOND saves the @@ -10,11 +12,10 @@ To combat this, I changed the window name. -- Doohl #define PRODUCTS_PER_PAGE 15 // # of products per page /obj/machinery/vending - var/const - WIRE_EXTEND = 1 - WIRE_SCANID = 2 - WIRE_SHOCK = 3 - WIRE_SHOOTINV = 4 + var/const/WIRE_EXTEND = 1 + var/const/WIRE_SCANID = 2 + var/const/WIRE_SHOCK = 3 + var/const/WIRE_SHOOTINV = 4 var/page var/builtpaths = 0 var/lastpaths diff --git a/code/game/magic/archived_book.dm b/code/game/magic/archived_book.dm index d8452caa832..2fc9412fcd9 100644 --- a/code/game/magic/archived_book.dm +++ b/code/game/magic/archived_book.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04 + #define BOOK_VERSION_MIN 1 #define BOOK_VERSION_MAX 2 #define BOOK_PATH "data/books/" @@ -61,16 +63,15 @@ datum/book_manager/proc/remove(var/id) fdel(path(id)) datum/archived_book - var - author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned - title // The real name of the book. - category // The category/genre of the book - id // the id of the book (like an isbn number) - dat // Actual page content + var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned + var/title // The real name of the book. + var/category // The category/genre of the book + var/id // the id of the book (like an isbn number) + var/dat // Actual page content - author_real // author's real_name - author_key // author's byond key - list/icon/photos // in-game photos used + var/author_real // author's real_name + var/author_key // author's byond key + var/list/icon/photos // in-game photos used // loads the book corresponding by the specified id datum/archived_book/New(var/path) diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index 6c1304a2255..5011601c110 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + var/use_uristrunes = 1 @@ -64,10 +66,9 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", layer = TURF_LAYER - var - word1 - word2 - word3 + var/word1 + var/word2 + var/word3 // Places these combos are mentioned: this file - twice in the rune code, once in imbued tome, once in tome's HTML runes.dm - in the imbue rune code. If you change a combination - dont forget to change it everywhere. // travel self [word] - Teleport to random [rune with word destination matching] @@ -491,9 +492,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", M << "\red You feel searing heat inside!" - attack_self(mob/living/user as mob) usr = user + if(!usr.canmove || usr.stat || usr.restrained()) + return + if(!wordtravel) runerandom() if(iscultist(user)) @@ -503,6 +506,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", if (!istype(user.loc,/turf)) user << "\red You do not have enough space to write a proper rune." return + + + + if (C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist switch(alert("Too many runes are already in the vicinity.. The cloth of reality can't take that much of a strain. By creating another rune, you risk locally tearing reality apart, which would prove fatal to you. Do you still wish to scribe the rune?",,"Yes","No")) if("Yes") @@ -518,9 +525,13 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", if("Cancel") return if("Read it") + if(usr.equipped() != src) + return user << browse("[tomedat]", "window=Arcane Tome") return if("Notes") + if(usr.equipped() != src) + return notedat = {"
    Word translation notes
    [words[1]] is [words[words[1]]] Clear
    @@ -537,6 +548,9 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", // call(/obj/item/weapon/tome/proc/edit_notes)() user << browse("[notedat]", "window=notes") return + if(usr.equipped() != src) + return + var/w1 var/w2 var/w3 @@ -558,11 +572,17 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", for (var/w in words) if (words[w] == w3) w3 = w + + if(usr.equipped() != src) + return + for (var/mob/V in viewers(src)) V.show_message("\red [user] slices open a finger and begins to chant and paint symbols on the floor.", 3, "\red You hear chanting.", 2) user << "\red You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world." user.take_overall_damage(1) if(do_after(user, 50)) + if(usr.equipped() != src) + return var/mob/living/carbon/human/H = user var/obj/effect/rune/R = new /obj/effect/rune(user.loc) user << "\red You finish drawing the arcane markings of the Geometer." @@ -570,8 +590,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", R.word2 = w2 R.word3 = w3 R.check_icon() - if(!R.blood_DNA) - R.blood_DNA = list() + R.blood_DNA = list() R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type return else @@ -617,6 +636,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", var/obj/effect/rune/R = new /obj/effect/rune if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user + R.blood_DNA = list() R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type switch(r) if("teleport") @@ -781,8 +801,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", w_class = 1.0 flags = FPRINT | TABLEPASS - var - data + var/data attack_self(mob/user as mob) view_scrap(user) diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm index fda0744c647..0727bf111e4 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/magic/cultist/runes.dm @@ -534,7 +534,7 @@ var/list/sacrificed = list() /////////////////////////////////////////FOURTEETH RUNE communicate() - var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null + var/input = copytext(sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null),1,MAX_MESSAGE_LEN) if(!input) if (istype(src)) return fizzle() @@ -961,7 +961,7 @@ var/list/sacrificed = list() usr.say("Fuu ma'jin!") for(var/mob/living/carbon/C in viewers(src)) flick("e_flash", C.flash) - if (C.stuttering < 1 && (!(C.mutations & HULK))) + if (C.stuttering < 1 && (!(HULK in C.mutations))) C.stuttering = 1 C.Weaken(1) C.Stun(1) @@ -977,7 +977,7 @@ var/list/sacrificed = list() for(var/mob/O in viewers(T, null)) O.show_message(text("\red [] invokes a talisman at []", usr, T), 1) flick("e_flash", T.flash) - if (!(T.mutations & HULK)) + if (!(HULK in T.mutations)) T.silent += 15 T.Weaken(25) T.Stun(25) diff --git a/code/game/magic/library.dm b/code/game/magic/library.dm index 5a2c62f6bf3..963a7eb16ac 100644 --- a/code/game/magic/library.dm +++ b/code/game/magic/library.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + //******************************* // // Library SQL Configuration @@ -61,7 +63,7 @@ /obj/structure/bookcase name = "bookcase" icon = 'library.dmi' - icon_state = "bookcase" + icon_state = "book-0" anchored = 1 density = 1 opacity = 1 @@ -118,57 +120,58 @@ if(comp) comp.inventory += B - attackby(obj/O as obj, mob/user as mob) - if(istype(O, /obj/item/weapon/book)) - user.drop_item() - O.loc = src - else if(istype(O, /obj/item/weapon/pen)) - var/newname = input("What would you like to title this bookshelf?") as text|null - if(!newname) - return - else - setname(sanitize(newname)) +/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob) + if(istype(O, /obj/item/weapon/book)) + user.drop_item() + O.loc = src + update_icon() + else if(istype(O, /obj/item/weapon/pen)) + var/newname = copytext(sanitize(input("What would you like to title this bookshelf?") as text|null),1,MAX_NAME_LEN) + if(!newname) + return else - ..() - attack_hand(var/mob/user as mob) - var/list/books = list() - for(var/obj/item/weapon/book/b in src.contents) - books.Add(b) - if(books.len) - var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") as null|anything in books - if(choice) - choice.loc = src.loc + name = ("bookcase ([sanitize(newname)])") + else + ..() + +/obj/structure/bookcase/attack_hand(var/mob/user as mob) + if(contents.len) + var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") in contents as obj|null + if(choice) + if(ishuman(user)) + if(!user.get_active_hand()) + user.put_in_hand(choice) else - return + choice.loc = get_turf(src) + update_icon() + +/obj/structure/bookcase/ex_act(severity) + switch(severity) + if(1.0) + for(var/obj/item/weapon/book/b in contents) + del(b) + del(src) + return + if(2.0) + for(var/obj/item/weapon/book/b in contents) + if (prob(50)) b.loc = (get_turf(src)) + else del(b) + del(src) + return + if(3.0) + if (prob(50)) + for(var/obj/item/weapon/book/b in contents) + b.loc = (get_turf(src)) + del(src) + return else - user << "None of these books pique your interest in the slightest." + return - proc - setname(var/t as text) - if(t) - src.name = "bookcase ([t])" - - ex_act(severity) - switch(severity) - if(1.0) - for(var/obj/item/weapon/book/b in src.contents) - del(b) - del(src) - return - if(2.0) - for(var/obj/item/weapon/book/b in src.contents) - if (prob(50)) b.loc = (get_turf(src)) - else del(b) - del(src) - return - if(3.0) - if (prob(50)) - for(var/obj/item/weapon/book/b in src.contents) - b.loc = (get_turf(src)) - del(src) - return - else - return +/obj/structure/bookcase/update_icon() + if(contents.len < 5) + icon_state = "book-[contents.len]" + else + icon_state = "book-5" /obj/structure/bookcase/manuals/medical @@ -177,6 +180,7 @@ New() ..() new /obj/item/weapon/book/manual/medical_cloning(src) + update_icon() /obj/structure/bookcase/manuals/engineering @@ -190,6 +194,7 @@ new /obj/item/weapon/book/manual/engineering_guide(src) new /obj/item/weapon/book/manual/engineering_singularity_safety(src) new /obj/item/weapon/book/manual/robotics_cyborgs(src) + update_icon() /obj/structure/bookcase/manuals/research_and_development name = "R&D Manuals bookcase" @@ -197,6 +202,7 @@ New() ..() new /obj/item/weapon/book/manual/research_and_development(src) + update_icon() @@ -211,20 +217,19 @@ throw_range = 5 w_class = 1.0 flags = FPRINT | TABLEPASS - var - dat // Actual page content - due_date = 0 // Game time in 1/10th seconds - author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned - unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified - title // The real name of the book. + var/dat // Actual page content + var/due_date = 0 // Game time in 1/10th seconds + var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned + var/unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + var/title // The real name of the book. - author_real // author's real_name - author_key // author's byond key - ssbn // the ssbn, if a downloaded book + var/author_real // author's real_name + var/author_key // author's byond key + var/ssbn // the ssbn, if a downloaded book - list/pages = new() // individual pages as a list of text - cur_page = 1 // current page being read - list/icon/photos // in-game photos used + var/list/pages = new() // individual pages as a list of text + var/cur_page = 1 // current page being read + var/list/icon/photos // in-game photos used proc/navbar() return "
    " \ @@ -306,12 +311,9 @@ var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") switch(choice) if("Title") - var/ntitle = input("Write a new title:") as text|null + var/ntitle = copytext(sanitize(input("Write a new title:") as text|null),1,MAX_MESSAGE_LEN) if(!ntitle) return - else - title = sanitize(ntitle) - name = "Book: [title]" if("Contents") var/t = "[src.dat]" do @@ -337,7 +339,7 @@ src.dat = t gen_pages() if("Author") - var/nauthor = input("Write the author's name:") as text|null + var/nauthor = copytext(sanitize(input("Write the author's name:") as text|null),1,MAX_NAME_LEN) if(!nauthor) return else @@ -417,10 +419,9 @@ throw_range = 5 w_class = 1.0 flags = FPRINT | TABLEPASS - var - obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this - obj/item/weapon/book/book // Currently scanned book - mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory + var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this + var/obj/item/weapon/book/book // Currently scanned book + var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory attack_self(mob/user as mob) mode += 1 @@ -456,11 +457,10 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and for how long. - var - bookname - mobname - getdate - duedate + var/bookname + var/mobname + var/getdate + var/duedate @@ -475,12 +475,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f icon_state = "computer" anchored = 1 density = 1 - var - screenstate = 0 - title - category = "Any" - author - SQLquery + var/screenstate = 0 + var/title + var/category = "Any" + var/author + var/SQLquery /obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob) @@ -583,18 +582,17 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f icon_state = "computer" anchored = 1 density = 1 - var - arcanecheckout = 0 - screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book - buffer_book - buffer_mob - upload_category = "Fiction" - list/checkouts = list() - list/inventory = list() - checkoutperiod = 5 // In minutes - obj/machinery/libraryscanner/scanner // Book scanner that will be used when uploading books to the Archive + var/arcanecheckout = 0 + var/screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book + var/buffer_book + var/buffer_mob + var/upload_category = "Fiction" + var/list/checkouts = list() + var/list/inventory = list() + var/checkoutperiod = 5 // In minutes + var/obj/machinery/libraryscanner/scanner // Book scanner that will be used when uploading books to the Archive - bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl + var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl /obj/machinery/librarycomp/attack_hand(var/mob/user as mob) usr.machine = src @@ -612,9 +610,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f dat += "7. Access the Forbidden Lore Vault
    " if(src.arcanecheckout) new /obj/item/weapon/tome(src.loc) - user << "Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a dusty old tome sitting on the desk. You don't really remember printing it." - for (var/mob/V in hearers(src)) - V.show_message("[usr] stares at the blank screen for a few moments, his expression frozen in fear. When he finally awakens from it, he looks a lot older.", 2) + user << "Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a dusty old tome sitting on the desk. You don't really remember printing it." + user.visible_message("[user] stares at the blank screen for a few moments, his expression frozen in fear. When he finally awakens from it, he looks a lot older.", 2) src.arcanecheckout = 0 if(1) // Inventory @@ -780,9 +777,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f if(checkoutperiod < 1) checkoutperiod = 1 if(href_list["editbook"]) - buffer_book = input("Enter the book's title:") as text|null + buffer_book = copytext(sanitize(input("Enter the book's title:") as text|null),1,MAX_MESSAGE_LEN) if(href_list["editmob"]) - buffer_mob = input("Enter the recipient's name:") as text|null + buffer_mob = copytext(sanitize(input("Enter the recipient's name:") as text|null),1,MAX_NAME_LEN) if(href_list["checkout"]) var/datum/borrowbook/b = new /datum/borrowbook b.bookname = sanitize(buffer_book) @@ -802,9 +799,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f scanner.cache.title = sanitize(newtitle) scanner.cache.name = "Book: [scanner.cache.title]" if(href_list["setauthor"]) - var/newauthor = input("Enter the author's name: ", "Book Upload", scanner.cache.author) as text|null + var/newauthor = copytext(sanitize(input("Enter the author's name: ", "Book Upload", scanner.cache.author) as text|null),1,MAX_MESSAGE_LEN) if(newauthor) - scanner.cache.author = sanitize(newauthor) + scanner.cache.author = newauthor if(href_list["setcategory"]) var/newcategory = input("Choose a category: ") in list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion") if(newcategory) @@ -939,8 +936,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f icon_state = "bigscanner" anchored = 1 density = 1 - var - obj/item/weapon/book/cache // Last scanned book + var/obj/item/weapon/book/cache // Last scanned book diff --git a/code/game/magic/musician.dm b/code/game/magic/musician.dm index c46f7464752..60003e6b418 100644 --- a/code/game/magic/musician.dm +++ b/code/game/magic/musician.dm @@ -1,8 +1,9 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /datum/song - var - name = "Untitled" - list/lines = new() - tempo = 5 + var/name = "Untitled" + var/list/lines = new() + var/tempo = 5 /obj/structure/device/piano name = "space minimoog" @@ -10,11 +11,10 @@ icon_state = "minimoog" anchored = 1 density = 1 - var - datum/song/song - playing = 0 - help = 0 - edit = 1 + var/datum/song/song + var/playing = 0 + var/help = 0 + var/edit = 1 proc playnote(var/note as text) diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index c5fcd673f0b..33dffbcb83b 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -59,6 +59,8 @@ datum/controller/game_controller setupgenetics() + setupdooralarms() + // for(var/i = 0, i < max_secret_rooms, i++) // make_mining_asteroid_secret() // Because energy cutlasses, facehuggers, and empty rooms are silly. FOR NOW. - Erthilo @@ -70,6 +72,8 @@ datum/controller/game_controller if(!ticker) ticker = new /datum/controller/gameticker() + setupfactions() + spawn ticker.pregame() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 4b7fd385845..52f897ef19b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -424,7 +424,7 @@ call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit) return - if (user.mutations & HULK && !prob(src.deflect_chance)) + if ( ((HULK in user.mutations) || (SUPRSTR in user.augmentations)) && !prob(src.deflect_chance)) src.take_damage(15) src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) user.visible_message("[user] hits [src.name], doing some damage.", "You hit [src.name] with all your might. The metal creaks and bends.") @@ -1582,7 +1582,7 @@ /* if (href_list["ai_take_control"]) - var/var/mob/living/silicon/ai/AI = locate(href_list["ai_take_control"]) + var/mob/living/silicon/ai/AI = locate(href_list["ai_take_control"]) var/duration = text2num(href_list["duration"]) var/mob/living/silicon/ai/O = new /mob/living/silicon/ai(src) var/cur_occupant = src.occupant diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index 5e3f3392cff..f53bf46918b 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -78,7 +78,6 @@ if(!M || M.stat || !(M in view(M))) return if(!M.client) return var/client/C = M.client - var/icon/tempHud = 'hud.dmi' for(var/mob/living/carbon/human/patient in view(M.loc)) if(M.see_invisible < patient.invisibility) continue @@ -88,12 +87,14 @@ foundVirus++ //if(patient.virus2) // foundVirus++ - C.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") + patient.health_img.icon_state = "hud[RoundHealth(patient.health)]" + C.images += patient.health_img if(patient.stat == 2) - C.images += image(tempHud,patient,"huddead") + patient.med_img.icon_state = "huddead" else if(patient.alien_egg_flag) - C.images += image(tempHud,patient,"hudxeno") + patient.med_img.icon_state = "hudxeno" else if(foundVirus) - C.images += image(tempHud,patient,"hudill") + patient.med_img.icon_state = "hudill" else - C.images += image(tempHud,patient,"hudhealthy") + patient.med_img.icon_state = "hudhealthy" + C.images += patient.med_img diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 24dcea75d08..8e05d853b84 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -41,6 +41,24 @@ ME.attach(src) return +/obj/mecha/working/ripley/mining + desc = "An old, dusty mining ripley." + name = "APLU \"Miner\"" + +/obj/mecha/working/ripley/mining/New() + ..() + //Attach drill + if(prob(25)) //Possible diamond drill... Feeling lucky? + var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill + D.attach(src) + else + var/obj/item/mecha_parts/mecha_equipment/tool/drill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill + D.attach(src) + + //Attach hydrolic clamp + var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp + HC.attach(src) + /obj/mecha/working/ripley/Exit(atom/movable/O) if(O in cargo) return 0 diff --git a/code/game/objects/alien/facehugger.dm b/code/game/objects/alien/facehugger.dm index 3c35491fa39..6fa55c6ad2f 100644 --- a/code/game/objects/alien/facehugger.dm +++ b/code/game/objects/alien/facehugger.dm @@ -1,9 +1,10 @@ -var/const - MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone - MAX_IMPREGNATION_TIME = 150 +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 - MIN_ACTIVE_TIME = 300 //time between being dropped and going idle - MAX_ACTIVE_TIME = 600 +var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone +var/const/MAX_IMPREGNATION_TIME = 150 + +var/const/MIN_ACTIVE_TIME = 300 //time between being dropped and going idle +var/const/MAX_ACTIVE_TIME = 600 /obj/item/clothing/mask/facehugger name = "alien" @@ -150,7 +151,7 @@ var/const layer = 20 target.wear_mask = src - target.update_clothing() + target.rebuild_appearance() GoIdle() //so it doesn't jump the people that tear it off @@ -267,4 +268,4 @@ var/const ..(M) processing_objects.Remove(src) -*/ \ No newline at end of file +*/ diff --git a/code/game/objects/alien/resin.dm b/code/game/objects/alien/resin.dm index e08ffaf5c42..ffda3d44f18 100644 --- a/code/game/objects/alien/resin.dm +++ b/code/game/objects/alien/resin.dm @@ -50,7 +50,7 @@ /obj/effect/alien/resin/hitby(AM as mob|obj) ..() for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [src] was hit by [AM]."), 1) + O.show_message("\red [src] was hit by [AM].", 1) var/tforce = 0 if(ismob(AM)) tforce = 10 @@ -63,10 +63,10 @@ return /obj/effect/alien/resin/attack_hand() - if ((usr.mutations & HULK)) - usr << text("\blue You easily destroy the [name].") + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + usr << "\blue You easily destroy the [name]." for(var/mob/O in oviewers(src)) - O.show_message(text("\red [] destroys the [name]!", usr), 1) + O.show_message("\red [usr] destroys the [name]!", 1) health = 0 healthcheck() return @@ -77,15 +77,15 @@ /obj/effect/alien/resin/attack_alien() if (islarva(usr))//Safety check for larva. /N return - usr << text("\green You claw at the [name].") + usr << "\green You claw at the [name]." for(var/mob/O in oviewers(src)) - O.show_message(text("\red [] claws at the resin!", usr), 1) + O.show_message("\red [usr] claws at the resin!", 1) playsound(loc, 'attackblob.ogg', 100, 1) health -= rand(10, 20) if(health <= 0) - usr << text("\green You slice the [name] to pieces.") + usr << "\green You slice the [name] to pieces." for(var/mob/O in oviewers(src)) - O.show_message(text("\red [] slices the [name] apart!", usr), 1) + O.show_message("\red [usr] slices the [name] apart!", 1) healthcheck() return @@ -131,7 +131,7 @@ contents.Add(affecting) while(!isnull(M)&&!isnull(src))//While M and wall exist - if(prob(90)&& M.mutations & HULK)//If they're the Hulk, they're getting out. + if(prob(90)&& HULK in M.mutations)//If they're the Hulk, they're getting out. M << "You smash your way to freedom!" break if(prob(30))//Let's people know that someone is trapped in the resin wall. @@ -161,6 +161,6 @@ /obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group) return 0 - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags & PASSGLASS) return !opacity return !density diff --git a/code/game/objects/bodybag.dm b/code/game/objects/bodybag.dm index 55a56cd4fb0..cb8a2f6a088 100644 --- a/code/game/objects/bodybag.dm +++ b/code/game/objects/bodybag.dm @@ -48,7 +48,7 @@ return if (!in_range(src, user) && src.loc != user) return - t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) + t = copytext(sanitize(t),1,MAX_NAME_LEN) if (t) src.name = "body bag - " src.name += t diff --git a/code/game/objects/closets.dm b/code/game/objects/closets.dm index 88091cd0344..1ec2acdda74 100644 --- a/code/game/objects/closets.dm +++ b/code/game/objects/closets.dm @@ -232,3 +232,30 @@ if(!src.toggle()) usr << "\blue It won't budge!" + +/obj/structure/closet/verb/verb_toggleopen() + set src in view(1) + set category = "Object" + set name = "Toggle Open" + + if(!(usr)) + return + if(!istype(src.loc, /turf) || usr.stat || usr.restrained() ) + usr << "\red You can't interact with this!" + return + if(src.anchored) + usr << "\red You can't interact with this!" + return + if(istype(usr, /mob/living/silicon/robot)) + src.attack_hand(usr) + return + if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain))) + usr << "\red You can't interact with this!" + return + if(istype(usr, /mob/living/carbon/human)) + src.attack_hand(usr) + if(istype(usr, /mob/living/carbon/alien)) + src.attack_alien(usr) + if(istype(usr, /mob/living/carbon/monkey)) + src.attack_paw(usr) + return diff --git a/code/game/objects/closets/ert.dm b/code/game/objects/closets/ert.dm new file mode 100644 index 00000000000..71798a82bdb --- /dev/null +++ b/code/game/objects/closets/ert.dm @@ -0,0 +1,89 @@ +/obj/structure/closet/secure_closet/ert/commander + name = "\improper ERT commander locker" + req_access = list(access_security) + icon_state = "capsecure1" + icon_closed = "capsecure" + icon_locked = "capsecure1" + icon_opened = "capsecureopen" + icon_broken = "capsecurebroken" + icon_off = "capsecureoff" + + New() + ..() + sleep(2) + new /obj/item/clothing/head/helmet/space/ert/commander(src) + new /obj/item/clothing/suit/space/ert/commander(src) + new /obj/item/weapon/plastique(src) + new /obj/item/weapon/storage/belt/security/full(src) + new /obj/item/weapon/gun/energy/ionrifle(src) + new /obj/item/weapon/gun/energy/gun/nuclear(src) + new /obj/item/clothing/glasses/thermal(src) + new /obj/item/weapon/lighter/zippo(src) + new /obj/item/weapon/pinpointer(src) + return + +/obj/structure/closet/secure_closet/ert/security + name = "\improper ERT security locker" + req_access = list(access_security) + icon_state = "sec1" + icon_closed = "sec" + icon_locked = "sec1" + icon_opened = "secopen" + icon_broken = "secbroken" + icon_off = "secoff" + + New() + ..() + sleep(2) + new /obj/item/clothing/head/helmet/space/ert/security(src) + new /obj/item/clothing/suit/space/ert/security(src) + new /obj/item/weapon/plastique(src) + new /obj/item/weapon/storage/belt/security/full(src) + new /obj/item/weapon/gun/energy/ionrifle(src) + new /obj/item/weapon/gun/energy/gun/nuclear(src) + new /obj/item/clothing/glasses/thermal(src) + return + + +/obj/structure/closet/secure_closet/ert/engineer + name = "\improper ERT engineer locker" + req_access = list(access_engine) + icon_state = "secureeng1" + icon_closed = "secureeng" + icon_locked = "secureeng1" + icon_opened = "secureengopen" + icon_broken = "secureengbroken" + icon_off = "secureengoff" + + New() + ..() + sleep(2) + new /obj/item/clothing/head/helmet/space/ert/engineer(src) + new /obj/item/clothing/suit/space/ert/engineer(src) + new /obj/item/weapon/gun/energy/taser(src) + new /obj/item/weapon/storage/belt/utility/full(src) + new /obj/item/weapon/storage/backpack/industrial/full(src) + new /obj/item/device/t_scanner(src) + new /obj/item/clothing/glasses/meson(src) + return + +/obj/structure/closet/secure_closet/ert/medical + name = "\improper ERT medical locker" + req_access = list(access_medical) + icon_state = "securemed1" + icon_closed = "securemed" + icon_locked = "securemed1" + icon_opened = "securemedopen" + icon_broken = "securemedbroken" + icon_off = "securemedoff" + + New() + ..() + sleep(2) + new /obj/item/clothing/head/helmet/space/ert/medical(src) + new /obj/item/clothing/suit/space/ert/medical(src) + new /obj/item/weapon/gun/energy/taser(src) + new /obj/item/weapon/storage/backpack/medic/full(src) + new /obj/item/weapon/storage/belt/medical(src) + new /obj/item/clothing/glasses/hud/health(src) + return \ No newline at end of file diff --git a/code/game/objects/closets/extinguisher.dm b/code/game/objects/closets/extinguisher.dm index 1d503333d7f..82dc7d88aa0 100644 --- a/code/game/objects/closets/extinguisher.dm +++ b/code/game/objects/closets/extinguisher.dm @@ -1,4 +1,4 @@ -/obj/structure/closet/extinguisher +/obj/structure/extinguisher_cabinet name = "extinguisher cabinet" desc = "A small wall mounted cabinet designed to hold a fire extinguisher." icon = 'closet.dmi' @@ -6,10 +6,11 @@ anchored = 1 density = 0 var/obj/item/weapon/extinguisher/has_extinguisher = new/obj/item/weapon/extinguisher + var/opened = 0 -/obj/structure/closet/extinguisher/attackby(var/obj/item/O as obj, var/mob/user as mob) +/obj/structure/extinguisher_cabinet/attackby(var/obj/item/O as obj, var/mob/user as mob) if (isrobot(usr)) return if (istype(O, /obj/item/weapon/extinguisher)) @@ -26,7 +27,7 @@ -/obj/structure/closet/extinguisher/attack_hand(mob/user as mob) +/obj/structure/extinguisher_cabinet/attack_hand(mob/user as mob) if(has_extinguisher) user.put_in_hand(has_extinguisher) has_extinguisher = null @@ -38,13 +39,13 @@ -/obj/structure/closet/extinguisher/attack_paw(mob/user as mob) +/obj/structure/extinguisher_cabinet/attack_paw(mob/user as mob) attack_hand(user) return -/obj/structure/closet/extinguisher/update_icon() +/obj/structure/extinguisher_cabinet/update_icon() if(!opened) icon_state = "extinguisher_closed" return diff --git a/code/game/objects/closets/firecloset.dm b/code/game/objects/closets/firecloset.dm index be3571a83f1..c3a6ad2fbc5 100644 --- a/code/game/objects/closets/firecloset.dm +++ b/code/game/objects/closets/firecloset.dm @@ -8,7 +8,7 @@ new /obj/item/device/flashlight(src) new /obj/item/weapon/tank/oxygen/red(src) new /obj/item/weapon/extinguisher(src) - new /obj/item/clothing/head/helmet/hardhat/red(src) + new /obj/item/clothing/head/helmet/space/fire_helmet(src) /obj/structure/closet/firecloset/New() ..() @@ -17,7 +17,7 @@ new /obj/item/clothing/mask/gas(src) new /obj/item/weapon/tank/oxygen/red(src) new /obj/item/weapon/extinguisher(src) - new /obj/item/clothing/head/helmet/hardhat/red(src) + new /obj/item/clothing/head/helmet/space/fire_helmet(src) /*switch (pickweight(list("nothing" = 5, "bare-bones" = 35, "basic" = 40, "pickpocketed" = 10, "untouched" = 10))) if ("nothing") diff --git a/code/game/objects/closets/fitnesscloset.dm b/code/game/objects/closets/fitnesscloset.dm new file mode 100644 index 00000000000..64d90b266ac --- /dev/null +++ b/code/game/objects/closets/fitnesscloset.dm @@ -0,0 +1,39 @@ +/obj/structure/closet/athletic_mixed/New() + ..() + sleep(2) + new /obj/item/clothing/under/shorts/grey(src) + new /obj/item/clothing/under/shorts/black(src) + new /obj/item/clothing/under/shorts/red(src) + new /obj/item/clothing/under/shorts/blue(src) + new /obj/item/clothing/under/shorts/green(src) + +/obj/structure/closet/boxinggloves/New() + ..() + sleep(2) + new /obj/item/clothing/gloves/boxing/blue(src) + new /obj/item/clothing/gloves/boxing/green(src) + new /obj/item/clothing/gloves/boxing/yellow(src) + new /obj/item/clothing/gloves/boxing(src) + +/obj/structure/closet/masks/New() + ..() + sleep(2) + new /obj/item/clothing/mask/luchador(src) + new /obj/item/clothing/mask/luchador/rudos(src) + new /obj/item/clothing/mask/luchador/tecnicos(src) + +/obj/structure/closet/lasertag/red/New() + ..() + sleep(2) + new /obj/item/clothing/suit/redtag(src) + new /obj/item/clothing/suit/redtag(src) + new /obj/item/weapon/gun/energy/laser/redtag(src) + new /obj/item/weapon/gun/energy/laser/redtag(src) + +/obj/structure/closet/lasertag/blue/New() + ..() + sleep(2) + new /obj/item/clothing/suit/bluetag(src) + new /obj/item/clothing/suit/bluetag(src) + new /obj/item/weapon/gun/energy/laser/bluetag(src) + new /obj/item/weapon/gun/energy/laser/bluetag(src) \ No newline at end of file diff --git a/code/game/objects/closets/secure/cargo.dm b/code/game/objects/closets/secure/cargo.dm index a366ebf9ee2..638bc2ffd66 100644 --- a/code/game/objects/closets/secure/cargo.dm +++ b/code/game/objects/closets/secure/cargo.dm @@ -15,7 +15,7 @@ new /obj/item/clothing/shoes/black(src) new /obj/item/device/radio/headset/headset_cargo(src) new /obj/item/clothing/gloves/black(src) - new /obj/item/weapon/cartridge/quartermaster(src) +// new /obj/item/weapon/cartridge/quartermaster(src) return /obj/structure/closet/secure_closet/qm_personal diff --git a/code/game/objects/closets/secure/engineering.dm b/code/game/objects/closets/secure/engineering.dm index aed317be772..38c567421d3 100644 --- a/code/game/objects/closets/secure/engineering.dm +++ b/code/game/objects/closets/secure/engineering.dm @@ -118,7 +118,7 @@ new /obj/item/device/t_scanner(src) new /obj/item/weapon/storage/belt/utility/full(src) new /obj/item/weapon/storage/toolbox/mechanical(src) - new /obj/item/weapon/cartridge/engineering(src) +// new /obj/item/weapon/cartridge/engineering(src) new /obj/item/device/radio/headset/headset_eng(src) new /obj/item/clothing/suit/hazardvest(src) new /obj/item/clothing/mask/gas(src) diff --git a/code/game/objects/closets/secure/medical.dm b/code/game/objects/closets/secure/medical.dm index 49cb6f466e5..b9829af6ad4 100644 --- a/code/game/objects/closets/secure/medical.dm +++ b/code/game/objects/closets/secure/medical.dm @@ -86,7 +86,7 @@ new /obj/item/clothing/under/rank/medical/green(src) if ("purple") new /obj/item/clothing/under/rank/medical/purple(src) - new /obj/item/weapon/cartridge/medical(src) +// new /obj/item/weapon/cartridge/medical(src) new /obj/item/device/radio/headset/headset_med(src) return diff --git a/code/game/objects/closets/secure/personal.dm b/code/game/objects/closets/secure/personal.dm index 508a80cabb7..86bc423f0b6 100644 --- a/code/game/objects/closets/secure/personal.dm +++ b/code/game/objects/closets/secure/personal.dm @@ -72,7 +72,7 @@ playsound(src.loc, 'blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) for(var/mob/O in viewers(user, 3)) - O.show_message(text("\blue The locker has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2) + O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2) else user << "\red Access Denied" return diff --git a/code/game/objects/closets/secure/secure_closets.dm b/code/game/objects/closets/secure/secure_closets.dm index 35c45401c1b..fdfac4dcda1 100644 --- a/code/game/objects/closets/secure/secure_closets.dm +++ b/code/game/objects/closets/secure/secure_closets.dm @@ -24,6 +24,19 @@ src.req_access += pick(get_all_accesses()) ..() +/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob) + if(src.allowed(user)) + src.locked = !src.locked + for(var/mob/O in viewers(user, 3)) + if((O.client && !( O.blinded ))) + O << "\blue The locker has been [src.locked ? null : "un"]locked by [user]." + if(src.locked) + src.icon_state = src.icon_locked + else + src.icon_state = src.icon_closed + else + user << "\red Access Denied" + /obj/structure/closet/secure_closet/attackby(obj/item/W as obj, mob/user as mob) if(src.opened) if(istype(W, /obj/item/weapon/grab)) @@ -56,15 +69,15 @@ playsound(src.loc, 'blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) for(var/mob/O in viewers(user, 3)) - O.show_message(text("\blue The locker has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2) + O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2) else for(var/mob/O in viewers(user, 3)) - O.show_message(text("\blue The locker has been broken by [] with an electromagnetic card!", user), 1, text("You hear a faint electrical spark."), 2) + O.show_message("\blue The locker has been broken by [user] with an electromagnetic card!", 1, "You hear a faint electrical spark.", 2) else if(src.allowed(user)) src.locked = !src.locked for(var/mob/O in viewers(user, 3)) if((O.client && !( O.blinded ))) - O << text("\blue The locker has been []locked by [].", (src.locked ? null : "un"), user) + O << "\blue The locker has been [src.locked ? null : "un"]locked by [user]." if(src.locked) src.icon_state = src.icon_locked else @@ -83,8 +96,7 @@ else user << "You need to stay still!" else - user << "\red Access Denied" - return + togglelock(user) /obj/structure/closet/secure_closet/relaymove(mob/user as mob) if(user.stat) @@ -114,4 +126,16 @@ return src.attackby(null, user) /obj/structure/closet/secure_closet/attack_paw(mob/user as mob) - return src.attack_hand(user) \ No newline at end of file + return src.attack_hand(user) + +/obj/structure/closet/secure_closet/verb/verb_togglelock() + set src in oview(1) // Can only use it from one square distance + set category = "Object" + set name = "Toggle Lock" + + if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain + return + + if(!opened) // If we let him lock it while it's open, it will close without the items inside going with it + togglelock(usr) + diff --git a/code/game/objects/closets/secure/security.dm b/code/game/objects/closets/secure/security.dm index c05e41d40eb..c8129152ed0 100644 --- a/code/game/objects/closets/secure/security.dm +++ b/code/game/objects/closets/secure/security.dm @@ -107,7 +107,7 @@ new /obj/item/device/flash(B) new /obj/item/device/pda/security(src) new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/weapon/cartridge/security(src) +// new /obj/item/weapon/cartridge/security(src) new /obj/item/device/radio/headset/headset_sec(src) new /obj/item/weapon/storage/flashbang_kit(src) new /obj/item/weapon/melee/baton(src) @@ -140,7 +140,7 @@ new /obj/item/clothing/suit/armor/vest(src) new /obj/item/clothing/suit/storage/gearharness(src) new /obj/item/clothing/head/helmet(src) - new /obj/item/weapon/cartridge/security(src) +// new /obj/item/weapon/cartridge/security(src) new /obj/item/device/pda/security(src) new /obj/item/device/radio/headset/headset_sec(src) new /obj/item/weapon/storage/belt/security(src) diff --git a/code/game/objects/closets/wardrobe.dm b/code/game/objects/closets/wardrobe.dm index b193d0e3d8f..128f6440488 100644 --- a/code/game/objects/closets/wardrobe.dm +++ b/code/game/objects/closets/wardrobe.dm @@ -74,12 +74,15 @@ obj/structure/closet/wardrobe/hop/New() /obj/structure/closet/wardrobe/chaplain_black/New() //new /obj/item/clothing/suit/imperium_monk(src) //No. -- Urist + new /obj/item/clothing/under/rank/chaplain(src) + new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/suit/nun(src) + new /obj/item/clothing/head/nun_hood(src) new /obj/item/clothing/suit/storage/chaplain_hoodie(src) new /obj/item/clothing/head/chaplain_hood(src) new /obj/item/clothing/suit/holidaypriest(src) - new /obj/item/clothing/suit/hastur (src) - new /obj/item/clothing/head/hasturhood (src) + //new /obj/item/clothing/suit/hastur (src) //No. -- Urist + //new /obj/item/clothing/head/hasturhood (src) //No. -- Urist return /obj/structure/closet/wardrobe/green/New() diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 1293cfce2b1..3fdbcb4fb67 100755 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -8,7 +8,8 @@ icon_state = "pda" item_state = "electronic" w_class = 1.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_ID | SLOT_BELT //Main variables var/owner = null @@ -125,6 +126,7 @@ ttone = "holy" /obj/item/device/pda/lawyer + default_cartridge = /obj/item/weapon/cartridge/lawyer icon_state = "pda-lawyer" ttone = "objection" @@ -134,8 +136,6 @@ /obj/item/device/pda/roboticist icon_state = "pda-robot" - desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case." - note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Turbo Edition!" /obj/item/device/pda/librarian icon_state = "pda-libb" @@ -143,6 +143,16 @@ note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!" silent = 1 //Quiet in the library! +/obj/item/device/pda/atmos + icon_state = "pda-atmo" + +/obj/item/device/pda/chemist + default_cartridge = /obj/item/weapon/cartridge/chemistry + icon_state = "pda-chem" + +/obj/item/device/pda/geneticist + icon_state = "pda-gene" + /* * The Actual PDA */ @@ -860,24 +870,30 @@ user.show_message("\blue No radiation detected.") /obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob) + if(!in_range(A, user)) + return switch(scanmode) if(2) - if (!A.fingerprints) - user << "\blue Unable to locate any fingerprints on [A]!" - else - user << "\blue Isolated [A:fingerprints.len] fingerprints." - var/list/prints = A:fingerprints - var/list/complete_prints = list() - for(var/i in prints) - var/print = prints[i] - if(stringpercent(print) <= FINGERPRINT_COMPLETE) - complete_prints += print - if(complete_prints.len < 1) - user << "\blue No intact prints found" + if(!istype(A, /obj/item/weapon/f_card)) + if (!A.fingerprints) + user << "\blue Unable to locate any fingerprints on [A]!" else - user << "\blue Found [complete_prints.len] intact prints" - for(var/i in complete_prints) - user << "\blue [i]" + user << "\blue Isolated [A:fingerprints.len] fingerprints." + var/list/prints = A:fingerprints + var/list/complete_prints = list() + for(var/i in prints) + var/print = prints[i] + if(stringpercent(print) <= FINGERPRINT_COMPLETE) + complete_prints += print + if(complete_prints.len < 1) + user << "\blue No intact prints found" + else + user << "\blue Found [complete_prints.len] intact prints" + for(var/i in complete_prints) + user << "\blue [i]" + if(cartridge && cartridge.access_security) + cartridge.add_data(A) + user << "Data added to internal storage. Scan with a High-Resolution Scanner to retreive." if(3) if(!isnull(A.reagents)) @@ -905,7 +921,10 @@ if (ismob(loc)) var/mob/M = loc M.show_message("\red Your [src] explodes!", 1) - + if (src in M.contents) + if(fon) + fon = 0 + M.total_luminosity -= f_lum if(T) T.hotspot_expose(700,125) @@ -1016,15 +1035,15 @@ var/newcart = pick(1,2,3,4) switch(newcart) if(1) - new /obj/item/weapon/cartridge/janitor(src) + new /obj/item/weapon/cartridge/engineering(src) if(2) new /obj/item/weapon/cartridge/security(src) if(3) new /obj/item/weapon/cartridge/medical(src) if(4) - new /obj/item/weapon/cartridge/head(src) + new /obj/item/weapon/cartridge/signal/toxins(src) - new /obj/item/weapon/cartridge/signal/toxins(src) + new /obj/item/weapon/cartridge/head(src) // Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP diff --git a/code/game/objects/devices/PDA/cart.dm b/code/game/objects/devices/PDA/cart.dm index 0c750fed264..b715f080d42 100644 --- a/code/game/objects/devices/PDA/cart.dm +++ b/code/game/objects/devices/PDA/cart.dm @@ -29,6 +29,7 @@ var/list/powermonitors = list() var/message1 // used for status_displays var/message2 + var/list/stored_data = list() engineering name = "Power-ON Cartridge" @@ -40,6 +41,11 @@ icon_state = "cart-m" access_medical = 1 + chemistry + name = "ChemWhiz Cartridge" + icon_state = "cart-chem" + access_reagent_scanner = 1 + security name = "R.O.B.U.S.T. Cartridge" icon_state = "cart-s" @@ -63,6 +69,11 @@ icon_state = "cart-j" access_janitor = 1 + lawyer + name = "P.R.O.V.E. Cartridge" + icon_state = "cart-s" + access_security = 1 + clown name = "Honkworks 5.0" icon_state = "cart-clown" @@ -89,7 +100,7 @@ name = "Signal Ace 2" desc = "Complete with integrated radio signaler!" icon_state = "cart-tox" - access_reagent_scanner = 1 +// access_reagent_scanner = 1 New() ..() @@ -146,13 +157,14 @@ name = "Med-U DELUXE" icon_state = "cart-cmo" access_status_display = 1 + access_reagent_scanner = 1 access_medical = 1 rd name = "Signal Ace DELUXE" icon_state = "cart-rd" access_status_display = 1 - access_reagent_scanner = 1 +// access_reagent_scanner = 1 New() ..() @@ -170,7 +182,7 @@ access_status_display = 1 syndicate - name = "Detomatix Cartridge" + name = "modified signaler cartridge" icon_state = "cart" access_remote_door = 1 remote_door_id = "syndicate" //Make sure this matches the syndicate shuttle's shield/door id!! @@ -570,6 +582,43 @@ Code: else menu += "ERROR: Unable to determine current location." + proc/add_data(atom/A as mob|obj|turf|area) + //I love hashtables. + var/list/data_entry = stored_data["\ref [A]"] + if(islist(data_entry)) //Yay, it was already stored! + //Merge the fingerprints. + var/list/data_prints = data_entry[1] + for(var/print in A.fingerprints) + var/merged_print = data_prints[print] + if(!merged_print) + data_prints[print] = A.fingerprints[print] + else + data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print]) + + //Now the fibers + var/list/fibers = data_entry[2] + if(!fibers) + fibers = list() + if(A.suit_fibers && A.suit_fibers.len) + for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~ + if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add! + fibers += A.suit_fibers[j] + var/list/blood = data_entry[3] + if(!blood) + blood = list() + if(A.blood_DNA && A.blood_DNA.len) + for(var/main_blood in A.blood_DNA) + if(!blood[main_blood]) + blood[main_blood] = A.blood_DNA[blood] + return 1 + var/list/sum_list[4] //Pack it back up! + sum_list[1] = A.fingerprints + sum_list[2] = A.suit_fibers + sum_list[3] = A.blood_DNA + sum_list[4] = "\The [A] in \the [get_area(A)]" + stored_data["\ref [A]"] = sum_list + return 0 + /obj/item/weapon/cartridge/Topic(href, href_list) ..() diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index ea733eab5b7..f81d3e2089e 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -4,7 +4,8 @@ icon_state = "aicard" // aicard-full item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT var/flush = null origin_tech = "programming=4;materials=4" diff --git a/code/game/objects/devices/chameleonproj.dm b/code/game/objects/devices/chameleonproj.dm index 0526ec5ff29..884dce76839 100644 --- a/code/game/objects/devices/chameleonproj.dm +++ b/code/game/objects/devices/chameleonproj.dm @@ -40,9 +40,10 @@ return /obj/item/device/chameleon - name = "chameleon-projector" + name = "small device" icon_state = "shield0" - flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY + slot_flags = SLOT_BELT item_state = "electronic" throwforce = 5.0 throw_speed = 1 diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm index 3508f652fc9..9b0f7b042bc 100644 --- a/code/game/objects/devices/flash.dm +++ b/code/game/objects/devices/flash.dm @@ -15,7 +15,7 @@ var/last_used = 0 //last world.time it was used. /obj/item/device/flash/proc/clown_check(var/mob/user) - if(user && (user.mutations & CLUMSY) && prob(50)) + if(user && (CLUMSY in user.mutations) && prob(50)) user << "\red The Flash slips out of your hand." user.drop_item() return 0 diff --git a/code/game/objects/devices/flashlight.dm b/code/game/objects/devices/flashlight.dm index 66b6f327f2f..62b9c9506e0 100644 --- a/code/game/objects/devices/flashlight.dm +++ b/code/game/objects/devices/flashlight.dm @@ -4,14 +4,14 @@ icon_state = "flight0" w_class = 2 item_state = "flight" - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT m_amt = 50 g_amt = 20 - var - on = 0 - brightness_on = 4 //luminosity when on - icon_on = "flight1" - icon_off = "flight0" + var/on = 0 + var/brightness_on = 4 //luminosity when on + var/icon_on = "flight1" + var/icon_off = "flight0" /obj/item/device/flashlight/initialize() ..() @@ -49,7 +49,7 @@ /obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob) src.add_fingerprint(user) if(src.on && user.zone_sel.selecting == "eyes") - if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly + if (((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly return ..()//just hit them in the head if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity @@ -69,7 +69,7 @@ if(M.stat > 1 || M.disabilities & 128)//mob is dead or fully blind if(M!=user) user.show_message(text("\red [] pupils does not react to the light!", M),1) - else if(M.mutations & XRAY)//mob has X-RAY vision + else if(XRAY in M.mutations)//mob has X-RAY vision if(M!=user) user.show_message(text("\red [] pupils give an eerie glow!", M),1) else //nothing wrong @@ -190,6 +190,28 @@ user.UpdateLuminosity() src.sd_SetLuminosity(brightness_on) +// the desk lamps are a bit special +/obj/item/device/flashlight/lamp + name = "desk lamp" + desc = "A desk lamp" + icon = 'lighting.dmi' + icon_state = "lamp0" + brightness_on = 5 + icon_on = "lamp1" + icon_off = "lamp0" + w_class = 4 + flags = FPRINT | TABLEPASS | CONDUCT + m_amt = 0 + g_amt = 0 + on = 1 + +// green-shaded desk lamp +/obj/item/device/flashlight/lamp/green + icon_state = "green0" + icon_on = "green1" + icon_off = "green0" + desc = "A green-shaded desk lamp" + /obj/item/device/flashlight/lamp/verb/toggle_light() set name = "Toggle light" set category = "Object" diff --git a/code/game/objects/devices/paicard.dm b/code/game/objects/devices/paicard.dm index 05cdbbd2196..e13b7c605ff 100644 --- a/code/game/objects/devices/paicard.dm +++ b/code/game/objects/devices/paicard.dm @@ -4,7 +4,8 @@ icon_state = "pai" item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT origin_tech = "programming=2" var/obj/item/device/radio/radio var/looking_for_personality = 0 @@ -90,7 +91,7 @@ else radio.wires |= t1 if(href_list["setlaws"]) - var/newlaws = input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message + var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN) if(newlaws) pai.pai_laws = newlaws pai << "Your supplemental directives have been updated. Your new directives are:" diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 8d0211e7f29..4d2a52722d3 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -14,7 +14,8 @@ MASS SPECTROMETER desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." icon_state = "t-ray0" var/on = 0 - flags = FPRINT|ONBELT|TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" m_amt = 150 @@ -59,188 +60,14 @@ MASS SPECTROMETER if(M) M.invisibility = 2 -/obj/item/device/detective_scanner - name = "Scanner" - desc = "Used to scan objects for DNA and fingerprints." - icon_state = "forensic1" - var/amount = 20.0 -// var/printing = 0.0 - var/list/stored = list() - w_class = 3.0 - item_state = "electronic" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY - - - attackby(obj/item/weapon/f_card/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/weapon/f_card)) - if (W.fingerprints) - return - if (src.amount == 20) - return - if (W.amount + src.amount > 20) - src.amount = 20 - W.amount = W.amount + src.amount - 20 - else - src.amount += W.amount - //W = null - del(W) - add_fingerprint(user) - if (W) - W.add_fingerprint(user) - return - -// attack_self(mob/user as mob) -// src.printing = !( src.printing ) -// if(src.printing) -// user << "\blue Printing turned on" -// else -// user << "\blue Printing turned off" -// src.icon_state = text("forensic[]", src.printing) -// add_fingerprint(user) -// return - - attack(mob/living/carbon/human/M as mob, mob/user as mob) - if (!ishuman(M)) - user << "\red [M] is not human and cannot have the fingerprints." - return 0 - if (( !( istype(M.dna, /datum/dna) ) || M.gloves) ) - user << "\blue No fingerprints found on [M]" - return 0 - else - if (src.amount < 1) - user << text("\blue Fingerprints scanned on [M]. Need more cards to print.") - else - src.amount-- - var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc ) - F.amount = 1 - F.add_fingerprint(M) - F.icon_state = "fingerprint1" - F.name = text("FPrintC- '[M.name]'") - - user << "\blue Done printing." - user << "\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]" - if ( !M.blood_DNA || !M.blood_DNA.len ) - user << "\blue No blood found on [M]" - if(M.blood_DNA) - del(M.blood_DNA) - else - user << "\blue Blood found on [M]. Analysing..." - spawn(15) - for(var/blood in M.blood_DNA) - user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]" - return - - afterattack(atom/A as obj|turf|area, mob/user as mob) - if(!(locate(A) in oview(1,user))) - return - if(src.loc != user) - return - if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit. - return - if(istype(A,/obj/item/weapon/f_card)) - user << "Haha, nice try. Cheater. (It would break stuff anyways.)" - return - if(!A.fingerprints) - A.fingerprints = list() - add_fingerprint(user) - - //Special case for blood splaters. - if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune)) - if(!isnull(A.blood_DNA)) - for(var/blood in A.blood_DNA) - user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]" - return - var/duplicate = 0 - //General - if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA) - user << "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!" - return 0 - - //BLOOD - else if (A.blood_DNA) - user << "\blue Blood found on [A]. Analysing..." - sleep(15) - if(!duplicate) - duplicate = 1 - var/i = add_data(A) - if(i) - user << "\blue Blood already in memory." - for(var/blood in A.blood_DNA) - user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]" - else - user << "\blue No Blood Located" - - //PRINTS - if(!A.fingerprints || !A.fingerprints.len) - user << "\blue No Fingerprints Located." - if(A.fingerprints) - del(A.fingerprints) - else - user << text("\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve.") - if(!duplicate) - duplicate = 1 - var/i = add_data(A) - if(i) - user << "\blue Fingerprints already in memory." - - //FIBERS - if(!A.suit_fibers) - user << "\blue No Fibers/Materials Located." - else - user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve." - - if(!duplicate) - duplicate = 1 - var/i = add_data(A) - if(i) - user << "\blue Fibers/Materials already in memory." - return - - proc/add_data(atom/A as mob|obj|turf|area) - //I love hashtables. - var/list/data_entry = stored["\ref [A]"] - if(islist(data_entry)) //Yay, it was already stored! - //Merge the fingerprints. - var/list/data_prints = data_entry[1] - for(var/print in A.fingerprints) - var/merged_print = data_prints[print] - if(!merged_print) - data_prints[print] = A.fingerprints[print] - else - data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print]) - - //Now the fibers - var/list/fibers = data_entry[2] - if(!fibers) - fibers = list() - if(A.suit_fibers && A.suit_fibers.len) - for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~ - if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add! - fibers += A.suit_fibers[j] - var/list/blood = data_entry[3] - if(!blood) - blood = list() - if(A.blood_DNA && A.blood_DNA.len) - for(var/main_blood in A.blood_DNA) - if(!blood[main_blood]) - blood[main_blood] = A.blood_DNA[blood] - return 1 - var/list/sum_list[4] //Pack it back up! - sum_list[1] = A.fingerprints - sum_list[2] = A.suit_fibers - sum_list[3] = A.blood_DNA - sum_list[4] = "\The [A] in [get_area(A)]" - stored["\ref [A]"] = sum_list - return 0 - /obj/item/device/healthanalyzer name = "Health Analyzer" icon_state = "health" item_state = "analyzer" desc = "A hand-held body scanner able to distinguish vital signs of the subject." - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT throwforce = 3 w_class = 1.0 throw_speed = 5 @@ -249,67 +76,67 @@ MASS SPECTROMETER origin_tech = "magnets=1;biotech=1" var/mode = 1; - proc - analyze_health_less_info(mob/living/carbon/M as mob, mob/user as mob) - var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) - if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath)) - user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1) - user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) +/obj/item/device/healthanalyzer/proc/analyze_health_less_info(mob/living/carbon/M as mob, mob/user as mob) + var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) + if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath)) + user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1) + user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) + else + user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health - M.halloss))), 1) + user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) + user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1) + user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) + if(mode == 1 && istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + var/list/damaged = H.get_damaged_organs(1,1) + user.show_message("\blue Localized Damage, Brute/Burn:",1) + if(length(damaged)>0) + for(var/datum/organ/external/org in damaged) + user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1) + else + user.show_message("\blue \t Limbs are OK.",1) + + if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder"))) + user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) + else + user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) + if (M.getCloneLoss()) + user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) + for(var/datum/disease/D in M.viruses) + if(!D.hidden[SCANNER]) + user.show_message(text("\red Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) + if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) + user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) + if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) + user.show_message(text("\red Subject is brain dead."), 1) + else if (M.getBrainLoss() >= 60) + user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1) + else if (M.getBrainLoss() >= 10) + user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1) + if (M.virus2 || M.reagents.reagent_list.len > 0) + user.show_message(text("\red Unknown substance detected in blood."), 1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + for(var/name in H.organs) + var/datum/organ/external/e = H.organs[name] + if(e.broken) + user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1) + break + if(ishuman(M)) + if(M:vessel) + var/blood_volume = round(M:vessel.get_reagent_amount("blood")) + var/blood_percent = blood_volume / 560 + blood_percent *= 100 + if(blood_volume <= 448) + user.show_message("\red Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl") + else if(blood_volume <= 336) + user.show_message("\red Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl") else - user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health - M.halloss))), 1) - user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) - user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1) - user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) - if(mode == 1 && istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - var/list/damaged = H.get_damaged_organs(1,1) - user.show_message("\blue Localized Damage, Brute/Burn:",1) - if(length(damaged)>0) - for(var/datum/organ/external/org in damaged) - user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1) - else - user.show_message("\blue \t Limbs are OK.",1) - if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder"))) - user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) - else - user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) - if (M.getCloneLoss()) - user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) - for(var/datum/disease/D in M.viruses) - if(!D.hidden[SCANNER]) - user.show_message(text("\red Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) - if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) - user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) - if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) - user.show_message(text("\red Subject is brain dead."), 1) - else if (M.getBrainLoss() >= 60) - user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1) - else if (M.getBrainLoss() >= 10) - user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1) - if (M.virus2 || M.reagents.reagent_list.len > 0) - user.show_message(text("\red Unknown substance detected in blood."), 1) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - for(var/name in H.organs) - var/datum/organ/external/e = H.organs[name] - if(e.broken) - user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1) - break - if(ishuman(M)) - if(M:vessel) - var/blood_volume = round(M:vessel.get_reagent_amount("blood")) - var/blood_percent = blood_volume / 560 - blood_percent *= 100 - if(blood_volume <= 448) - user.show_message("\red Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl") - else if(blood_volume <= 336) - user.show_message("\red Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl") - else - user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl") - return + user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl") + return /obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob) - if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) + if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) @@ -346,7 +173,8 @@ MASS SPECTROMETER icon_state = "atmos" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 throw_range = 20 diff --git a/code/game/objects/devices/traitordevices.dm b/code/game/objects/devices/traitordevices.dm new file mode 100644 index 00000000000..3c7387b9976 --- /dev/null +++ b/code/game/objects/devices/traitordevices.dm @@ -0,0 +1,61 @@ +/* + +Miscellaneous traitor devices + +BATTERER + + +*/ + +/* + +The Batterer, like a flashbang but 50% chance to knock people over. Can be either very +effective or pretty fucking useless. + +*/ + +/obj/item/device/batterer + name = "mind batterer" + desc = "A strange device with twin antennas." + icon_state = "batterer" + throwforce = 5 + w_class = 1.0 + throw_speed = 4 + throw_range = 10 + flags = FPRINT | TABLEPASS| CONDUCT + item_state = "electronic" + origin_tech = "magnets=3;combat=3;syndicate=3" + + var/times_used = 0 //Number of times it's been used. + var/max_uses = 2 + + +/obj/item/device/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0) + if(!user) return + if(times_used >= max_uses) + user << "\red The mind batterer has been burnt out!" + return + + user.attack_log += text("\[[time_stamp()]\] Used [src] to knock down people in the area.") + + for(var/mob/living/carbon/human/M in orange(10, user)) + spawn() + if(prob(50)) + + M.Weaken(rand(10,20)) + if(prob(25)) + M.Stun(rand(5,10)) + M << "\red You feel a tremendous, paralyzing wave flood your mind." + + else + M << "\red You feel a sudden, electric jolt travel through your head." + + playsound(src.loc, 'interference.ogg', 50, 1) + user << "\blue You trigger [src]." + times_used += 1 + if(times_used >= max_uses) + icon_state = "battererburnt" + + + + diff --git a/code/game/objects/door_assembly.dm b/code/game/objects/door_assembly.dm index f316fcc0e8c..4c9e9c7207c 100644 --- a/code/game/objects/door_assembly.dm +++ b/code/game/objects/door_assembly.dm @@ -184,7 +184,9 @@ obj/structure/door_assembly W:welding = 2 user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.") playsound(src.loc, 'Welder2.ogg', 50, 1) + if(do_after(user, 40)) + if(!src) return user << "\blue You dissasembled the airlock assembly!" new /obj/item/stack/sheet/metal(get_turf(src), 4) if(src.glass==1) @@ -194,52 +196,55 @@ obj/structure/door_assembly else user << "\blue You need more welding fuel to dissassemble the airlock assembly." return + else if(istype(W, /obj/item/weapon/wrench) && !anchored ) playsound(src.loc, 'Ratchet.ogg', 100, 1) - var/turf/T = get_turf(user) user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.") - sleep(40) - if(get_turf(user) == T) + + if(do_after(user, 40)) + if(!src) return user << "\blue You secured the airlock assembly!" src.name = "Secured Airlock Assembly" src.anchored = 1 + else if(istype(W, /obj/item/weapon/wrench) && anchored ) playsound(src.loc, 'Ratchet.ogg', 100, 1) - var/turf/T = get_turf(user) user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.") - sleep(40) - if(get_turf(user) == T) + if(do_after(user, 40)) + if(!src) return user << "\blue You unsecured the airlock assembly!" src.name = "Airlock Assembly" src.anchored = 0 + else if(istype(W, /obj/item/weapon/cable_coil) && state == 0 && anchored ) var/obj/item/weapon/cable_coil/coil = W - var/turf/T = get_turf(user) user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.") - sleep(40) - if(get_turf(user) == T) + if(do_after(user, 40)) + if(!src) return coil.use(1) src.state = 1 user << "\blue You wire the Airlock!" src.name = "Wired Airlock Assembly" + else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 ) playsound(src.loc, 'Wirecutter.ogg', 100, 1) - var/turf/T = get_turf(user) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") - sleep(40) - if(get_turf(user) == T) + + if(do_after(user, 40)) + if(!src) return user << "\blue You cut the airlock wires.!" - new/obj/item/weapon/cable_coil(T, 1) + new/obj/item/weapon/cable_coil(get_turf(user), 1) src.state = 0 src.name = "Secured Airlock Assembly" + else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 ) playsound(src.loc, 'Screwdriver.ogg', 100, 1) - var/turf/T = get_turf(user) user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.") user.drop_item() W.loc = src - sleep(40) - if(get_turf(user) == T) + + if(do_after(user, 40)) + if(!src) return user << "\blue You installed the airlock electronics!" var/obj/item/weapon/airlock_electronics/E = W @@ -263,12 +268,13 @@ obj/structure/door_assembly W.loc = src.loc //del(W) + else if(istype(W, /obj/item/weapon/crowbar) && state == 2 ) playsound(src.loc, 'Crowbar.ogg', 100, 1) - var/turf/T = get_turf(user) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.") - sleep(40) - if(get_turf(user) == T) + + if(do_after(user, 40)) + if(!src) return user << "\blue You removed the airlock electronics!" src.state = 1 src.name = "Wired Airlock Assembly" @@ -279,6 +285,7 @@ obj/structure/door_assembly ae = electronics electronics = null ae.loc = src.loc + else if(istype(W, /obj/item/stack/sheet/rglass) && glass == 0 && ispath(glass_type)) playsound(src.loc, 'Crowbar.ogg', 100, 1) user.visible_message("[user] adds reinforced glass windows to the airlock assembly.", "You start to install reinforced glass windows into the airlock assembly.") @@ -293,10 +300,10 @@ obj/structure/door_assembly src.airlock_type = glass_type else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 ) playsound(src.loc, 'Screwdriver.ogg', 100, 1) - var/turf/T = get_turf(user) user << "\blue Now finishing the airlock." - sleep(40) - if(get_turf(user) == T) + + if(do_after(user, 40)) + if(!src) return user << "\blue You finish the airlock!" var/obj/machinery/door/airlock/door if(glass) diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index c661ae8a725..1c0d6480d01 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -13,12 +13,16 @@ would spawn and follow the beaker, even if it is carried or thrown. unacidable = 1//So effect are not targeted by alien acid. flags = TABLEPASS +/obj/effect/ex_act(severity) + if(severity) + del(src) + /obj/effect/effect/water name = "water" icon = 'effects.dmi' icon_state = "extinguish" var/life = 15.0 - flags = 2.0 + flags = TABLEPASS mouse_opacity = 0 /obj/effect/effect/smoke @@ -1000,7 +1004,7 @@ steam.start() -- spawns the effect return attack_hand(var/mob/user) - if (user.mutations & HULK || (prob(75 - metal*25))) + if ((HULK in user.mutations) || (prob(75 - metal*25)) || (SUPRSTR in user.augmentations)) user << "\blue You smash through the metal foam wall." for(var/mob/O in oviewers(user)) if ((O.client && !( O.blinded ))) @@ -1044,44 +1048,17 @@ steam.start() -- spawns the effect proc/update_nearby_tiles(need_rebuild) if(!air_master) return 0 - var/turf/simulated/source = loc + var/turf/simulated/source = get_turf(src) var/turf/simulated/north = get_step(source,NORTH) var/turf/simulated/south = get_step(source,SOUTH) var/turf/simulated/east = get_step(source,EAST) var/turf/simulated/west = get_step(source,WEST) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(north)) - if(north.parent) - air_master.groups_to_rebuild += north.parent - else - air_master.tiles_to_update += north - if(istype(south)) - if(south.parent) - air_master.groups_to_rebuild += south.parent - else - air_master.tiles_to_update += south - if(istype(east)) - if(east.parent) - air_master.groups_to_rebuild += east.parent - else - air_master.tiles_to_update += east - if(istype(west)) - if(west.parent) - air_master.groups_to_rebuild += west.parent - else - air_master.tiles_to_update += west - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(north)) air_master.tiles_to_update += north - if(istype(south)) air_master.tiles_to_update += south - if(istype(east)) air_master.tiles_to_update += east - if(istype(west)) air_master.tiles_to_update += west + if(istype(source)) air_master.tiles_to_update |= source + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return 1 diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 1dda1b438f6..3210d70d6ef 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -28,58 +28,59 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa E.set_up(epicenter) E.start() - var/list/exTurfs = list() + var/list/dTurfs = list() //Holds the turfs in devestation range. + var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range. + var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range. + var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty) if(roundExplosions) - for(var/turf/T in circlerange(epicenter,light_impact_range)) - exTurfs += T + fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range)) + dTurfs = circlerange(epicenter,devastation_range) + hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs + lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs else - for(var/turf/T in range(light_impact_range, epicenter)) - exTurfs += T + fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range)) + dTurfs = range(epicenter,devastation_range) + hTurfs = range(epicenter,heavy_impact_range) - dTurfs + lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs - for(var/turf/T in exTurfs) - var/distance = 0 - if(roundExplosions) - distance = get_dist_euclidian(epicenter, T) - else - distance = get_dist(epicenter, T) - if(distance < 0) - distance = 0 - if(distance < devastation_range) - for(var/atom/object in T.contents) - spawn() - if(object) - object.ex_act(1) - if(prob(5)) - if(T) + + for(var/turf/T in dTurfs) //Loop through the turfs in devestation range. + spawn() //Try to pop each turf into it's own thread, speed things along. + if(T) //Sanity checking. + //Now, the actual explosion stuff happens. + if(prob(5)) T.ex_act(2) - else - if(T) + else T.ex_act(1) - else if(distance < heavy_impact_range) - for(var/atom/object in T.contents) - spawn() - if(object) - object.ex_act(2) + for(var/atom/object in T.contents) + spawn() + if(object) + object.ex_act(1) + + for(var/turf/T in hTurfs) + spawn() if(T) - T.ex_act(2) - else if (distance == heavy_impact_range) - for(var/atom/object in T.contents) - if(object) - object.ex_act(2) - if(prob(15) && devastation_range > 2 && heavy_impact_range > 2) - secondaryexplosion(T, 1) - else - if(T) + if(prob(15) && devastation_range > 2 && heavy_impact_range > 2) + secondaryexplosion(T, 1) + else T.ex_act(2) - else if(distance <= light_impact_range) - for(var/atom/object in T.contents) - spawn() - if(object) - object.ex_act(3) + for(var/atom/object in T.contents) + spawn() + if(object) + object.ex_act(2) + + for(var/turf/T in lTurfs) + spawn() if(T) T.ex_act(3) - for(var/mob/living/carbon/mob in T) + for(var/atom/object in T.contents) + spawn() + if(object) + object.ex_act(3) + + spawn() + for(var/mob/living/carbon/mob in fTurfs) flick("flash", mob:flash) sleep(-1) @@ -91,5 +92,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa proc/secondaryexplosion(turf/epicenter, range) - for(var/turf/tile in range(range, epicenter)) - tile.ex_act(2) \ No newline at end of file + spawn() + for(var/turf/tile in range(range, epicenter)) + tile.ex_act(2) \ No newline at end of file diff --git a/code/game/objects/gibs.dm b/code/game/objects/gibs.dm index ab11d1caf5b..0dcbf964503 100644 --- a/code/game/objects/gibs.dm +++ b/code/game/objects/gibs.dm @@ -51,6 +51,7 @@ gib.viruses += viruus viruus.holder = gib viruus.spread_type = CONTACT_FEET + gib.blood_DNA = list() if(MobDNA) gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type if(MobDNA.original_name != "Unknown") diff --git a/code/game/objects/grille.dm b/code/game/objects/grille.dm index b584f5ec996..82d2fdf16b6 100644 --- a/code/game/objects/grille.dm +++ b/code/game/objects/grille.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /obj/structure/grille desc = "A piece of metal with evenly spaced gridlike holes in it. Blocks large object but lets small items, gas, or energy beams through. Strangely enough these grilles also lets meteors pass through them, whether they be small or huge station breaking death stones." name = "grille" @@ -8,9 +10,8 @@ flags = FPRINT | CONDUCT pressure_resistance = 5*ONE_ATMOSPHERE layer = 2.9 - var - health = 10 - destroyed = 0 + var/health = 10 + var/destroyed = 0 proc healthcheck() shock(mob/user, prb) @@ -48,7 +49,7 @@ user.visible_message("[user.name] kicks the [src.name].", \ "You kick the [src.name].", \ "You hear a noise") - if((usr.mutations & HULK)) + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) src.health -= 5 else if(!shock(user, 70)) src.health -= 3 @@ -93,7 +94,7 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSGRILLE)) + if(istype(mover) && mover.pass_flags & PASSGRILLE) return 1 else if (istype(mover, /obj/item/projectile)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2065a50acd7..ba9c5a979fa 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -8,7 +8,6 @@ /obj/item/weapon/bedsheet/attack_self(mob/user as mob) user.drop_item() src.layer = 5 - user.update_clothing() add_fingerprint(user) return @@ -28,7 +27,7 @@ M.handcuffed = new /obj/item/weapon/handcuffs(M) else - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << "\red Uh ... how do those things work?!" if (istype(M, /mob/living/carbon/human)) if(!M.handcuffed) @@ -118,13 +117,13 @@ if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1) var/obj/o = target o.reagents.trans_to(src, 50) - user << "\blue Extinguisher refilled" + user << "\blue \The [src] is now refilled" playsound(src.loc, 'refill.ogg', 50, 1, -6) return if (!safety) if (src.reagents.total_volume < 1) - usr << "\red the [src] is empty." + usr << "\red \The [src] is empty." return if (world.time < src.last_use + 20) @@ -565,3 +564,20 @@ for(var/mob/M in viewers(5, src)) M << "\red \the [src] burns up." del(src) + +/obj/item/weapon/megaphone/attack_self(mob/user as mob) + if(!ishuman(user)) + usr << "\red You don't know how to use this!" + return + if(cooldown) + usr << "\red \The [src] needs to recharge!" + return + var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN) + if(message && !cooldown) + if ((src.loc == user && usr.stat == 0)) + for(var/mob/O in (viewers(user))) + O.show_message("[user] broadcasts, \"[message]\"",2) // 2 stands for hearable message + cooldown = 1 + spawn(100) + cooldown = 0 + return diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 33a1c461ea7..d93e157d767 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + #define CANDLE_LUM 3 /obj/item/candle @@ -7,9 +9,8 @@ icon_state = "candle1" item_state = "candle1" - var - wax = 200 - lit = 0 + var/wax = 200 + var/lit = 0 proc light(var/flavor_text = "\red [usr] lights the [name].") @@ -94,7 +95,8 @@ w_class = 1 throwforce = 2 var/candlecount = 5 - flags = ONBELT | TABLEPASS + flags = TABLEPASS + slot_flags = SLOT_BELT /obj/item/weapon/candlepack/update_icon() diff --git a/code/game/objects/items/clothing.dm b/code/game/objects/items/clothing.dm index 6aafd6c53a8..7eb200596e4 100644 --- a/code/game/objects/items/clothing.dm +++ b/code/game/objects/items/clothing.dm @@ -398,10 +398,16 @@ THERMAL GLASSES usr << "You unbutton the labcoat." else if(src.icon_state == "fr_jacket_open") src.icon_state = "fr_jacket" - usr << "You button up the labcoat." + usr << "You button up the jacket." else if(src.icon_state == "fr_jacket") src.icon_state = "fr_jacket_open" - usr << "You unbutton the labcoat." + usr << "You unbutton the jacket." + else if(src.icon_state == "fr_sleeve_open") + src.icon_state = "fr_sleeve" + usr << "You button up the jacket." + else if(src.icon_state == "fr_sleeve") + src.icon_state = "fr_sleeve_open" + usr << "You unbutton the jacket." else usr << "Sorry! The suit you're wearing doesn't have buttons!" usr.update_clothing() @@ -428,10 +434,10 @@ THERMAL GLASSES M.disabilities &= ~1 ..() -/obj/item/clothing/head/helmet/space/rig/engspace_helmet/attack_self() +/obj/item/clothing/head/helmet/space/engineer/attack_self() toggle() -/obj/item/clothing/head/helmet/space/rig/engspace_helmet/verb/toggle() +/obj/item/clothing/head/helmet/space/engineer/verb/toggle() set category = "Object" set name = "Toggle Helmet Visor" if(usr.canmove && usr.stat != 2 && !usr.restrained()) @@ -439,34 +445,13 @@ THERMAL GLASSES src.up = !src.up src.see_face = !src.see_face src.flags |= HEADCOVERSEYES - icon_state = "engspace_helmet" + icon_state = "[initial(icon_state)]" usr << "You toggle the reflective tint on." else src.up = !src.up src.see_face = !src.see_face src.flags &= ~HEADCOVERSEYES - icon_state = "engspace_helmet_clear" - usr << "You toggle the reflective tint off." - usr.update_clothing() - -/obj/item/clothing/head/helmet/space/rig/cespace_helmet/attack_self() - toggle() - -/obj/item/clothing/head/helmet/space/rig/cespace_helmet/verb/toggle() - set category = "Object" - set name = "Toggle Helmet Visor" - if(usr.canmove && usr.stat != 2 && !usr.restrained()) - if(src.up) - src.up = !src.up - src.see_face = !src.see_face - src.flags |= HEADCOVERSEYES - icon_state = "cespace_helmet" - usr << "You toggle the reflective tint on." - else - src.up = !src.up - src.see_face = !src.see_face - src.flags &= ~HEADCOVERSEYES - icon_state = "cespace_helmet_clear" + icon_state = "[initial(icon_state)]_clear" usr << "You toggle the reflective tint off." usr.update_clothing() diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 7e269078e85..682cfae67d3 100755 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -70,41 +70,6 @@ src.loc = T - -obj/item/verb/pick_up() - set name = "Pick Up" - set category = "Object" - set src in view(1) - - if(!(usr)) - return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain - usr << "\red You can't pick things up!" - return - if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained - usr << "\red You can't pick things up!" - return - if(src.anchored) //Object isn't anchored - usr << "\red You can't pick that up!" - return - if(!usr.hand && usr.r_hand) //Right hand is not full - usr << "\red Your right hand is full." - return - if(usr.hand && usr.l_hand) //Left hand is not full - usr << "\red Your left hand is full." - return - if(!istype(src.loc, /turf)) //Object is on a turf - usr << "\red You can't pick that up!" - return - //All checks are done, time to pick it up! - if(istype(usr, /mob/living/carbon/human)) - src.attack_hand(usr) - if(istype(usr, /mob/living/carbon/alien)) - src.attack_alien(usr) - if(istype(usr, /mob/living/carbon/monkey)) - src.attack_paw(usr) - return - /obj/item/examine() set src in view() @@ -121,7 +86,7 @@ obj/item/verb/pick_up() if(5.0) t = "huge" else - if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking" + if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) if(src.desc) usr << src.desc @@ -302,6 +267,9 @@ mob/proc/flash_weak_pain() // M.lastattacker = null ///////////////////////// + if((HULK in user.mutations) || (SUPRSTR in user.augmentations)) + power *= 2 + if(!istype(M, /mob/living/carbon/human)) if(istype(M, /mob/living/carbon/metroid)) var/mob/living/carbon/metroid/Metroid = M @@ -410,7 +378,7 @@ mob/proc/flash_weak_pain() if (istype(location, /turf/simulated)) location.add_blood_floor(M) if("fire") - if (!(M.mutations & COLD_RESISTANCE)) + if (!(COLD_RESISTANCE in M.mutations)) M.take_organ_damage(0, power) M << "Aargh it burns!" M.updatehealth() @@ -454,7 +422,7 @@ mob/proc/flash_weak_pain() log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") src.add_fingerprint(user) - //if((user.mutations & CLUMSY) && prob(50)) + //if((CLUMSY in user.mutations) && prob(50)) // M = user /* M << "\red You stab yourself in the eye." diff --git a/code/game/objects/items/robot_items.dm b/code/game/objects/items/robot_items.dm index 30e18dc1777..a57bc2ed88a 100644 --- a/code/game/objects/items/robot_items.dm +++ b/code/game/objects/items/robot_items.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /********************************************************************** Cyborg Spec Items ***********************************************************************/ @@ -90,8 +92,7 @@ possible_transfer_amounts = list(5,10,15,25,30,50,100) flags = FPRINT | TABLEPASS | OPENCONTAINER volume = 60 - var - reagent = "" + var/reagent = "" /obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline @@ -221,11 +222,10 @@ flags = FPRINT | TABLEPASS| CONDUCT force = 5.0 w_class = 3.0 - var // datum/effect/effect/system/spark_spread/spark_system - working = 0 - mode = 1 - disabled = 0 + var/working = 0 + var/mode = 1 + var/disabled = 0 /* New() diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm index c392932ff22..169adde5b8e 100644 --- a/code/game/objects/items/robot_parts.dm +++ b/code/game/objects/items/robot_parts.dm @@ -3,7 +3,8 @@ icon = 'robot_parts.dmi' item_state = "buildpipe" icon_state = "blank" - flags = FPRINT | ONBELT | TABLEPASS | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/construction_time = 100 var/list/construction_cost = list("metal"=20000,"glass"=5000) @@ -220,7 +221,7 @@ if (istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + t = copytext(sanitize(t), 1, MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/objects/items/tk_grab.dm b/code/game/objects/items/tk_grab.dm index a506cf43087..a621dec8d4a 100644 --- a/code/game/objects/items/tk_grab.dm +++ b/code/game/objects/items/tk_grab.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /obj/item/tk_grab name = "Telekinetic Grab" desc = "Magic" @@ -8,10 +10,9 @@ w_class = 10.0 layer = 20 - var - last_throw = 0 - obj/focus = null - mob/living/host = null + var/last_throw = 0 + var/obj/focus = null + var/mob/living/host = null dropped(mob/user as mob) @@ -47,7 +48,7 @@ if(!host) del(src) return - if(!host.mutations & TK) + if(!(TK in host.mutations)) del(src) return if(!focus) @@ -113,7 +114,7 @@ //equip_if_possible(obj/item/W, slot, del_on_fail = 1) /* if(istype(user, /mob/living/carbon)) - if(user:mutations & TK && get_dist(source, user) <= 7) + if((TK in user:mutations) && get_dist(source, user) <= 7) if(user:equipped()) return 0 var/X = source:x var/Y = source:y diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index ecb7bc49f02..627a2a5f849 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -46,6 +46,9 @@ name = "candle" icon = 'candle.dmi' icon_state = "candle4" + liquidfood + name = "\improper \"LiquidFood\" ration" + icon_state = "liquidfood" /obj/item/trash/attack(mob/M as mob, mob/living/user as mob) return @@ -58,7 +61,8 @@ desc = "A heavy-duty, no fun allowed trash bag." var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 25; //the number of trash it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 2.0 /obj/item/weapon/trashbag/update_icon() @@ -88,6 +92,7 @@ if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete user << "\blue You pick up all the trash." for(var/obj/item/O in get_turf(W)) + if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak if(contents.len < capacity) if(O.w_class <= 2) contents += O; @@ -97,6 +102,7 @@ else user << "\blue The bag is full!" else + if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak if(contents.len < capacity) contents += W; else diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 4f2ffc43991..9a00bbb85bc 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -91,8 +91,8 @@ AI MODULES /obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob) ..() - var/targName = input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name) - targetName = sanitize(targName) + var/targName = copytext(sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)),1,MAX_MESSAGE_LEN) + targetName = targName desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not crew and are a threat to crew.'", targetName, targetName) /obj/item/weapon/aiModule/safeguard/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) @@ -114,8 +114,8 @@ AI MODULES /obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob) ..() - var/targName = input(usr, "Please enter the name of the person who is the only crewmember.", "Who?", user.real_name) - targetName = sanitize(targName) + var/targName = copytext(sanitize(input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)),1,MAX_MESSAGE_LEN) + targetName = targName desc = text("A 'one crewmember' AI module: 'Only [] is crewmember.'", targetName) /obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) @@ -247,8 +247,8 @@ AI MODULES lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num lawpos = min(lawpos, 50) var/newlaw = "" - var/targName = input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw) - newFreeFormLaw = sanitize(targName) + var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN) + newFreeFormLaw = targName desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'" /obj/item/weapon/aiModule/freeform/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) @@ -390,8 +390,8 @@ AI MODULES /obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw) - newFreeFormLaw = sanitize(targName) + var/targName = copytext(sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN) + newFreeFormLaw = targName desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'" /obj/item/weapon/aiModule/freeformcore/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) @@ -411,8 +411,8 @@ AI MODULES /obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw) - newFreeFormLaw = sanitize(targName) + var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN) + newFreeFormLaw = targName desc = "A hacked AI law module: '[newFreeFormLaw]'" /obj/item/weapon/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 25f32a39343..db9f1206a34 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /* CONTAINS: RCD @@ -18,13 +20,12 @@ RCD w_class = 3.0 m_amt = 50000 origin_tech = "engineering=4;materials=2" - var - datum/effect/effect/system/spark_spread/spark_system - matter = 0 - working = 0 - mode = 1 - disabled = 0 - max_matter = 30 + var/datum/effect/effect/system/spark_spread/spark_system + var/matter = 0 + var/working = 0 + var/mode = 1 + var/disabled = 0 + var/max_matter = 30 New() diff --git a/code/game/objects/items/weapons/cameras.dm b/code/game/objects/items/weapons/cameras.dm index 7899721c493..69c48c6795e 100644 --- a/code/game/objects/items/weapons/cameras.dm +++ b/code/game/objects/items/weapons/cameras.dm @@ -42,7 +42,8 @@ icon_state = "camera" item_state = "electropack" w_class = 2.0 - flags = 466.0 + flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS + slot_flags = SLOT_BELT m_amt = 2000 throwforce = 5 throw_speed = 4 @@ -51,7 +52,6 @@ var/pictures_left = 30 var/can_use = 1 - /obj/item/weapon/photo name = "photo" icon = 'items.dmi' diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 96e712bc5d0..0241b13390b 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -233,15 +233,13 @@ FINGERPRINT CARD return /obj/item/weapon/f_card/proc/display() - if(!fingerprints) return - if (length(fingerprints)) + if(!fingerprints || !fingerprints.len) + return "There are no fingerprints on this card." + else var/dat = "Fingerprints on Card
    " for(var/name in fingerprints) dat += "[name]
    " - //Foreach goto(41) return dat - else - return "There are no fingerprints on this card." return /* @@ -297,7 +295,7 @@ FINGERPRINT CARD else src.name = "Finger Print Card" W.add_fingerprint(user) - add_fingerprint(user) + src.add_fingerprint(user) return /obj/item/weapon/f_card/add_fingerprint() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 7e0c05a1768..cd6b29491a4 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /* CONTAINS: MATCHES @@ -63,7 +65,8 @@ ZIPPO icon_state = "matchbox" item_state = "zippo" w_class = 1 - flags = ONBELT | TABLEPASS + flags = TABLEPASS + slot_flags = SLOT_BELT var/matchcount = 10 w_class = 1.0 @@ -113,14 +116,14 @@ ZIPPO item_state = "cigoff" w_class = 1 body_parts_covered = null - var - lit = 0 - icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi - icon_off = "cigoff" - icon_butt = "cigbutt" - lastHolder = null - smoketime = 300 - butt_count = 5 //count of butt sprite variations + var/lit = 0 + var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi + var/icon_off = "cigoff" + var/icon_butt = "cigbutt" + var/lastHolder = null + var/smoketime = 300 + var/butt_count = 5 //count of butt sprite variations + proc light(var/flavor_text = "[usr] lights the [name].") @@ -161,7 +164,6 @@ ZIPPO processing_objects.Add(src) - process() var/turf/location = get_turf(src) src.smoketime-- @@ -244,13 +246,13 @@ ZIPPO item_state = "cobpipeoff" w_class = 1 body_parts_covered = null - var - lit = 0 - icon_on = "cobpipeon" //Note - these are in masks.dmi - icon_off = "cobpipeoff" - lastHolder = null - smoketime = 100 - maxsmoketime = 100 //make sure this is equal to your smoketime + var/lit = 0 + var/icon_on = "cobpipeon" //Note - these are in masks.dmi + var/icon_off = "cobpipeoff" + var/lastHolder = null + var/smoketime = 100 + var/maxsmoketime = 100 //make sure this is equal to your smoketime + proc light(var/flavor_text = "[usr] lights the [name].") @@ -337,9 +339,9 @@ ZIPPO item_state = "cigpacket" w_class = 1 throwforce = 2 - flags = ONBELT | TABLEPASS - var - cigcount = 6 + flags = TABLEPASS + slot_flags = SLOT_BELT + var/cigcount = 6 update_icon() @@ -382,11 +384,12 @@ ZIPPO var/icon_off = "lighter-g" w_class = 1 throwforce = 4 - flags = ONBELT | TABLEPASS | CONDUCT + flags = TABLEPASS | CONDUCT + slot_flags = SLOT_BELT var/lit = 0 /obj/item/weapon/lighter/zippo - name = "Zippo lighter" + name = "\improper Zippo lighter" desc = "The zippo." icon_state = "zippo" item_state = "zippo" @@ -410,16 +413,16 @@ ZIPPO src.item_state = icon_on if( istype(src,/obj/item/weapon/lighter/zippo) ) for(var/mob/O in viewers(user, null)) - O.show_message(text("\red Without even breaking stride, [] flips open and lights [] in one smooth movement.", user, src), 1) + O.show_message(text("\red Without even breaking stride, \the [] flips open and lights \the [] in one smooth movement.", user, src), 1) else if(prob(75)) for(var/mob/O in viewers(user, null)) - O.show_message("\red After a few attempts, [user] manages to light [src].", 1) + O.show_message("\red After a few attempts, \the [user] manages to light \the [src].", 1) else user << "\red You burn yourself while lighting the lighter." user.adjustFireLoss(5) for(var/mob/O in viewers(user, null)) - O.show_message("\red After a few attempts, [user] manages to light [src], they however burn their finger in the process.", 1) + O.show_message("\red After a few attempts, \the [user] manages to light \the [src], they however burn themself in the process.", 1) user.total_luminosity += 2 processing_objects.Add(src) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 8bcde897038..46ee8750c72 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -23,7 +23,7 @@ /obj/item/weapon/dnainjector/proc/inject(mob/M as mob) M.radiation += rand(20,50) - if (!(M.mutations2 & NOCLONE)) // prevents drained people from having their DNA changed + if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed if (dnatype == "ui") if (!block) //isolated block? if (ue) //unique enzymes? yes diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 1548cb45418..6ad3f7eda1c 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -1,5 +1,7 @@ /obj/item/weapon/plastique/attack_self(mob/user as mob) - var/newtime = input(usr, "Please set the timer.", "Timer", 10) + var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num + if(newtime < 1) + newtime = 10 timer = newtime user << "Timer set for [timer] seconds." @@ -26,6 +28,8 @@ message_admins("ATTACK: [user] ([user.ckey]) planted [src] on [target] ([target:ckey]).") log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])") target.overlays += image('assemblies.dmi', "plastic-explosive2") + log_admin("[user] ([user.ckey]) has planted a [src].") + message_admins("[user] ([user.ckey]) planted a [src].") user << "Bomb has been planted. Timer counting down from [timer]." spawn(timer*10) if(target) diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 7ed926c801d..a20c6a20c7c 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/flamethrower/full/New(var/loc) ..() weldtool = new/obj/item/weapon/weldingtool(src) @@ -24,15 +26,14 @@ w_class = 3.0 m_amt = 500 origin_tech = "combat=1;plasmatech=1" - var - status = 0 - throw_amount = 100 - lit = 0 //on or off - operating = 0//cooldown - turf/previousturf = null - obj/item/weapon/weldingtool/weldtool = null - obj/item/device/assembly/igniter/igniter = null - obj/item/weapon/tank/plasma/ptank = null + var/status = 0 + var/throw_amount = 100 + var/lit = 0 //on or off + var/operating = 0//cooldown + var/turf/previousturf = null + var/obj/item/weapon/weldingtool/weldtool = null + var/obj/item/device/assembly/igniter/igniter = null + var/obj/item/weapon/tank/plasma/ptank = null Del() @@ -236,11 +237,13 @@ /obj/item/weapon/flamethrower/proc/ignite_turf(turf/target) //TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this... //Transfer 5% of current tank air contents to turf - var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05*throw_amount/100) - air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE + var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100)) + //air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE + new/obj/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target)) + air_transfer.toxins = 0 target.assume_air(air_transfer) //Burn it based on transfered gas //target.hotspot_expose(part4.air_contents.temperature*2,300) target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE //location.hotspot_expose(1000,500,1) - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm index 96e5480a8b0..b9ed0be9c89 100644 --- a/code/game/objects/items/weapons/grenades.dm +++ b/code/game/objects/items/weapons/grenades.dm @@ -14,15 +14,17 @@ FLASHBANG item_state = "emp" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT origin_tech = "materials=2;magnets=3" - var - active = 0 - det_time = 50 - proc - prime() - clown_check(var/mob/living/user) + var/active = 0 + var/det_time = 50 + proc/prime() + return + + proc/clown_check(var/mob/living/user) + return afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container @@ -66,7 +68,7 @@ FLASHBANG clown_check(var/mob/living/user) - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.active = 1 src.icon_state = "empar" @@ -88,17 +90,21 @@ FLASHBANG item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT origin_tech = "materials=2;combat=1" - var - active = 0 - det_time = 30 - banglet = 0 - proc - bang(var/turf/T , var/mob/living/carbon/M) - prime() - clown_check(var/mob/living/user) + var/active = 0 + var/det_time = 30 + var/banglet = 0 + proc/bang(var/turf/T , var/mob/living/carbon/M) + return + + proc/prime() + return + + proc/clown_check(var/mob/living/user) + return attackby(obj/item/weapon/W as obj, mob/user as mob) if (isscrewdriver(W)) @@ -169,7 +175,7 @@ FLASHBANG if(ishuman(M)) if(istype(M:l_ear, /obj/item/clothing/ears/earmuffs) || istype(M:r_ear, /obj/item/clothing/ears/earmuffs)) ear_safety += 2 - if(M.mutations & HULK) + if(HULK in M.mutations) ear_safety += 1 if(istype(M:head, /obj/item/clothing/head/helmet)) ear_safety += 1 @@ -227,7 +233,6 @@ FLASHBANG M << "\red Your ears start to ring!" prime() // Prime now just handles the two loops that query for people in lockers and people who can see it. - var/turf/T = get_turf(src) if(T) T.hotspot_expose(700,125) @@ -272,7 +277,7 @@ FLASHBANG clown_check(var/mob/living/user) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.active = 1 src.icon_state = "flashbang1" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 6c0fd9a6bcc..f5422469e2f 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -1,24 +1,35 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/implant name = "implant" desc = "An implant. Not usually seen outside a body." icon = 'items.dmi' icon_state = "implant" - var - implanted = null - mob/imp_in = null - color = "b" - allow_reagents = 0 - proc - trigger(emote, source as mob) - activate() - implanted(source as mob) - get_data() - hear(message, source as mob) + var/implanted = null + var/mob/imp_in = null + color = "b" + var/allow_reagents = 0 + + proc/trigger(emote, source as mob) + return + + proc/activate() + return + + proc/implanted(source as mob) + return + + proc/get_data() + return + + proc/hear(message, source as mob) + return trigger(emote, source as mob) return + activate() return @@ -37,6 +48,7 @@ implanted(source as mob) return + get_data() return "No information available" @@ -48,9 +60,8 @@ /obj/item/weapon/implant/uplink name = "uplink implant" desc = "A micro-telecrystal implant which allows for instant transportation of equipment." - var - activation_emote = "chuckle" - obj/item/device/uplink/radio/uplink = null + var/activation_emote = "chuckle" + var/obj/item/device/uplink/radio/uplink = null New() @@ -77,8 +88,7 @@ /obj/item/weapon/implant/tracking name = "tracking implant" desc = "An implant which relays information to the appropriate tracking computer." - var - id = 1.0 + var/id = 1.0 get_data() diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 1c792e6fe75..95939663466 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/implantcase name = "Glass Case" desc = "A case containing an implant." @@ -6,8 +8,7 @@ throw_speed = 1 throw_range = 5 w_class = 1.0 - var - obj/item/weapon/implant/imp = null + var/obj/item/weapon/implant/imp = null proc update() @@ -125,4 +126,4 @@ New() src.imp = new /obj/item/weapon/implant/death_alarm( src ) ..() - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index f73af2ad2b1..4f49e2ca497 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/implantchair name = "Loyalty Implanter" desc = "Used to implant occupants with loyalty implants." @@ -7,16 +9,15 @@ opacity = 0 anchored = 1 - var - ready = 1 - malfunction = 0 - list/obj/item/weapon/implant/loyalty/implant_list = list() - max_implants = 5 - injection_cooldown = 600 - replenish_cooldown = 6000 - replenishing = 0 - mob/living/carbon/occupant = null - injecting = 0 + var/ready = 1 + var/malfunction = 0 + var/list/obj/item/weapon/implant/loyalty/implant_list = list() + var/max_implants = 5 + var/injection_cooldown = 600 + var/replenish_cooldown = 6000 + var/replenishing = 0 + var/mob/living/carbon/occupant = null + var/injecting = 0 proc go_out() diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index d32bb8155d4..d07152f7e8a 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -6,106 +6,105 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - var - obj/item/weapon/implant/imp = null - proc - update() + var/obj/item/weapon/implant/imp = null + +/obj/item/weapon/implanter/proc/update() - update() - if (imp) - icon_state = "implanter1" +/obj/item/weapon/implanter/update() + if (imp) + icon_state = "implanter1" + else + icon_state = "implanter0" + return + + +/obj/item/weapon/implanter/attack(mob/M as mob, mob/user as mob) + if (!istype(M, /mob/living/carbon)) + return + if (user && imp) + if (M != user) + user.visible_message("\red \The [user] tries to implant \the [M] with \the [src]!","\red You try to implant \the [M] with \the [src]!") else - icon_state = "implanter0" - return - - - attack(mob/M as mob, mob/user as mob) - if (!istype(M, /mob/living/carbon)) + user.visible_message("\red \The [user] tries to implant [user.get_gender_form("itself")] with \the [src]!","\red You try to implant yourself with \the [src]!") + if(!do_mob(user, M,60)) return - if (user && imp) - if (M != user) - user.visible_message("\red [user] tries to implant [M] with \the [src]!","\red You try to implant [M] with \the [src]!") - else - user.visible_message("\red [user] tries to implant [user.gender == MALE? "himself":"herself"] with \the [src]!","\red You try to implant yourself with \the [src]!") - if(!do_mob(user, M,60)) + if(hasorgans(M)) + var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting)) + if(target.destroyed) + user << "What [target.display_name]?" return - if(hasorgans(M)) - var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting)) - if(target.destroyed) - user << "What [target.display_name]?" - return - target.implant += imp - imp.loc = target - if (M != user) - user.visible_message("\red [user] implants [M]'s [target.display_name] with \the [src]!","\red You implant [M]'s [target.display_name] with \the [src]!") - else - user.visible_message("\red [user] implants [user.gender == MALE? "his own ":"her own "][target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!") - M.attack_log += text("\[[time_stamp()]\] Implanted with [src] ([imp]) by [user] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src] ([imp]) to implant [M] ([M.ckey])") - log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].") - message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].") - log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") - imp.imp_in = M - imp.implanted = 1 - imp.implanted(M) - imp = null - icon_state = "implanter0" - return + target.implant += imp + imp.loc = target + if (M != user) + user.visible_message("\red \The [user] implants \the [M]'s [target.display_name] with \the [src]!","\red You implant \the [M]'s [target.display_name] with \the [src]!") + else + user.visible_message("\red \The [user] implants [user.get_gender_form("its")] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!") + M.attack_log += text("\[[time_stamp()]\] Implanted with [src] ([imp]) by [user] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src] ([imp]) to implant [M] ([M.ckey])") + log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].") + message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].") + log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + imp.imp_in = M + imp.implanted = 1 + imp.implanted(M) + imp = null + icon_state = "implanter0" + return /obj/item/weapon/implanter/loyalty name = "implanter-loyalty" - New() - imp = new /obj/item/weapon/implant/loyalty( src ) - ..() - update() - return +/obj/item/weapon/implanter/loyalty/New() + imp = new /obj/item/weapon/implant/loyalty( src ) + ..() + update() + return /obj/item/weapon/implanter/explosive - name = "implanter-explosive" + name = "implanter (E)" - New() - imp = new /obj/item/weapon/implant/explosive( src ) - ..() - update() - return +/obj/item/weapon/implanter/explosive/New() + imp = new /obj/item/weapon/implant/explosive( src ) + ..() + update() + return /obj/item/weapon/implanter/compressed - name = "implanter-compressed" + name = "implanter (C)" icon_state = "cimplanter0" - New() - imp = new /obj/item/weapon/implant/compressed( src ) - ..() - update() - return - +/obj/item/weapon/implanter/compressed/New() + imp = new /obj/item/weapon/implant/compressed( src ) + ..() update() - if (imp) - var/obj/item/weapon/implant/compressed/c = imp - if(!c.scanned) - icon_state = "cimplanter0" - else - icon_state = "cimplanter1" - else - icon_state = "cimplanter2" - return + return - attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/implanter/compressed/update() + if (imp) var/obj/item/weapon/implant/compressed/c = imp - if (c.scanned == null) - user << "Please scan an object with the implanter first." - return - ..() + if(!c.scanned) + icon_state = "cimplanter0" + else + icon_state = "cimplanter1" + else + icon_state = "cimplanter2" + return - afterattack(atom/A, mob/user as mob) - if(istype(A,/obj/item)) - var/obj/item/weapon/implant/compressed/c = imp - c.scanned = A - A.loc.contents.Remove(A) - update() \ No newline at end of file +/obj/item/weapon/implanter/compressed/attack(mob/M as mob, mob/user as mob) + var/obj/item/weapon/implant/compressed/c = imp + if (c.scanned == null) + user << "Please scan an object with the implanter first." + return + ..() + +/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob) + if(istype(A,/obj/item)) + var/obj/item/weapon/implant/compressed/c = imp + c.scanned = A + A.loc.contents.Remove(A) + update() diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm index 21cb9f81f9e..7540061142b 100644 --- a/code/game/objects/items/weapons/implants/implantfreedom.dm +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -1,10 +1,11 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/implant/freedom name = "freedom" desc = "Use this to escape from those evil Red Shirts." color = "r" - var - activation_emote = "chuckle" - uses = 1.0 + var/activation_emote = "chuckle" + var/uses = 1.0 New() diff --git a/code/game/objects/items/weapons/implants/implantnanoaug.dm b/code/game/objects/items/weapons/implants/implantnanoaug.dm new file mode 100644 index 00000000000..2914a8da199 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantnanoaug.dm @@ -0,0 +1,179 @@ +/obj/item/weapon/implant/nanoaug + name = "nanoaug" + desc = "A nano-robotic biological augmentation implant." + var/augmentation + var/augment_text = "You feel strange..." + var/activation_emote = "fart" + + get_data() + var/dat = {" +Implant Specifications:
    +Name: Cybersun Industries Nano-Robotic Biological Augmentation Suite
    +Life: Infinite. WARNING: Biological chances are irreversable.
    +Important Notes: Illegal. Subjects exposed to nanorobotic agent are considered dangerous.
    +
    +Implant Details:
    +Function: Implant contains colony of pre-programmed nanorobots. Subject will experience radical changes in their body, amplifying and improving certain bodily characteristics.
    +Special Features: Will grant subject superhuman powers.
    +Integrity: Nanoaugmentation is permanent. Once the process is complete, the nanorobots disassemble and are dissolved by the blood stream."} + return dat + + + implanted(mob/M as mob) + if(!istype(M, /mob/living/carbon/human)) return + var/mob/living/carbon/human/H = M + H.augmentations.Add(augmentation) // give them the mutation + H << "\blue [augment_text]" + if(istype(src, /obj/item/weapon/implant/nanoaug/eswordsynth)) + activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + H.mind.store_memory("Freedom nanoaugmentation can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) + H << "The nanoaugmentation implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." + + if(istype(src, /obj/item/weapon/implant/nanoaug/radar)) + H << "Red blips on the map are Security." + H << "White blips are civlians." + H << "Monochrome Green blips are cyborgs and AIs." + H << "Light blue blips are heads of staff." + H << "Purple blips are unidentified organisms." + H << "Dead biologicals will not display on the radar." + + spawn() + H.start_radar() + return + + +/obj/item/weapon/implant/nanoaug/strength + name = "Superhuman Strength" + augmentation = SUPRSTR + augment_text = "You muscle ache, and you feel a rapid surge of energy pulse through your body. You feel strong." + +/obj/item/weapon/implant/nanoaug/radar + name = "Short-range Psionic Radar" + augmentation = RADAR + augment_text = "You begin to sense the presence or lack of presence of others around you." + +/obj/item/weapon/implant/nanoaug/electrichands + name = "Electric Hands" + augmentation = ELECTRICHANDS + augment_text = "You feel a sudden jolt of electricity pulse through your veins. Arcs of electricity travel through your hands." + +/obj/item/weapon/implant/nanoaug/eswordsynth + name = "Energy Blade Synthesizer" + augmentation = ESWORDSYNTH + augment_text = "Your hands throb and pulsate. They feel sharper, and strangely hot." + + trigger(emote, source as mob) + if(emote == activation_emote) + src.activate(source) + return + + activate(var/mob/source) + + var/obj/item/weapon/melee/energy/blade/swordspawn = new /obj/item/weapon/melee/energy/blade + if(!source.get_active_hand()) + source.put_in_hand(swordspawn) + + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, source.loc) + spark_system.start() + playsound(source.loc, "sparks", 50, 1) + ..() + +/obj/item/weapon/implant/nanoaug/rebreather + name = "Bioelectric Rebreather" + augmentation = REBREATHER + augment_text = "You begin to lose your breath. Just as you are about to pass out, you suddenly lose the urge to breath. Breathing is no longer a necessity for you." + +/obj/item/weapon/implant/nanoaug/dermalarmor + name = "Skin-intergrated Dermal Armor" + augmentation = DERMALARMOR + augment_text = "The skin throughout your body grows tense and tight, and you become slightly stiff. Your bones and skin feel a lot stronger." + +/obj/item/weapon/implant/nanoaug/reflexes + name = "Combat Reflexes" + augmentation = REFLEXES + augment_text = "Your mind suddenly is able to identify threats before you are aware of them. You become more aware of your surroundings." + +/obj/item/weapon/implant/nanoaug/nanoregen + name = "Regenerative Nanobots" + augmentation = NANOREGEN + augment_text = "You feel a very faint vibration in your body. You instantly feel much younger." + + +/obj/item/weapon/implanter/nanoaug + name = "Nanoaugmentation Implanter (Empty)" + icon_state = "nanoimplant" + +/obj/item/weapon/implanter/nanoaug/update() + if (src.imp) + src.icon_state = "nanoimplant" + else + src.icon_state = "nanoimplant0" + return + + +/obj/item/weapon/implanter/nanoaug/strength + name = "Nanoaugmentation Implaner (Superhuman Strength)" + +/obj/item/weapon/implanter/nanoaug/strength/New() + src.imp = new /obj/item/weapon/implant/nanoaug/strength( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/radar + name = "Nanoaugmentation Implaner (Short-range Psionic Radar)" + +/obj/item/weapon/implanter/nanoaug/radar/New() + src.imp = new /obj/item/weapon/implant/nanoaug/radar( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/electrichands + name = "Nanoaugmentation Implaner (Electric Hands)" + +/obj/item/weapon/implanter/nanoaug/electrichands/New() + src.imp = new /obj/item/weapon/implant/nanoaug/electrichands( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/eswordsynth + name = "Nanoaugmentation Implaner (Energy Blade Synthesizer)" + +/obj/item/weapon/implanter/nanoaug/eswordsynth/New() + src.imp = new /obj/item/weapon/implant/nanoaug/eswordsynth( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/rebreather + name = "Nanoaugmentation Implaner (Bioelectric Rebreather)" + +/obj/item/weapon/implanter/nanoaug/rebreather/New() + src.imp = new /obj/item/weapon/implant/nanoaug/rebreather( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/dermalarmor + name = "Nanoaugmentation Implaner (Skin-intergrated Dermal Armor)" + +/obj/item/weapon/implanter/nanoaug/dermalarmor/New() + src.imp = new /obj/item/weapon/implant/nanoaug/dermalarmor( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/reflexes + name = "Nanoaugmentation Implaner (Combat Reflexes)" + +/obj/item/weapon/implanter/nanoaug/reflexes/New() + src.imp = new /obj/item/weapon/implant/nanoaug/reflexes( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/nanoregen + name = "Nanoaugmentation Implaner (Regenerative Nanobots)" + +/obj/item/weapon/implanter/nanoaug/nanoregen/New() + src.imp = new /obj/item/weapon/implant/nanoaug/nanoregen( src ) + ..() + update() + + diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index b42fe178ddc..5b2b4da7f00 100644 --- a/code/game/objects/items/weapons/implants/implantpad.dm +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/implantpad name = "implantpad" desc = "Used to modify implants." @@ -7,10 +9,9 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - var - obj/item/weapon/implantcase/case = null - broadcasting = null - listening = 1.0 + var/obj/item/weapon/implantcase/case = null + var/broadcasting = null + var/listening = 1.0 proc update() diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 3d83483ef90..358c0fb40e8 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -35,7 +35,7 @@ KNIFE del(bite) src.icon_state = "fork" else if(user.zone_sel.selecting == "eyes") - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M, user) else @@ -90,7 +90,7 @@ KNIFE // ROLLING PIN /* //Honestly this doesn't even work and is very silly. -- Erthilo /obj/item/weapon/kitchen/rollingpin/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) @@ -130,7 +130,7 @@ KNIFE // KNIFE /obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You accidentally cut yourself with the [src]." user.take_organ_damage(20) return @@ -153,7 +153,7 @@ KNIFE sleep(rand(2,4)) - if((user.mutations & CLUMSY) && prob(50)) //What if he's a clown? + if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown? M << "\red You accidentally slam yourself with the [src]!" M.Weaken(1) user.take_organ_damage(2) diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm index 12305a43c01..09996aa6216 100644 --- a/code/game/objects/items/weapons/medical.dm +++ b/code/game/objects/items/weapons/medical.dm @@ -8,16 +8,11 @@ MEDICAL /obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob) if (M.stat == 2) - var/t_him = "it" - if (M.gender == MALE) - t_him = "him" - else if (M.gender == FEMALE) - t_him = "her" - user << "\red \The [M] is dead, you cannot help [t_him]!" + user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!" return if (!istype(M)) - user << "\red \The [src] cannot be applied to [M]!" + user << "\red \The [src] cannot be applied to \the [M]!" return 1 if ( ! (istype(user, /mob/living/carbon/human) || \ @@ -26,6 +21,8 @@ MEDICAL user << "\red You don't have the dexterity to do this!" return 1 + + var/stoppedblood = 0 if(hasorgans(M)) var/datum/organ/external/affecting = M:get_organ("chest") @@ -37,7 +34,7 @@ MEDICAL if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) affecting = M:get_organ("head") if(affecting.destroyed && !affecting.gauzed) - user.visible_message("\red [user] does [user.gender == MALE? "his" : "her"] best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You do your best to stop the bleeding from [M]'s stump.", "\red You hear something like gauze being ripped.") + user.visible_message("\red \The [user] does [user.get_gender_form("its")] best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.") affecting.gauzed = 1 use(1) return @@ -68,9 +65,9 @@ MEDICAL if (user && stoppedblood) if (M != user) - user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") + user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else - user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") + user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") else if(user) user << "\red Nothing to patch up!" return @@ -126,16 +123,11 @@ MEDICAL /obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob) if (M.stat == 2) - var/t_him = "it" - if (M.gender == MALE) - t_him = "him" - else if (M.gender == FEMALE) - t_him = "her" - user << "\red \The [M] is dead, you cannot help [t_him]!" + user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!" return if (!istype(M)) - user << "\red \The [src] cannot be applied to [M]!" + user << "\red \The [src] cannot be applied to \the [M]!" return 1 if ( ! (istype(user, /mob/living/carbon/human) || \ @@ -155,7 +147,7 @@ MEDICAL if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) affecting = M:get_organ("head") if(affecting.destroyed && !affecting.gauzed) - M.visible_message("\red You do your best to stop the bleeding from [M]'s stump.", "\red [user] does their best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.") + M.visible_message("\red \The [user] does their best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.") affecting.gauzed = 1 use(1) return @@ -177,9 +169,13 @@ MEDICAL if (user && stoppedblood) if (M != user) - user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") + user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].",\ + "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].",\ + "\red You hear something like gauze being ripped.") else - user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") + user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].",\ + "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].",\ + "\red You hear something like gauze being ripped.") else if(user) user << "\red Nothing to patch up!" return diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm index 2af673ae4f6..6f5e460303a 100644 --- a/code/game/objects/items/weapons/mops_cleaners.dm +++ b/code/game/objects/items/weapons/mops_cleaners.dm @@ -1,10 +1,13 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/cleaner desc = "A chemical that cleans messes." icon = 'janitor.dmi' name = "space cleaner" icon_state = "cleaner" item_state = "cleaner" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 @@ -115,7 +118,8 @@ name = "chem sprayer" icon_state = "chemsprayer" item_state = "chemsprayer" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 3.0 throw_speed = 2 @@ -210,7 +214,6 @@ return - return //Pepper spray, set up to make the 2 different types /obj/item/weapon/pepperspray //This is riot control @@ -219,7 +222,8 @@ name = "pepperspray" icon_state = "pepperspray" item_state = "pepperspray" - flags = ONBELT|TABLEPASS|FPRINT|USEDELAY + flags = TABLEPASS | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 throw_speed = 2 @@ -234,7 +238,8 @@ name = "mace" icon_state = "pepperspray" item_state = "pepperspray" - flags = ONBELT|TABLEPASS|FPRINT|USEDELAY + flags = TABLEPASS | FPRINT | USEDELAY + slot_flags = SLOT_BELT throwforce = 3 w_class = 1.0 throw_speed = 2 @@ -451,13 +456,12 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf) /proc/GetColors(hex) hex = uppertext(hex) - var - hi1 = text2ascii(hex, 2) - lo1 = text2ascii(hex, 3) - hi2 = text2ascii(hex, 4) - lo2 = text2ascii(hex, 5) - hi3 = text2ascii(hex, 6) - lo3 = text2ascii(hex, 7) + var/hi1 = text2ascii(hex, 2) + var/lo1 = text2ascii(hex, 3) + var/hi2 = text2ascii(hex, 4) + var/lo2 = text2ascii(hex, 5) + var/hi3 = text2ascii(hex, 6) + var/lo3 = text2ascii(hex, 7) return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), ((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48), ((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48)) diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 3e92b39a56a..e41e65e6eee 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -63,14 +63,13 @@ var/global/list/cached_icons = list() remover paint_type = "remover" - /* /obj/item/weapon/paint name = "Paint Can" desc = "Used to recolor floors and walls. Can not be removed by the janitor." icon = 'items.dmi' icon_state = "paint_neutral" - var/color = "FFFFFF" + color = "FFFFFF" item_state = "paintcan" w_class = 3.0 diff --git a/code/game/objects/items/weapons/papers_bins.dm b/code/game/objects/items/weapons/papers_bins.dm index ce9c2710827..e284daf9ca9 100644 --- a/code/game/objects/items/weapons/papers_bins.dm +++ b/code/game/objects/items/weapons/papers_bins.dm @@ -96,7 +96,7 @@ NOTEBOOK set category = "Object" set src in usr - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << text("\red You cut yourself on the paper.") return var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text diff --git a/code/game/objects/items/weapons/plant_bag.dm b/code/game/objects/items/weapons/plant_bag.dm index 1cbb6f7903c..4f13ee45e1b 100644 --- a/code/game/objects/items/weapons/plant_bag.dm +++ b/code/game/objects/items/weapons/plant_bag.dm @@ -7,7 +7,8 @@ name = "Plant Bag" var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 50; //the number of plant pieces it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 1 /obj/item/weapon/plantbag/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index cf501a4a63b..89759fc9653 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /* CONTAINS: RETRACTOR @@ -344,7 +346,7 @@ CIRCULAR SAW if(M != user) for(var/mob/O in (viewers(M) - user - M)) O.show_message("\red [user] is beginning to clamp bleeders in [M]'s cut open torso with [src].", 1) - M << "\red [user] begins to torso bleeders in your chest with [src]!" + M << "\red [user] begins to clamp bleeders in your chest with [src]!" user << "\red You clamp bleeders in [M]'s torso with [src]!" M:embryo_op_stage = 2.0 return @@ -501,12 +503,12 @@ CIRCULAR SAW if(3.0) if(M != user) M.visible_message( \ - "\red [user] is beginning to reshape [M]'s vocal chords and face with [src].", \ + "\red [user] is beginning to reshape [M]'s vocal cords and face with [src].", \ "\red [user] begins to reshape your vocal chords and face [src]!") else M.visible_message( \ - "\red [user] begins to reshape their vocal chords and face and face with [src]!", \ - "\red You begin to reshape your vocal chords and face with [src]!") + "\red [user] begins to reshape their vocal cords and face and face with [src]!", \ + "\red You begin to reshape your vocal cords and face with [src]!") if(do_mob(user, M, 120)) if(M != user) @@ -521,12 +523,12 @@ CIRCULAR SAW if(do_mob(user, M, 120)) if(M != user) M.visible_message( \ - "\red [user] reshapes [M]'s vocal chords and face with [src]!", \ - "\red [user] reshapes your vocal chords and face with [src]!") + "\red [user] reshapes [M]'s vocal cords and face with [src]!", \ + "\red [user] reshapes your vocal cords and face with [src]!") else M.visible_message( \ - "\red [user] reshapes their vocal chords and face with [src]!", \ - "\red You reshape your vocal chords and face with [src]!") + "\red [user] reshapes their vocal cords and face with [src]!", \ + "\red You reshape your vocal cords and face with [src]!") if(M == user && prob(25)) user << "\red You mess up!" @@ -561,7 +563,7 @@ CIRCULAR SAW return ..() if(S.robot) - user << "Medical equipment for a robot arm? How would that do any good..." + user << "Medical equipment for a robot arm? How would that do any good?" return if(!S.open) @@ -651,11 +653,10 @@ CIRCULAR SAW /obj/item/weapon/autopsy_scanner/var/timeofdeath = null /datum/autopsy_data_data - var - weapon = null // this is the DEFINITE weapon type that was used - list/organs_scanned = list() // this maps a number of scanned organs to + var/weapon = null // this is the DEFINITE weapon type that was used + var/list/organs_scanned = list() // this maps a number of scanned organs to // the wounds to those organs with this data's weapon type - organ_names = "" + var/organ_names = "" /obj/item/weapon/autopsy_scanner/proc/add_data(var/datum/organ/external/O) if(!O.autopsy_data.len && !O.trace_chemicals.len) return @@ -813,7 +814,7 @@ CIRCULAR SAW usr << "You have to cut the limb open first!" return if(S.robot) - user << "Medical equipment for a robot arm? How would that do any good..." + user << "Medical equipment for a robot arm? How would that do any good?" return for(var/mob/O in viewers(M)) O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with \the [src.name]", 1) @@ -1081,9 +1082,9 @@ CIRCULAR SAW if(!istype(M)) return ..() - //if(M.mutations & HUSK) return ..() + //if(NOCLONE in M.mutations) return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) @@ -1487,12 +1488,11 @@ CIRCULAR SAW //////////////// //CIRCULAR SAW// //////////////// - /obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!istype(M)) return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) @@ -1672,7 +1672,7 @@ CIRCULAR SAW /obj/item/weapon/surgical_tool/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob) if(!istype(M, /mob)) return - if((usr.mutations & 16) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M << "\red You stab yourself in the eye." M.disabilities |= 128 M.weakened += 4 diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 42204aeb922..764522598ed 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -4,6 +4,7 @@ SWORD BLADE AXE STUN BATON +ENERGY SHIELD (where else should i even put this) */ @@ -22,7 +23,7 @@ STUN BATON color = pick("red","blue","green","purple") /obj/item/weapon/melee/energy/sword/attack_self(mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You accidentally cut yourself with [src]." user.take_organ_damage(5,5) active = !active @@ -104,7 +105,7 @@ STUN BATON /obj/item/weapon/melee/baton/attack_self(mob/user as mob) src.status = !( src.status ) - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) usr << "\red You grab the stunbaton on the wrong side." usr.Paralyse(60) return @@ -120,7 +121,7 @@ STUN BATON return /obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob) - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << "\red You grab the stunbaton on the wrong side." usr.Weaken(30) return @@ -165,7 +166,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 1 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 1 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 1 M.Stun(1) M.Weaken(1) @@ -176,7 +177,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 10 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 10 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 M.Stun(10) M.Weaken(10) @@ -193,7 +194,7 @@ STUN BATON charges -= 5 /obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You club yourself over the head." user.Weaken(3 * force) if(ishuman(user)) @@ -215,7 +216,7 @@ STUN BATON if (user.a_intent == "hurt") if(!..()) return playsound(src.loc, "swing_hit", 50, 1, -1) - if (M.stuttering < 8 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 8 M.Stun(8) M.Weaken(8) @@ -227,3 +228,29 @@ STUN BATON M.Weaken(5) for(var/mob/O in viewers(M)) if (O.client) O.show_message("\red [M] has been stunned with the police baton by [user]!", 1, "\red You hear someone fall", 2) + +/obj/item/weapon/shield/energy/IsShield() + if(active) + return 1 + else + return 0 + +/obj/item/weapon/shield/energy/attack_self(mob/living/user as mob) + if ((CLUMSY in user.mutations) && prob(50)) + user << "\red You beat yourself in the head with [src]." + user.take_organ_damage(5) + active = !active + if (active) + force = 10 + icon_state = "eshield[active]" + w_class = 4 + playsound(user, 'saberon.ogg', 50, 1) + user << "\blue [src] is now active." + else + force = 3 + icon_state = "eshield[active]" + w_class = 1 + playsound(user, 'saberoff.ogg', 50, 1) + user << "\blue [src] can now be concealed." + add_fingerprint(user) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 6055252d56b..2a936622766 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -9,8 +9,8 @@ /obj/item/weapon/syndie/c4explosive icon_state = "c-4small_0" item_state = "c-4small" - name = "mysterious package" - desc = "A mysterious package." + name = "normal-sized package" + desc = "A small wrapped package." w_class = 3 var/power = 1 /*Size of the explosion.*/ @@ -27,9 +27,9 @@ var/K = rand(1,2000) K = md5(num2text(K)+name) K = copytext(K,1,7) - src.desc += "\n You see [K] engraved on \the [src]" + src.desc += "\n You see [K] engraved on \the [src]." var/obj/item/weapon/syndie/c4detonator/detonator = new(src.loc) - detonator.desc += "\n You see [K] engraved on \the [src]" + detonator.desc += "\n You see [K] engraved on the lighter." detonator.bomb = src /obj/item/weapon/syndie/c4explosive/proc/detonate() @@ -53,8 +53,8 @@ /obj/item/weapon/syndie/c4detonator icon_state = "c-4detonator_0" item_state = "c-4detonator" - name = "lighter" /*Sneaky, thanks Dreyfus.*/ - desc = "A disposable lighter, it's quite heavy." + name = "\improper Zippo lighter" /*Sneaky, thanks Dreyfus.*/ + desc = "The zippo." w_class = 1 var/obj/item/weapon/syndie/c4explosive/bomb diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 4d301b5fc0c..5a23cfbb8ab 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + /* CONTAINS: @@ -13,7 +15,8 @@ WELDINGTOOOL desc = "A wrench with common uses. Can be found in your hand." icon = 'items.dmi' icon_state = "wrench" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 w_class = 2.0 @@ -24,7 +27,29 @@ WELDINGTOOOL // SCREWDRIVER /obj/item/weapon/screwdriver/New() - icon_state = pick("screwdriver","screwdriver2","screwdriver3","screwdriver4","screwdriver5","screwdriver6","screwdriver7") + switch(pick("red","blue","purple","brown","green","cyan","yellow")) + if ("red") + icon_state = "screwdriver2" + item_state = "screwdriver" + if ("blue") + icon_state = "screwdriver" + item_state = "screwdriver_blue" + if ("purple") + icon_state = "screwdriver3" + item_state = "screwdriver_purple" + if ("brown") + icon_state = "screwdriver4" + item_state = "screwdriver_brown" + if ("green") + icon_state = "screwdriver5" + item_state = "screwdriver_green" + if ("cyan") + icon_state = "screwdriver6" + item_state = "screwdriver_cyan" + if ("yellow") + icon_state = "screwdriver7" + item_state = "screwdriver_yellow" + if (prob(75)) src.pixel_y = rand(0, 16) return @@ -33,7 +58,7 @@ WELDINGTOOOL if(!istype(M)) return ..() if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head") return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) @@ -44,7 +69,8 @@ WELDINGTOOOL name = "Welding Tool" icon = 'items.dmi' icon_state = "welder" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 3.0 throwforce = 5.0 throw_speed = 1 @@ -53,10 +79,9 @@ WELDINGTOOOL m_amt = 70 g_amt = 30 origin_tech = "engineering=1" - var - welding = 0 - status = 1 - max_fuel = 20 + var/welding = 0 + var/status = 1 + var/max_fuel = 20 proc get_fuel() remove_fuel(var/amount = 1, var/mob/M = null) @@ -224,7 +249,6 @@ WELDINGTOOOL src.damtype = "brute" src.icon_state = "welder" src.welding = 0 - return eyecheck(mob/user as mob) @@ -313,7 +337,8 @@ WELDINGTOOOL desc = "This cuts wires." icon = 'items.dmi' icon_state = "cutters" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 6.0 throw_speed = 2 throw_range = 9 @@ -324,6 +349,7 @@ WELDINGTOOOL New() if(prob(50)) icon_state = "cutters-y" + item_state = "cutters_yellow" /obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob) if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable))) @@ -334,4 +360,4 @@ WELDINGTOOOL M.update_clothing() return else - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index b39e32a55b9..14eff5ba0f0 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -93,7 +93,7 @@ desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" force = 5 w_class = 4.0 - flags = ONBACK + slot_flags = SLOT_BACK force_unwielded = 5 force_wielded = 18 diff --git a/code/game/objects/items/weapons/wrappingpaper.dm b/code/game/objects/items/weapons/wrappingpaper.dm index 8d3bb9a8495..26046b07dc2 100644 --- a/code/game/objects/items/weapons/wrappingpaper.dm +++ b/code/game/objects/items/weapons/wrappingpaper.dm @@ -222,8 +222,7 @@ PHOTOGRAPHS /obj/item/weapon/paper/photograph/attack_self(mob/user as mob) - var/n_name = input(user, "What would you like to label the photo?", "Paper Labelling", null) as text - n_name = copytext(n_name, 1, 32) + var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32) if ((src.loc == user && user.stat == 0)) src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null)) src.add_fingerprint(user) diff --git a/code/game/objects/mineral_doors.dm b/code/game/objects/mineral_doors.dm index 310cdfd8805..f99a8d395fe 100644 --- a/code/game/objects/mineral_doors.dm +++ b/code/game/objects/mineral_doors.dm @@ -145,38 +145,11 @@ var/turf/simulated/east = get_step(source,EAST) var/turf/simulated/west = get_step(source,WEST) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(north)) - if(north.parent) - air_master.groups_to_rebuild += north.parent - else - air_master.tiles_to_update += north - if(istype(south)) - if(south.parent) - air_master.groups_to_rebuild += south.parent - else - air_master.tiles_to_update += south - if(istype(east)) - if(east.parent) - air_master.groups_to_rebuild += east.parent - else - air_master.tiles_to_update += east - if(istype(west)) - if(west.parent) - air_master.groups_to_rebuild += west.parent - else - air_master.tiles_to_update += west - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(north)) air_master.tiles_to_update += north - if(istype(south)) air_master.tiles_to_update += south - if(istype(east)) air_master.tiles_to_update += east - if(istype(west)) air_master.tiles_to_update += west + if(istype(source)) air_master.tiles_to_update += source + if(istype(north)) air_master.tiles_to_update += north + if(istype(south)) air_master.tiles_to_update += south + if(istype(east)) air_master.tiles_to_update += east + if(istype(west)) air_master.tiles_to_update += west return 1 @@ -225,8 +198,6 @@ proc/TemperatureAct(temperature) for(var/turf/simulated/floor/target_tile in range(2,loc)) - if(target_tile.parent && target_tile.parent.group_processing) - target_tile.parent.suspend_group_processing() var/datum/gas_mixture/napalm = new @@ -305,4 +276,4 @@ isSwitchingStates = 0 Dismantle(devastated = 0) - del(src) + del(src) diff --git a/code/game/objects/new_year.dm b/code/game/objects/new_year.dm index 90ed7f10665..3398a7e4b61 100644 --- a/code/game/objects/new_year.dm +++ b/code/game/objects/new_year.dm @@ -55,11 +55,12 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT /obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (user.equipped() == src) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.state = 1 src.icon_state = "flashbang1" @@ -107,7 +108,7 @@ /obj/item/weapon/firbang/attack_self(mob/user as mob) if (!src.state) - if (user.mutations & CLUMSY) + if (CLUMSY in user.mutations) user << "\red Huh? How does this thing work?!" spawn( 5 ) prime() diff --git a/code/game/objects/radio/electropack.dm b/code/game/objects/radio/electropack.dm index 209fbea8b53..dd5462fbff5 100644 --- a/code/game/objects/radio/electropack.dm +++ b/code/game/objects/radio/electropack.dm @@ -8,7 +8,8 @@ m_amt = 10000 frequency = 1449 w_class = 5.0 - flags = 323 + flags = FPRINT | CONDUCT | TABLEPASS + slot_flags = SLOT_BACK item_state = "electropack" /obj/item/device/radio/electropack/examine() diff --git a/code/game/objects/radio/headset.dm b/code/game/objects/radio/headset.dm index 7e58b10f896..7c0217a2db6 100644 --- a/code/game/objects/radio/headset.dm +++ b/code/game/objects/radio/headset.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/radio/headset name = "radio headset" desc = "An updated, modular intercom that fits over the head. Takes encryption keys" @@ -6,13 +8,14 @@ g_amt = 0 m_amt = 75 subspace_transmission = 1 - protective_temperature = 0 canhear_range = 1 // can't hear headsets from very far away - var - translate_binary = 0 - translate_hive = 0 - obj/item/device/encryptionkey/keyslot1 = null - obj/item/device/encryptionkey/keyslot2 = null + + slot_flags = SLOT_EARS + protective_temperature = 0 + var/translate_binary = 0 + var/translate_hive = 0 + var/obj/item/device/encryptionkey/keyslot1 = null + var/obj/item/device/encryptionkey/keyslot2 = null /obj/item/device/radio/headset/New() ..() diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index 5a6a212d4f7..56cd66eec87 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + var/GLOBAL_RADIO_TYPE = 1 // radio type to use // 0 = old radios // 1 = new radios (subspace technology) @@ -9,46 +11,44 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use suffix = "\[3\]" icon_state = "walkietalkie" item_state = "walkietalkie" - var - on = 1 // 0 for off - last_transmission - frequency = 1459 //common chat - traitor_frequency = 0 //tune to frequency to unlock traitor supplies - canhear_range = 3 // the range which mobs can hear this radio from - obj/item/device/radio/patch_link = null - obj/item/device/uplink/radio/traitorradio = null - wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT - b_stat = 0 - broadcasting = 0 - listening = 1 - freerange = 0 // 0 - Sanitize frequencies, 1 - Full range - list/channels = list() //see communications.dm for full list. First channes is a "default" for :h - subspace_transmission = 0 + var/on = 1 // 0 for off + var/last_transmission + var/frequency = 1459 //common chat + var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies + var/canhear_range = 3 // the range which mobs can hear this radio from + var/obj/item/device/radio/patch_link = null + var/obj/item/device/uplink/radio/traitorradio = null + var/wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT + var/b_stat = 0 + var/broadcasting = 0 + var/listening = 1 + var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range + var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h + var/subspace_transmission = 0 // "Example" = FREQ_LISTENING|FREQ_BROADCASTING - flags = 450 // hello i'm a fucking idiot why is this 450?? CODE GODS PLEASE EXPLAIN~ + flags = FPRINT | CONDUCT | TABLEPASS + slot_flags = SLOT_BELT throw_speed = 2 throw_range = 9 w_class = 2 g_amt = 25 m_amt = 75 - var/const - WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone - WIRE_RECEIVE = 2 - WIRE_TRANSMIT = 4 - TRANSMISSION_DELAY = 5 // only 2/second/radio - FREQ_LISTENING = 1 + var/const/WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone + var/const/WIRE_RECEIVE = 2 + var/const/WIRE_TRANSMIT = 4 + var/const/TRANSMISSION_DELAY = 5 // only 2/second/radio + var/const/FREQ_LISTENING = 1 //FREQ_BROADCASTING = 2 /obj/item/device/radio - var - datum/radio_frequency/radio_connection - list/datum/radio_frequency/secure_radio_connections = new - proc - set_frequency(new_frequency) - radio_controller.remove_object(src, frequency) - frequency = new_frequency - radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT) + var/datum/radio_frequency/radio_connection + var/list/datum/radio_frequency/secure_radio_connections = new + + proc/set_frequency(new_frequency) + radio_controller.remove_object(src, frequency) + frequency = new_frequency + radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT) @@ -85,9 +85,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use if(!on) return - var/dat = {" - [src] - Microphone: [broadcasting ? "Engaged" : "Disengaged"]
    + var/dat = "[src]" + + if(!istype(src, /obj/item/device/radio/headset)) //Headsets dont get a mic button + dat += "Microphone: [broadcasting ? "Engaged" : "Disengaged"]
    " + + dat += {" Speaker: [listening ? "Engaged" : "Disengaged"]
    Frequency: - diff --git a/code/game/objects/secstorage/sbriefcase.dm b/code/game/objects/secstorage/sbriefcase.dm index 5d31e306b1c..b2afa199f97 100644 --- a/code/game/objects/secstorage/sbriefcase.dm +++ b/code/game/objects/secstorage/sbriefcase.dm @@ -16,7 +16,7 @@ new /obj/item/weapon/pen(src) /obj/item/weapon/secstorage/sbriefcase/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) diff --git a/code/game/objects/stacks/glass.dm b/code/game/objects/stacks/glass.dm index f70c1e50b57..a11beacd82f 100644 --- a/code/game/objects/stacks/glass.dm +++ b/code/game/objects/stacks/glass.dm @@ -17,8 +17,8 @@ SHARDS var/obj/item/weapon/cable_coil/CC = W if(CC.amount < 5) user << "\b There is not enough wire in this coil. You need 5 lengths." - CC.amount -= 5 - amount -= 1 + CC.use(5) + src.use(1) user << "\blue You attach wire to the [name]." new/obj/item/stack/light_w(user.loc) if(CC.amount <= 0) @@ -50,37 +50,39 @@ SHARDS return 0 var/title = "Sheet-Glass" title += " ([src.amount] sheet\s left)" - switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null)) - if("one direct") + switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null)) + if("One Direction") if(!src) return 1 if(src.loc != user) return 1 + var/list/directions = new/list(cardinal) + var/i = 0 for (var/obj/structure/window/win in user.loc) + i++ + if(i >= 4) + user << "\red There are too many windows in this location." + return 1 directions-=win.dir if(!(win.ini_dir in cardinal)) user << "\red Can't let you do that." return 1 - var/dir_to_set = 2 - //yes, this could probably be done better but hey... it works... + + var/dir_to_set = NORTH for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 4 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 1 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 8 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 2 + if (WT.dir == SOUTH) + dir_to_set = EAST + if (WT.dir == WEST) + dir_to_set = SOUTH + if (WT.dir == NORTH) + dir_to_set = WEST + var/obj/structure/window/W W = new /obj/structure/window/basic( user.loc, 0 ) W.dir = dir_to_set W.ini_dir = W.dir W.anchored = 0 src.use(1) - if("full (2 sheets)") + if("Full Window") if(!src) return 1 if(src.loc != user) return 1 if(src.amount < 2) @@ -111,30 +113,32 @@ SHARDS return 0 var/title = "Sheet Reinf. Glass" title += " ([src.amount] sheet\s left)" - switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null)) - if("one direct") + switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel")) + if("One Direction") if(!src) return 1 if(src.loc != user) return 1 var/list/directions = new/list(cardinal) + var/i = 0 for (var/obj/structure/window/win in user.loc) + i++ + if(i >= 4) + user << "\red There are too many windows in this location." + return 1 directions-=win.dir if(!(win.ini_dir in cardinal)) user << "\red Can't let you do that." return 1 - var/dir_to_set = 2 - //yes, this could probably be done better but hey... it works... + var/dir_to_set = NORTH for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 4 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 1 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 8 - for(var/obj/structure/window/WT in user.loc) - if (WT.dir == dir_to_set) - dir_to_set = 2 + if (WT.dir == SOUTH) + dir_to_set = EAST + if (WT.dir == WEST) + dir_to_set = SOUTH + if (WT.dir == NORTH) + dir_to_set = WEST + /*else + dir_to_set stays NORTH*/ + var/obj/structure/window/W W = new /obj/structure/window/reinforced( user.loc, 1 ) W.state = 0 @@ -142,7 +146,8 @@ SHARDS W.ini_dir = W.dir W.anchored = 0 src.use(1) - if("full (2 sheets)") + + if("Full Window") if(!src) return 1 if(src.loc != user) return 1 if(src.amount < 2) @@ -158,6 +163,44 @@ SHARDS W.ini_dir = SOUTHWEST W.anchored = 0 src.use(2) + + if("Windoor") + if(!src || src.loc != user) return 1 + + if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc)) + user << "\red There is already a windoor assembly in that location." + return 1 + + if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc)) + user << "\red There is already a windoor in that location." + return 1 + + if(src.amount < 5) + user << "\red You need more glass to do that." + return 1 + + var/obj/structure/windoor_assembly/WD + WD = new /obj/structure/windoor_assembly(user.loc) + WD.state = "01" + WD.anchored = 0 + src.use(5) + switch(user.dir) + if(SOUTH) + WD.dir = SOUTH + WD.ini_dir = SOUTH + if(EAST) + WD.dir = EAST + WD.ini_dir = EAST + if(WEST) + WD.dir = WEST + WD.ini_dir = WEST + else//If the user is facing northeast. northwest, southeast, southwest or north, default to north + WD.dir = NORTH + WD.ini_dir = NORTH + else + return 1 + + return 0 // SHARDS diff --git a/code/game/objects/storage/backpack.dm b/code/game/objects/storage/backpack.dm index a6eb10e6fe7..7e5b3ff895f 100644 --- a/code/game/objects/storage/backpack.dm +++ b/code/game/objects/storage/backpack.dm @@ -47,6 +47,7 @@ return /* Remove these comments to re-enable BoH BoH Singuloths.-Hawk. if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail) + investigate_log("has become a singularity. Caused by [user.key]","singulo") user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!" del(W) var/obj/machinery/singularity/singulo = new /obj/machinery/singularity (get_turf(src)) diff --git a/code/game/objects/storage/belt.dm b/code/game/objects/storage/belt.dm index 11dcc50c2a6..fc5c1aa2f7e 100644 --- a/code/game/objects/storage/belt.dm +++ b/code/game/objects/storage/belt.dm @@ -4,7 +4,8 @@ icon = 'belts.dmi' icon_state = "utilitybelt" item_state = "utility" - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT max_w_class = 3 max_combined_w_class = 21 @@ -163,4 +164,15 @@ new /obj/item/device/soulstone(src) new /obj/item/device/soulstone(src) new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) \ No newline at end of file + new /obj/item/device/soulstone(src) + + +/obj/item/weapon/storage/belt/champion + name = "championship belt" + desc = "Proves to the world that you are the strongest!" + icon_state = "championbelt" + item_state = "champion" + storage_slots = 1 + can_hold = list( + "/obj/item/clothing/mask/luchador" + ) \ No newline at end of file diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index 6ce4abd47cf..6166c2c6ad1 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -49,7 +49,7 @@ user.take_organ_damage(0,10) return - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) @@ -62,10 +62,10 @@ if(M.mind && (M.mind.assigned_role == "Chaplain")) user << "\red You can't heal yourself!" return - if((M.mind in ticker.mode.cult) && (prob(20))) + /*if((M.mind in ticker.mode.cult) && (prob(20))) M << "\red The power of [src.deity_name] clears your mind of heresy!" user << "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!" - ticker.mode.remove_cultist(M.mind) + ticker.mode.remove_cultist(M.mind)*/ if ((istype(M, /mob/living/carbon/human) && prob(60))) bless(M) for(var/mob/O in viewers(M, null)) diff --git a/code/game/objects/storage/briefcase.dm b/code/game/objects/storage/briefcase.dm index fc7d6cd9396..6413a66eec6 100644 --- a/code/game/objects/storage/briefcase.dm +++ b/code/game/objects/storage/briefcase.dm @@ -11,7 +11,7 @@ /obj/item/weapon/storage/briefcase/attack(mob/M as mob, mob/living/user as mob) //..() - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) diff --git a/code/game/objects/storage/coat.dm b/code/game/objects/storage/coat.dm index f881283910f..25ec08d6640 100644 --- a/code/game/objects/storage/coat.dm +++ b/code/game/objects/storage/coat.dm @@ -112,7 +112,7 @@ return //Means the item is already in the storage item if(contents.len >= storage_slots) - user << "\red The [src] is full, make some space." + user << "\red \The [src] is full, make some space." return //Storage item is full if(can_hold.len) @@ -122,16 +122,16 @@ ok = 1 break if(!ok) - user << "\red This [src] cannot hold [W]." + user << "\red \The [src] cannot hold \the [W]." return for(var/A in cant_hold) //Check for specific items which this container can't hold. if(istype(W, text2path(A) )) - user << "\red This [src] cannot hold [W]." + user << "\red \The [src] cannot hold \the [W]." return if (W.w_class > max_w_class) - user << "\red This [W] is too big for \the [src]" + user << "\red \The [W] is too big for \the [src]" return var/sum_w_class = W.w_class @@ -139,12 +139,12 @@ sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it. if(sum_w_class > max_combined_w_class) - user << "\red The [src] is full, make some space." + user << "\red \The [src] is full, make some space." return if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage))) if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm. - user << "\red The [src] cannot hold [W] as it's a storage item of the same size." + user << "\red \The [src] cannot hold \the [W] as it's a storage item of the same size." return //To prevent the stacking of the same sized items. user.u_equip(W) diff --git a/code/game/objects/storage/lockbox.dm b/code/game/objects/storage/lockbox.dm index 38141dd1e6e..d15663409e4 100644 --- a/code/game/objects/storage/lockbox.dm +++ b/code/game/objects/storage/lockbox.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/storage/lockbox name = "lockbox" desc = "A locked box." @@ -8,12 +10,11 @@ max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item. storage_slots = 4 req_access = list(access_armory) - var - locked = 1 - broken = 0 - icon_locked = "lockbox+l" - icon_closed = "lockbox" - icon_broken = "lockbox+b" + var/locked = 1 + var/broken = 0 + var/icon_locked = "lockbox+l" + var/icon_closed = "lockbox" + var/icon_broken = "lockbox+b" attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -90,4 +91,4 @@ New() ..() - new /obj/item/weapon/flashbang/clusterbang(src) \ No newline at end of file + new /obj/item/weapon/flashbang/clusterbang(src) diff --git a/code/game/objects/storage/storage.dm b/code/game/objects/storage/storage.dm index 2c7d66971f5..9004c3c447a 100644 --- a/code/game/objects/storage/storage.dm +++ b/code/game/objects/storage/storage.dm @@ -126,23 +126,23 @@ ok = 1 break if(!ok) - user << "\red This [src] cannot hold [W]." + user << "\red \The [src] cannot hold \the [W]." return for(var/A in cant_hold) //Check for specific items which this container can't hold. if(istype(W, text2path(A) )) - user << "\red This [src] cannot hold [W]." + user << "\red \The [src] cannot hold \the [W]." return if (W.w_class > max_w_class) - user << "\red This [W] is too big for \the [src]" + user << "\red \The [W] is too big for \the [src]" return if(istype(W, /obj/item/weapon/tray)) var/obj/item/weapon/tray/T = W if(T.calc_carry() > 0) if(prob(85)) - user << "\red The tray won't fit in [src]." + user << "\red The tray won't fit in \the [src]." return else @@ -157,12 +157,12 @@ sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it. if(sum_w_class > max_combined_w_class) - user << "\red The [src] is full, make some space." + user << "\red \The [src] is full, make some space." return if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage))) if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm. - user << "\red The [src] cannot hold [W] as it's a storage item of the same size." + user << "\red \The [src] cannot hold \the [W] as it's a storage item of the same size." return //To prevent the stacking of the same sized items. user.u_equip(W) @@ -184,11 +184,11 @@ if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY for(var/mob/M in viewers(user, null)) if (M == user) - user << "\blue You put the [W] into [src]." + user << "\blue You put the \the [W] into \the [src]." else if (M in range(1)) //If someone is standing close enough, they can tell what it is... - M.show_message(text("\blue [user] puts [W] into [src].")) + M.show_message(text("\blue \The [user] puts \the [W] into \the [src].")) else if (W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance... - M.show_message(text("\blue [user] puts [W] into [src].")) + M.show_message(text("\blue \The [user] puts \the [W] into \the [src].")) return /obj/item/weapon/storage/dropped(mob/user as mob) @@ -271,7 +271,7 @@ if ( !found ) // User is too far away return // Now make the cardboard - user << "\blue You fold [src] flat." + user << "\blue You fold \the [src] flat." new src.foldable(get_turf(src)) del(src) //BubbleWrap END diff --git a/code/game/objects/storage/uplink_kits.dm b/code/game/objects/storage/uplink_kits.dm new file mode 100644 index 00000000000..10e9c4078eb --- /dev/null +++ b/code/game/objects/storage/uplink_kits.dm @@ -0,0 +1,53 @@ +/obj/item/weapon/storage/syndie_kit + name = "box" + desc = "It's just an ordinary box." + icon_state = "box" + item_state = "syringe_kit" + +/obj/item/weapon/storage/syndie_kit/imp_freedom + name = "box (FI)" + +/obj/item/weapon/storage/syndie_kit/imp_freedom/New() + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) + O.imp = new /obj/item/weapon/implant/freedom(O) + O.update() + ..() + return + +/obj/item/weapon/storage/syndie_kit/imp_compress + name = "box (CMI)" + +/obj/item/weapon/storage/syndie_kit/imp_compress/New() + new /obj/item/weapon/implanter/compressed(src) + ..() + return + +/obj/item/weapon/storage/syndie_kit/imp_explosive + name = "box (EI)" + +/obj/item/weapon/storage/syndie_kit/imp_explosive/New() + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) + O.imp = new /obj/item/weapon/implant/explosive(O) +// O.name = "(BIO-HAZARD) BIO-detpack" + O.update() + ..() + return + +/obj/item/weapon/storage/syndie_kit/imp_uplink + name = "box (UI)" + +/obj/item/weapon/storage/syndie_kit/imp_uplink/New() + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) + O.imp = new /obj/item/weapon/implant/uplink(O) + O.update() + ..() + return + +/obj/item/weapon/storage/syndie_kit/space + name = "box (SS)" + +/obj/item/weapon/storage/syndie_kit/space/New() + new /obj/item/clothing/suit/space/syndicate(src) + new /obj/item/clothing/head/helmet/space/syndicate(src) + ..() + return \ No newline at end of file diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 6edbbf80491..132fd7e00cc 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,6 +1,27 @@ obj/structure icon = 'structures.dmi' +obj/structure/blob_act() + if(prob(50)) + del(src) + +obj/structure/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if(prob(50)) + del(src) + return + if(3.0) + return + +obj/structure/meteorhit(obj/O as obj) + del(src) + + + /obj/structure/girder icon_state = "girder" anchored = 1 diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm index fef13487454..1ffe6a64c7b 100644 --- a/code/game/objects/tables_racks.dm +++ b/code/game/objects/tables_racks.dm @@ -20,6 +20,11 @@ TABLE AND RACK OBJECT INTERATIONS else return +/obj/structure/table/examine() + set src in oview() + ..() + if(dented) + usr << "It looks to have [dented] [prob(30) ? "face shaped " : ""] dents in it." /obj/structure/table/blob_act() if(prob(75)) @@ -38,11 +43,11 @@ TABLE AND RACK OBJECT INTERATIONS /obj/structure/table/attack_paw(mob/user as mob) - if ((usr.mutations & HULK)) - usr << text("\blue You destroy the table.") + if ((HULK in usr.mutations)) + usr << "\blue You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes the table apart!", usr) + O << "\red [user] smashes the table apart!" if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -57,16 +62,16 @@ TABLE AND RACK OBJECT INTERATIONS user.layer = TURF_LAYER for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("[] hides under the table!", user) + O << "[user] hides under the table!" //Foreach goto(69) return /obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N - usr << text("\green You destroy the table.") + usr << "\green You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] slices the table apart!", user) + O << "\red [user] slices the table apart!" if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -80,10 +85,10 @@ TABLE AND RACK OBJECT INTERATIONS /obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N if(user.wall_smash) - usr << text("\red You destroy the table.") + usr << "\red You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes the table apart!", user) + O << "\red [user] smashes the table apart!" if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -98,11 +103,11 @@ TABLE AND RACK OBJECT INTERATIONS /obj/structure/table/attack_hand(mob/user as mob) - if (usr.mutations & HULK) - usr << text("\blue You destroy the table.") + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + usr << "\blue You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes the table apart!", usr) + O << "\red [user] smashes the table apart!" if(istype(src, /obj/structure/table/reinforced)) new /obj/item/weapon/table_parts/reinforced( src.loc ) else if(istype(src, /obj/structure/table/woodentable)) @@ -111,23 +116,13 @@ TABLE AND RACK OBJECT INTERATIONS new /obj/item/weapon/table_parts( src.loc ) src.density = 0 del(src) -/* if (user.mutations2 & mSmallsize) - step(user, get_dir(user, src)) - if (user.loc == src.loc) - user.layer = TURF_LAYER - user.update_clothing() - for(var/mob/M in viewers(user, null)) - M.show_message("[user] hides under the table!", 1) - //Foreach goto(69) - */ -//Googol never tested this shit. return /obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 - if(istype(mover) && (mover.checkpass(PASSTABLE) || (mover.flags & TABLEPASS) || mover.throwing)) //WTF do things hit tables like that? Jeez. + if(istype(mover) && (mover.pass_flags & PASSTABLE || (mover.flags & TABLEPASS) || mover.throwing)) //WTF do things hit tables like that? Jeez. return 1 else return 0 @@ -164,23 +159,23 @@ TABLE AND RACK OBJECT INTERATIONS affecting.take_damage(rand(10,15), 0) H.Weaken(2) if(prob(20)) // One chance in 20 to DENT THE TABLE - affecting.take_damage(rand(0,5), 0) //Extra damage + affecting.take_damage(rand(5,10), 0) //Extra damage if(dented) G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\ "\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") else - dented = 1 G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\ "\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") + dented++ else if(prob(50)) - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\ - "\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.") else - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\ - "\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.") else affecting.take_damage(rand(5,10), 0) @@ -189,14 +184,13 @@ TABLE AND RACK OBJECT INTERATIONS "\red You hear the nauseating crunch of bone and gristle on solid metal.") H.UpdateDamageIcon() H.updatehealth() - H.update_clothing() playsound(src.loc, 'tablehit1.ogg', 50, 1, -3) return G.affecting.loc = src.loc G.affecting.Weaken(5) for(var/mob/O in viewers(world.view, src)) if (O.client) - O << text("\red [] puts [] on the table.", G.assailant, G.affecting) + O << "\red [G.assailant] puts [G.affecting] on the table." del(W) return @@ -220,7 +214,7 @@ TABLE AND RACK OBJECT INTERATIONS playsound(src.loc, 'blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) for(var/mob/O in viewers(user, 4)) - O.show_message(text("\blue The table was sliced apart by []!", user), 1, text("\red You hear metal coming apart."), 2) + O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2) new /obj/item/weapon/table_parts( src.loc ) del(src) return @@ -242,7 +236,7 @@ TABLE AND RACK OBJECT INTERATIONS G.affecting.Weaken(5) for(var/mob/O in viewers(world.view, src)) if (O.client) - O << text("\red [] puts [] on the wooden table.", G.assailant, G.affecting) + O << "\red [G.assailant] puts [G.affecting] on the wooden table." del(W) return if (istype(W, /obj/item/weapon/wrench)) @@ -262,7 +256,7 @@ TABLE AND RACK OBJECT INTERATIONS playsound(src.loc, 'blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) for(var/mob/O in viewers(user, 4)) - O.show_message(text("\blue The wooden table was sliced apart by []!", user), 1, text("\red You hear wood coming apart."), 2) + O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2) new /obj/item/weapon/table_parts/wood( src.loc ) del(src) return @@ -284,7 +278,7 @@ TABLE AND RACK OBJECT INTERATIONS G.affecting.Weaken(5) for(var/mob/O in viewers(world.view, src)) if (O.client) - O << text("\red [] puts [] on the reinforced table.", G.assailant, G.affecting) + O << "\red [G.assailant] puts [G.affecting] on the reinforced table." del(W) return @@ -332,7 +326,7 @@ TABLE AND RACK OBJECT INTERATIONS playsound(src.loc, 'blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) for(var/mob/O in viewers(user, 4)) - O.show_message(text("\blue The reinforced table was sliced apart by []!", user), 1, text("\red You hear metal coming apart."), 2) + O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2) new /obj/item/weapon/table_parts/reinforced( src.loc ) del(src) return @@ -369,7 +363,7 @@ TABLE AND RACK OBJECT INTERATIONS if(air_group || (height==0)) return 1 if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!| return 1 - if(istype(mover) && (mover.checkpass(PASSTABLE) || mover.flags & TABLEPASS || mover.throwing)) + if(istype(mover) && (mover.pass_flags & PASSTABLE || mover.flags & TABLEPASS || mover.throwing)) return 1 else return 0 diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm index 73b890be9e7..fb711275107 100644 --- a/code/game/objects/tank.dm +++ b/code/game/objects/tank.dm @@ -5,7 +5,8 @@ var/datum/gas_mixture/air_contents = null var/distribute_pressure = ONE_ATMOSPHERE - flags = FPRINT | TABLEPASS | CONDUCT | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BACK pressure_resistance = ONE_ATMOSPHERE*5 @@ -34,7 +35,7 @@ set src in usr ..() if(air_contents.oxygen < 1 && loc==usr) - usr << text("\red The meter on the [src.name] indicates you are almost out of air!") + usr << "\red The meter on the [src.name] indicates you are almost out of air!" usr << sound('alert.ogg') @@ -43,6 +44,7 @@ desc = "Contains dangerous plasma. Do not inhale." icon_state = "plasma" flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = null //they have no straps! /obj/item/weapon/tank/blob_act() if(prob(50)) @@ -282,7 +284,7 @@ else descriptive = "furiously hot" - usr << text("\blue \The \icon[][src] feels []", icon, descriptive) + usr << "\blue \The \icon[icon][src] feels [descriptive]" return diff --git a/code/game/objects/tanks/emergency.dm b/code/game/objects/tanks/emergency.dm index 71ca3243f12..7c0e80fd947 100644 --- a/code/game/objects/tanks/emergency.dm +++ b/code/game/objects/tanks/emergency.dm @@ -2,7 +2,8 @@ name = "emergency oxygen tank" desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." icon_state = "emergency" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT w_class = 2.0 force = 4.0 distribute_pressure = ONE_ATMOSPHERE*O2STANDARD @@ -11,7 +12,7 @@ New() ..() - air_contents.adjustGases((3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) + air_contents.adjust((3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return @@ -43,5 +44,5 @@ ..() var/datum/gas/sleeping_agent/trace_gas = new() trace_gas.moles = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD - air_contents.adjustGases((3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, traces = list(trace_gas)) + air_contents.adjust((3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, traces = list(trace_gas)) return \ No newline at end of file diff --git a/code/game/objects/tanks/jetpack.dm b/code/game/objects/tanks/jetpack.dm index a8b853b6b7c..84384341e13 100644 --- a/code/game/objects/tanks/jetpack.dm +++ b/code/game/objects/tanks/jetpack.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/tank/jetpack name = "Jetpack (Empty)" desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution." @@ -5,11 +7,10 @@ w_class = 4.0 item_state = "jetpack" distribute_pressure = ONE_ATMOSPHERE*O2STANDARD - var - datum/effect/effect/system/ion_trail_follow/ion_trail - on = 0.0 - stabilization_on = 0 - volume_rate = 500 //Needed for borg jetpack transfer + var/datum/effect/effect/system/ion_trail_follow/ion_trail + var/on = 0.0 + var/stabilization_on = 0 + var/volume_rate = 500 //Needed for borg jetpack transfer New() ..() @@ -75,7 +76,7 @@ New() ..() - air_contents.adjustGases((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) + air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return /obj/item/weapon/tank/jetpack/oxygen @@ -86,7 +87,7 @@ New() ..() - air_contents.adjustGases((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) + air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return /obj/item/weapon/tank/jetpack/carbondioxide @@ -99,7 +100,7 @@ ..() src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() src.ion_trail.set_up(src) - air_contents.adjustGases(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) + air_contents.adjust(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return examine() @@ -108,4 +109,4 @@ if(air_contents.carbon_dioxide < 10) usr << text("\red The meter on the [src.name] indicates you are almost out of air!") playsound(usr, 'alert.ogg', 50, 1) - return \ No newline at end of file + return diff --git a/code/game/objects/tanks/oxygen.dm b/code/game/objects/tanks/oxygen.dm index 3c06dd0c644..308bd6c43c3 100644 --- a/code/game/objects/tanks/oxygen.dm +++ b/code/game/objects/tanks/oxygen.dm @@ -8,7 +8,7 @@ New() ..() - air_contents.adjustGases((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) + air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return diff --git a/code/game/objects/toys.dm b/code/game/objects/toys.dm index 02ffbd272d6..4cf697d8746 100644 --- a/code/game/objects/toys.dm +++ b/code/game/objects/toys.dm @@ -140,7 +140,7 @@ CRAYONS user << "You start drawing a rune on the [target.name]." if(instant || do_after(user, 50)) if(user.equipped() == src) - new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype) + new /obj/effect/decal/cleanable/crayon(user.client,target,colour,shadeColour,drawtype) user << "You finish drawing." if(uses) uses-- @@ -175,6 +175,7 @@ CRAYONS icon = 'rune.dmi' layer = 2.1 anchored = 1 + var/client/who_drew_this examine() @@ -183,9 +184,10 @@ CRAYONS return - New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune") + New(who,location,main = "#FFFFFF",shade = "#000000",var/type = "rune") ..() loc = location + who_drew_this = who name = type desc = "A [type] drawn in crayon." diff --git a/code/game/objects/transfer_valve.dm b/code/game/objects/transfer_valve.dm index 395e7cd4ecf..3404d4b6498 100644 --- a/code/game/objects/transfer_valve.dm +++ b/code/game/objects/transfer_valve.dm @@ -10,195 +10,180 @@ var/valve_open = 0 var/toggle = 1 - proc - process_activation(var/obj/item/device/D) +/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D) - IsAssemblyHolder() - return 1 +/obj/item/device/transfer_valve/IsAssemblyHolder() + return 1 - attackby(obj/item/item, mob/user) - if(istype(item, /obj/item/weapon/tank)) - if(tank_one && tank_two) - user << "There are already two tanks attached, remove one first." - return +/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user) + if(istype(item, /obj/item/weapon/tank)) + if(tank_one && tank_two) + user << "There are already two tanks attached, remove one first." + return - if(!tank_one) - tank_one = item - user.drop_item() - item.loc = src - user << "You attach the tank to the transfer valve." - else if(!tank_two) - tank_two = item - user.drop_item() - item.loc = src - user << "You attach the tank to the transfer valve." + if(!tank_one) + tank_one = item + user.drop_item() + item.loc = src + user << "You attach the tank to the transfer valve." + else if(!tank_two) + tank_two = item + user.drop_item() + item.loc = src + user << "You attach the tank to the transfer valve." - update_icon() + update_icon() //TODO: Have this take an assemblyholder - else if(isassembly(item)) - var/obj/item/device/assembly/A = item - if(A.secured) - user << "The device is secured." - return - if(attached_device) - user << "There is already an device attached to the valve, remove it first." - return - user.remove_from_mob(item) - attached_device = A - A.loc = src - user << "You attach the [item] to the valve controls and secure it." - A.holder = src - A.toggle_secure() - - bombers += "[key_name(user)] attached a [item] to a transfer valve." - message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.") - log_game("[key_name_admin(user)] attached a [item] to a transfer valve.") - attacher = key_name(user) - return - - - HasProximity(atom/movable/AM as mob|obj) - if(!attached_device) return - attached_device.HasProximity(AM) - return - - - attack_self(mob/user as mob) - user.machine = src - var/dat = {" Valve properties: -
    Attachment one: [tank_one] [tank_one ? "Remove" : ""] -
    Attachment two: [tank_two] [tank_two ? "Remove" : ""] -
    Valve attachment: [attached_device ? "[attached_device]" : "None"] [attached_device ? "Remove" : ""] -
    Valve status: [ valve_open ? "Closed Open" : "Closed Open"]"} - - user << browse(dat, "window=trans_valve;size=600x300") - onclose(user, "trans_valve") - return - - Topic(href, href_list) - ..() - if ( usr.stat || usr.restrained() ) + else if(isassembly(item)) + var/obj/item/device/assembly/A = item + if(A.secured) + user << "The device is secured." return - if (src.loc == usr) - if(tank_one && href_list["tankone"]) - split_gases() - valve_open = 0 - tank_one.loc = get_turf(src) - tank_one = null - update_icon() - else if(tank_two && href_list["tanktwo"]) - split_gases() - valve_open = 0 - tank_two.loc = get_turf(src) - tank_two = null - update_icon() - else if(href_list["open"]) - toggle_valve() - else if(attached_device) - if(href_list["rem_device"]) - attached_device.loc = get_turf(src) - attached_device:holder = null - attached_device = null - update_icon() - if(href_list["device"]) - attached_device.attack_self(usr) - - src.attack_self(usr) - src.add_fingerprint(usr) - return - return - - process_activation(var/obj/item/device/D) - if(toggle) - toggle = 0 - toggle_valve() - spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever - toggle = 1 - - process() - - update_icon() - src.overlays = new/list() - src.underlays = new/list() - if(!tank_one && !tank_two && !attached_device) - icon_state = "valve_1" - return - icon_state = "valve" - var/tank_one_icon = "" - var/tank_two_icon = "" - if(tank_one) - tank_one_icon = tank_one.icon_state - if(tank_two) - tank_two_icon = tank_two.icon_state - if(tank_one) - var/icon/I = new(src.icon, icon_state = "[tank_one_icon]") - //var/obj/effect/overlay/tank_one_overlay = new - //tank_one_overlay.icon = src.icon - //tank_one_overlay.icon_state = tank_one_icon - src.underlays += I - if(tank_two) - var/icon/J = new(src.icon, icon_state = "[tank_two_icon]") - //I.Flip(EAST) this breaks the perspective! - J.Shift(WEST, 13) - //var/obj/underlay/tank_two_overlay = new - //tank_two_overlay.icon = I - src.underlays += J if(attached_device) - var/icon/K = new(src.icon, icon_state = "device") - //var/obj/effect/overlay/device_overlay = new - //device_overlay.icon = src.icon - //device_overlay.icon_state = device_icon - src.overlays += K - proc - merge_gases() - tank_two.air_contents.volume += tank_one.air_contents.volume - var/datum/gas_mixture/temp - temp = tank_one.air_contents.remove_ratio(1) - tank_two.air_contents.merge(temp) - - split_gases() - if (!valve_open || !tank_one || !tank_two) - return - var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume - var/datum/gas_mixture/temp - temp = tank_two.air_contents.remove_ratio(ratio1) - tank_one.air_contents.merge(temp) - tank_two.air_contents.volume -= tank_one.air_contents.volume - - /* - Exadv1: I know this isn't how it's going to work, but this was just to check - it explodes properly when it gets a signal (and it does). - */ - - toggle_valve() - if(valve_open==0 && (tank_one && tank_two)) - valve_open = 1 - var/turf/bombturf = get_turf(src) - var/bombarea = bombturf.loc.name - var/log_str = "Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]" - bombers += log_str - message_admins(log_str) - log_game(log_str) - merge_gases() - spawn(20) // In case one tank bursts - for (var/i=0,i<5,i++) - src.update_icon() - sleep(10) - src.update_icon() - - else if(valve_open==1 && (tank_one && tank_two)) - split_gases() - valve_open = 0 - src.update_icon() - - // this doesn't do anything but the timer etc. expects it to be here - // eventually maybe have it update icon to show state (timer, prox etc.) like old bombs - c_state() + user << "There is already an device attached to the valve, remove it first." return + user.remove_from_mob(item) + attached_device = A + A.loc = src + user << "You attach the [item] to the valve controls and secure it." + A.holder = src + A.toggle_secure() + + bombers += "[key_name(user)] attached a [item] to a transfer valve." + message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.") + log_game("[key_name_admin(user)] attached a [item] to a transfer valve.") + attacher = key_name(user) + return + + +/obj/item/device/transfer_valve/HasProximity(atom/movable/AM as mob|obj) + if(!attached_device) return + attached_device.HasProximity(AM) + return + + +/obj/item/device/transfer_valve/attack_self(mob/user as mob) + user.machine = src + var/dat = {" Valve properties: +
    Attachment one: [tank_one] [tank_one ? "Remove" : ""] +
    Attachment two: [tank_two] [tank_two ? "Remove" : ""] +
    Valve attachment: [attached_device ? "[attached_device]" : "None"] [attached_device ? "Remove" : ""] +
    Valve status: [ valve_open ? "Closed Open" : "Closed Open"]"} + + user << browse(dat, "window=trans_valve;size=600x300") + onclose(user, "trans_valve") + return + +/obj/item/device/transfer_valve/Topic(href, href_list) + ..() + if ( usr.stat || usr.restrained() ) + return + if (src.loc == usr) + if(tank_one && href_list["tankone"]) + split_gases() + valve_open = 0 + tank_one.loc = get_turf(src) + tank_one = null + update_icon() + else if(tank_two && href_list["tanktwo"]) + split_gases() + valve_open = 0 + tank_two.loc = get_turf(src) + tank_two = null + update_icon() + else if(href_list["open"]) + toggle_valve() + else if(attached_device) + if(href_list["rem_device"]) + attached_device.loc = get_turf(src) + attached_device:holder = null + attached_device = null + update_icon() + if(href_list["device"]) + attached_device.attack_self(usr) + + src.attack_self(usr) + src.add_fingerprint(usr) + return + return + +/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D) + if(toggle) + toggle = 0 + toggle_valve() + spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever + toggle = 1 + +/obj/item/device/transfer_valve/process() + return + +/obj/item/device/transfer_valve/update_icon() + overlays = null + underlays = null + + if(!tank_one && !tank_two && !attached_device) + icon_state = "valve_1" + return + icon_state = "valve" + + if(tank_one) + overlays += "[tank_one.icon_state]" + if(tank_two) + var/icon/J = new(icon, icon_state = "[tank_two.icon_state]") + J.Shift(WEST, 13) + underlays += J + if(attached_device) + overlays += "device" + +/obj/item/device/transfer_valve/proc/merge_gases() + tank_two.air_contents.volume += tank_one.air_contents.volume + var/datum/gas_mixture/temp + temp = tank_one.air_contents.remove_ratio(1) + tank_two.air_contents.merge(temp) + +/obj/item/device/transfer_valve/proc/split_gases() + if (!valve_open || !tank_one || !tank_two) + return + var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume + var/datum/gas_mixture/temp + temp = tank_two.air_contents.remove_ratio(ratio1) + tank_one.air_contents.merge(temp) + tank_two.air_contents.volume -= tank_one.air_contents.volume + + /* + Exadv1: I know this isn't how it's going to work, but this was just to check + it explodes properly when it gets a signal (and it does). + */ + +/obj/item/device/transfer_valve/proc/toggle_valve() + if(valve_open==0 && (tank_one && tank_two)) + valve_open = 1 + var/turf/bombturf = get_turf(src) + var/bombarea = bombturf.loc.name + var/log_str = "Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]" + bombers += log_str + message_admins(log_str) + log_game(log_str) + merge_gases() + spawn(20) // In case one tank bursts + for (var/i=0,i<5,i++) + src.update_icon() + sleep(10) + src.update_icon() + + else if(valve_open==1 && (tank_one && tank_two)) + split_gases() + valve_open = 0 + src.update_icon() + +// this doesn't do anything but the timer etc. expects it to be here +// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs +/obj/item/device/transfer_valve/proc/c_state() + return -/obj/structure/falsewall/ +/obj/structure/falsewall attack_hand(mob/user as mob) if(density) // Open wall diff --git a/code/game/objects/uplinks.dm b/code/game/objects/uplinks.dm new file mode 100644 index 00000000000..c431b4c5890 --- /dev/null +++ b/code/game/objects/uplinks.dm @@ -0,0 +1,469 @@ +//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak + +/* + +SYNDICATE UPLINKS + +TO-DO: + Once wizard is fixed, make sure the uplinks work correctly for it. wizard.dm is right now uncompiled and with broken code in it. + + Clean the code up and comment it. Part of it is right now copy-pasted, with the general Topic() and modifications by Abi79. + + I should take a more in-depth look at both the copy-pasted code for the individual uplinks below, and at each gamemode's code + to see how uplinks are assigned and if there are any bugs with those. + + +A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message. + +*/ + +/obj/item/device/uplink + var/welcome // Welcoming menu message + var/menu_message = "" // The actual menu text + var/items // List of items + var/item_data // raw item text + var/list/ItemList // Parsed list of items + var/uses // Numbers of crystals + var/uplink_data // designated uplink items + // List of items not to shove in their hands. + var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate) + + New() + welcome = ticker.mode.uplink_welcome + if(!item_data) + items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items + else + items = dd_replacetext(item_data) + ItemList = dd_text2list(src.items, ";") // Parsing the items text string + uses = ticker.mode.uplink_uses + +//Let's build a menu! + proc/generate_menu() + src.menu_message = "[src.welcome]
    " + src.menu_message += "Tele-Crystals left: [src.uses]
    " + src.menu_message += "
    " + src.menu_message += "Request item:
    " + src.menu_message += "Each item costs a number of tele-crystals as indicated by the number following their name.

    " + + var/cost + var/item + var/name + var/path_obj + var/path_text + var/category_items = 1 //To prevent stupid :P + + for(var/D in ItemList) + var/list/O = stringsplit(D, ":") + if(O.len != 3) //If it is not an actual item, make a break in the menu. + if(O.len == 1) //If there is one item, it's probably a title + src.menu_message += "[O[1]]
    " + category_items = 0 + else //Else, it's a white space. + if(category_items < 1) //If there were no itens in the last category... + src.menu_message += "We apologize, as you could not afford anything from this category.
    " + src.menu_message += "
    " + continue + + path_text = O[1] + cost = text2num(O[2]) + + if(cost>uses) + continue + + path_obj = text2path(path_text) + item = new path_obj() + name = O[3] + del item + + src.menu_message += "[name] ([cost])
    " + category_items++ + +// src.menu_message += "Random Item (??)
    " + src.menu_message += "
    " + return + + Topic(href, href_list) + if (href_list["buy_item"]) +/* if(href_list["buy_item"] == "random") + var/list/randomItems = list() + + //Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list + //Add only items the player can afford: + if(uses > 19) + randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops) + + if(uses > 9) + randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon + randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter + randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle + + //if(uses > 8) //Nothing... yet. + //if(uses > 7) //Nothing... yet. + + if(uses > 6) + randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module + randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon + + if(uses > 5) + randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver + + if(uses > 4) + randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow + randomItems.Add("/obj/item/device/powersink") //Powersink + + if(uses > 3) + randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword + randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer + randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector + + if(uses > 2) + randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades + randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen + randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge + randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit + randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card + randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer + randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit + randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key + randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant + randomItems.Add("/obj/item/clothing/glasses/thermal") //Thermal Imaging Goggles + + if(uses > 1) +/* + var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo + var/hasRevolver = 0 + for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it + if(istype(I,/obj/item/weapon/gun/projectile)) + hasRevolver = 1 + + if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo +*/ + randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo + randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes + randomItems.Add("/obj/item/weapon/plastique") //C4 + + if(uses > 0) + randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap + randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox + + if(!randomItems) + del(randomItems) + return 0 + else + href_list["buy_item"] = pick(randomItems) + + switch(href_list["buy_item"]) //Ok, this gets a little messy, sorry. + if("/obj/item/weapon/circuitboard/teleporter") + uses -= 20 + if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate") + uses -= 10 + if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate") + uses -= 7 + if("/obj/item/weapon/gun/projectile") + uses -= 6 + if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink") + uses -= 5 + if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon") + uses -= 4 + if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \ + "/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \ + "/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal") + uses -= 3 + if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique") + uses -= 2 + if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate") + uses -= 1 + + del(randomItems) + return 1 +*/ + + + if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item + return 0 + + //if(usr:mind && ticker.mode.traitors[usr:mind]) + //var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind] + //info.spawnlist += href_list["buy_item"] + + uses -= text2num(href_list["cost"]) + + return 1 + + +/* + *PDA uplink + */ + +//Syndicate uplink hidden inside a traitor PDA +//Communicate with traitor through the PDA's note function. + +/obj/item/device/uplink/pda + name = "uplink module" + desc = "An electronic uplink system of unknown origin." + icon = 'module.dmi' + icon_state = "power_mod" + var/obj/item/device/pda/hostpda = null + + var/orignote = null //Restore original notes when locked. + var/active = 0 //Are we currently active? + var/lock_code = "" //The unlocking password. + + proc + unlock() + if ((isnull(src.hostpda)) || (src.active)) + return + + src.orignote = src.hostpda.note + src.active = 1 + src.hostpda.mode = 1 //Switch right to the notes program + + src.generate_menu() + print_to_host(menu_message) + + for (var/mob/M in viewers(1, src.hostpda.loc)) + if (M.client && M.machine == src.hostpda) + src.hostpda.attack_self(M) + + return + + print_to_host(var/text) + if (isnull(hostpda)) + return + hostpda.note = text + + for (var/mob/M in viewers(1, hostpda.loc)) + if (M.client && M.machine == hostpda) + hostpda.attack_self(M) + return + + shutdown_uplink() + if (isnull(src.hostpda)) + return + active = 0 + hostpda.note = orignote + if (hostpda.mode==1) + hostpda.mode = 0 + hostpda.updateDialog() + return + + attack_self(mob/user as mob) + src.generate_menu() + src.hostpda.note = src.menu_message + + + Topic(href, href_list) + if ((isnull(src.hostpda)) || (!src.active)) + return + + if (usr.stat || usr.restrained() || !in_range(src.hostpda, usr)) + return + + if(..() == 1) // We can afford the item + var/path_obj = text2path(href_list["buy_item"]) + var/mob/A = src.hostpda.loc + var/item = new path_obj(get_turf(src.hostpda)) + if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner)) + if(!A.r_hand) + item:loc = A + A.r_hand = item + item:layer = 20 + else if(!A.l_hand) + item:loc = A + A.l_hand = item + item:layer = 20 + else + item:loc = get_turf(A) + usr.update_clothing() + // usr.client.onBought("[item:name]") When we have the stats again, uncomment. + /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind + del item*/ + //HEADFINDBACK + src.attack_self(usr) + src.hostpda.attack_self(usr) + return + + +/* + *Portable radio uplink + */ + +//A Syndicate uplink disguised as a portable radio +/obj/item/device/uplink/radio/implanted + New() + ..() + uses = 5 + return + + explode() + var/turf/location = get_turf(src.loc) + if(location) + location.hotspot_expose(700,125) + explosion(location, 0, 0, 2, 4, 1) + + var/obj/item/weapon/implant/uplink/U = src.loc + var/mob/living/A = U.imp_in + var/datum/organ/external/head = A:organs["head"] + head.destroyed = 1 + spawn(2) + head.droplimb() + del(src.master) + del(src) + return + + +/obj/item/device/uplink/radio + name = "ship bounced radio" + icon = 'radio.dmi' + icon_state = "radio" + var/temp = null //Temporary storage area for a message offering the option to destroy the radio + var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself. + var/obj/item/device/radio/origradio = null + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT + w_class = 2.0 + item_state = "radio" + throwforce = 5 + throw_speed = 4 + throw_range = 20 + m_amt = 100 + + attack_self(mob/user as mob) + var/dat + + if (src.selfdestruct) + dat = "Self Destructing..." + else + if (src.temp) + dat = "[src.temp]

    Clear" + else + src.generate_menu() + dat = src.menu_message + if (src.origradio) // Checking because sometimes the radio uplink may be spawned by itself, not as a normal unlockable radio + dat += "Lock
    " + dat += "
    " + dat += "Self-Destruct" + + user << browse(dat, "window=radio") + onclose(user, "radio") + return + + Topic(href, href_list) + if (usr.stat || usr.restrained()) + return + + if (!( istype(usr, /mob/living/carbon/human))) + return 1 + + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || istype(src.loc,/obj/item/weapon/implant/uplink))) + usr.machine = src + + if(href_list["buy_item"]) + if(..() == 1) // We can afford the item + var/path_obj = text2path(href_list["buy_item"]) + var/item = new path_obj(get_turf(src.loc)) + var/mob/A = src.loc + if(istype(src.loc,/obj/item/weapon/implant/uplink)) + var/obj/item/weapon/implant/uplink/U = src.loc + A = U.imp_in + if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner)) + if(!A.r_hand) + item:loc = A + A.r_hand = item + item:layer = 20 + else if(!A.l_hand) + item:loc = A + A.l_hand = item + item:layer = 20 + else + item:loc = get_turf(A) + /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind + del item*/ + // usr.client.onBought("[item:name]") When we have the stats again, uncomment. + src.attack_self(usr) + return + + else if (href_list["lock"] && src.origradio) + // presto chango, a regular radio again! (reset the freq too...) + usr.machine = null + usr << browse(null, "window=radio") + var/obj/item/device/radio/T = src.origradio + var/obj/item/device/uplink/radio/R = src + R.loc = T + T.loc = usr + // R.layer = initial(R.layer) + R.layer = 0 + if (usr.client) + usr.client.screen -= R + if (usr.r_hand == R) + usr.u_equip(R) + usr.r_hand = T + + else + usr.u_equip(R) + usr.l_hand = T + R.loc = T + T.layer = 20 + T.set_frequency(initial(T.frequency)) + T.attack_self(usr) + return + + else if (href_list["selfdestruct"]) + src.temp = "Self-Destruct" + + else if (href_list["selfdestruct2"]) + src.selfdestruct = 1 + spawn (100) + explode() + return + + else if (href_list["clear_selfdestruct"]) + src.temp = null + + attack_self(usr) +// if (istype(src.loc, /mob)) +// attack_self(src.loc) +// else +// for(var/mob/M in viewers(1, src)) +// if (M.client) +// src.attack_self(M) + return + + proc/explode() + var/turf/location = get_turf(src.loc) + if(location) + location.hotspot_expose(700,125) + explosion(location, 0, 0, 2, 4, 1) + + del(src.master) + del(src) + return + + proc/shutdown_uplink() + if (!src.origradio) + return + var/list/nearby = viewers(1, src) + for(var/mob/M in nearby) + if (M.client && M.machine == src) + M << browse(null, "window=radio") + M.machine = null + + var/obj/item/device/radio/T = src.origradio + var/obj/item/device/uplink/radio/R = src + var/mob/L = src.loc + R.loc = T + T.loc = L + // R.layer = initial(R.layer) + R.layer = 0 + if (istype(L)) + if (L.client) + L.client.screen -= R + if (L.r_hand == R) + L.u_equip(R) + L.r_hand = T + else + L.u_equip(R) + L.l_hand = T + T.layer = 20 + T.set_frequency(initial(T.frequency)) + return \ No newline at end of file diff --git a/code/game/objects/watercloset.dm b/code/game/objects/watercloset.dm index da6d46bdc0a..afc41385615 100644 --- a/code/game/objects/watercloset.dm +++ b/code/game/objects/watercloset.dm @@ -1,4 +1,4 @@ -//todo: flushing, flushing heads, showers actually cleaning people +//todo: toothbrushes, and some sort of "toilet-filthinator" for the hos /obj/structure/toilet name = "toilet" @@ -8,18 +8,43 @@ density = 0 anchored = 1 var/open = 0 + var/mob/swirlie = null /obj/structure/toilet/New() open = round(rand(0, 1)) update_icon() /obj/structure/toilet/attack_hand() - open = !open - update_icon() + if(!swirlie) + open = !open + update_icon() + else + usr.visible_message("[usr] slams the toilet seat onto [swirlie.name]'s head!", "You slam the toilet seat onto [swirlie.name]'s head!", "You hear reverberating porcelain.") + swirlie.adjustBruteLoss(8) /obj/structure/toilet/update_icon() icon_state = "toilet[open]" +/obj/structure/toilet/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = I + var/mob/GM = G.affecting + if(ismob(G.affecting)) + if(G.state>1 && GM.loc == get_turf(src)) + if(open && !swirlie) + user.visible_message("[user] starts to give [GM.name] a swirlie!", "You start to give [GM.name] a swirlie!") + swirlie = GM + if(do_after(user, 30, 5, 0)) + user.visible_message("[user] gives [GM.name] a swirlie!", "You give [GM.name] a swirlie!", "You hear a toilet flushing.") + if(!GM.internal) + GM.adjustOxyLoss(5) + swirlie = null + else + user.visible_message("[user] slams [GM.name] into the [src]!", "You slam [GM.name] into the [src]!") + GM.adjustBruteLoss(8) + else + user << "You need a tighter grip." + /obj/structure/urinal @@ -30,9 +55,20 @@ density = 0 anchored = 1 +/obj/structure/urinal/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = I + var/mob/GM = G.affecting + if(ismob(G.affecting)) + if(G.state>1 && GM.loc == get_turf(src)) + user.visible_message("[user] slams [GM.name] into the [src]!", "You slam [GM.name] into the [src]!") + GM.adjustBruteLoss(8) + else + user << "You need a tighter grip." -/obj/structure/shower + +/obj/machinery/shower name = "shower" desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division." icon = 'watercloset.dmi' @@ -41,7 +77,9 @@ anchored = 1 var/on = 0 var/obj/effect/mist/mymist = null - var/ismist = 0 //needs a var so we can make it linger~ + var/ismist = 0 //needs a var so we can make it linger~ + var/watertemp = "normal" //freezing, normal, or boiling + var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process() //add heat controls? when emagged, you can freeze to death in it? @@ -52,22 +90,37 @@ layer = MOB_LAYER + 1 mouse_opacity = 0 -/obj/structure/shower/attack_hand(mob/M as mob) +/obj/machinery/shower/attack_hand(mob/M as mob) on = !on update_icon() if(on && M.loc == loc) wash(M) + check_heat(M) -/obj/structure/shower/attackby(mob/M as mob) - attack_hand(M) +/obj/machinery/shower/attackby(var/obj/item/I, var/mob/user) + if(I.type == /obj/item/device/analyzer) + user << "The water temperature seems to be [watertemp]." + if(istype(I, /obj/item/weapon/wrench)) + user << "You begin to adjust the temperature valve with the [I]." + if(do_after(user, 50)) + switch(watertemp) + if("normal") + watertemp = "freezing" + if("freezing") + watertemp = "boiling" + if("boiling") + watertemp = "normal" + user.visible_message("[user] adjusts the shower with the [I].", "You adjust the shower with the [I].") -/obj/structure/shower/update_icon() - overlays = null +/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up + overlays = null //once it's been on for a while, in addition to handling the water overlay. if(mymist) del(mymist) if(on) overlays += image('watercloset.dmi', src, "water", MOB_LAYER + 1, dir) + if(watertemp == "freezing") + return if(!ismist) spawn(50) if(src && on) @@ -84,13 +137,20 @@ del(mymist) ismist = 0 -/obj/structure/shower/HasEntered(atom/movable/O as obj|mob) +/obj/machinery/shower/HasEntered(atom/movable/O) ..() wash(O) + if(ismob(O)) + mobpresent += 1 + check_heat(O) + +/obj/machinery/shower/Uncrossed(atom/movable/O) + if(ismob(O)) + mobpresent -= 1 + ..() //Yes, showers are super powerful as far as washing goes. -/obj/structure/shower/proc/wash(atom/movable/O as obj|mob) - ..() +/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob) if(!on) return O.clean_blood() @@ -108,10 +168,10 @@ var/mob/living/carbon/human/washer = O if(washer.head) washer.head.clean_blood() - if(washer.w_uniform) - washer.w_uniform.clean_blood() if(washer.wear_suit) washer.wear_suit.clean_blood() + else if(washer.w_uniform) + washer.w_uniform.clean_blood() if(washer.shoes) washer.shoes.clean_blood() if(washer.gloves) @@ -129,6 +189,26 @@ for(var/obj/effect/overlay/R in tile) del(R) +/obj/machinery/shower/process() + if(!on || !mobpresent) return + for(var/mob/living/carbon/C in loc) + check_heat(C) + +/obj/machinery/shower/proc/check_heat(mob/M as mob) + if(!on || watertemp == "normal") return + if(iscarbon(M)) + var/mob/living/carbon/C = M + + if(watertemp == "freezing") + C.bodytemperature = min(100, C.bodytemperature - 80) + C << "The water is freezing!" + return + if(watertemp == "boiling") + C.bodytemperature = max(500, C.bodytemperature + 35) + C.adjustFireLoss(10) + C << "The water is searing!" + return + /obj/item/weapon/bikehorn/rubberducky @@ -177,7 +257,7 @@ else C.clean_blood() //other things that can't wear gloves should just wash the mob. for(var/mob/V in viewers(src, null)) - V.show_message(text("\blue [M] washes their hands using \the [src].")) + V.show_message("\blue [M] washes their hands using \the [src].") /obj/structure/sink/attackby(var/obj/item/O as obj, var/mob/user as mob) if(busy) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 6d04a7d4ea0..36137ab6cf2 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -30,8 +30,6 @@ for (var/turf/simulated/floor/target in range(1,src)) if(!target.blocks_air) - if(target.parent) - target.parent.suspend_group_processing() var/datum/gas_mixture/payload = new var/datum/gas/sleeping_agent/trace_gas = new @@ -48,8 +46,6 @@ /obj/effect/mine/proc/triggerplasma(obj) for (var/turf/simulated/floor/target in range(1,src)) if(!target.blocks_air) - if(target.parent) - target.parent.suspend_group_processing() var/datum/gas_mixture/payload = new @@ -86,7 +82,7 @@ if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) for(var/mob/O in viewers(world.view, src.loc)) - O << text("[M] triggered the \icon[] [src]", src) + O << "[M] triggered the \icon[src] [src]" triggered = 1 call(src,triggerproc)(M) @@ -157,7 +153,7 @@ user << "\blue You arm the mousetrap." else icon_state = "mousetrap" - if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) + if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -166,7 +162,7 @@ for(var/mob/O in viewers(user, null)) if(O == user) continue - O.show_message(text("\red [user] accidentally sets off the mousetrap, breaking their fingers."), 1) + O.show_message("\red [user] accidentally sets off the mousetrap, breaking their fingers.", 1) return user << "\blue You disarm the mousetrap." armed = !armed @@ -174,7 +170,7 @@ /obj/item/weapon/mousetrap/attack_hand(mob/user as mob) if(armed) - if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) + if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -183,7 +179,7 @@ for(var/mob/O in viewers(user, null)) if(O == user) continue - O.show_message(text("\red [user] accidentally sets off the mousetrap, breaking their fingers."), 1) + O.show_message("\red [user] accidentally sets off the mousetrap, breaking their fingers.", 1) return ..() @@ -196,12 +192,12 @@ for(var/mob/O in viewers(H, null)) if(O == H) continue - O.show_message(text("\red [H] accidentally steps on the mousetrap."), 1) + O.show_message("\red [H] accidentally steps on the mousetrap.", 1) ..() /obj/item/weapon/mousetrap/hitby(A as mob|obj) if(!armed) return ..() for(var/mob/O in viewers(src, null)) - O.show_message(text("\red The mousetrap is triggered by [A]."), 1) + O.show_message("\red The mousetrap is triggered by [A].", 1) src.triggered(null) diff --git a/code/game/objects/windoor_assembly.dm b/code/game/objects/windoor_assembly.dm new file mode 100644 index 00000000000..c1b220927f2 --- /dev/null +++ b/code/game/objects/windoor_assembly.dm @@ -0,0 +1,296 @@ +/* Windoor (window door) assembly -Nodrak + * Step 1: Create a windoor out of rglass + * Step 2: Add r-glass to the assembly to make a secure windoor (Optional) + * Step 3: Rotate or Flip the assembly to face and open the way you want + * Step 4: Wrench the assembly in place + * Step 5: Add cables to the assembly + * Step 6: Set access for the door. + * Step 7: Screwdriver the door to complete + */ + + +obj/structure/windoor_assembly + icon = 'windoor.dmi' + + name = "Windoor Assembly" + icon_state = "l_windoor_assembly01" + anchored = 0 + density = 0 + dir = NORTH + + var/ini_dir + var/obj/item/weapon/airlock_electronics/electronics = null + + //Vars to help with the icon's name + var/facing = "l" //Does the windoor open to the left or right? + var/secure = "" //Whether or not this creates a secure windoor + var/state = "01" //How far the door assembly has progressed in terms of sprites + +obj/structure/windoor_assembly/New(dir=NORTH) + ..() + src.ini_dir = src.dir + update_nearby_tiles(need_rebuild=1) + +obj/structure/windoor_assembly/Del() + density = 0 + update_nearby_tiles() + ..() + +/obj/structure/windoor_assembly/update_icon() + icon_state = "[facing]_[secure]windoor_assembly[state]" + +/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(istype(mover) && mover.pass_flags & PASSGLASS) + return 1 + if(get_dir(loc, target) == dir) //Make sure looking at appropriate border + if(air_group) return 0 + return !density + else + return 1 + +/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf) + if(istype(mover) && mover.pass_flags & PASSGLASS) + return 1 + if(get_dir(loc, target) == dir) + return !density + else + return 1 + + +/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob) + //I really should have spread this out across more states but thin little windoors are hard to sprite. + switch(state) + if("01") + if(istype(W, /obj/item/weapon/weldingtool) && !anchored ) + var/obj/item/weapon/weldingtool/WT = W + if (WT.remove_fuel(0,user)) + user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.") + playsound(src.loc, 'Welder2.ogg', 50, 1) + + if(do_after(user, 40)) + if(!src) return + user << "\blue You dissasembled the windoor assembly!" + new /obj/item/stack/sheet/rglass(get_turf(src), 5) + if(secure) + new /obj/item/stack/rods(get_turf(src), 4) + del(src) + else + user << "\blue You need more welding fuel to dissassemble the windoor assembly." + return + + //Wrenching an unsecure assembly anchors it in place. Step 4 complete + if(istype(W, /obj/item/weapon/wrench) && !anchored) + playsound(src.loc, 'Ratchet.ogg', 100, 1) + user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.") + + if(do_after(user, 40)) + if(!src) return + user << "\blue You've secured the windoor assembly!" + src.anchored = 1 + if(src.secure) + src.name = "Secure Anchored Windoor Assembly" + else + src.name = "Anchored Windoor Assembly" + + //Unwrenching an unsecure assembly un-anchors it. Step 4 undone + else if(istype(W, /obj/item/weapon/wrench) && anchored) + playsound(src.loc, 'Ratchet.ogg', 100, 1) + user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.") + + if(do_after(user, 40)) + if(!src) return + user << "\blue You've unsecured the windoor assembly!" + src.anchored = 0 + if(src.secure) + src.name = "Secure Windoor Assembly" + else + src.name = "Windoor Assembly" + + //Adding r-glass makes the assembly a secure windoor assembly. Step 2 (optional) complete. + else if(istype(W, /obj/item/stack/rods) && !secure) + var/obj/item/stack/rods/R = W + if(R.amount < 4) + user << "\red You need more rods to do this." + return + user << "\blue You start to reinforce the windoor with rods." + + if(do_after(user,40)) + if(!src) return + + R.use(4) + user << "\blue You reinforce the windoor." + src.secure = "secure_" + if(src.anchored) + src.name = "Secure Anchored Windoor Assembly" + else + src.name = "Secure Windoor Assembly" + + //Adding cable to the assembly. Step 5 complete. + else if(istype(W, /obj/item/weapon/cable_coil) && anchored) + user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.") + + if(do_after(user, 40)) + if(!src) return + var/obj/item/weapon/cable_coil/CC = W + CC.use(1) + user << "\blue You wire the windoor!" + src.state = "02" + if(src.secure) + src.name = "Secure Wired Windoor Assembly" + else + src.name = "Wired Windoor Assembly" + else + ..() + + if("02") + + //Removing wire from the assembly. Step 5 undone. + if(istype(W, /obj/item/weapon/wirecutters)) + playsound(src.loc, 'Wirecutter.ogg', 100, 1) + user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") + + if(do_after(user, 40)) + if(!src) return + + user << "\blue You cut the windoor wires.!" + new/obj/item/weapon/cable_coil(get_turf(user), 1) + src.state = "01" + if(src.secure) + src.name = "Secure Wired Windoor Assembly" + else + src.name = "Wired Windoor Assembly" + + //Adding airlock electronics for access. Step 6 complete. + else if(istype(W, /obj/item/weapon/airlock_electronics)) + playsound(src.loc, 'Screwdriver.ogg', 100, 1) + user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.") + + if(do_after(user, 40)) + if(!src) return + + user.drop_item() + W.loc = src + user << "\blue You've installed the airlock electronics!" + src.name = "Near finished Windoor Assembly" + src.electronics = W + else + W.loc = src.loc + + //Screwdriver to remove airlock electronics. Step 6 undone. + else if(istype(W, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 100, 1) + user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.") + + if(do_after(user, 40)) + if(!src) return + user << "\blue You've removed the airlock electronics!" + src.name = "Wired Windoor Assembly" + var/obj/item/weapon/airlock_electronics/ae + if (!electronics) + ae = new/obj/item/weapon/airlock_electronics( src.loc ) + else + ae = electronics + electronics = null + ae.loc = src.loc + + + //Crowbar to complete the assembly, Step 7 complete. + else if(istype(W, /obj/item/weapon/crowbar)) + usr << browse(null, "window=windoor_access") + playsound(src.loc, 'Crowbar.ogg', 100, 1) + user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.") + + if(do_after(user, 40)) + + if(!src) return + + density = 1 //Shouldn't matter but just incase + user << "\blue You finish the windoor!" + + if(secure) + var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc) + if(src.facing == "l") + windoor.icon_state = "leftsecureopen" + windoor.base_state = "leftsecure" + else + windoor.icon_state = "rightsecureopen" + windoor.base_state = "rightsecure" + windoor.dir = src.dir + windoor.density = 0 + + windoor.req_access = src.electronics.conf_access + windoor.electronics = src.electronics + src.electronics.loc = windoor + else + var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(src.loc) + if(src.facing == "l") + windoor.icon_state = "leftopen" + windoor.base_state = "left" + else + windoor.icon_state = "rightopen" + windoor.base_state = "right" + windoor.dir = src.dir + windoor.density = 0 + + windoor.req_access = src.electronics.conf_access + windoor.electronics = src.electronics + src.electronics.loc = windoor + + + del(src) + + + else + ..() + + //Update to reflect changes(if applicable) + update_icon() + + +//Rotates the windoor assembly clockwise +/obj/structure/windoor_assembly/verb/revrotate() + set name = "Rotate Windoor Assembly" + set category = "Object" + set src in oview(1) + + if (src.anchored) + usr << "It is fastened to the floor; therefore, you can't rotate it!" + return 0 + if(src.state != "01") + update_nearby_tiles(need_rebuild=1) //Compel updates before + + src.dir = turn(src.dir, 270) + + if(src.state != "01") + update_nearby_tiles(need_rebuild=1) + + src.ini_dir = src.dir + update_icon() + return + +//Flips the windoor assembly, determines whather the door opens to the left or the right +/obj/structure/windoor_assembly/verb/flip() + set name = "Flip Windoor Assembly" + set category = "Object" + set src in oview(1) + + if(src.facing == "l") + usr << "The windoor will now slide to the right." + src.facing = "r" + else + src.facing = "l" + usr << "The windoor will now slide to the left." + + update_icon() + return + +/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild) + if(!air_master) return 0 + + var/turf/simulated/source = loc + var/turf/simulated/target = get_step(source,dir) + + if(istype(source)) air_master.tiles_to_update += source + if(istype(target)) air_master.tiles_to_update += target + + return 1 \ No newline at end of file diff --git a/code/game/objects/window.dm b/code/game/objects/window.dm index ee9871be0fc..b6bc1e5c897 100644 --- a/code/game/objects/window.dm +++ b/code/game/objects/window.dm @@ -34,7 +34,7 @@ del(src) /obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(istype(mover) && mover.checkpass(PASSGLASS)) + if(istype(mover) && mover.pass_flags & PASSGLASS) return 1 if (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST) return 0 //full tile window, you can't move into it! @@ -44,7 +44,7 @@ return 1 /obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf) - if(istype(O) && O.checkpass(PASSGLASS)) + if(istype(O) && O.pass_flags & PASSGLASS) return 1 if (get_dir(O.loc, target) == dir) return 0 @@ -68,7 +68,7 @@ ..() for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [src] was hit by [AM]."), 1) + O.show_message("\red [src] was hit by [AM].", 1) var/tforce = 0 if(ismob(AM)) tforce = 40 @@ -87,15 +87,17 @@ src.density = 0 del(src) return - ..() + //..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak return +//These all need to be rewritten to use visiblemessage() + /obj/structure/window/attack_hand() - if ((usr.mutations & HULK)) - usr << text("\blue You smash through the window.") + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + usr << "\blue You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes through the window!", usr) + O << "\red [usr] smashes through the window!" src.health = 0 new /obj/item/weapon/shard( src.loc ) if(reinf) new /obj/item/stack/rods( src.loc) @@ -111,11 +113,11 @@ /obj/structure/window/attack_paw() - if ((usr.mutations & HULK)) - usr << text("\blue You smash through the window.") + if ((HULK in usr.mutations)) + usr << "\blue You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes through the window!", usr) + O << "\red [usr] smashes through the window!" src.health = 0 new /obj/item/weapon/shard( src.loc ) if(reinf) new /obj/item/stack/rods( src.loc) @@ -126,17 +128,17 @@ /obj/structure/window/attack_alien() if (istype(usr, /mob/living/carbon/alien/larva))//Safety check for larva. /N return - usr << text("\green You smash against the window.") + usr << "\green You smash against the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes against the window.", usr) + O << "\red [usr] smashes against the window." playsound(src.loc, 'Glasshit.ogg', 100, 1) src.health -= 15 if(src.health <= 0) - usr << text("\green You smash through the window.") + usr << "\green You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes through the window!", usr) + O << "\red [usr] smashes through the window!" src.health = 0 new /obj/item/weapon/shard(src.loc) if(reinf) @@ -150,17 +152,17 @@ /obj/structure/window/attack_animal(mob/living/simple_animal/M as mob) if (M.melee_damage_upper == 0) return - M << text("\green You smash against the window.") + M << "\green You smash against the window." for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes against the window.", M) + O << "\red [M] smashes against the window." playsound(src.loc, 'Glasshit.ogg', 100, 1) src.health -= M.melee_damage_upper if(src.health <= 0) - M << text("\green You smash through the window.") + M << "\green You smash through the window." for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes through the window!", M) + O << "\red [M] smashes through the window!" src.health = 0 new /obj/item/weapon/shard(src.loc) if(reinf) @@ -174,17 +176,17 @@ if(!istype(usr, /mob/living/carbon/metroid/adult)) return - usr<< text("\green You smash against the window.") + usr<< "\green You smash against the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes against the window.", usr) + O << "\red [usr] smashes against the window." playsound(src.loc, 'Glasshit.ogg', 100, 1) src.health -= rand(10,15) if(src.health <= 0) - usr << text("\green You smash through the window.") + usr << "\green You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - O << text("\red [] smashes through the window!", usr) + O << "\red [usr] smashes through the window!" src.health = 0 new /obj/item/weapon/shard(src.loc) if(reinf) @@ -343,23 +345,11 @@ /obj/structure/window/proc/update_nearby_tiles(need_rebuild) if(!air_master) return 0 - var/turf/simulated/source = loc + var/turf/simulated/source = get_turf(src) var/turf/simulated/target = get_step(source,dir) - if(need_rebuild) - if(istype(source)) //Rebuild/update nearby group geometry - if(source.parent) - air_master.groups_to_rebuild += source.parent - else - air_master.tiles_to_update += source - if(istype(target)) - if(target.parent) - air_master.groups_to_rebuild += target.parent - else - air_master.tiles_to_update += target - else - if(istype(source)) air_master.tiles_to_update += source - if(istype(target)) air_master.tiles_to_update += target + if(istype(source)) air_master.tiles_to_update |= source + if(istype(target)) air_master.tiles_to_update |= target return 1 diff --git a/code/game/player/news.dm b/code/game/player/news.dm index c868a9974d8..88bbb11960b 100644 --- a/code/game/player/news.dm +++ b/code/game/player/news.dm @@ -201,7 +201,7 @@ client/proc/remove_news(ID as num) display_all_news_list() client/proc/edit_news(ID as num) - if(!src.holder) + if(!src.holder || src.holder.level <= 0) src << "You tried to modify the news, but you're not an admin!" return diff --git a/code/game/prisonshuttle.dm b/code/game/prisonshuttle.dm index 8fa447c9ae5..1ee3b575bab 100644 --- a/code/game/prisonshuttle.dm +++ b/code/game/prisonshuttle.dm @@ -15,6 +15,7 @@ var/prison_shuttle_timeleft = 0 icon = 'computer.dmi' icon_state = "shuttle" req_access = list(access_security) + circuit = "/obj/item/weapon/circuitboard/prison_shuttle" var/temp = null var/hacked = 0 var/allowedtocall = 0 @@ -34,7 +35,28 @@ var/prison_shuttle_timeleft = 0 attackby(I as obj, user as mob) - if(istype(I,/obj/item/weapon/card/emag) && (!hacked)) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) + else if(istype(I,/obj/item/weapon/card/emag) && (!hacked)) var/obj/item/weapon/card/emag/E = I if(E.uses) E.uses-- diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 2ab9c5416c9..b53bbd155b2 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -27,7 +27,7 @@ client/verb/JoinResponseTeam() new_commando.mind.key = usr.key new_commando.key = usr.key - new_commando << "\blue You are [!leader_selected?"a member":"the LEADER"] of an armed response team in CentComm's service. Something went down on [station_name()] and they're now on code red. Go in there and fix the problem." + new_commando << "\blue You are [!leader_selected?"a member":"the LEADER"] of an Emergency Response Team under CentComm's service. There is a code red alert on [station_name()], you are tasked to go and fix the problem." new_commando << "You should first gear up and discuss a plan with your team. More members may be joining, don't move out before you're ready." del(L) @@ -81,7 +81,7 @@ proc/trigger_armed_response_team(var/force = 0) if(!nuke) nuke = locate() in world var/obj/item/weapon/paper/P = new - P.info = "Your orders, Commander, are to use all necessary tools given to return the station to a survivable condition.
    To this end, you have been provided with the best tools we can give in the three areas of Medical Engineering and Security. The nuclear authorization code is: [ nuke ? nuke.r_code : "AHH, THE NUKE IS GONE!"]. Be warned, if you detonate this without good reason, we will hold you to account for damages. Memorise this code, and then burn this message." + P.info = "Your orders, Commander, are to use all means necessary to return the station to a survivable condition.
    To this end, you have been provided with the best tools we can give in the three areas of Medicine, Engineering, and Security. The nuclear authorization code is: [ nuke ? nuke.r_code : "AHH, THE NUKE IS GONE!"]. Be warned, if you detonate this without good reason, we will hold you to account for damages. Memorise this code, and then burn this message." P.name = "Emergency Nuclear Code, and ERT Orders" for (var/obj/effect/landmark/A in world) if (A.name == "nukecode") @@ -170,9 +170,7 @@ proc/trigger_armed_response_team(var/force = 0) M.gender = MALE else M.gender = FEMALE - M.update_body() - M.update_face() - M.update_clothing() + M.rebuild_appearance() M.real_name = commando_name M.name = commando_name diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index f481fe8f58f..8e173913891 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -46,7 +46,7 @@ var/list/supply_groups = new() layer = 4 /obj/structure/plasticflaps/CanPass(atom/A, turf/T) - if(istype(A) && A.checkpass(PASSGLASS)) + if(istype(A) && A.pass_flags&PASSGLASS) return prob(60) else if(istype(A, /mob/living)) // You Shall Not Pass! var/mob/living/M = A @@ -69,18 +69,10 @@ var/list/supply_groups = new() name = "\improper Airtight plastic flaps" desc = "Heavy duty, airtight, plastic flaps." - New() //set the turf below the flaps to block air - var/turf/T = get_turf(src.loc) - if(T) - T.blocks_air = 1 - ..() - - Del() //lazy hack to set the turf to allow air to pass if it's a simulated floor - var/turf/T = get_turf(src.loc) - if(T) - if(istype(T, /turf/simulated/floor)) - T.blocks_air = 0 - ..() + CanPass(atom/A, turf/T, height = 0, air_group = 0) + if(!istype(A)) + return 0 + return ..() /area/supplyshuttle name = "Supply Shuttle" @@ -373,7 +365,9 @@ This method wont take into account storage items developed in the future and doe var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(src.loc) var/idname = "Unknown" var/idrank = "Unknown" - var/reason = input(usr,"Reason:","Why do you require this item?","") + var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","")),1,MAX_MESSAGE_LEN) + if(!reason) + reason = "Unknown" reqform.name = "Requisition Form - [P.name]" reqform.overlays += "paper_words" @@ -587,7 +581,7 @@ This method wont take into account storage items developed in the future and doe supply_shuttle_points -= P.cost O.object = P O.orderedby = usr.name - O.comment = input(usr,"Comment:","Enter comment","") + O.comment = copytext(sanitize(input(usr,"Comment:","Enter comment","")),1,MAX_MESSAGE_LEN) supply_shuttle_shoppinglist += O src.temp = "Thanks for your order.
    " src.temp += "
    OK" @@ -603,7 +597,7 @@ This method wont take into account storage items developed in the future and doe supply_shuttle_points -= P.cost O.object = P O.orderedby = usr.name - O.comment = input(usr,"Comment:","Enter comment","") + O.comment = copytext(sanitize(input(usr,"Comment:","Enter comment","")),1,MAX_MESSAGE_LEN) supply_shuttle_shoppinglist += O src.temp = "Thanks for your order.
    " src.temp += "
    OK" @@ -676,7 +670,7 @@ This method wont take into account storage items developed in the future and doe if (supply_shuttle_moving) return if (!supply_can_move()) - usr << "\red The supply shuttle can not transport station employees or homing beacons." + usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes, or homing beacons." return var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE diff --git a/code/game/throwing.dm b/code/game/throwing.dm index 149296f585e..8340f98d753 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -1,6 +1,6 @@ /mob/living/carbon/proc/toggle_throw_mode() if(!equipped())//Not holding anything - if(mutations & TK) + if(TK in mutations) if (hand) l_hand = new/obj/item/tk_grab(src) l_hand:host = src @@ -99,10 +99,10 @@ if(istype(A,/mob/living)) if(A:lying) continue src.throw_impact(A) - src.throwing = 0 + if(src.throwing == 1) + src.throwing = 0 if(isobj(A)) - if(A.density && !A.CanPass(src,target)) // **TODO: Better behaviour for windows - // which are dense, but shouldn't always stop movement + if(A.density && !A.CanPass(src,target)) src.throw_impact(A) src.throwing = 0 @@ -110,7 +110,22 @@ if(istype(hit_atom,/mob/living)) var/mob/living/M = hit_atom M.visible_message("\red [hit_atom] has been hit by [src].") - if(src.vars.Find("throwforce")) + + if(!istype(src, /obj/item)) // this is a big item that's being thrown at them~ + + if(istype(M, /mob/living/carbon/human)) + var/armor_block = M:run_armor_check("chest", "melee") + M:apply_damage(rand(20,45), BRUTE, "chest", armor_block) + + visible_message("\red [M] has been knocked down by the force of [src]!") + M:apply_effect(rand(4,12), WEAKEN, armor_block) + + M:UpdateDamageIcon() + else + M.take_organ_damage(rand(20,45)) + + + else if(src.vars.Find("throwforce")) M.take_organ_damage(src:throwforce) log_attack("[hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])") @@ -136,13 +151,19 @@ if(src.throwing) src.throw_impact(O) src.throwing = 0 + airflow_speed = 0 ..() /atom/movable/proc/throw_at(atom/target, range, speed) if(!target || !src) return 0 //use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target + src.throwing = 1 + if(usr) + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + src.throwing = 2 // really strong throw! + var/dist_x = abs(target.x - src.x) var/dist_y = abs(target.y - src.y) diff --git a/code/game/turf.dm b/code/game/turf.dm index ac32981a41f..7055658b4f2 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -18,9 +18,8 @@ /turf/New() ..() for(var/atom/movable/AM as mob|obj in src) - spawn( 0 ) - src.Entered(AM) - return + spawn(0) + Entered(AM) return /turf/ex_act(severity) @@ -166,7 +165,17 @@ W.sd_SetOpacity(0) //This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO W.levelupdate() - air_master.tiles_to_update += W + air_master.tiles_to_update |= W + + var/turf/simulated/north = get_step(W,NORTH) + var/turf/simulated/south = get_step(W,SOUTH) + var/turf/simulated/east = get_step(W,EAST) + var/turf/simulated/west = get_step(W,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return W /turf/proc/ReplaceWithPlating() @@ -184,7 +193,17 @@ W.opacity = 1 W.sd_SetOpacity(0) W.levelupdate() - air_master.tiles_to_update += W + air_master.tiles_to_update |= W + + var/turf/simulated/north = get_step(W,NORTH) + var/turf/simulated/south = get_step(W,SOUTH) + var/turf/simulated/east = get_step(W,EAST) + var/turf/simulated/west = get_step(W,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return W /turf/proc/ReplaceWithEngineFloor() @@ -197,7 +216,17 @@ E.dir = old_dir E.icon_state = "engine" E.levelupdate() - air_master.tiles_to_update += E + air_master.tiles_to_update |= E + + var/turf/simulated/north = get_step(E,NORTH) + var/turf/simulated/south = get_step(E,SOUTH) + var/turf/simulated/east = get_step(E,EAST) + var/turf/simulated/west = get_step(E,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return E /turf/simulated/Entered(atom/A, atom/OL) @@ -260,7 +289,17 @@ var/old_dir = dir var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) S.dir = old_dir - air_master.tiles_to_update += S + air_master.tiles_to_update |= S + + var/turf/simulated/north = get_step(S,NORTH) + var/turf/simulated/south = get_step(S,SOUTH) + var/turf/simulated/east = get_step(S,EAST) + var/turf/simulated/west = get_step(S,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return S /turf/proc/ReplaceWithLattice() @@ -268,27 +307,61 @@ var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) S.dir = old_dir new /obj/structure/lattice( locate(src.x, src.y, src.z) ) - air_master.tiles_to_update += S + air_master.tiles_to_update |= S + + var/turf/simulated/north = get_step(S,NORTH) + var/turf/simulated/south = get_step(S,SOUTH) + var/turf/simulated/east = get_step(S,EAST) + var/turf/simulated/west = get_step(S,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return S /turf/proc/ReplaceWithWall() var/old_icon = icon_state + if(zone) + zone.RemoveTurf(src) var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) ) S.icon_old = old_icon S.opacity = 0 S.sd_NewOpacity(1) levelupdate() - air_master.tiles_to_update += S + air_master.tiles_to_update |= S + + var/turf/simulated/north = get_step(S,NORTH) + var/turf/simulated/south = get_step(S,SOUTH) + var/turf/simulated/east = get_step(S,EAST) + var/turf/simulated/west = get_step(S,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return S /turf/proc/ReplaceWithRWall() var/old_icon = icon_state + if(zone) + zone.RemoveTurf(src) var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) ) S.icon_old = old_icon S.opacity = 0 S.sd_NewOpacity(1) levelupdate() - air_master.tiles_to_update += S + air_master.tiles_to_update |= S + + var/turf/simulated/north = get_step(S,NORTH) + var/turf/simulated/south = get_step(S,SOUTH) + var/turf/simulated/east = get_step(S,EAST) + var/turf/simulated/west = get_step(S,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west return S //turf/simulated/wall/New() @@ -366,7 +439,7 @@ dismantle_wall() /turf/simulated/wall/attack_paw(mob/user as mob) - if ((user.mutations & HULK)) + if ((HULK in user.mutations)) if (prob(40)) usr << text("\blue You smash through the wall.") dismantle_wall(1) @@ -396,7 +469,7 @@ return /turf/simulated/wall/attack_hand(mob/user as mob) - if ((user.mutations & HULK)) + if ((HULK in user.mutations) || (SUPRSTR in user.augmentations)) if (prob(40)) usr << text("\blue You smash through the wall.") dismantle_wall(1) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 4b4d39d32b3..d138c6ece49 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -37,11 +37,13 @@ log_ooc("[src.name]/[src.key] : [msg]") for (var/client/C) - if (src.client.holder && (!src.client.stealth || C.holder)) + if (src.client.holder && (!src.client.stealth || ( C.holder && C.holder.level != 0))) if (src.client.holder.rank == "Admin Observer") C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: [msg]" else if (src.client.holder.rank == "Retired Admin") C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: [msg]" + else if (src.client.holder.rank == "Moderator") + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: [msg]" else if (src.client.holder.level >= 5) C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: [msg]" else diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index eb45379de53..26ac9307b61 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -30,7 +30,7 @@ for (var/mob/M in world) if(M && M.client && M.client.holder) - if(usr.client.holder) + if(usr.client.holder && (usr.client.holder.level != 0)) usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""]" else if(!M.client.stealth && (M.client.holder.level != -3)) usr << "\t[pick(nobles)] [M.client] is a [M.client.holder.rank]" diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm index 55a18aa3e34..918a43d1c90 100644 --- a/code/modules/DetectiveWork/detective_work.dm +++ b/code/modules/DetectiveWork/detective_work.dm @@ -1,12 +1,13 @@ -//gloves w_uniform wear_suit shoes +//CONTAINS: Suit fibers and Detective's Scanning Computer atom/var/list/suit_fibers atom/proc/add_fibers(mob/living/carbon/human/M) - if(M.gloves) - if(M.gloves.transfer_blood) //bloodied gloves transfer blood to touched objects - if(add_blood(M.gloves.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody - M.gloves.transfer_blood-- + if(M.gloves && istype(M.gloves,/obj/item/clothing/)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.transfer_blood) //bloodied gloves transfer blood to touched objects + if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody + G.transfer_blood-- else if(M.bloody_hands) if(add_blood(M.bloody_hands_mob)) M.bloody_hands-- @@ -51,7 +52,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri //the print must be there for it to be complete. (Prints are 32 digits) obj/machinery/computer/forensic_scanning - name = "High-Res Forensic Scanning Computer" + name = "\improper High-Res Forensic Scanning Computer" icon_state = "forensic" var obj/item/scanning @@ -133,13 +134,8 @@ obj/machinery/computer/forensic_scanning authenticated = 1 updateDialog() return - var/obj/item/weapon/card/id/I = M.equipped() - if (I && istype(I)) - if(src.check_access(I)) - authenticated = 1 - //usr << "\green Access Granted" - //if(!authenticated) - //usr << "\red Access Denied" + if (allowed(M)) + authenticated = 1 if("logout") authenticated = 0 if("clear") @@ -166,7 +162,7 @@ obj/machinery/computer/forensic_scanning I.loc = src else usr << "Invalid Object Rejected." - if("card") + if("card") //Processing a fingerprint card. var/mob/M = usr var/obj/item/I = M.equipped() if(!(I && istype(I,/obj/item/weapon/f_card))) @@ -186,7 +182,7 @@ obj/machinery/computer/forensic_scanning process_card() else usr << "\red Invalid Object Rejected." - if("database") + if("database") //Viewing all records in each database canclear = 1 if(href_list["delete_record"]) delete_dossier(href_list["delete_record"]) @@ -198,10 +194,9 @@ obj/machinery/computer/forensic_scanning if(files && files.len) temp = "Criminal Evidence Database

    " temp += "Consolidated data points:
    " - var/i = 1 for(var/print in files) - temp += "{Dossier [i]}
    " - i++ + var/list/file = files[print] + temp += "{[file[2]]}
    " temp += "
    {Insert Finger Print Card (To complete a Dossier)}


    " else temp = "" @@ -211,25 +206,40 @@ obj/machinery/computer/forensic_scanning for(var/atom in misc) var/list/data_entry = misc[atom] temp += "{[data_entry[3]]}
    " - if("record") + if("record") //Viewing a record from the "files" database. canclear = 0 if(files) - temp = "Criminal Evidence Database

    " - temp += "Consolidated data points: Dossier [files.Find(href_list["identifier"])]
    " var/list/dossier = files[href_list["identifier"]] + if(href_list["ren"]) + var/new_title = copytext(sanitize(input("Rename to what?", "Dossier Editing", "Dossier [files.Find(href_list["identifier"])]") as null|text),1,MAX_MESSAGE_LEN) + if(new_title) + dossier[2] = new_title + else + usr << "Illegal or blank name." + temp = "Criminal Evidence Database

    " + temp += "Consolidated data points: [dossier[2]]
    " var/print_string = "Fingerprints: Print not complete!
    " if(stringpercent(dossier[1]) <= FINGERPRINT_COMPLETE) print_string = "Fingerprints: (80% or higher completion reached)
    [dossier[1]]
    " temp += print_string for(var/object in dossier) - if(object == dossier[1]) + if(object == dossier[1] || object == dossier[2]) continue temp += "
    " var/list/outputs = dossier[object] - var/list/prints_len = outputs[1] + var/list/prints = outputs[1] temp += "Object: [outputs[4]]
    " temp += " Fingerprints:
    " - temp += "    [prints_len.len] Unique fingerprints found.
    " + temp += "    [prints.len] Unique fingerprints found.
    " + var/complete_prints = 0 + for(var/print in prints) + if(stringpercent(prints[print]) <= FINGERPRINT_COMPLETE) + complete_prints++ + temp += "      [prints[print]]
    " + if(complete_prints) + temp += "      And [prints.len - complete_prints] unknown unique prints.
    " + else + temp += "      No prints of sufficient completeness.
    " var/list/fibers = outputs[2] if(fibers && fibers.len) temp += " Fibers:
    " @@ -240,32 +250,42 @@ obj/machinery/computer/forensic_scanning temp += " Blood:
    " for(var/named in blood) temp += "      Type: [blood[named]], DNA: [named]
    " + temp += "
    {Rename this Dossier}" temp += "
    {Delete this Dossier}" temp += "
    {Print}" else temp = "ERROR. Database not found!
    " temp += "
    {Return}" - if("databaseprint") + if("databaseprint") //Printing from the "files" database. if(files) var/obj/item/weapon/paper/P = new(loc) - P.name = "Database File (Dossier [files.Find(href_list["identifier"])])" + var/list/dossier = files[href_list["identifier"]] + P.name = "\improper Database File ([dossier[2]])" P.overlays += "paper_words" P.info = "Criminal Evidence Database

    " - P.info += "Consolidated data points: Dossier [href_list["identifier"]]
    " - var/list/dossier = files[href_list["identifier"]] + P.info += "Consolidated data points: [dossier[2]]
    " var/print_string = "Fingerprints: Print not complete!
    " if(stringpercent(dossier[1]) <= FINGERPRINT_COMPLETE) print_string = "Fingerprints: (80% or higher completion reached)
    [dossier[1]]
    " P.info += print_string for(var/object in dossier) - if(object == dossier[1]) + if(object == dossier[1] || object == dossier[2]) continue P.info += "
    " var/list/outputs = dossier[object] - var/list/prints_len = outputs[1] + var/list/prints = outputs[1] P.info += "Object: [outputs[4]]
    " P.info += " Fingerprints:
    " - P.info += "    [prints_len.len] Unique fingerprints found.
    " + P.info += "    [prints.len] Unique fingerprints found.
    " + var/complete_prints = 0 + for(var/print in prints) + if(stringpercent(prints[print]) <= FINGERPRINT_COMPLETE) + complete_prints++ + P.info += "      [prints[print]]
    " + if(complete_prints) + P.info += "      And [prints.len - complete_prints] unknown unique prints.
    " + else + P.info += "      No prints of sufficient completeness.
    " var/list/fibers = outputs[2] if(fibers && fibers.len) P.info += " Fibers:
    " @@ -274,52 +294,75 @@ obj/machinery/computer/forensic_scanning var/list/blood = outputs[3] if(blood && blood.len) P.info += " Blood:
    " - for(var/j = 1, j <= blood.len, j++) - var/list/templist2 = blood[j] - P.info += "      Type: [templist2[2]], DNA: [templist2[1]]
    " + for(var/named in blood) + P.info += "      Type: [blood[named]], DNA: [named]
    " else usr << "ERROR. Database not found!
    " - if("auxiliary") + if("auxiliary") //Viewing a record from the "misc" database. canclear = 0 if(misc) temp = "Auxiliary Evidence Database

    " var/list/outputs = misc[href_list["identifier"]] temp += "Consolidated data points: [outputs[3]]
    " + var/list/prints = outputs[4] + if(prints) + temp += " Fingerprints:
    " + temp += "    [prints.len] Unique fingerprints found.
    " + var/complete_prints = 0 + for(var/print in prints) + if(stringpercent(prints[print]) <= FINGERPRINT_COMPLETE) + complete_prints++ + temp += "      [prints[print]]
    " + if(complete_prints) + temp += "      And [prints.len - complete_prints] unknown unique prints.
    " + else + temp += "      No prints of sufficient completeness.
    " var/list/fibers = outputs[1] if(fibers && fibers.len) temp += " Fibers:
    " - for(var/j = 1, j <= fibers.len, j++) - temp += "
          [fibers[j]]" + for(var/fiber in fibers) + temp += "      [fiber]
    " var/list/blood = outputs[2] if(blood && blood.len) temp += " Blood:
    " - for(var/j = 1, j <= blood.len, j++) - var/list/templist2 = blood[j] - temp += "      Type: [templist2[2]], DNA: [templist2[1]]
    " + for(var/named in blood) + temp += "      Type: [blood[named]], DNA: [named]
    " temp += "
    {Delete This Record}" temp += "
    {Print}" else temp = "ERROR. Database not found!
    " temp += "
    {Return}" - if("auxiliaryprint") + if("auxiliaryprint") //Printing from the "misc" database. if(misc) var/obj/item/weapon/paper/P = new(loc) var/list/outputs = misc[href_list["identifier"]] - P.name = "Auxiliary Database File ([outputs[3]])" + P.name = "\improper Auxiliary Database File ([outputs[3]])" P.overlays += "paper_words" P.info = "Auxiliary Evidence Database

    " P.info += "Consolidated data points: [outputs[3]]
    " + var/list/prints = outputs[4] + if(prints) + P.info += " Fingerprints:
    " + P.info += "    [prints.len] Unique fingerprints found.
    " + var/complete_prints = 0 + for(var/print in prints) + if(stringpercent(prints[print]) <= FINGERPRINT_COMPLETE) + complete_prints++ + P.info += "      [prints[print]]
    " + if(complete_prints) + P.info += "      And [prints.len - complete_prints] unknown unique prints.
    " + else + P.info += "      No prints of sufficient completeness.
    " var/list/fibers = outputs[1] if(fibers && fibers.len) P.info += " Fibers:
    " - for(var/j = 1, j <= fibers.len, j++) - P.info += "
          [fibers[j]]" + for(var/fiber in fibers) + P.info += "      [fiber]
    " var/list/blood = outputs[2] if(blood && blood.len) P.info += " Blood:
    " - for(var/j = 1, j <= blood.len, j++) - var/list/templist2 = blood[j] - P.info += "      Type: [templist2[2]], DNA: [templist2[1]]
    " + for(var/named in blood) + P.info += "      Type: [blood[named]], DNA: [named]
    " else usr << "ERROR. Database not found!
    " if("scan") @@ -365,36 +408,17 @@ obj/machinery/computer/forensic_scanning if(!scanning.fingerprints) scan_data += "No Fingerprints Found

    " else - var/list/L = scanning.fingerprints - scan_data += "Isolated [L.len] Fingerprints. Loaded into database.
    " + scan_data += "Isolated [scanning.fingerprints.len] Fingerprints. Loaded into database.
    " add_data(scanning) if(!scanning.suit_fibers) - /*if(istype(scanning,/obj/item/device/detective_scanner)) - var/obj/item/device/detective_scanner/scanner = scanning - if(scanner.stored_name) - scan_data += "Fibers/Materials Data - [scanner.stored_name]:
    " - for(var/data in scanner.stored_fibers) - scan_data += "- [data]
    " - else - scan_data += "No Fibers/Materials Data
    " - else*/ scan_data += "No Fibers/Materials Located
    " else - /*if(istype(scanning,/obj/item/device/detective_scanner)) - var/obj/item/device/detective_scanner/scanner = scanning - if(scanner.stored_name) - scan_data += "Fibers/Materials Data - [scanner.stored_name]:
    " - for(var/data in scanner.stored_fibers) - scan_data += "- [data]
    " - else - scan_data += "No Fibers/Materials Data
    "*/ - scan_data += "Fibers/Materials Found:
    " for(var/data in scanning.suit_fibers) scan_data += "- [data]
    " - if(istype(scanning,/obj/item/device/detective_scanner)) - scan_data += "
    Data transfered from Scanner to Database.
    " + if(istype(scanning,/obj/item/device/detective_scanner) || (istype(scanning, /obj/item/device/pda) && scanning:cartridge && scanning:cartridge.access_security)) + scan_data += "
    Data transfered from \the [scanning] to Database.
    " add_data_scanner(scanning) else if(!scanning.fingerprints) scan_data += "
    Add to Database?
    " @@ -402,11 +426,11 @@ obj/machinery/computer/forensic_scanning temp = "Scan Failed: No Object" - if("print") + if("print") //Printing scan data if(scan_data) temp = "Scan Data Printed." var/obj/item/weapon/paper/P = new(loc) - P.name = "Scan Data ([scan_name])" + P.name = "\improper Scan Data ([scan_name])" P.info = "[scan_data]" P.overlays += "paper_words" else @@ -415,28 +439,43 @@ obj/machinery/computer/forensic_scanning scan_data = "" if("cancel") scan_process = 0 - if("add") + if("add") //Adding an object (Manually) to the database. if(scanning) add_data(scanning) else temp = "Data Transfer Failed: No Object." + if("rename") + if(!files || !files[href_list["identifier"]]) + temp = "ERROR: Record/Database not found!" + else + var/new_title = copytext(sanitize(input("Rename to what?", "Dossier Editing", "Dossier [files.Find(href_list["identifier"])]") as null|text),1,MAX_MESSAGE_LEN) + if(new_title) + var/list/file = files[href_list["identifier"]] + file[2] = new_title updateUsrDialog() ex_act() return - proc/add_data_scanner(var/obj/item/device/detective_scanner/W) - if(W.stored) - for(var/atom in W.stored) - var/list/data = W.stored[atom] - add_data_master(atom,data[1],data[2],data[3],data[4]) - W.stored = list() + proc/add_data_scanner(var/obj/item/device/W) + if(istype(W, /obj/item/device/detective_scanner)) + if(W:stored) + for(var/atom in W:stored) + var/list/data = W:stored[atom] + add_data_master(atom,data[1],data[2],data[3],data[4]) + W:stored = list() + else if(istype(W, /obj/item/device/pda) && W:cartridge && W:cartridge.access_security) + if(W:cartridge.stored_data) + for(var/atom in W:cartridge.stored_data) + var/list/data = W:cartridge.stored_data[atom] + add_data_master(atom,data[1],data[2],data[3],data[4]) + W:cartridge.stored_data = list() return proc/add_data(var/atom/scanned_atom) return add_data_master("\ref [scanned_atom]", scanned_atom.fingerprints,\ - scanned_atom.suit_fibers, scanned_atom.blood_DNA, scanned_atom.name) + scanned_atom.suit_fibers, scanned_atom.blood_DNA, "[scanned_atom.name] (Direct Scan)") @@ -447,89 +486,97 @@ obj/machinery/computer/forensic_scanning //What follows is massive. It cross references all stored data in the scanner with the other stored data, //and what is already in the computer. Not sure how bad the lag may/may not be. - if(!atom_fingerprints) //No prints - if(!misc) - misc = list() - var/list/data_entry = misc[atom_reference] - if(data_entry) - var/list/fibers = data_entry[1] - if(!fibers) - fibers = list() - if(atom_suit_fibers) - for(var/j = 1, j <= atom_suit_fibers.len, j++) //Fibers~~~ - if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add! - fibers += atom_suit_fibers[j] - var/list/blood = data_entry[2] - if(!blood) - blood = list() - if(atom_blood_DNA) - for(var/main_blood in atom_blood_DNA) - if(!blood[main_blood]) - blood[main_blood] = atom_blood_DNA[blood] - return 1 - var/list/templist[3] + if(!misc) + misc = list() + var/list/data_entry = misc[atom_reference] + if(data_entry) + var/list/fibers = data_entry[1] + if(!fibers) + fibers = list() + if(atom_suit_fibers) + for(var/fiber in atom_suit_fibers) //Fibers~~~ + if(!fibers.Find(fiber)) //It isn't! Add! + fibers += fiber + var/list/blood = data_entry[2] + if(!blood) + blood = list() + if(atom_blood_DNA) + for(var/main_blood in atom_blood_DNA) + if(!blood[main_blood]) + blood[main_blood] = atom_blood_DNA[blood] + var/list/prints = data_entry[4] + if(!prints && atom_fingerprints) + prints = list() + if(atom_fingerprints) + for(var/print in atom_fingerprints) + if(!prints[print]) + prints[print] = atom_fingerprints[print] + else + var/list/templist[4] templist[1] = atom_suit_fibers templist[2] = atom_blood_DNA templist[3] = atom_name + templist[4] = atom_fingerprints misc[atom_reference] = templist //Store it! - return 0 //Has prints. - if(!files) - files = list() - for(var/main_print in atom_fingerprints) - var/list/data_entry = files[main_print] - if(data_entry)//The print is already in here! - var/list/internal_atom = data_entry[atom_reference] //Lets see if we can find the current object - if(internal_atom) - //We must be on a roll! Just update what needs to be updated. - var/list/internal_prints = internal_atom[1] - for(var/print in atom_fingerprints) //Sorry for the double loop! D: - var/associated_print = internal_prints[print] - var/reference_print = atom_fingerprints[print] - if(associated_print && associated_print != reference_print) //It does not match - internal_prints[print] = stringmerge(associated_print, reference_print) - else if(!associated_print) - internal_prints[print] = reference_print - //If the main print was updated, lets update the master as well. - if(print == main_print && (!associated_print || (associated_print && associated_print != reference_print))) - update_fingerprints(main_print, internal_prints[print]) - //Fibers. - var/list/fibers = internal_atom[2] - if(!fibers) - fibers = list() - if(atom_suit_fibers) - for(var/j = 1, j < atom_suit_fibers.len, j++) //Fibers~~~ - if(!fibers.Find(atom_suit_fibers[j])) //It isn't! Add! - fibers += atom_suit_fibers[j] - //Blood. - var/list/blood = internal_atom[3] - if(!blood) - blood = list() - if(atom_blood_DNA) - for(var/main_blood in atom_blood_DNA) - if(!blood[main_blood]) - blood[main_blood] = atom_blood_DNA[blood] + if(atom_fingerprints) + if(!files) + files = list() + for(var/main_print in atom_fingerprints) + data_entry = files[main_print] + if(data_entry)//The print is already in here! + var/list/internal_atom = data_entry[atom_reference] //Lets see if we can find the current object + if(internal_atom) + //We must be on a roll! Just update what needs to be updated. + var/list/internal_prints = internal_atom[1] + for(var/print in atom_fingerprints) //Sorry for the double loop! D: + var/associated_print = internal_prints[print] + var/reference_print = atom_fingerprints[print] + if(associated_print && associated_print != reference_print) //It does not match + internal_prints[print] = stringmerge(associated_print, reference_print) + else if(!associated_print) + internal_prints[print] = reference_print + //If the main print was updated, lets update the master as well. + if(print == main_print && (!associated_print || (associated_print && associated_print != reference_print))) + update_fingerprints(main_print, internal_prints[print]) + //Fibers. + var/list/fibers = internal_atom[2] + if(!fibers) + fibers = list() + if(atom_suit_fibers) + for(var/fiber in atom_suit_fibers) //Fibers~~~ + if(!fibers.Find(fiber)) //It isn't! Add! + fibers += fiber + //Blood. + var/list/blood = internal_atom[3] + if(!blood) + blood = list() + if(atom_blood_DNA) + for(var/main_blood in atom_blood_DNA) + if(!blood[main_blood]) + blood[main_blood] = atom_blood_DNA[blood] + continue + //It's not in there! We gotta add it. + update_fingerprints(main_print, atom_fingerprints[main_print]) + var/list/data_point[4] + data_point[1] = atom_fingerprints + data_point[2] = atom_suit_fibers + data_point[3] = atom_blood_DNA + data_point[4] = atom_name + data_entry[atom_reference] = data_point continue - //It's not in there! We gotta add it. - update_fingerprints(main_print, atom_fingerprints[main_print]) + //No print at all! New data entry, go! var/list/data_point[4] data_point[1] = atom_fingerprints data_point[2] = atom_suit_fibers data_point[3] = atom_blood_DNA data_point[4] = atom_name - data_entry[atom_reference] = data_point - continue - //No print at all! New data entry, go! - var/list/data_point[4] - data_point[1] = atom_fingerprints - data_point[2] = atom_suit_fibers - data_point[3] = atom_blood_DNA - data_point[4] = atom_name - var/list/new_file[1] - new_file[1] = atom_fingerprints[main_print] - new_file[atom_reference] = data_point - files[main_print] = new_file + var/list/new_file[2] + new_file[1] = atom_fingerprints[main_print] + new_file[2] = "Dossier [files.len + 1]" + new_file[atom_reference] = data_point + files[main_print] = new_file return 1 /******************************** ***END DO NOT DIRECTLY CALL ME*** @@ -540,7 +587,7 @@ obj/machinery/computer/forensic_scanning if(master) master[1] = stringmerge(master[1],new_print) else - CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal") + CRASH("Fucking hell. Something went wrong, and it tried to update a null print or something. Tell SkyMarshal (and give him this call stack)") return proc/process_card() //Same as above, but for fingerprint cards @@ -577,207 +624,4 @@ obj/machinery/computer/forensic_scanning detective icon_state = "old" - name = "PowerScan Mk.I" - -obj/item/clothing/shoes/var - track_blood = 0 - mob/living/carbon/human/track_blood_mob - track_blood_type -mob/var - bloody_hands = 0 - mob/living/carbon/human/bloody_hands_mob - track_blood - mob/living/carbon/human/track_blood_mob - track_blood_type -obj/item/clothing/gloves/var - transfer_blood = 0 - mob/living/carbon/human/bloody_hands_mob - - -obj/effect/decal/cleanable/var - track_amt = 3 - mob/blood_owner - -turf/Exited(mob/living/carbon/human/M) - if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid)) - if(!istype(src, /turf/space)) // Bloody tracks code starts here - var/dofoot = 1 - if(istype(M,/mob/living/simple_animal)) - if(!(istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/constructwraith))) - dofoot = 0 - - if(dofoot) - - if(!istype(src, /turf/space)) // Bloody tracks code starts here - if(M.track_blood > 0) - M.track_blood-- - src.add_bloody_footprints(M.track_blood_mob,1,M.dir,get_tracks(M),M.track_blood_type) - else if(istype(M,/mob/living/carbon/human)) - if(M.shoes) - if(M.shoes.track_blood > 0) - M.shoes.track_blood-- - src.add_bloody_footprints(M.shoes.track_blood_mob,1,M.dir,M.shoes.name,M.shoes.track_blood_type) // And bloody tracks end here - . = ..() -turf/Entered(mob/living/carbon/human/M) - if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid)) - var/dofoot = 1 - if(istype(M,/mob/living/simple_animal)) - if(!(istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/constructwraith))) - dofoot = 0 - - if(dofoot) - - if(M.track_blood > 0) - M.track_blood-- - src.add_bloody_footprints(M.track_blood_mob,0,M.dir,get_tracks(M),M.track_blood_type) - else if(istype(M,/mob/living/carbon/human)) - if(M.shoes && !istype(src,/turf/space)) - if(M.shoes.track_blood > 0) - M.shoes.track_blood-- - src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name,M.shoes.track_blood_type) - - - for(var/obj/effect/decal/cleanable/B in src) - if(B:track_amt <= 0) continue - if(B.type != /obj/effect/decal/cleanable/blood/tracks) - if(istype(B, /obj/effect/decal/cleanable/xenoblood) || istype(B, /obj/effect/decal/cleanable/blood) || istype(B, /obj/effect/decal/cleanable/oil) || istype(B, /obj/effect/decal/cleanable/robot_debris)) - - var/track_type = "blood" - if(istype(B, /obj/effect/decal/cleanable/xenoblood)) - track_type = "xeno" - else if(istype(B, /obj/effect/decal/cleanable/oil) || istype(B, /obj/effect/decal/cleanable/robot_debris)) - track_type = "oil" - - if(istype(M,/mob/living/carbon/human)) - if(M.shoes) - M.shoes.add_blood(B.blood_owner) - M.shoes.track_blood_mob = B.blood_owner - M.shoes.track_blood = max(M.shoes.track_blood,8) - M.shoes.track_blood_type = track_type - else - M.add_blood(B.blood_owner) - M.track_blood_mob = B.blood_owner - M.track_blood = max(M.track_blood,rand(4,8)) - M.track_blood_type = track_type - B.track_amt-- - break - . = ..() - -turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info,bloodcolor) - for(var/obj/effect/decal/cleanable/blood/tracks/T in src) - if(T.dir == d && findtext(T.icon_state, bloodcolor)) - if((leaving && T.icon_state == "steps2") || (!leaving && T.icon_state == "steps1")) - T.desc = "These bloody footprints appear to have been made by [info]." - if(!T.blood_DNA) - T.blood_DNA = list() - if(istype(M,/mob/living/carbon/human)) - T.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type - else if(istype(M,/mob/living/carbon/alien)) - T.blood_DNA["UNKNOWN DNA"] = "X*" - else if(istype(M,/mob/living/carbon/monkey)) - T.blood_DNA["Non-human DNA"] = "A+" - return - var/obj/effect/decal/cleanable/blood/tracks/this = new(src) - this.icon = 'footprints.dmi' - - var/preiconstate = "" - - if(info == "animal paws") - preiconstate = "paw" - else if(info == "alien claws") - preiconstate = "claw" - else if(info == "small alien feet") - preiconstate = "paw" - - if(leaving) - this.icon_state = "[bloodcolor][preiconstate]2" - else - this.icon_state = "[bloodcolor][preiconstate]1" - this.dir = d - - if(bloodcolor == "blood") - this.desc = "These bloody footprints appear to have been made by [info]." - else if(bloodcolor == "xeno") - this.desc = "These acidic bloody footprints appear to have been made by [info]." - else if(bloodcolor == "oil") - this.name = "oil" - this.desc = "These oil footprints appear to have been made by [info]." - - if(istype(M,/mob/living/carbon/human)) - if(!this.blood_DNA) - this.blood_DNA = list() - this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type - -proc/get_tracks(mob/M) - if(istype(M,/mob/living)) - if(istype(M,/mob/living/carbon/human)) - . = "human feet" - else if(istype(M,/mob/living/carbon/monkey) || istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/crab)) - . = "animal paws" - else if(istype(M,/mob/living/silicon/robot)) - . = "robot feet" - else if(istype(M,/mob/living/carbon/alien/humanoid)) - . = "alien claws" - else if(istype(M,/mob/living/carbon/alien/larva)) - . = "small alien feet" - else - . = "an unknown creature" - - -proc/blood_incompatible(donor,receiver) - var - donor_antigen = copytext(donor,1,lentext(donor)) - receiver_antigen = copytext(receiver,1,lentext(receiver)) - donor_rh = findtext("+",donor) - receiver_rh = findtext("+",receiver) - if(donor_rh && !receiver_rh) return 1 - switch(receiver_antigen) - if("A") - if(donor_antigen != "A" && donor_antigen != "O") return 1 - if("B") - if(donor_antigen != "B" && donor_antigen != "O") return 1 - if("O") - if(donor_antigen != "O") return 1 - //AB is a universal receiver. - return 0 - -/obj/item/weapon/rag - New() // So I don't have to grab maplock - spawn(1) - new/obj/item/weapon/reagent_containers/glass/rag(loc) - del src - -/obj/item/weapon/reagent_containers/glass/rag - name = "damp rag" - desc = "For cleaning up messes, you suppose." - w_class = 1 - icon = 'toy.dmi' - icon_state = "rag" - amount_per_transfer_from_this = 5 - possible_transfer_amounts = list(5) - volume = 5 - can_be_placed_into = null - - attack(atom/target as obj|turf|area, mob/user as mob , flag) - if(ismob(target) && target.reagents && reagents.total_volume) - user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise") - src.reagents.reaction(target, TOUCH) - spawn(5) src.reagents.clear_reagents() - return - else - ..() - - afterattack(atom/A as obj|turf|area, mob/user as mob) - if(istype(A)) - user.visible_message("[user] starts to wipe down [A] with [src]!") - if(do_after(user,30)) - user.visible_message("[user] finishes wiping off the [A]!") - A.clean_blood() - return - - examine() - if (!( usr )) - return - usr << "That's \a [src]." - usr << desc - return + name = "PowerScan Mk.I" \ No newline at end of file diff --git a/code/modules/DetectiveWork/evidence.dm b/code/modules/DetectiveWork/evidence.dm index 5ff551d1ada..8853efb2be6 100644 --- a/code/modules/DetectiveWork/evidence.dm +++ b/code/modules/DetectiveWork/evidence.dm @@ -1,7 +1,4 @@ -//CONTAINS: -//Evidence bags and stuff -/////////// -//Shamelessly ripped from Mini's old code. +//CONTAINS: Evidence bags /obj/item/weapon/evidencebag name = "evidence bag" @@ -10,34 +7,43 @@ icon_state = "evidenceobj" w_class = 1 -/* buggy and stuff -/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob) - return src.afterattack(O, user) -*/ - /obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob) + if(!in_range(O,user)) + return + if(istype(O, /obj/item/weapon/storage) && O in user) return ..() + if(!(O && istype(O)) || O.anchored == 1) - user << "You can't put that inside the [src]!" + user << "You can't put that inside \the [src]!" return ..() - if(O in user) + + if(istype(O, /obj/item/weapon/evidencebag)) + user << "You find putting an evidence bag in another evidence bag to be slightly absurd." + return + + if(O in user && (user.l_hand != O && user.r_hand != O)) //If it is in their inventory, but not in their hands, don't grab it off of them. user << "You are wearing that." return - if(src.contents.len > 0) + + if(contents.len) user << "The [src] already has something inside it." return ..() + if(istype(O.loc,/obj/item/weapon/storage)) var/obj/item/weapon/storage/U = O.loc user.client.screen -= O U.contents.Remove(O) + if(istype(O.loc,/obj/item/clothing/suit/storage/)) var/obj/item/clothing/suit/storage/U = O.loc user.client.screen -= O U.contents.Remove(O) - user << "You put the [O] inside the [src]." + + user.visible_message("\The [user] puts \a [O] into \a [src]", "You put \the [O] inside \the [src].",\ + "You hear a rustle as someone puts something into a plastic bag.") icon_state = "evidence" - src.overlays += O + overlays += O desc = "An evidence bag containing \a [O]. [O.desc]" O.loc = src w_class = O.w_class @@ -45,17 +51,19 @@ /obj/item/weapon/evidencebag/attack_self(mob/user as mob) - if (src.contents.len > 0) - var/obj/item/I = src.contents[1] - user << "You take the [I] out of the [src]." - src.overlays -= I - I.loc = get_turf(user.loc) + if (contents.len) + var/obj/item/I = contents[1] + user.visible_message("\The [user] takes \a [I] out of \a [src]", "You take \the [I] out of \the [src].",\ + "You hear someone rustle around in a plastic bag, and remove something.") + overlays -= I + user.put_in_hands(I) w_class = 1 - src.icon_state = "evidenceobj" + icon_state = "evidenceobj" desc = "An empty evidence bag." + else - user << "[src] is empty." - src.icon_state = "evidenceobj" + user << "\The [src] is empty." + icon_state = "evidenceobj" return /obj/item/weapon/storage/box/evidence diff --git a/code/modules/DetectiveWork/footprints_and_rag.dm b/code/modules/DetectiveWork/footprints_and_rag.dm new file mode 100644 index 00000000000..83e49347897 --- /dev/null +++ b/code/modules/DetectiveWork/footprints_and_rag.dm @@ -0,0 +1,207 @@ +//CONTAINS: Bloody footprints code, code for managing blood incompatability, and a rag to wipe away evidence. + +obj/item/clothing/shoes/var + track_blood = 0 + mob/living/carbon/human/track_blood_mob + track_blood_type +mob/var + bloody_hands = 0 + mob/living/carbon/human/bloody_hands_mob + track_blood + mob/living/carbon/human/track_blood_mob + track_blood_type +obj/item/clothing/gloves/var + transfer_blood = 0 + mob/living/carbon/human/bloody_hands_mob + + +obj/effect/decal/cleanable/var + track_amt = 3 + mob/blood_owner + +turf/Exited(mob/living/carbon/human/M) + if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid)) + if(!istype(src, /turf/space)) // Bloody tracks code starts here + var/dofoot = 1 + if(istype(M,/mob/living/simple_animal)) + if(!(istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/constructwraith))) + dofoot = 0 + + if(dofoot) + + if(!istype(src, /turf/space)) // Bloody tracks code starts here + if(M.track_blood > 0) + M.track_blood-- + src.add_bloody_footprints(M.track_blood_mob,1,M.dir,get_tracks(M),M.track_blood_type) + else if(istype(M,/mob/living/carbon/human)) + if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes)) + var/obj/item/clothing/shoes/S = M.shoes + if(S.track_blood > 0) + S.track_blood-- + src.add_bloody_footprints(S.track_blood_mob,1,M.dir,S.name,S.track_blood_type) // And bloody tracks end here + . = ..() +turf/Entered(mob/living/carbon/human/M) + if(istype(M,/mob/living) && !istype(M,/mob/living/carbon/metroid)) + var/dofoot = 1 + if(istype(M,/mob/living/simple_animal)) + if(!(istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/constructwraith))) + dofoot = 0 + + if(dofoot) + + if(M.track_blood > 0) + M.track_blood-- + src.add_bloody_footprints(M.track_blood_mob,0,M.dir,get_tracks(M),M.track_blood_type) + else if(istype(M,/mob/living/carbon/human)) + if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes) && !istype(src,/turf/space)) + var/obj/item/clothing/shoes/S = M.shoes + if(S.track_blood > 0) + S.track_blood-- + src.add_bloody_footprints(S.track_blood_mob,0,M.dir,S.name,S.track_blood_type) + + + for(var/obj/effect/decal/cleanable/B in src) + if(B:track_amt <= 0) continue + if(B.type != /obj/effect/decal/cleanable/blood/tracks) + if(istype(B, /obj/effect/decal/cleanable/xenoblood) || istype(B, /obj/effect/decal/cleanable/blood) || istype(B, /obj/effect/decal/cleanable/oil) || istype(B, /obj/effect/decal/cleanable/robot_debris)) + + var/track_type = "blood" + if(istype(B, /obj/effect/decal/cleanable/xenoblood)) + track_type = "xeno" + else if(istype(B, /obj/effect/decal/cleanable/oil) || istype(B, /obj/effect/decal/cleanable/robot_debris)) + track_type = "oil" + + if(istype(M,/mob/living/carbon/human)) + if(M.shoes && istype(M.shoes,/obj/item/clothing/shoes)) + var/obj/item/clothing/shoes/S = M.shoes + S.add_blood(B.blood_owner) + S.track_blood_mob = B.blood_owner + S.track_blood = max(S.track_blood,8) + S.track_blood_type = track_type + else + M.add_blood(B.blood_owner) + M.track_blood_mob = B.blood_owner + M.track_blood = max(M.track_blood,rand(4,8)) + M.track_blood_type = track_type + B.track_amt-- + break + . = ..() + +turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info,bloodcolor) + for(var/obj/effect/decal/cleanable/blood/tracks/T in src) + if(T.dir == d && findtext(T.icon_state, bloodcolor)) + if((leaving && T.icon_state == "steps2") || (!leaving && T.icon_state == "steps1")) + T.desc = "These bloody footprints appear to have been made by [info]." + if(!T.blood_DNA) + T.blood_DNA = list() + if(istype(M,/mob/living/carbon/human)) + T.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type + else if(istype(M,/mob/living/carbon/alien)) + T.blood_DNA["UNKNOWN DNA"] = "X*" + else if(istype(M,/mob/living/carbon/monkey)) + T.blood_DNA["Non-human DNA"] = "A+" + return + var/obj/effect/decal/cleanable/blood/tracks/this = new(src) + this.icon = 'footprints.dmi' + + var/preiconstate = "" + + if(info == "animal paws") + preiconstate = "paw" + else if(info == "alien claws") + preiconstate = "claw" + else if(info == "small alien feet") + preiconstate = "paw" + + if(leaving) + this.icon_state = "[bloodcolor][preiconstate]2" + else + this.icon_state = "[bloodcolor][preiconstate]1" + this.dir = d + + if(bloodcolor == "blood") + this.desc = "These bloody footprints appear to have been made by [info]." + else if(bloodcolor == "xeno") + this.desc = "These acidic bloody footprints appear to have been made by [info]." + else if(bloodcolor == "oil") + this.name = "oil" + this.desc = "These oil footprints appear to have been made by [info]." + + if(istype(M,/mob/living/carbon/human)) + if(!this.blood_DNA) + this.blood_DNA = list() + this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type + +proc/get_tracks(mob/M) + if(istype(M,/mob/living)) + if(istype(M,/mob/living/carbon/human)) + . = "human feet" + else if(istype(M,/mob/living/carbon/monkey) || istype(M,/mob/living/simple_animal/cat) || istype(M,/mob/living/simple_animal/corgi) || istype(M,/mob/living/simple_animal/crab)) + . = "animal paws" + else if(istype(M,/mob/living/silicon/robot)) + . = "robot feet" + else if(istype(M,/mob/living/carbon/alien/humanoid)) + . = "alien claws" + else if(istype(M,/mob/living/carbon/alien/larva)) + . = "small alien feet" + else + . = "an unknown creature" + + +proc/blood_incompatible(donor,receiver) + var + donor_antigen = copytext(donor,1,lentext(donor)) + receiver_antigen = copytext(receiver,1,lentext(receiver)) + donor_rh = findtext("+",donor) + receiver_rh = findtext("+",receiver) + if(donor_rh && !receiver_rh) return 1 + switch(receiver_antigen) + if("A") + if(donor_antigen != "A" && donor_antigen != "O") return 1 + if("B") + if(donor_antigen != "B" && donor_antigen != "O") return 1 + if("O") + if(donor_antigen != "O") return 1 + //AB is a universal receiver. + return 0 + +/obj/item/weapon/rag + New() // So I don't have to grab maplock + spawn(1) + new/obj/item/weapon/reagent_containers/glass/rag(loc) + del src + +/obj/item/weapon/reagent_containers/glass/rag + name = "damp rag" + desc = "For cleaning up messes, you suppose." + w_class = 1 + icon = 'toy.dmi' + icon_state = "rag" + amount_per_transfer_from_this = 5 + possible_transfer_amounts = list(5) + volume = 5 + can_be_placed_into = null + + attack(atom/target as obj|turf|area, mob/user as mob , flag) + if(ismob(target) && target.reagents && reagents.total_volume) + user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise") + src.reagents.reaction(target, TOUCH) + spawn(5) src.reagents.clear_reagents() + return + else + ..() + + afterattack(atom/A as obj|turf|area, mob/user as mob) + if(istype(A) && src in user) + user.visible_message("\The [user] starts to wipe down \a [A] with \a [src]!", "You start to wipe down \the [A].", "You hear a damp rag being rubbed against something.") + if(do_after(user,30)) + user.visible_message("\The [user] finishes wiping off \a [A]!", "You finish wiping down \the [A].") + A.clean_blood() + return + + examine() + if (!usr) + return + usr << "That's \a [src]." + usr << desc + return \ No newline at end of file diff --git a/code/modules/DetectiveWork/scanner.dm b/code/modules/DetectiveWork/scanner.dm new file mode 100644 index 00000000000..65285684049 --- /dev/null +++ b/code/modules/DetectiveWork/scanner.dm @@ -0,0 +1,172 @@ +//CONTAINS: Detective's Scanner + +/obj/item/device/detective_scanner + name = "Scanner" + desc = "Used to scan objects for DNA and fingerprints." + icon_state = "forensic1" + var/amount = 20.0 + var/list/stored = list() + w_class = 3.0 + item_state = "electronic" + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT + + attackby(obj/item/weapon/f_card/W as obj, mob/user as mob) + ..() + if (istype(W, /obj/item/weapon/f_card)) + if (W.fingerprints) + return + if (src.amount == 20) + return + if (W.amount + src.amount > 20) + src.amount = 20 + W.amount = W.amount + src.amount - 20 + else + src.amount += W.amount + //W = null + del(W) + add_fingerprint(user) + if (W) + W.add_fingerprint(user) + return + + attack(mob/living/carbon/human/M as mob, mob/user as mob) + if (!ishuman(M)) + user << "\red [M] is not human and cannot have the fingerprints." + return 0 + if (( !( istype(M.dna, /datum/dna) ) || M.gloves) ) + user << "\blue No fingerprints found on [M]" + return 0 + else + if (src.amount < 1) + user << text("\blue Fingerprints scanned on [M]. Need more cards to print.") + else + src.amount-- + var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc ) + F.amount = 1 + F.add_fingerprint(M) + F.icon_state = "fingerprint1" + F.name = text("FPrintC- '[M.name]'") + + user << "\blue Done printing." + user << "\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]" + if ( !M.blood_DNA || !M.blood_DNA.len ) + user << "\blue No blood found on [M]" + if(M.blood_DNA) + del(M.blood_DNA) + else + user << "\blue Blood found on [M]. Analysing..." + spawn(15) + for(var/blood in M.blood_DNA) + user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]" + return + + afterattack(atom/A as obj|turf|area, mob/user as mob) + if(!in_range(A,user)) + return + if(loc != user) + return + if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit. + return + if(istype(A,/obj/item/weapon/f_card)) + user << "The scanner displays on the screen: \"ERROR 43: Object on Excluded Object List.\"" + return + + add_fingerprint(user) + + + //Special case for blood splaters. + if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune)) + if(!isnull(A.blood_DNA)) + for(var/blood in A.blood_DNA) + user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]" + return + + //General + if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA) + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\ + "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\ + "You hear a faint hum of electrical equipment.") + return 0 + + if(add_data(A)) + user << "\blue Object already in internal memory. Consolidating data..." + return + + + //PRINTS + if(!A.fingerprints || !A.fingerprints.len) + if(A.fingerprints) + del(A.fingerprints) + else + user << "\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve." + var/list/complete_prints = list() + for(var/i in A.fingerprints) + var/print = A.fingerprints[i] + if(stringpercent(print) <= FINGERPRINT_COMPLETE) + complete_prints += print + if(complete_prints.len < 1) + user << "\blue   No intact prints found" + else + user << "\blue   Found [complete_prints.len] intact prints" + for(var/i in complete_prints) + user << "\blue     [i]" + + //FIBERS + if(A.suit_fibers) + user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve." + + //Blood + if (A.blood_DNA) + user << "\blue Blood found on [A]. Analysing..." + spawn(15) + for(var/blood in A.blood_DNA) + user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]" + if(prob(80) || !A.fingerprints) + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\ + "You finish scanning \the [A].",\ + "You hear a faint hum of electrical equipment.") + return 0 + else + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]\n[user.get_gender_form("It")] seems to perk up slightly at the readout." ,\ + "The results of the scan pique your interest.",\ + "You hear a faint hum of electrical equipment, and someone making a thoughtful noise.") + return 0 + return + + proc/add_data(atom/A as mob|obj|turf|area) + //I love hashtables. + var/list/data_entry = stored["\ref [A]"] + if(islist(data_entry)) //Yay, it was already stored! + //Merge the fingerprints. + var/list/data_prints = data_entry[1] + for(var/print in A.fingerprints) + var/merged_print = data_prints[print] + if(!merged_print) + data_prints[print] = A.fingerprints[print] + else + data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print]) + + //Now the fibers + var/list/fibers = data_entry[2] + if(!fibers) + fibers = list() + if(A.suit_fibers && A.suit_fibers.len) + for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~ + if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add! + fibers += A.suit_fibers[j] + var/list/blood = data_entry[3] + if(!blood) + blood = list() + if(A.blood_DNA && A.blood_DNA.len) + for(var/main_blood in A.blood_DNA) + if(!blood[main_blood]) + blood[main_blood] = A.blood_DNA[blood] + return 1 + var/list/sum_list[4] //Pack it back up! + sum_list[1] = A.fingerprints + sum_list[2] = A.suit_fibers + sum_list[3] = A.blood_DNA + sum_list[4] = "\The [A] in \the [get_area(A)]" + stored["\ref [A]"] = sum_list + return 0 \ No newline at end of file diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm new file mode 100644 index 00000000000..aa0f8129bf3 --- /dev/null +++ b/code/modules/admin/IsBanned.dm @@ -0,0 +1,19 @@ +//Blocks an attempt to connect before even creating our client datum thing. +world/IsBanned(key,address,computer_id) +// if(ckey(key) in admins) +// return ..() + + //Guest Checking + if(IsGuestKey(key)) + log_access("Failed Login: [key] - Guests not allowed") + message_admins("\blue Failed Login: [key] - Guests not allowed") + return list("reason"="guest", "desc"="\nReason: Guests not allowed.brb") + + //Ban Checking + . = CheckBan( ckey(key), computer_id, address ) + if(.) + log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]") + message_admins("\blue Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]") + return . + + return ..() //default pager ban stuff diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index beafeff0a5c..809809ff5f4 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -1,10 +1,67 @@ var/CMinutes = null var/savefile/Banlist + +/proc/CheckBan(var/ckey, var/id, var/address) + if(!Banlist) // if Banlist cannot be located for some reason + LoadBans() // try to load the bans + if(!Banlist) // uh oh, can't find bans! + return 0 // ABORT ABORT ABORT + + . = list() + var/appeal + if(config && config.banappeals) + appeal = "\nFor more information on your ban, or to appeal, head to [config.banappeals]" + Banlist.cd = "/base" + if( "[ckey][id]" in Banlist.dir ) + Banlist.cd = "[ckey][id]" + if (Banlist["temp"]) + if (!GetBanExp(Banlist["minutes"])) + ClearTempbans() + return 0 + else + .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetBanExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]" + else + Banlist.cd = "/base/[ckey][id]" + .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMENANT\nBy: [Banlist["bannedby"]][appeal]" + .["reason"] = "ckey/id" + return . + else + for (var/A in Banlist.dir) + Banlist.cd = "/base/[A]" + var/matches + if( ckey == Banlist["key"] ) + matches += "ckey" + if( id == Banlist["id"] && Banlist["skipIdCheck"] == 0) + if(matches) + matches += "/" + matches += "id" +// if( address == Banlist["ip"] ) +// if(matches) +// matches += "/" +// matches += "ip" + + if(matches) + if(Banlist["temp"]) + if (!GetBanExp(Banlist["minutes"])) + ClearTempbans() + return 0 + else + .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetBanExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]" + else + .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMENANT\nBy: [Banlist["bannedby"]][appeal]" + .["reason"] = matches + return . + return 0 + +/proc/UpdateTime() //No idea why i made this a proc. + CMinutes = (world.realtime / 10) / 60 + return 1 + /proc/LoadBans() Banlist = new("data/banlist.bdb") - log_admin("Loading banlist.") + log_admin("Loading Banlist") if (!length(Banlist.dir)) log_admin("Banlist is empty.") @@ -17,70 +74,6 @@ var/savefile/Banlist ClearTempbans() return 1 - -/proc/CheckBan(var/client/clientvar) - - var/id = clientvar.computer_id - var/key = clientvar.ckey - - if(!Banlist) // if Banlist cannot be located for some reason - LoadBans() // try to load the bans - if(!Banlist) // uh oh, can't find bans! - return 0 // ABORT ABORT ABORT - - Banlist.cd = "/base" - if (Banlist.dir.Find("[key][id]")) - Banlist.cd = "[key][id]" - if (Banlist["temp"]) - if (!GetBanExp(Banlist["minutes"])) - ClearTempbans() - return 0 - else - log_access("Failed Login: [clientvar] - Banned") - message_admins("\blue Failed Login: [clientvar] - Banned") - alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") - return 1 - else - Banlist.cd = "/base/[key][id]" - log_access("Failed Login: [clientvar] - Banned") - message_admins("\blue Failed Login: [clientvar] - Banned") - alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This is a permanent ban.)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") - return 1 - - Banlist.cd = "/base" - for (var/A in Banlist.dir) - Banlist.cd = "/base/[A]" - if ( key == Banlist["key"] || (id == Banlist["id"] && Banlist["skipIdCheck"] == 0) ) - if(Banlist["temp"]) - if (!GetBanExp(Banlist["minutes"])) - ClearTempbans() - return 0 - else - if(key != Banlist["key"]) - log_access("Failed Login: [clientvar] - Banned as [Banlist["key"]]") - message_admins("\blue Failed Login: [clientvar] - Banned as [Banlist["key"]]") - else - log_access("Failed Login: [clientvar] - Banned") - message_admins("\blue Failed Login: [clientvar] - Banned") - alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") - return 1 - else - if(key != Banlist["key"]) - log_access("Failed Login: [clientvar] - Banned as [Banlist["key"]]") - message_admins("\blue Failed Login: [clientvar] - Banned as [Banlist["key"]]") - else - log_access("Failed Login: [clientvar] - Banned") - message_admins("\blue Failed Login: [clientvar] - Banned") - alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This is a permanent ban.)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") - return 1 - - return 0 - - -/proc/UpdateTime() - CMinutes = (world.realtime / 10) / 60 - return 1 - /proc/ClearTempbans() UpdateTime() @@ -171,6 +164,7 @@ var/savefile/Banlist /obj/admins/proc/unbanpanel() var/count = 0 var/dat + //var/dat = "
    Unban Player: \blue(U) = Unban , (E) = Edit Ban\green (Total
    " Banlist.cd = "/base" for (var/A in Banlist.dir) count++ diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 5305be97577..871c134542c 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -6,7 +6,7 @@ var/global/BSACooldown = 0 /proc/message_admins(var/text, var/admin_ref = 0) var/rendered = "ADMIN LOG: [text]" for (var/mob/M in world) - if (M && M.client && M.client.holder && M.client.holder.level > -3) //Lets not spam our retirees. + if (M && M.client && M.client.holder && M.client.holder.level > -3 && M.client.holder.level != 0) //Lets not spam our retirees. Or moderators! if (admin_ref) M << dd_replaceText(rendered, "%admin_ref%", "\ref[M]") else @@ -176,6 +176,7 @@ var/global/BSACooldown = 0 var/datum/player_info/P = new P.author = usr.key + P.rank = usr.client.holder.rank P.content = add var/modifyer = "th" switch(time2text(world.timeofday, "DD")) @@ -196,6 +197,9 @@ var/global/BSACooldown = 0 info << infos + message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.") + log_admin("[key_name(usr)] has edited [key]'s notes.") + del info var/savefile/note_list = new("data/player_notes.sav") @@ -221,6 +225,9 @@ var/global/BSACooldown = 0 infos.Remove(item) info << infos + message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.") + log_admin("[key_name(usr)] deleted one of [key]'s notes.") + del info show_player_info(key) @@ -515,6 +522,17 @@ var/global/BSACooldown = 0 else jobs += "" + //Misc (Grey) + jobs += "
    [dd_replacetext("Emergency Response Team", " ", " ")]
    " + jobs += "" + + //Records + if(jobban_isbanned(M, "Records")) + jobs += "" + else + jobs += "" + + /* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment if(jobban_isbanned(M, "malf AI") || isbanned_dept) @@ -782,7 +800,7 @@ var/global/BSACooldown = 0 usr << browse(dat, "window=jobban2;size=600x250") return if(href_list["newjobban2"]) - if ((src.rank in list("Moderator", "Administrator", "Badmin", "Tyrant" ))) + if ((src.rank in list(/*"Moderator", */"Administrator", "Badmin", "Tyrant" ))) var/mob/M = locate(href_list["jobban4"]) var/job = href_list["newjobban2"] if(!ismob(M)) return @@ -859,7 +877,7 @@ var/global/BSACooldown = 0 remove_goon(t) */ if (href_list["mute2"]) - if ((src.rank in list( "Moderator", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + if ((src.rank in list(/* "Moderator", */"Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/mob/M = locate(href_list["mute2"]) if (ismob(M)) if ((M.client && M.client.holder && (M.client.holder.level >= src.level))) @@ -873,7 +891,7 @@ var/global/BSACooldown = 0 message_admins("\blue [key_name_admin(usr)] has [(M.client.muted ? "muted" : "voiced")] [key_name_admin(M)].", 1) M << "You have been [(M.client.muted ? "muted" : "voiced")]. Please resolve this in adminhelp." if (href_list["mute_complete"]) - if ((src.rank in list( "Moderator", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + if ((src.rank in list(/* "Moderator", */"Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/mob/M = locate(href_list["mute_complete"]) if (ismob(M)) if ((M.client && M.client.holder && (M.client.holder.level >= src.level))) @@ -968,11 +986,10 @@ var/global/BSACooldown = 0 if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/mob/M = locate(href_list["forcespeech"]) if (ismob(M)) - var/speech = input("What will [key_name(M)] say?.", "Force speech", "") + var/speech = copytext(sanitize(input("What will [key_name(M)] say?.", "Force speech", "")),1,MAX_MESSAGE_LEN) if(!speech) return M.say(speech) - speech = copytext(sanitize(speech), 1, MAX_MESSAGE_LEN) log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]") message_admins("\blue [key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]") else @@ -980,7 +997,7 @@ var/global/BSACooldown = 0 return if (href_list["sendtoprison"]) - if ((src.rank in list( "Moderator", "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + if ((src.rank in list(/* "Moderator", */"Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/confirm = alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No") if(confirm != "Yes") @@ -1294,6 +1311,19 @@ var/global/BSACooldown = 0 alert("You cannot perform this action. You must be of a higher administrative rank!") return + if (href_list["grantskrell"]) + if (src.level>=5) + var/mob/M = locate(href_list["grantskrell"]) + for (var/s in alien_whitelist) + if(findtext(s,"[M.ckey] - Skrell")) + alert("This key is already on the whitelist!", null, null, null, null, null) + return + alien_whitelist += "[M.ckey] - Skrell" + usr << "[M.ckey] added to Skrell whitelist." + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + /***************** BEFORE************** if (href_list["l_players"]) @@ -1333,62 +1363,79 @@ var/global/BSACooldown = 0 // Now isn't that much better? IT IS NOW A PROC, i.e. kinda like a big panel like unstable if (href_list["adminplayeropts"]) - var/mob/M = locate(href_list["adminplayeropts"]) - show_player_panel(M) + if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master")) + var/mob/M = locate(href_list["adminplayeropts"]) + show_player_panel(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") if (href_list["player_info"]) var/key = href_list["player_info"] show_player_info(key) if (href_list["adminplayervars"]) - var/mob/M = locate(href_list["adminplayervars"]) - if(src && src.owner) - if(istype(src.owner,/client)) - var/client/cl = src.owner - cl.debug_variables(M) - else if(ismob(src.owner)) - var/mob/MO = src.owner - if(MO.client) - var/client/cl = MO.client + if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master")) + var/mob/M = locate(href_list["adminplayervars"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner cl.debug_variables(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.debug_variables(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") if (href_list["adminplayersubtlemessage"]) - var/mob/M = locate(href_list["adminplayersubtlemessage"]) - if(src && src.owner) - if(istype(src.owner,/client)) - var/client/cl = src.owner - cl.cmd_admin_subtle_message(M) - else if(ismob(src.owner)) - var/mob/MO = src.owner - if(MO.client) - var/client/cl = MO.client + if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master")) + var/mob/M = locate(href_list["adminplayersubtlemessage"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner cl.cmd_admin_subtle_message(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.cmd_admin_subtle_message(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") if (href_list["adminplayerobservejump"]) - var/mob/M = locate(href_list["adminplayerobservejump"]) - if(src && src.owner) - if(istype(src.owner,/client)) - var/client/cl = src.owner - cl.admin_observe() - sleep(2) - cl.jumptomob(M) - else if(ismob(src.owner)) - var/mob/MO = src.owner - if(MO.client) - var/client/cl = MO.client + if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master")) + var/mob/M = locate(href_list["adminplayerobservejump"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner cl.admin_observe() sleep(2) cl.jumptomob(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.admin_observe() + sleep(2) + cl.jumptomob(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") if (href_list["traitor_panel_pp"]) - var/mob/M = locate(href_list["traitor_panel_pp"]) - if(isnull(M)) - usr << "Mob doesn't seem to exist." - return - if(!ismob(M)) - usr << "This doen't seem to be a mob." - return - show_traitor_panel(M) + if(rank in list("Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master")) + var/mob/M = locate(href_list["traitor_panel_pp"]) + if(isnull(M)) + usr << "Mob doesn't seem to exist." + return + if(!ismob(M)) + usr << "This doen't seem to be a mob." + return + show_traitor_panel(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + + if (href_list["BlueSpaceArtillery"]) var/mob/M = locate(href_list["BlueSpaceArtillery"]) @@ -1883,7 +1930,7 @@ var/global/BSACooldown = 0 if(!ticker) alert("The game hasn't started yet!") return - var/objective = input("Enter an objective") + var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN) if(!objective) return //feedback_inc("admin_secrets_fun_used",1) @@ -2222,7 +2269,7 @@ var/global/BSACooldown = 0 return if (href_list["secretsadmin"]) - if ((src.rank in list( "Moderator", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + if ((src.rank in list(/* "Moderator", */"Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) var/ok = 0 switch(href_list["secretsadmin"]) if("clear_bombs") @@ -2363,7 +2410,7 @@ var/global/BSACooldown = 0 message_admins("\blue [user.ckey] warned [M.ckey].") else AddBan(M.ckey, M.computer_id, "Autobanning due to previous warn", user.ckey, 1, AUTOBANTIME) - M << "\redYou have been autobanned by [user.ckey]. This is what we in the biz like to call a \"second warning\"." + M << "\redYou have been autobanned by [user.ckey]." M << "\red This is a temporary ban; it will automatically be removed in [AUTOBANTIME] minutes." log_admin("[user.ckey] warned [M.ckey], resulting in a [AUTOBANTIME] minute autoban.") ban_unban_log_save("[user.ckey] warned [M.ckey], resulting in a [AUTOBANTIME] minute autoban.") @@ -2411,6 +2458,7 @@ var/global/BSACooldown = 0 body += "Mob type = [M.type]

    " + body += "Warn | " body += "Kick | " body += "Ban | " body += "Jobban " @@ -2502,6 +2550,7 @@ var/global/BSACooldown = 0 body += "Thunderdome Observer | " body += "Grant Tajaran (Temp) | " body += "Grant Soghun (Temp) | " + body += "Grant Skrell (Temp) | " body += "
    " body += "" @@ -2510,10 +2559,11 @@ var/global/BSACooldown = 0 //feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/datum/player_info/var - author // admin who authored the information - content // text content of the information - timestamp // Because this is bloody annoying + +/datum/player_info/var/author // admin who authored the information +/datum/player_info/var/rank //rank of admin who made the notes +/datum/player_info/var/content // text content of the information +/datum/player_info/var/timestamp // Because this is bloody annoying /obj/admins/proc/player_has_info(var/key as text) var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav") @@ -2546,7 +2596,10 @@ var/global/BSACooldown = 0 if(!I.timestamp) I.timestamp = "Pre-4/3/2012" update_file = 1 - dat += "[I.content]by [I.author] on [I.timestamp] " + if(!I.rank) + I.rank = "N/A" + update_file = 1 + dat += "[I.content]by [I.author] ([I.rank]) on [I.timestamp] " if(I.author == usr.key) dat += "Remove" dat += "

    " @@ -2572,6 +2625,20 @@ var/global/BSACooldown = 0 return +/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob) + set category = "Admin" + set name = "Update Mob Sprite" + set desc = "Should fix any mob sprite update errors." + + if (!holder) + src << "Only administrators may use this command." + return + + if(istype(H)) + H.update_body() + H.update_clothing() + H.update_face() + /obj/admins/proc/Jobbans() if ((src.rank in list( "Game Admin", "Game Master" ))) diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm new file mode 100644 index 00000000000..4f2956cf9bf --- /dev/null +++ b/code/modules/admin/admin_investigate.dm @@ -0,0 +1,43 @@ +//By Carnwennan + +//This system was made as an alternative to all the in-game lists and variables used to log stuff in-game. +//lists and variables are great. However, they have several major flaws: +//Firstly, they use memory. TGstation has one of the highest memory usage of all the ss13 branches. +//Secondly, they are usually stored in an object. This means that they aren't centralised. It also means that +//the data is lost when the object is deleted! This is especially annoying for things like the singulo engine! +#define INVESTIGATE_DIR "data/investigate/" + +//SYSTEM +/proc/investigate_subject2file(var/subject) + switch(subject) + if("singulo") + return file("[INVESTIGATE_DIR]singulo.html") + if("silicon") + return file("[INVESTIGATE_DIR]silicon.html") + else + return + +/proc/investigate_reset() + if(fdel(INVESTIGATE_DIR)) return 1 + return 0 + +/atom/proc/investigate_log(var/message, var/subject) + if(!message) return + var/F = investigate_subject2file(subject) + if(!F) return + F << "[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z]) || [src] [message]
    " + + + +//ADMINVERBS +/client/proc/investigate_show( subject in list("singulo","silicon") ) + set name = "Investigate" + set category = "Admin" + if(!holder) return + var/F = investigate_subject2file(subject) + if(!F) + src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." + return + src << browse(F,"window=investigate;size=800x300") + + diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm new file mode 100644 index 00000000000..68b8c7e84b9 --- /dev/null +++ b/code/modules/admin/admin_memo.dm @@ -0,0 +1,54 @@ +#define MEMOFILE "data/memo.sav" //where the memos are saved +#define ENABLE_MEMOS 1 //using a define because screw making a config variable for it. This is more efficient and purty. + +//switch verb so we don't spam up the verb lists with like, 3 verbs for this feature. +/client/proc/admin_memo(task in list("write","show","delete")) + set name = "Memo" + set category = "Server" + if(!holder) return + switch(task) + if("write") + admin_memo_write() + if("show") + admin_memo_show() + if("delete") + admin_memo_delete() + + +//write a message +/client/proc/admin_memo_write() + var/savefile/F = new(MEMOFILE) + if(F) + var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message + switch(memo) + if(null) + return + if("") + F.dir.Remove(ckey) + src << "Memo removed" + return + if( findtext(memo,"[memo]" + message_admins("[key] set an admin memo:
    [memo]") + +//show all memos +/client/proc/admin_memo_show() + if(ENABLE_MEMOS) + var/savefile/F = new(MEMOFILE) + if(F) + for(var/ckey in F.dir) + src << "
    Admin Memo by [F[ckey]]
    " + +//delete your own or somebody else's memo +/client/proc/admin_memo_delete() + var/savefile/F = new(MEMOFILE) + if(F) + var/ckey + if( holder.rank == "Game Master" ) + ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir + else + ckey = src.ckey + if(ckey) + F.dir.Remove(ckey) + src << "Removed Memo created by [ckey]." diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 186fadd0ee8..6c847a17b88 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -105,53 +105,35 @@ //Admin Observer if (holder.level >= -1) + verbs += /client/proc/investigate_show verbs += /client/proc/cmd_admin_say + verbs += /client/proc/cmd_mod_say verbs += /client/proc/cmd_admin_gib_self + verbs += /client/proc/update_mob_sprite verbs += /client/proc/deadmin_self else if (holder.level == -3) // Retired Admin verbs += /client/proc/cmd_admin_say + verbs += /client/proc/cmd_mod_say return else return //Moderator if (holder.level >= 0) - verbs += /obj/admins/proc/announce - verbs += /obj/admins/proc/startnow - verbs += /obj/admins/proc/toggleAI //Toggle the AI - verbs += /obj/admins/proc/toggleenter //Toggle enterting -// verbs += /obj/admins/proc/toggleguests //Toggle guests entering - verbs += /obj/admins/proc/toggleooc //toggle ooc - verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc - verbs += /obj/admins/proc/voteres //toggle votes - verbs += /obj/admins/proc/vmode - verbs += /obj/admins/proc/votekill - verbs += /obj/admins/proc/show_player_panel - verbs += /client/proc/deadchat //toggles deadchat - //verbs += /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro verbs += /client/proc/cmd_admin_pm_context verbs += /client/proc/cmd_admin_pm_panel - verbs += /client/proc/cmd_admin_subtle_message - //verbs += /client/proc/warn - was never used - verbs += /client/proc/dsay verbs += /client/proc/admin_play verbs += /client/proc/admin_observe - verbs += /client/proc/game_panel -// verbs += /client/proc/player_panel - verbs += /client/proc/player_panel_new - verbs += /client/proc/unban_panel - verbs += /client/proc/jobbans - - verbs += /client/proc/voting verbs += /client/proc/hide_verbs - verbs += /client/proc/general_report - verbs += /client/proc/air_report verbs += /client/proc/deadmin_self - //verbs += /client/proc/cmd_admin_prison --Merged with player panel - //verbs += /obj/admins/proc/unprison --Merged with player panel - verbs += /client/proc/playernotes verbs += /obj/admins/proc/show_skills else return + if(holder.level == 0) //Moderators don't get asay, only msay + verbs -= /client/proc/cmd_admin_say + verbs -= /client/proc/investigate_show + verbs -= /client/proc/cmd_admin_gib_self + verbs += /client/proc/mod_panel + //Temporary Admin if (holder.level >= 1) verbs += /obj/admins/proc/delay //game start delay @@ -164,6 +146,35 @@ verbs += /client/proc/deadmin_self //verbs += /client/proc/cmd_admin_attack_log --Merged with view variables verbs += /client/proc/cmd_admin_change_custom_event + // + //MOVED FROM MODERATOR + // + verbs += /client/proc/cmd_admin_subtle_message + verbs += /obj/admins/proc/announce + verbs += /obj/admins/proc/startnow + verbs += /obj/admins/proc/toggleAI //Toggle the AI + verbs += /obj/admins/proc/toggleenter //Toggle enterting +// verbs += /obj/admins/proc/toggleguests //Toggle guests entering + verbs += /obj/admins/proc/toggleooc //toggle ooc + verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc + verbs += /obj/admins/proc/voteres //toggle votes + verbs += /obj/admins/proc/vmode + verbs += /obj/admins/proc/votekill + verbs += /client/proc/deadchat //toggles deadchat + //verbs += /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro + verbs += /client/proc/dsay + verbs += /client/proc/game_panel + verbs += /obj/admins/proc/show_player_panel +// verbs += /client/proc/player_panel + verbs += /client/proc/player_panel_new + verbs += /client/proc/unban_panel + verbs += /client/proc/jobbans + verbs += /client/proc/voting + verbs += /client/proc/general_report + //verbs += /client/proc/air_report + //verbs += /client/proc/cmd_admin_prison --Merged with player panel + //verbs += /obj/admins/proc/unprison --Merged with player panel + verbs += /client/proc/playernotes else return //Admin Candidate @@ -248,7 +259,7 @@ // verbs += /client/proc/mapload verbs += /client/proc/check_words verbs += /client/proc/drop_bomb - verbs += /client/proc/kill_airgroup + //verbs += /client/proc/kill_airgroup //verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables verbs += /client/proc/make_sound verbs += /client/proc/play_local_sound @@ -260,6 +271,7 @@ verbs += /client/proc/toggle_gravity_off verbs += /client/proc/toggle_random_events verbs += /client/proc/deadmin_self + if(ENABLE_MEMOS) verbs += /client/proc/admin_memo //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables //verbs += /client/proc/cmd_admin_explosion --Merged with view variables //verbs += /client/proc/cmd_admin_emp --Merged with view variables @@ -278,7 +290,7 @@ verbs += /client/proc/Force_Event_admin verbs += /client/proc/radioalert verbs += /client/proc/CarbonCopy - verbs += /client/proc/jump_to_dead_group + //verbs += /client/proc/jump_to_dead_group else return //Game Master @@ -391,8 +403,8 @@ verbs -= /client/proc/cmd_admin_pm_context verbs -= /client/proc/cmd_admin_pm_panel verbs -= /client/proc/cmd_admin_say + verbs -= /client/proc/cmd_mod_say verbs -= /client/proc/cmd_admin_subtle_message - //verbs -= /client/proc/warn verbs -= /client/proc/dsay verbs -= /client/proc/admin_play verbs -= /client/proc/admin_observe @@ -403,9 +415,10 @@ verbs -= /client/proc/voting verbs -= /client/proc/hide_verbs verbs -= /client/proc/general_report - verbs -= /client/proc/air_report + //verbs -= /client/proc/air_report verbs -= /client/proc/cmd_admin_say verbs -= /client/proc/cmd_admin_gib_self + verbs -= /client/proc/update_mob_sprite verbs -= /client/proc/restartcontroller verbs -= /client/proc/play_local_sound verbs -= /client/proc/enable_debug_verbs @@ -416,15 +429,18 @@ verbs -= /client/proc/toggle_hear_radio verbs -= /client/proc/tension_report verbs -= /client/proc/player_panel_new + verbs -= /client/proc/mod_panel verbs -= /client/proc/toggle_gravity_on verbs -= /client/proc/toggle_gravity_off verbs -= /client/proc/toggle_random_events verbs -= /client/proc/deadmin_self verbs -= /client/proc/jumptocoord verbs -= /client/proc/everyone_random - verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs + verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs verbs -= /client/proc/getserverlog verbs -= /client/proc/cinematic //show a cinematic sequence + verbs -= /client/proc/admin_memo + verbs -= /client/proc/investigate_show verbs -= /client/proc/cmd_admin_change_custom_event verbs -= /client/proc/admin_invis verbs -= /client/proc/callprocgen @@ -452,13 +468,13 @@ //verbs -= /obj/admins/proc/unprison --Merged with player panel //verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying verbs -= /client/proc/togglebuildmodeself - verbs -= /client/proc/kill_airgroup + //verbs -= /client/proc/kill_airgroup verbs -= /client/proc/debug_master_controller verbs -= /client/proc/make_tajaran verbs -= /client/proc/admin_deny_shuttle verbs -= /client/proc/cmd_admin_christmas verbs -= /client/proc/editappear - verbs -= /client/proc/jump_to_dead_group + //verbs -= /client/proc/jump_to_dead_group verbs -= /client/proc/playernotes verbs -= /obj/admins/proc/show_skills verbs -= /client/proc/enable_debug_verbs @@ -534,6 +550,14 @@ // feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return +/client/proc/mod_panel() + set name = "Moderator Panel" + set category = "Admin" + if(holder) + holder.mod_panel() +// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + /client/proc/check_antagonists() set name = "Check Antagonists" set category = "Admin" @@ -832,6 +856,7 @@ verbs += /client/proc/deadchat //toggles deadchat verbs += /obj/admins/proc/toggleooc //toggle ooc verbs += /client/proc/cmd_admin_say//asay + verbs += /client/proc/cmd_mod_say verbs += /client/proc/toggleadminhelpsound // feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -852,6 +877,7 @@ verbs += /client/proc/deadchat //toggles deadchat verbs += /obj/admins/proc/toggleooc //toggle ooc verbs += /client/proc/cmd_admin_say//asay + verbs += /client/proc/cmd_mod_say//asay // feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -863,8 +889,7 @@ return src.admin_invis =! src.admin_invis if(src.mob) - var/mob/m = src.mob//probably don't need this cast, but I'm too lazy to check if /client.mob is of type /mob or not - m.update_clothing() + mob.update_clothing() log_admin("[key_name(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]") message_admins("[key_name_admin(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]", 1) @@ -971,9 +996,7 @@ M.gender = MALE else M.gender = FEMALE - M.update_body() - M.update_face() - M.update_clothing() + M.rebuild_appearance() M.check_dna(M) diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index cd6ef81420c..bcb433e473e 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -1,6 +1,7 @@ -var - jobban_runonce // Updates legacy bans with new info - jobban_keylist[0] //to store the keys & ranks +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + +var/jobban_runonce // Updates legacy bans with new info +var/jobban_keylist[0] //to store the keys & ranks /proc/jobban_fullban(mob/M, rank, reason) if (!M || !M.key) return diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 2c87cf9410a..408815774e9 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -113,6 +113,113 @@ usr << browse(dat, "window=players;size=905x600") + +/obj/admins/proc/mod_panel()//The new one + if (!usr.client.holder) + return + var/dat = "Player Menu" + dat += "
    Misc Positions
    [dd_replacetext("Records", " ", " ")][dd_replacetext("Records", " ", " ")]
    " + //add to this if wanting to add back in IP checking + //add if you want to know their ip to the lists below + var/list/mobs = get_sorted_mobs() + var/i = 1 + + for(var/mob/M in mobs) + if(M.ckey) + var/color = "#e6e6e6" + i++ + if(i%2 == 0) + color = "#f2f2f2" + var/real = (M.real_name == M.original_name ? "[M.name]/[M.real_name]" : "[M.original_name] (as [M.name]/[M.real_name])") + var/turf/T = get_turf(M) + var/client_key = (M.key? M.key : "No key") + dat += "" // Adds current name +/* if(isobserver(M)) + dat += "" + else if(isalien(M)) + dat += "" + else if(islarva(M)) + dat += "" + else if(istajaran(M)) + dat += "" + else if(ishuman(M)) + dat += "" + else if(ismetroid(M)) + dat += "" + else if(ismonkey(M)) + dat += "" + else if(isAI(M)) + dat += "" + else if(ispAI(M)) + dat += "" + else if(isrobot(M)) + dat += "" + else if(isanimal(M)) + dat += "" + else if(iscorgi(M)) + dat += "" + else if(istype(M,/mob/new_player)) + dat += "" + else + dat += "\black" + + if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job. + var/mob/living/carbon/human/H = M + + if (H.wear_id) + var/obj/item/weapon/card/id/id + + if(istype(H.wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/PDA = H.wear_id + if(!isnull(PDA.id)) // The PDA may contain no ID + id = PDA.id // The ID is contained inside the PDA + + else + id = H.wear_id // The ID was on the ID slot + + if(!id) // Happens when there's no ID in the PDA located on the wear_id slot + dat += "" + + else if(isnull(id.assignment)) // Preventing runtime errors blocking the player panel + if(istype(id, /obj/item/weapon/card/id/syndicate)) + dat += "" + else + usr << "ERROR: Inform the coders that an [id.name] was checked for its assignment variable, and it was null." + dat += "" + + else + if(M.mind.assigned_role == id.assignment) // Polymorph + dat += "" + + else + dat += "" + + else + dat += "" +*/ + dat += {" + "} + + dat += {" + + "} + +/* switch(is_special_character(M)) + if(0) + dat += {""} + if(1) + dat += {""} + if(2) + dat += {""} +*/ + dat += "
    Name/Real NameIP/CIDInfoOptions
    IP:Type Assigned Job Traitor?(IP: [M.lastKnownIP])
    [real]
    [M.client ? M.client : "No client ([client_key])"] at ([T.x], [T.y], [T.z])
    GhostAlienAlien larvaTajaran[M.job]MetroidMonkeyAIpAICyborgAnimalCorgiNew Player\red ERROR[M.mind.assigned_role] (No ID)AntagonistERROR[M.mind.assigned_role][M.mind.assigned_role] ([id.assignment])" + + else + dat += "[M.mind.assigned_role] (No ID)No Assigned RoleIP: [M.client.address]
    + CID: [M.client.computer_id]
    [player_has_info(M.ckey) ? "Info" : "N/A"] PMTraitor?Traitor?Traitor?
    " + + usr << browse(dat, "window=players;size=600x600") + //The old one /obj/admins/proc/player_panel_old() if (!usr.client.holder) diff --git a/code/modules/admin/verbs/MC.dm b/code/modules/admin/verbs/MC.dm index a9481f7f348..a7bd0c0161f 100644 --- a/code/modules/admin/verbs/MC.dm +++ b/code/modules/admin/verbs/MC.dm @@ -1,8 +1,11 @@ /client/proc/restartcontroller() set category = "Debug" set name = "Restart Master Controller" + if(!holder) return switch(alert("Are you sure? If the control is still running it will now be running twice.",,"Yes","No")) if("Yes") + src = null + usr = null //weird things were happening after restarting MC. spawn(0) master_controller.process() if("No") diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 94bd6098f51..2c0f9eba325 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -61,8 +61,12 @@ if(C.holder) if(holder) //both are admins - C << "Admin PM from-[key_name(src, C, 1)]: [msg]" - src << "Admin PM to-[key_name(C, src, 1)]: [msg]" + if(holder.rank == "Moderator") //If moderator + C << "Mod PM from-[key_name(src, C, 1)]: [msg]" + src << "Mod PM to-[key_name(C, src, 1)]: [msg]" + else + C << "Admin PM from-[key_name(src, C, 1)]: [msg]" + src << "Admin PM to-[key_name(C, src, 1)]: [msg]" else //recipient is an admin but sender is not C << "Reply PM from-[key_name(src, C, 1)]: [msg]" @@ -75,10 +79,14 @@ else if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT // C << "-- Administrator private message --" - C << "Admin PM from-[key_name(src, C, 0)]: [msg]" - C << "Click on the administrator's name to reply." - src << "Admin PM to-[key_name(C, src, 1)]: [msg]" - + if(holder.rank == "Moderator") + C << "Mod PM from-[key_name(src, C, 0)]: [msg]" + C << "Click on the moderators's name to reply." + src << "Mod PM to-[key_name(C, src, 1)]: [msg]" + else + C << "Admin PM from-[key_name(src, C, 0)]: [msg]" + C << "Click on the administrator's name to reply." + src << "Admin PM to-[key_name(C, src, 1)]: [msg]" //always play non-admin recipients the adminhelp sound C << 'adminhelp.ogg' diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 92165d06a2f..07ccbbbddd3 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -20,9 +20,39 @@ //feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! for (var/mob/M in world) - if (M.client && M.client.holder) + if (M.client && M.client.holder && M.client.holder.level != 0) //Moderators cannot see it. if (src.holder.rank == "Admin Observer") M << "ADMIN: [key_name(usr, M)]: [msg]" else M << "ADMIN: [key_name(usr, M)] (JMP): [msg]" +/client/proc/cmd_mod_say(msg as text) + set category = "Special Verbs" + set name = "Msay" + set hidden = 1 + + if (!src.holder) + src << "Only administrators may use this command." + return + + if (src.muted || src.muted_complete) + src << "You are muted." + return + + msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) + log_admin("MOD: [key_name(src)] : [msg]") + + + if (!msg) + return + //feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + for (var/mob/M in world) + if (M.client && M.client.holder) + if (src.holder.rank == "Admin Observer") + M << "MOD: [key_name(usr, M)]: [msg]" + else if (src.holder.rank == "Moderator") + M << "MOD: [key_name(usr, M)] (JMP): [msg]" + else + M << "MOD: [key_name(usr, M)] (JMP): [msg]" + diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 03e54799e68..f4e5e28c0b3 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -98,7 +98,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) if("reference") - lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world + switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search")) + if("Specifc UID (Hexadecimal number)") + var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null + if(!UID) return + var/temp_variable = locate("\[0x[UID]\]") + if(!temp_variable) + usr << "ERROR. Could not locate referenced object." + return + switch(alert("You have chosen [temp_variable], in [get_area(temp_variable)]. Are you sure?","You sure?","Yes","NONOCANCEL!")) + if("Yes") + lst[i] = temp_variable + if("NONOCANCEL!") + return + if("Search") + lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world if("mob reference") lst[i] = input("Select reference:","Reference",usr) as mob in world @@ -171,8 +185,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." @@ -239,8 +251,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index fa68b836d90..dc8c6371f53 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -22,7 +22,7 @@ usr << browse(output,"window=generalreport") //feedback_add_details("admin_verb","SGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - air_report() +/* air_report() set category = "Debug" set name = "Show Air Report" @@ -83,7 +83,7 @@ for(var/datum/gas/trace_gas in GM.trace_gases) usr << "[trace_gas.type]: [trace_gas.moles]" //feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - +*/ fix_next_move() set category = "Debug" set name = "Unfreeze Everyone" @@ -183,7 +183,7 @@ //feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - jump_to_dead_group() + /*jump_to_dead_group() set name = "Jump to dead group" set category = "Debug" if(!holder) @@ -221,7 +221,7 @@ else usr << "Local airgroup is unsimulated!" //feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - +*/ tension_report() set category = "Debug" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index a899f823ddf..f319ebe5019 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -130,14 +130,14 @@ var/intercom_range_display_status = 0 src.verbs += /client/proc/camera_view //-errorage src.verbs += /client/proc/sec_camera_report //-errorage src.verbs += /client/proc/intercom_view //-errorage - src.verbs += /client/proc/air_status //Air things + //src.verbs += /client/proc/air_status //Air things src.verbs += /client/proc/Cell //More air things src.verbs += /client/proc/atmosscan //check plumbing src.verbs += /client/proc/powerdebug //check power src.verbs += /client/proc/count_objects_on_z_level src.verbs += /client/proc/count_objects_all src.verbs += /client/proc/cmd_assume_direct_control //-errorage - src.verbs += /client/proc/jump_to_dead_group + //src.verbs += /client/proc/jump_to_dead_group src.verbs += /client/proc/startSinglo src.verbs += /client/proc/ticklag //allows you to set the ticklag. src.verbs += /client/proc/cmd_admin_grantfullaccess diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index be02856640a..8e30ca8b469 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -66,8 +66,6 @@ var/list/forbidden_varedit_object_types = list( if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." @@ -131,8 +129,6 @@ var/list/forbidden_varedit_object_types = list( if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." @@ -308,8 +304,6 @@ var/list/forbidden_varedit_object_types = list( if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." @@ -554,8 +548,6 @@ var/list/forbidden_varedit_object_types = list( if("Specifc UID (Hexadecimal number)") var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null if(!UID) return - if(length(UID) != 7) - usr << "ERROR. UID must be 7 digits" var/temp_variable = locate("\[0x[UID]\]") if(!temp_variable) usr << "ERROR. Could not locate referenced object." diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 47e61313879..a4eb0ed0582 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -28,7 +28,7 @@ // log_admin("[key_name(Sender)] sent a message to Centcomm! The message was [msg]") // Handled somewhere else for (var/mob/M in world) - if (M.client && M.client.holder) + if (M.client && M.client.holder && M.client.holder.level != 0) M << "\blue CENTCOMM:[key_name(Sender, M)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" // /proc/Syndicate_announce(var/text , var/mob/Sender) @@ -38,6 +38,6 @@ // log_admin("[key_name(Sender)] sent a message to the Syndicate! The message was [msg]") // Handled somewhere else for (var/mob/M in world) - if (M.client && M.client.holder) + if (M.client && M.client.holder && M.client.holder.level != 0) M << "\blue SYNDICATE:[key_name(Sender, M)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" // diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 82358e2e624..6f1e473eff4 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -621,10 +621,13 @@ Traitors and the like can also be revived with the previous role mostly intact. /client/proc/cmd_admin_gib_self() set name = "Gibself" set category = "Fun" - if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere - return - else - mob.gib() + + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + if(confirm == "Yes") + if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere + return + else + mob.gib() log_admin("[key_name(usr)] used gibself.") message_admins("\blue [key_name_admin(usr)] used gibself.", 1) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 79eb5baec5e..1b526ff5211 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -24,7 +24,7 @@ var/global/sent_strike_team = 0 var/input = null while(!input) - input = input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "") as text|null + input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) if(!input) if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") return diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 8f4a15d6f72..8f25d8630fb 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -24,7 +24,7 @@ var/global/sent_syndicate_strike_team = 0 var/input = null while(!input) - input = input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "") + input = copytext(sanitize(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) if(!input) if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") return diff --git a/code/modules/admin/verbs/ticklag.dm b/code/modules/admin/verbs/ticklag.dm index 933513c2a0c..1d9afa57a42 100644 --- a/code/modules/admin/verbs/ticklag.dm +++ b/code/modules/admin/verbs/ticklag.dm @@ -4,33 +4,29 @@ set category = "Debug" set name = "Set Ticklag" set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9" - if(Debug2) - if(src.holder) - if(!src.mob) return - if(src.holder.rank in list("Game Admin", "Game Master")) - var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null - //I've used ticks of 2 before to help with serious singulo lags - if(newtick && newtick <= 2 && newtick > 0) - log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0) - message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0) - world.tick_lag = newtick - //feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + if(src.holder) + if(!src.mob) return - switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No")) - if("Yes") - config.Tickcomp = 1 - else - config.Tickcomp = 0 + if(src.holder.rank in list("Game Admin", "Game Master")) + var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null + //I've used ticks of 2 before to help with serious singulo lags + if(newtick && newtick <= 2 && newtick > 0) + log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0) + message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0) + world.tick_lag = newtick + feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return + switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No")) + if("Yes") + config.Tickcomp = 1 + else + config.Tickcomp = 0 - - src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made." return - src << "\red Error: ticklag(): You are not authorised to use this. Game Admins and higher only." + src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made." return - else - src << "\red Error: ticklag(): You must first enable Debugging mode." - return \ No newline at end of file + + src << "\red Error: ticklag(): You are not authorised to use this. Game Admins and higher only." + return diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 039aac01924..1ea22042b6f 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /proc/isassembly(O) if(istype(O, /obj/item/device/assembly)) @@ -46,38 +48,50 @@ throw_range = 10 origin_tech = "magnets=1" - var - secured = 1 - small_icon_state_left = null - small_icon_state_right = null - list/small_icon_state_overlays = null - obj/item/device/assembly_holder/holder = null - cooldown = 0//To prevent spam - wires = WIRE_RECEIVE | WIRE_PULSE + var/secured = 1 + var/small_icon_state_left = null + var/small_icon_state_right = null + var/list/small_icon_state_overlays = null + var/obj/item/device/assembly_holder/holder = null + var/cooldown = 0//To prevent spam + var/wires = WIRE_RECEIVE | WIRE_PULSE - var/const - WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate() - WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder - WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly - WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate() - WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message + var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate() + var/const/WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder + var/const/WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly + var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate() + var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message - proc - activate() //What the device does when turned on - pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs - pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct - toggle_secure() //Code that has to happen when the assembly is un\secured goes here - attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another - process_cooldown() //Called via spawn(10) to have it count down the cooldown var - holder_movement() //Called when the holder is moved - interact(mob/user as mob) //Called when attack_self is called + proc/activate() //What the device does when turned on + return + + proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs + return + + proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct + return + + proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here + return + + proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another + return + + proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var + return + + proc/holder_movement() //Called when the holder is moved + return + + proc/interact(mob/user as mob) //Called when attack_self is called + return process_cooldown() cooldown-- if(cooldown <= 0) return 0 spawn(10) - process_cooldown() + process_cooldown() return 1 @@ -186,15 +200,13 @@ Desc: If true is an object that can be attached to an assembly holder but is a s /obj/proc/IsSpecialAssembly() return 0 /* - var - small_icon_state = null//If this obj will go inside the assembly use this for icons - list/small_icon_state_overlays = null//Same here - obj/holder = null - cooldown = 0//To prevent spam + var/small_icon_state = null//If this obj will go inside the assembly use this for icons + var/list/small_icon_state_overlays = null//Same here + var/obj/holder = null + var/cooldown = 0//To prevent spam proc Activate()//Called when this assembly is pulsed by another one - Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var Attach_Holder(var/obj/H, var/mob/user)//Called when an assembly holder attempts to attach, sets src's loc in here diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index ac0cb27ad57..f499c3c0875 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -11,16 +11,20 @@ throw_speed = 3 throw_range = 10 - var - secured = 0 - obj/item/device/assembly/a_left = null - obj/item/device/assembly/a_right = null - obj/special_assembly = null + var/secured = 0 + var/obj/item/device/assembly/a_left = null + var/obj/item/device/assembly/a_right = null + var/obj/special_assembly = null + + proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user) + return + + proc/attach_special(var/obj/O, var/mob/user) + return + + proc/process_activation(var/obj/item/device/D) + return - proc - attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user) - attach_special(var/obj/O, var/mob/user) - process_activation(var/obj/item/device/D) IsAssemblyHolder() diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index c57c7730484..130965ecefb 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/assembly/infra name = "Infrared Beam" desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted." @@ -11,10 +13,9 @@ small_icon_state_left = "infrared_left" small_icon_state_right = "infrared_right" - var - scanning = 0 - visible = 0 - obj/effect/beam/i_beam/first = null + var/scanning = 0 + var/visible = 0 + var/obj/effect/beam/i_beam/first = null proc trigger_beam() @@ -271,4 +272,4 @@ /obj/effect/beam/i_beam/Del() del(src.next) ..() - return \ No newline at end of file + return diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index aab24bded2d..b9853beb325 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/assembly/prox_sensor name = "proximity sensor" desc = "Used for scanning and alerting when someone enters a certain proximity." @@ -11,10 +13,9 @@ small_icon_state_left = "prox_left" small_icon_state_right = "prox_right" - var - scanning = 0 - timing = 0 - time = 10 + var/scanning = 0 + var/timing = 0 + var/time = 10 proc toggle_scan() @@ -153,4 +154,4 @@ attack_self(usr) - return \ No newline at end of file + return diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 2cba4266bc4..e8a9a8b6bfd 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/assembly/signaler name = "Remote Signaling Device" desc = "Used to remotely activate devices." @@ -13,13 +15,12 @@ small_icon_state_left = "signaller_left" small_icon_state_right = "signaller_right" - var - code = 30 - frequency = 1457 - delay = 0 - airlock_wire = null - datum/radio_frequency/radio_connection - deadman = 0 + var/code = 30 + var/frequency = 1457 + var/delay = 0 + var/airlock_wire = null + var/datum/radio_frequency/radio_connection + var/deadman = 0 proc signal() diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index b905de1f0e2..0b856c21795 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/assembly/timer name = "timer" desc = "Used to time things. Works well with contraptions which has to count down. Tick tock." @@ -11,9 +13,8 @@ small_icon_state_left = "timer_left" small_icon_state_right = "timer_right" - var - timing = 0 - time = 10 + var/timing = 0 + var/time = 10 proc timer_end() @@ -114,4 +115,4 @@ if(usr) attack_self(usr) - return \ No newline at end of file + return diff --git a/code/modules/chemical/Chemistry-Holder.dm b/code/modules/chemical/Chemistry-Holder.dm index 459f298a96c..e6e75ad9a72 100644 --- a/code/modules/chemical/Chemistry-Holder.dm +++ b/code/modules/chemical/Chemistry-Holder.dm @@ -1,6 +1,7 @@ -var/const - TOUCH = 1 - INGEST = 2 +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + +var/const/TOUCH = 1 +var/const/INGEST = 2 /////////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 86d28577e4c..31bfd9f0759 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -261,23 +261,25 @@ datum for(var/mob/living/carbon/metroid/M in T) M.adjustToxLoss(rand(15,20)) - var/hotspot = (locate(/obj/effect/hotspot) in T) + var/hotspot = (locate(/obj/fire) in T) if(hotspot && !istype(T, /turf/space)) 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) + T.apply_fire_protection() del(hotspot) return reaction_obj(var/obj/O, var/volume) src = null var/turf/T = get_turf(O) - var/hotspot = (locate(/obj/effect/hotspot) in T) + var/hotspot = (locate(/obj/fire) in T) if(hotspot && !istype(T, /turf/space)) 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) + //T.apply_fire_protection() del(hotspot) if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube)) var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O @@ -522,14 +524,14 @@ datum src = null var/turf/the_turf = get_turf(O) var/datum/gas_mixture/napalm = new - napalm.oxygen = volume*10 + napalm.oxygen = volume/10 napalm.temperature = T0C napalm.update_values() the_turf.assume_air(napalm) reaction_turf(var/turf/T, var/volume) src = null var/datum/gas_mixture/napalm = new - napalm.oxygen = volume*10 + napalm.oxygen = volume/10 napalm.temperature = T0C napalm.update_values() T.assume_air(napalm) @@ -552,14 +554,14 @@ datum src = null var/turf/the_turf = get_turf(O) var/datum/gas_mixture/napalm = new - napalm.nitrogen = volume*10 + napalm.nitrogen = volume/10 napalm.temperature = T0C napalm.update_values() the_turf.assume_air(napalm) reaction_turf(var/turf/T, var/volume) src = null var/datum/gas_mixture/napalm = new - napalm.nitrogen = volume*10 + napalm.nitrogen = volume/10 napalm.temperature = T0C napalm.update_values() T.assume_air(napalm) @@ -861,7 +863,7 @@ datum if(!M) M = holder.my_atom if(!data) data = 1 data++ - M.mutations = 0 + M.mutations = list() M.disabilities = 0 M.jitteriness = 0 if(volume > REAGENTS_OVERDOSE) @@ -1034,18 +1036,10 @@ datum var/turf/the_turf = get_turf(O) if(!the_turf) return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO - var/datum/gas_mixture/napalm = new - napalm.toxins = volume*10 - napalm.temperature = T0C - napalm.update_values() - the_turf.assume_air(napalm) + new /obj/liquid_fuel(the_turf, volume) reaction_turf(var/turf/T, var/volume) src = null - var/datum/gas_mixture/napalm = new - napalm.toxins = volume*10 - napalm.temperature = T0C - napalm.update_values() - T.assume_air(napalm) + new /obj/liquid_fuel(T, volume) return on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1153,19 +1147,17 @@ datum src = null var/turf/the_turf = get_turf(O) var/datum/gas_mixture/napalm = new - var/datum/gas/volatile_fuel/fuel = new - fuel.moles = 5 - napalm.trace_gases += fuel + napalm.toxins = volume/5 napalm.update_values() the_turf.assume_air(napalm) + new /obj/liquid_fuel(the_turf, volume) reaction_turf(var/turf/T, var/volume) src = null var/datum/gas_mixture/napalm = new - var/datum/gas/volatile_fuel/fuel = new - fuel.moles = 5 - napalm.trace_gases += fuel + napalm.toxins = volume/5 napalm.update_values() T.assume_air(napalm) + new /obj/liquid_fuel(T, volume) return leporazine @@ -1757,6 +1749,12 @@ datum reagent_state = GAS color = "#404030" // rgb: 64, 64, 48 + ultraglue + name = "Ulta Glue" + id = "glue" + description = "An extremely powerful bonding agent." + color = "#FFFFCC" // rgb: 255, 255, 204 + diethylamine name = "Diethylamine" id = "diethylamine" @@ -2142,12 +2140,13 @@ datum if(T.wet_overlay) T.overlays -= T.wet_overlay T.wet_overlay = null - var/hotspot = (locate(/obj/effect/hotspot) in T) + var/hotspot = (locate(/obj/fire) 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) + T.apply_fire_protection() del(hotspot) enzyme @@ -2651,14 +2650,13 @@ datum reagent_state = LIQUID nutriment_factor = 0 //So alcohol can fill you up! If they want to. color = "#404030" // rgb: 64, 64, 48 - var - dizzy_adj = 3 - slurr_adj = 3 - confused_adj = 2 - slur_start = 65 //amount absorbed after which mob starts slurring - confused_start = 130 //amount absorbed after which mob starts confusing directions - blur_start = 260 //amount absorbed after which mob starts getting blurred vision - pass_out = 325 //amount absorbed after which mob starts passing out + var/dizzy_adj = 3 + var/slurr_adj = 3 + var/confused_adj = 2 + var/slur_start = 65 //amount absorbed after which mob starts slurring + var/confused_start = 130 //amount absorbed after which mob starts confusing directions + var/blur_start = 260 //amount absorbed after which mob starts getting blurred vision + var/pass_out = 325 //amount absorbed after which mob starts passing out on_mob_life(var/mob/living/M as mob) M:nutrition += nutriment_factor diff --git a/code/modules/chemical/Chemistry-Recipes.dm b/code/modules/chemical/Chemistry-Recipes.dm index ad825ca068d..d52a00e154a 100644 --- a/code/modules/chemical/Chemistry-Recipes.dm +++ b/code/modules/chemical/Chemistry-Recipes.dm @@ -350,8 +350,6 @@ datum on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/location = get_turf(holder.my_atom.loc) for(var/turf/simulated/floor/target_tile in range(0,location)) - if(target_tile.parent && target_tile.parent.group_processing) - target_tile.parent.suspend_group_processing() var/datum/gas_mixture/napalm = new @@ -887,7 +885,7 @@ datum name = "Soy Sauce" id = "soysauce" result = "soysauce" - required_reagents = list("soymilk" = 4, "acid" = 1) + required_reagents = list("soymilk" = 4, "water" = 1) //Was sulphuric acid, probably should change it result_amount = 5 cheesewheel diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index a3bcaabcc38..26bb307ea34 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -11,9 +11,6 @@ item_state = "flashbang" w_class = 2.0 force = 2.0 - throw_speed = 4 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY var/obj/item/weapon/reagent_containers/glass/beaker_one var/obj/item/weapon/reagent_containers/glass/beaker_two var/obj/item/device/assembly/attached_device @@ -27,6 +24,10 @@ var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle") var/affected_area = 3 var/mob/attacher = "Unknown" + throw_speed = 4 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT attackby(var/obj/item/weapon/W, var/mob/user) if(path || !active) @@ -784,7 +785,7 @@ /obj/structure/table, /obj/structure/closet/secure_closet, /obj/structure/closet, - /obj/machinery/sink, + /obj/structure/sink, /obj/item/weapon/storage, /obj/machinery/atmospherics/unary/cryo_cell, /obj/item/weapon/chem_grenade, @@ -994,7 +995,7 @@ if(!T.dna) usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)" return - if(T.mutations2 & NOCLONE) //target done been et, no more blood in him + if(NOCLONE in T.mutations) //target done been et, no more blood in him user << "\red You are unable to locate any blood." return if(ishuman(T)) @@ -1304,7 +1305,8 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = null - flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT /obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) return src.attack_hand(user) @@ -1349,9 +1351,9 @@ possible_transfer_amounts = null flags = FPRINT var/mode = 1 - var/charge_cost = 100 + var/charge_cost = 50 var/charge_tick = 0 - var/recharge_time = 10 //Time it takes for shots to recharge (in seconds) + var/recharge_time = 5 //Time it takes for shots to recharge (in seconds) New() ..() @@ -1372,13 +1374,13 @@ if(R && R.cell) if(mode == 1 && reagents.total_volume < 30) //Don't recharge reagents and drain power if the storage is full. R.cell.use(charge_cost) //Take power from borg... - reagents.add_reagent("tricordrazine",10) //And fill hypo with reagent. + reagents.add_reagent("tricordrazine",5) //And fill hypo with reagent. if(mode == 2 && reagents.total_volume < 30) R.cell.use(charge_cost) - reagents.add_reagent("inaprovaline", 10) + reagents.add_reagent("inaprovaline", 5) if(mode == 3 && reagents.total_volume < 30) R.cell.use(charge_cost) - reagents.add_reagent("spaceacillin", 10) + reagents.add_reagent("spaceacillin", 5) //update_icon() return 1 @@ -1402,16 +1404,19 @@ playsound(src.loc, 'pop.ogg', 50, 0) //Change the mode if(mode == 1) mode = 2 + charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes. reagents.clear_reagents() //Flushes whatever was in the storage previously, so you don't get chems all mixed up. user << "\blue Synthesizer is now producing 'Inaprovaline'." return if(mode == 2) mode = 3 + charge_tick = 0 reagents.clear_reagents() user << "\blue Synthesizer is now producing 'Spaceacillin'." return if(mode == 3) mode = 1 + charge_tick = 0 reagents.clear_reagents() user << "\blue Synthesizer is now producing 'Tricordrazine'." return @@ -1461,6 +1466,7 @@ icon_state = null var/bitesize = 1 var/bitecount = 0 + var/eatsound = 'eatfood.ogg' var/trash = null //Placeholder for effect that trigger on eating that aren't tied to reagents. @@ -1508,6 +1514,9 @@ if ("tray") var/obj/item/trash/tray/T = new /obj/item/trash/tray/( M ) M.put_in_hand(T) + if ("liquidfood") + var/obj/item/trash/liquidfood/T = new /obj/item/trash/liquidfood/( M ) + M.put_in_hand(T) return attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -1580,10 +1589,11 @@ if(!reagents.total_volume) if(M == user) user << "\red You finish eating [src]." else user << "\red [M] finishes eating [src]." + del(src) spawn(5) user.update_clothing() - del(src) - playsound(M.loc,'eatfood.ogg', rand(10,50), 1) + + playsound(M.loc, eatsound, rand(10,50), 1) return 1 else if(istype(M, /mob/living/simple_animal/livestock)) if(M == user) //If you're eating it yourself. @@ -1979,14 +1989,7 @@ attackby(var/obj/D, mob/user as mob) if(isprox(D)) - var/obj/item/weapon/bucket_sensor/B = new /obj/item/weapon/bucket_sensor - B.loc = user - if (user.r_hand == D) - user.u_equip(D) - user.r_hand = B - else - user.u_equip(D) - user.l_hand = B + var/obj/item/weapon/bucket_sensor/B = new /obj/item/weapon/bucket_sensor(user.loc) B.layer = 20 user << "You add the sensor to the bucket" del(D) @@ -2918,6 +2921,15 @@ src.pixel_x = rand(-10.0, 10) src.pixel_y = rand(-10.0, 10) +/obj/item/weapon/reagent_containers/food/drinks/waterbottle + name = "water bottle" + desc = "Straight from the ice lakes of Mars!" + icon_state = "waterbottle" + New() + ..() + reagents.add_reagent("water", 30) + src.pixel_x = rand(-10.0, 10) + src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/sillycup name = "Paper Cup" @@ -3210,19 +3222,19 @@ bullet_act(var/obj/item/projectile/Proj) if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) - explosion(src.loc,-1,0,2) + explosion(get_turf(src),-1,0,2) if(src) del(src) blob_act() - explosion(src.loc,0,1,5,7,10) + explosion(get_turf(src),0,1,5,7,10) if(src) del(src) ex_act() - explosion(src.loc,-1,0,2) + explosion(get_turf(src),-1,0,2) if(src) del(src) @@ -3263,7 +3275,7 @@ reagents.add_reagent("beer",1000) /obj/structure/reagent_dispensers/beerkeg/blob_act() - explosion(src.loc,0,3,5,7,10) + explosion(get_turf(src),0,3,5,7,10) del(src) @@ -3661,7 +3673,7 @@ desc = "A drink that is guaranteed to knock you silly." if("hippiesdelight") icon_state = "hippiesdelightglass" - name = "Hippiesdelight" + name = "Hippie's Delight" desc = "A drink enjoyed by people during the 1960's." if("bananahonk") icon_state = "bananahonkglass" @@ -3699,13 +3711,29 @@ icon_state = "driestmartiniglass" name = "Driest Martini" desc = "Only for the experienced. You think you see sand floating in the glass." + if("ice") + icon_state = "iceglass" + name = "Glass of ice" + desc = "Generally, you're supposed to put something else in there too..." + if("icecoffee") + icon_state = "icedcoffeeglass" + name = "Iced Coffee" + desc = "A drink to perk you up and refresh you!" + if("coffee") + icon_state = "glass_brown" + name = "Glass of coffee" + desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + if("bilk") + icon_state = "glass_brown" + name = "Glass of bilk" + desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." else icon_state ="glass_brown" name = "Glass of ..what?" desc = "You can't really tell what this is." else icon_state = "glass_empty" - name = "Drinking glass" + name = "drinking glass" desc = "Your standard drinking glass" return diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm new file mode 100644 index 00000000000..4bf02ed3139 --- /dev/null +++ b/code/modules/client/client defines.dm @@ -0,0 +1,55 @@ +//Some of this is being changed to a datum to cut down on uneccessary variables at the client level. ~Carn +/client + //////////////// + //ADMIN THINGS// + //////////////// + var/obj/admins/holder = null + var/buildmode = 0 + var/stealth = 0 + var/fakekey = null + var/seeprayers = 0 + var/ooccolor = "#b82e00" + var/muted = null //Can't talk in OOC, say, whisper, emote... anything except for adminhelp and admin-pm. An admin punishment + var/muted_complete = null //Can't talk in any way shape or form (muted + can't adminhelp or respond to admin pm-s). An admin punishment + var/warned = 0 + var/sound_adminhelp = 0 //If set to 1 this will play a sound when adminhelps are received. + var/admin_invis = 0 + + ///////// + //OTHER// + ///////// + var/listen_ooc = 1 + var/move_delay = 1 + var/moving = null + var/adminobs = null + var/deadchat = 0 + var/changes = 0 + var/area = null + var/played = 0 + var/team = null + var/be_alien = 0 //Check if that guy wants to be an alien + var/be_pai = 1 //Consider client when searching for players to recruit as a pAI + var/vote = null + var/showvote = null + var/STFU_ghosts //80+ people rounds are fun to admin when text flies faster than airport security + var/STFU_radio //80+ people rounds are fun to admin when text flies faster than airport security + var/be_syndicate = 0 //Moving this into client vars, since I was silly when I made it. + var/bubbles = 1 //Check if bubbles should be displayed for someone + + /////////////// + //SOUND STUFF// + /////////////// + var/canplaysound = 1 + var/ambience_playing= null + var/no_ambi = 0 //Toggle Ambience + var/midis = 1 //Toggle Midis + + //////////// + //SECURITY// + //////////// + var/next_allowed_topic_time = 10 + // comment out the line below when debugging locally to enable the options & messages menu + //control_freak = 1 + + + diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm new file mode 100644 index 00000000000..7a6795ff337 --- /dev/null +++ b/code/modules/client/client procs.dm @@ -0,0 +1,112 @@ + //////////// + //SECURITY// + //////////// +#define TOPIC_SPAM_DELAY 7 //7 tick delay is about half a second +#define UPLOAD_LIMIT 1048576 //Restricts client uploads to the server to 1MB //Could probably do with being lower. + /* + When somebody clicks a link in game, this Topic is called first. + It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever] + (if specified in the link). ie locate(hsrc).Topic() + + Such links can be spoofed. + + Because of this certain things MUST be considered whenever adding a Topic() for something: + - Can it be fed harmful values which could cause runtimes? + - Is the Topic call an admin-only thing? + - If so, does it have checks to see if the person who called it (usr.client) is an admin? + - Are the processes being called by Topic() particularly laggy? + - If so, is there any protection against somebody spam-clicking a link? + If you have any questions about this stuff feel free to ask. ~Carn + */ +/client/Topic(href, href_list, hsrc) + //Reduces spamming of links by dropping calls that happen during the delay period + if(next_allowed_topic_time > world.time) +// src << "\red DEBUG: Error: SPAM" + return + next_allowed_topic_time = world.time + TOPIC_SPAM_DELAY + + //search the href for script injection + if( findtext(href,"[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr]) || [href]
    " + + if(view_var_Topic(href,href_list,hsrc)) //Until viewvars can be rewritten as datum/admins/Topic() + return + + ..() //redirect to [locate(hsrc)]/Topic() + + +//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc. +/client/AllowUpload(filename, filelength) + if(filelength > UPLOAD_LIMIT) + src << "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB." + return 0 +/* //Don't need this at the moment. But it's here if it's needed later. + //Helps prevent multiple files being uploaded at once. Or right after eachother. + var/time_to_wait = fileaccess_timer - world.time + if(time_to_wait > 0) + src << "Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds." + return 0 + fileaccess_timer = world.time + FTPDELAY */ + return 1 + + + /////////// + //CONNECT// + /////////// +/client/New() + //Connection-Type Checking + if( connection != "seeker" ) + del(src) + return + + if(IsGuestKey(key)) + alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK") + del(src) + return + + if (((world.address == address || !(address)) && !(host))) + host = key + world.update_status() + + ..() //calls mob.Login() + makejson() + + if(custom_event_msg && custom_event_msg != "") + src << "

    Custom Event

    " + src << "

    A custom event is taking place. OOC Info:

    " + src << "[html_encode(custom_event_msg)]" + src << "
    " + + //Admin Authorisation + if( ckey in admins ) + holder = new /obj/admins(src) + holder.rank = admins[ckey] + update_admins(admins[ckey]) + admin_memo_show() + + + ////////////// + //DISCONNECT// + ////////////// +/client/Del() + spawn(0) + if(holder) + del(holder) + makejson() + return ..() \ No newline at end of file diff --git a/code/modules/clothing/costume.dm b/code/modules/clothing/costume.dm index 13f6d073a4b..dba2e92fbd7 100644 --- a/code/modules/clothing/costume.dm +++ b/code/modules/clothing/costume.dm @@ -70,7 +70,7 @@ new /obj/item/clothing/shoes/black(src.loc) new /obj/item/weapon/cane(src.loc) new /obj/item/clothing/under/sl_suit(src.loc) - new /obj/item/clothing/mask/gas/fakemoustache(src.loc) + new /obj/item/clothing/mask/fakemoustache(src.loc) del(src) /obj/effect/landmark/costume/plaguedoctor/New() diff --git a/code/modules/clothing/ears.dm b/code/modules/clothing/ears.dm index 05493ff2e10..25c12fd946a 100644 --- a/code/modules/clothing/ears.dm +++ b/code/modules/clothing/ears.dm @@ -4,6 +4,7 @@ name = "ears" w_class = 1.0 throwforce = 2 + slot_flags = SLOT_EARS var/twoeared = 0 /obj/item/clothing/ears/attack_hand(mob/user as mob) diff --git a/code/modules/clothing/gimmick.dm b/code/modules/clothing/gimmick.dm index 27e5f8579de..0d250a587dd 100644 --- a/code/modules/clothing/gimmick.dm +++ b/code/modules/clothing/gimmick.dm @@ -296,7 +296,8 @@ icon = 'weapons.dmi' icon_state = "baton" item_state = "classic_baton" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT force = 10 /obj/item/clothing/under/pirate diff --git a/code/modules/clothing/glasses.dm b/code/modules/clothing/glasses.dm index 53f7e1eaf86..40f5794b05c 100644 --- a/code/modules/clothing/glasses.dm +++ b/code/modules/clothing/glasses.dm @@ -1,13 +1,15 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/clothing/glasses name = "glasses" icon = 'glasses.dmi' w_class = 2.0 flags = GLASSESCOVERSEYES - var - vision_flags = 0 - darkness_view = 0//Base human is 2 - invisa_view = 0 - prescription = 0 + slot_flags = SLOT_EYES + var/vision_flags = 0 + var/darkness_view = 0//Base human is 2 + var/invisa_view = 0 + var/prescription = 0 /* SEE_SELF // can see self, no matter what diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 3709e1ab39b..3220b2ad577 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -1,10 +1,11 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/clothing/glasses/hud name = "HUD" desc = "A heads-up display that provides important info in (almost) real time." flags = null //doesn't protect eyes because it's a monocle, duh origin_tech = "magnets=3;biotech=2" - var - list/icon/current = list() //the current hud icons + var/list/icon/current = list() //the current hud icons proc process_hud(var/mob/M) return @@ -56,7 +57,6 @@ if(!M) return if(!M.client) return var/client/C = M.client - var/icon/tempHud = 'hud.dmi' for(var/mob/living/carbon/human/patient in view(M)) var/foundVirus = 0 for(var/datum/disease/D in patient.viruses) @@ -66,15 +66,17 @@ // jesus fuck, no, don't display vira by just looking at them /*if(patient.virus2) foundVirus++*/ - C.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") + patient.health_img.icon_state = "hud[RoundHealth(patient.health)]" + C.images += patient.health_img if(patient.stat == 2) - C.images += image(tempHud,patient,"huddead") + patient.med_img.icon_state = "huddead" else if(patient.alien_egg_flag) - C.images += image(tempHud,patient,"hudxeno") + patient.med_img.icon_state = "hudxeno" else if(foundVirus) - C.images += image(tempHud,patient,"hudill") + patient.med_img.icon_state = "hudill" else - C.images += image(tempHud,patient,"hudhealthy") + patient.med_img.icon_state = "hudhealthy" + C.images += patient.med_img /obj/item/clothing/glasses/hud/security @@ -95,37 +97,41 @@ if(!M) return if(!M.client) return var/client/C = M.client - var/icon/tempHud = 'hud.dmi' for(var/mob/living/carbon/human/perp in view(M)) if(!C) continue var/perpname = "wot" if(perp.wear_id) - C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") + perp.sec_img.icon_state = "hud[ckey(perp:wear_id:GetJobName())]" + C.images += perp.sec_img if(istype(perp.wear_id,/obj/item/weapon/card/id)) perpname = perp.wear_id:registered_name else if(istype(perp.wear_id,/obj/item/device/pda)) var/obj/item/device/pda/tempPda = perp.wear_id perpname = tempPda.owner + for (var/datum/data/record/E in data_core.general) + if (E.fields["name"] == perpname) + for (var/datum/data/record/R in data_core.security) + if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) + perp.sec2_img.icon_state = "hudwanted" + C.images += perp.sec2_img + break + else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) + perp.sec2_img.icon_state = "hudprisoner" + C.images += perp.sec2_img + break else - perpname = perp.name - C.images += image(tempHud,perp,"hudunknown") + perp.sec_img.icon_state = "hudunknown" + C.images += perp.sec_img - for (var/datum/data/record/E in data_core.general) - if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - C.images += image(tempHud,perp,"hudwanted") - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - C.images += image(tempHud,perp,"hudprisoner") - break for(var/named in perp.organs) var/datum/organ/external/E = perp.organs[named] for(var/obj/item/weapon/implant/I in E.implant) if(I.implanted) if(istype(I,/obj/item/weapon/implant/tracking)) - C.images += image(tempHud,perp,"hud_imp_tracking") + perp.imp_img.icon_state = "hud_imp_tracking" + C.images += perp.imp_img if(istype(I,/obj/item/weapon/implant/loyalty)) - C.images += image(tempHud,perp,"hud_imp_loyal") + perp.imp_img.icon_state = "hud_imp_loyal" + C.images += perp.imp_img diff --git a/code/modules/clothing/gloves.dm b/code/modules/clothing/gloves.dm index e2192512d43..670802d16e1 100644 --- a/code/modules/clothing/gloves.dm +++ b/code/modules/clothing/gloves.dm @@ -12,6 +12,7 @@ var/wired = 0 var/obj/item/weapon/cell/cell = 0 body_parts_covered = HANDS + slot_flags = SLOT_GLOVES /obj/item/clothing/gloves/boxing diff --git a/code/modules/clothing/head/hats.dm b/code/modules/clothing/head/hats.dm index ca94d809f95..c2f873564d9 100644 --- a/code/modules/clothing/head/hats.dm +++ b/code/modules/clothing/head/hats.dm @@ -3,7 +3,7 @@ name = "head" icon = 'hats.dmi' body_parts_covered = HEAD - var/list/allowed = list() + slot_flags = SLOT_HEAD /obj/item/clothing/head/cakehat name = "cake-hat" @@ -83,8 +83,30 @@ icon_state = "beret" flags = FPRINT | TABLEPASS +/obj/item/clothing/head/chaplain_hood + name = "chaplain's hood" + desc = "It's hood that covers the head. It keeps you warm during the space winters." + icon_state = "chaplain_hood" + flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR + +/obj/item/clothing/head/nun_hood + name = "nun hood" + desc = "Maximum piety in this star system." + icon_state = "nun_hood" + flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR + +/obj/item/clothing/head/hasturhood + name = "hastur's hood" + desc = "It's unspeakably stylish" + icon_state = "hasturhood" + flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR + +/obj/item/clothing/head/nursehat + name = "nurse's hat" + desc = "It allows quick identification of trained medical personnel." + icon_state = "nursehat" + flags = FPRINT|TABLEPASS -// CHUMP HELMETS: COOKING THEM DESTROYS THE CHUMP HELMET SPAWN. /obj/item/clothing/head/helmet/cueball name = "cueball helmet" @@ -109,6 +131,8 @@ item_state = "helmet" var/flipped = 0 + +// CHUMP HELMETS: COOKING THEM DESTROYS THE CHUMP HELMET SPAWN. /obj/item/clothing/head/syndicatefake name = "red space-helmet replica" desc = "A plastic replica of a red space space helmet. This is a toy, it is not made for use in space!" @@ -118,24 +142,6 @@ flags = FPRINT | TABLEPASS | BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES -/obj/item/clothing/head/chaplain_hood - name = "chaplain's hood" - desc = "It's hood that covers the head. It keeps you warm during the space winters." - icon_state = "chaplain_hood" - flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR - -/obj/item/clothing/head/hasturhood - name = "hastur's hood" - desc = "It's unspeakably stylish" - icon_state = "hasturhood" - flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|BLOCKHAIR - -/obj/item/clothing/head/nursehat - name = "nurse's hat" - desc = "It allows quick identification of trained medical personnel." - icon_state = "nursehat" - flags = FPRINT|TABLEPASS - /obj/item/clothing/head/helmet/cardborg name = "cardborg helmet" desc = "A helmet made out of a box." diff --git a/code/modules/clothing/head/helmets.dm b/code/modules/clothing/head/helmets.dm index 12621b0addc..069e1f49bea 100644 --- a/code/modules/clothing/head/helmets.dm +++ b/code/modules/clothing/head/helmets.dm @@ -19,7 +19,7 @@ name = "\improper SWAT helmet" desc = "They're often used by highly trained Swat Members." icon_state = "swat" - flags = FPRINT | TABLEPASS | SUITSPACE | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR + flags = FPRINT | TABLEPASS | SUITSPACE | HEADSPACE | HEADCOVERSEYES item_state = "swat" armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) flags_inv = HIDEEARS|HIDEEYES @@ -28,7 +28,7 @@ name = "\improper Thunderdome helmet" desc = "'Let the battle commence!'" icon_state = "thunderdome" - flags = FPRINT | TABLEPASS | SUITSPACE | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR + flags = FPRINT | TABLEPASS | SUITSPACE | HEADSPACE | HEADCOVERSEYES item_state = "thunderdome" armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0) diff --git a/code/modules/clothing/jumpsuit.dm b/code/modules/clothing/jumpsuit.dm index afefffb0a4d..97f58f0605e 100644 --- a/code/modules/clothing/jumpsuit.dm +++ b/code/modules/clothing/jumpsuit.dm @@ -7,7 +7,8 @@ protective_temperature = T0C + 50 heat_transfer_coefficient = 0.30 permeability_coefficient = 0.90 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS + slot_flags = SLOT_ICLOTHING var/has_sensor = 1//For the crew computer 2 = unable to change mode var/sensor_mode = 0 /* diff --git a/code/modules/clothing/mask.dm b/code/modules/clothing/mask.dm index 1a8fc6d83b4..7d5ee0be5b3 100644 --- a/code/modules/clothing/mask.dm +++ b/code/modules/clothing/mask.dm @@ -7,7 +7,7 @@ icon = 'masks.dmi' body_parts_covered = HEAD armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 0, rad = 0) - + slot_flags = SLOT_MASK /obj/item/clothing/mask/breath desc = "A close-fitting mask that can be connected to an air supply." @@ -44,9 +44,31 @@ desc = "LOADSAMONEY" icon_state = "balaclava" item_state = "balaclava" - flags = FPRINT|TABLEPASS|SUITSPACE|HEADSPACE|MASKCOVERSMOUTH|BLOCKHAIR + see_face = 0.0 + flags = FPRINT|TABLEPASS|HEADSPACE|BLOCKHAIR w_class = 2 +/obj/item/clothing/mask/luchador + name = "Luchador Mask" + desc = "Worn by robust fighters, flying high to defeat their foes!" + icon_state = "luchag" + item_state = "luchag" + flags = FPRINT|TABLEPASS|HEADSPACE|BLOCKHAIR + see_face = 0.0 + w_class = 2 + +/obj/item/clothing/mask/luchador/tecnicos + name = "Tecnicos Mask" + desc = "Worn by robust fighters who uphold justice and fight honorably." + icon_state = "luchador" + item_state = "luchador" + +/obj/item/clothing/mask/luchador/rudos + name = "Rudos Mask" + desc = "Worn by robust fighters who are willing to do anything to win." + icon_state = "luchar" + item_state = "luchar" + /obj/item/clothing/mask/muzzle name = "muzzle" desc = "To stop that awful noise." @@ -67,12 +89,20 @@ permeability_coefficient = 0.05 armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 75, rad = 0) +/obj/item/clothing/mask/fakemoustache + name = "fake moustache" + desc = "Warning: moustache is fake." + icon_state = "fake-moustache" + flags = FPRINT|TABLEPASS + see_face = 0.0 //Well, it's a disguise, of course. + //This now uses the alt sprites, like the emergency gasmask. -Pete /obj/item/clothing/mask/gas name = "gas mask" desc = "A face-covering mask that can be connected to an air supply." icon_state = "gas_alt" flags = FPRINT|TABLEPASS|SUITSPACE|MASKCOVERSMOUTH|MASKCOVERSEYES + flags_inv = HIDEEARS|HIDEEYES w_class = 3.0 see_face = 0.0 item_state = "gas_alt" @@ -147,10 +177,4 @@ name = "sexy mime mask" desc = "A traditional female mime's mask." icon_state = "sexymime" - item_state = "sexymime" - -//WHY IS THIS A GASMASK -/obj/item/clothing/mask/gas/fakemoustache - name = "fake moustache" - desc = "Warning: moustache is fake." - icon_state = "fake-moustache" \ No newline at end of file + item_state = "sexymime" \ No newline at end of file diff --git a/code/modules/clothing/shoes.dm b/code/modules/clothing/shoes.dm index 6e0a4a8d683..493cf794cb2 100644 --- a/code/modules/clothing/shoes.dm +++ b/code/modules/clothing/shoes.dm @@ -5,6 +5,7 @@ gender = PLURAL //Carn: for grammarically correct text-parsing body_parts_covered = FEET + slot_flags = SLOT_FEET protective_temperature = 500 heat_transfer_coefficient = 0.10 diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 720db8724c6..cb477ff130d 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -3,7 +3,7 @@ icon_state = "capspace" item_state = "capspacehelmet" desc = "A special helmet for the most fashionable of military figureheads." - flags = FPRINT | TABLEPASS | HEADCOVERSEYES + flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR see_face = 0.0 permeability_coefficient = 0.01 armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) diff --git a/code/modules/clothing/spacesuits/engineer.dm b/code/modules/clothing/spacesuits/engineer.dm new file mode 100644 index 00000000000..a08e9e5450b --- /dev/null +++ b/code/modules/clothing/spacesuits/engineer.dm @@ -0,0 +1,37 @@ +/obj/item/clothing/head/helmet/space/engineer + name = "environment suit helmet" + desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off." + flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR + see_face = 0.0 + flags_inv = HIDEEARS + icon_state = "engspace_helmet" + item_state = "engspace_helmet" + protective_temperature = 5000 + armor = list(melee = 20, bullet = 5, laser = 10,energy = 5, bomb = 15, bio = 100, rad = 75) + var/up = 0 + +/obj/item/clothing/head/helmet/space/engineer/ce + name = "chief engineer's environment suit helmet" + desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off." + icon_state = "cespace_helmet" + item_state = "cespace_helmet" + +/obj/item/clothing/suit/space/engineer + name = "environment suit" + desc = "An environment suit that protects against hazardous, low pressure environments. Has radiation shielding." + icon_state = "engspace_suit" + item_state = "engspace_suit" + protective_temperature = 5000 //For not dieing near a fire, but still not being great in a full inferno + slowdown = 2 + armor = list(melee = 20, bullet = 5, laser = 10,energy = 5, bomb = 15, bio = 100, rad = 75) + allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ + /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \ + /obj/item/device/radio, /obj/item/device/analyzer) + //yes, you can fit everything and your dog in it. + //i figure this might mitigate some of the inevitable bitching about it being a downgrade from the rig. + +/obj/item/clothing/suit/space/engineer/ce + name = "chief engineer's environment suit" + desc = "An environment suit that protects against hazardous, low pressure environments. Has radiation shielding and Chief Engineer colours." + icon_state = "cespace_suit" + item_state = "cespace_suit" \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm new file mode 100644 index 00000000000..33ed7261b12 --- /dev/null +++ b/code/modules/clothing/spacesuits/ert.dm @@ -0,0 +1,69 @@ +/obj/item/clothing/head/helmet/space/ert + name = "emergency response team helmet" + desc = "A helmet worn by members of the NanoTrasen Emergency Response Team. Armoured and space ready." + icon_state = "ert_commander" + item_state = "helm-command" + armor = list(melee = 50, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) + +/obj/item/clothing/suit/space/ert + name = "emergency response team suit" + desc = "A suit worn by members of the NanoTrasen Emergency Response Team. Armoured, space ready, and fire resistant." + icon_state = "ert_commander" + item_state = "suit-command" + w_class = 3 + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + slowdown = 1 + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) + protective_temperature = 10000 + allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ + /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \ + /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \ + /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun) + +//Commander +/obj/item/clothing/head/helmet/space/ert/commander + name = "emergency response team commander helmet" + desc = "A helmet worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready." + icon_state = "ert_commander" + item_state = "helm-command" + +/obj/item/clothing/suit/space/ert/commander + name = "emergency response team commander suit" + desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant." + icon_state = "ert_commander" + item_state = "suit-command" + +//Security +/obj/item/clothing/head/helmet/space/ert/security + name = "emergency response team security helmet" + desc = "A helmet worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready." + icon_state = "ert_security" + item_state = "syndicate-helm-black-red" + +/obj/item/clothing/suit/space/ert/security + name = "emergency response team security suit" + desc = "A suit worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured, space ready, and fire resistant." + icon_state = "ert_security" + item_state = "syndicate-black-red" + +//Engineer +/obj/item/clothing/head/helmet/space/ert/engineer + name = "emergency response team engineer helmet" + desc = "A helmet worn by engineering members of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready." + icon_state = "ert_engineer" + +/obj/item/clothing/suit/space/ert/engineer + name = "emergency response team engineer suit" + desc = "A suit worn by the engineering of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant." + icon_state = "ert_engineer" + +//Medical +/obj/item/clothing/head/helmet/space/ert/medical + name = "emergency response team medical helmet" + desc = "A helmet worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready." + icon_state = "ert_medical" + +/obj/item/clothing/suit/space/ert/medical + name = "emergency response team medical suit" + desc = "A suit worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready." + icon_state = "ert_medical" \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 7c3a2e678ab..487e076c9a1 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -27,7 +27,7 @@ icon_state = "santa" item_state = "santa" slowdown = 0 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL | SUITSPACE + flags = FPRINT | TABLEPASS | SUITSPACE allowed = list(/obj/item) //for stuffing exta special presents diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm index ce028fe46ac..a1a95239d9d 100644 --- a/code/modules/clothing/spacesuits/ninja.dm +++ b/code/modules/clothing/spacesuits/ninja.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/clothing/head/helmet/space/space_ninja desc = "What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear." name = "ninja hood" @@ -18,45 +20,44 @@ slowdown = 0 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - var //Important parts of the suit. - mob/living/carbon/affecting = null//The wearer. - obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New(). - datum/effect/effect/system/spark_spread/spark_system//To create sparks. - reagent_list[] = list("tricordrazine","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New(). - stored_research[]//For stealing station research. - obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk. + var/mob/living/carbon/affecting = null//The wearer. + var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New(). + var/datum/effect/effect/system/spark_spread/spark_system//To create sparks. + var/reagent_list[] = list("tricordrazine","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New(). + var/stored_research[]//For stealing station research. + var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk. //Other articles of ninja gear worn together, used to easily reference them after initializing. - obj/item/clothing/head/helmet/space/space_ninja/n_hood - obj/item/clothing/shoes/space_ninja/n_shoes - obj/item/clothing/gloves/space_ninja/n_gloves + var/obj/item/clothing/head/helmet/space/space_ninja/n_hood + var/obj/item/clothing/shoes/space_ninja/n_shoes + var/obj/item/clothing/gloves/space_ninja/n_gloves //Main function variables. - s_initialized = 0//Suit starts off. - s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick(). - s_cost = 5.0//Base energy cost each ntick. - s_acost = 25.0//Additional cost for additional powers active. - k_cost = 200.0//Kamikaze energy cost each ntick. - k_damage = 1.0//Brute damage potentially done by Kamikaze each ntick. - s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. - a_transfer = 20.0//How much reagent is transferred when injecting. - r_maxamount = 80.0//How much reagent in total there is. + var/s_initialized = 0//Suit starts off. + var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick(). + var/s_cost = 5.0//Base energy cost each ntick. + var/s_acost = 25.0//Additional cost for additional powers active. + var/k_cost = 200.0//Kamikaze energy cost each ntick. + var/k_damage = 1.0//Brute damage potentially done by Kamikaze each ntick. + var/s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. + var/a_transfer = 20.0//How much reagent is transferred when injecting. + var/r_maxamount = 80.0//How much reagent in total there is. //Support function variables. - spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works. - s_active = 0//Stealth off. - s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions. - kamikaze = 0//Kamikaze on or off. - k_unlock = 0//To unlock Kamikaze. + var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works. + var/s_active = 0//Stealth off. + var/s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions. + var/kamikaze = 0//Kamikaze on or off. + var/k_unlock = 0//To unlock Kamikaze. //Ability function variables. - s_bombs = 10.0//Number of starting ninja smoke bombs. - a_boost = 3.0//Number of adrenaline boosters. + var/s_bombs = 10.0//Number of starting ninja smoke bombs. + var/a_boost = 3.0//Number of adrenaline boosters. //Onboard AI related variables. - mob/living/silicon/ai/AI//If there is an AI inside the suit. - obj/item/device/paicard/pai//A slot for a pAI device - obj/effect/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay. - flush = 0//If an AI purge is in progress. - s_control = 1//If user in control of the suit. + var/mob/living/silicon/ai/AI//If there is an AI inside the suit. + var/obj/item/device/paicard/pai//A slot for a pAI device + var/obj/effect/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay. + var/flush = 0//If an AI purge is in progress. + var/s_control = 1//If user in control of the suit. diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 0aa74b947b5..62a25ab44b1 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -1,5 +1,5 @@ /obj/item/clothing/head/helmet/space/rig - name = "engineer RIG helmet" + name = "engineer hardsuit helmet" desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding." icon_state = "rig0-engineering" item_state = "rig0_engineering" @@ -10,42 +10,26 @@ color = "engineering" //Determines used sprites: rig[on]-[color] and rig[on]-[color]2 (lying down sprite) /obj/item/clothing/head/helmet/space/rig/mining - name = "mining RIG helmet" + name = "mining hardsuit helmet" icon_state = "rig0-mining" item_state = "rig0-mining" color = "mining" /obj/item/clothing/head/helmet/space/rig/elite - name = "advanced RIG helmet" + name = "advanced hardsuit helmet" icon_state = "rig0-white" item_state = "rig0-white" color = "white" -/obj/item/clothing/head/helmet/space/rig/engspace_helmet - name = "engineering space helmet" - desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off." - icon_state = "engspace_helmet" - item_state = "engspace_helmet" - see_face = 0.0 - var/up = 0 - -/obj/item/clothing/head/helmet/space/rig/cespace_helmet - name = "chief engineer's space helmet" - desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding and a visor that can be toggled on and off." - icon_state = "cespace_helmet" - item_state = "cespace_helmet" - see_face = 0.0 - var/up = 0 - /obj/item/clothing/head/helmet/space/rig/security - name = "security RIG helmet" + name = "security hardsuit helmet" icon_state = "rig0-security" color = "security" armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) /obj/item/clothing/suit/space/rig - name = "engineer RIG suit" + name = "engineer hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding." icon_state = "rig-engineering" item_state = "rig_suit" @@ -56,27 +40,15 @@ /obj/item/clothing/suit/space/rig/mining icon_state = "rig-mining" - name = "mining RIG suit" + name = "mining hardsuit" /obj/item/clothing/suit/space/rig/elite icon_state = "rig-white" - name = "advanced RIG suit" - protective_temperature = 10000 - -/obj/item/clothing/suit/space/rig/engspace_suit - name = "engineering space suit" - icon_state = "engspace_suit" - item_state = "engspace_suit" - -/obj/item/clothing/suit/space/rig/cespace_suit - name = "chief engineer's space suit" - desc = "A special suit that protects against hazardous, low pressure environments. Has radiation and fire shielding, and Chief Engineer colours." - icon_state = "cespace_suit" - item_state = "cespace_suit" + name = "advanced hardsuit" protective_temperature = 10000 /obj/item/clothing/suit/space/rig/security - name = "security RIG suit" + name = "security hardsuit" desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards" icon_state = "rig-security" item_state = "rig-security" diff --git a/code/modules/clothing/suit.dm b/code/modules/clothing/suit.dm index b312d4e6bd3..8156dc337d8 100644 --- a/code/modules/clothing/suit.dm +++ b/code/modules/clothing/suit.dm @@ -2,6 +2,7 @@ icon = 'suits.dmi' name = "suit" var/fire_resist = T0C+100 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL - var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen) + flags = FPRINT | TABLEPASS + allowed = list(/obj/item/weapon/tank/emergency_oxygen) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + slot_flags = SLOT_OCLOTHING diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 75a8fbfa406..dae33f4a011 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -10,7 +10,7 @@ desc = "An armored vest that protects against some damage." icon_state = "armor" item_state = "armor" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) /obj/item/clothing/suit/armor/vest/warden @@ -51,7 +51,7 @@ icon_state = "gearharness" item_state = "gearharness" body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/pepperspray,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/taperoll/police) flags_inv = 0 @@ -62,7 +62,7 @@ icon_state = "reactiveoff" item_state = "reactiveoff" slowdown = 1 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/suit/storage/armourrigvest @@ -71,7 +71,7 @@ icon_state = "armourrigvest" item_state = "armourrigvest" body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/pepperspray,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/taperoll/police) armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) diff --git a/code/modules/clothing/suits/detective.dm b/code/modules/clothing/suits/detective.dm index 7b07ce3a8d0..269bf437af1 100644 --- a/code/modules/clothing/suits/detective.dm +++ b/code/modules/clothing/suits/detective.dm @@ -21,7 +21,7 @@ desc = "An armored vest with a detective's badge on it." icon_state = "detective-armor" item_state = "armor" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/taperoll/police) armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) diff --git a/code/modules/clothing/suits/fire.dm b/code/modules/clothing/suits/fire.dm index 42dc200379a..7f03617caa5 100644 --- a/code/modules/clothing/suits/fire.dm +++ b/code/modules/clothing/suits/fire.dm @@ -28,6 +28,18 @@ protective_temperature = 10000 slowdown = 1.5 +/obj/item/clothing/head/helmet/space/fire_helmet + name = "Fire Helmet" + desc = "A helmet designed to protect against fires in sealed areas, which often create extreme pressures." + flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR + see_face = 0.0 + permeability_coefficient = 0.01 + heat_transfer_coefficient = 0.01 + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES + icon_state = "hazmat_firered" + item_state = "hazhat_firered" + /obj/item/clothing/head/radiation diff --git a/code/modules/clothing/suits/heavy.dm b/code/modules/clothing/suits/heavy.dm index c05940bf6ab..0a97bfaa5fc 100644 --- a/code/modules/clothing/suits/heavy.dm +++ b/code/modules/clothing/suits/heavy.dm @@ -74,7 +74,7 @@ icon_state = "invisible" item_state = "invisible" body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/pepperspray,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/taperoll/police) armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) flags_inv = 0 diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 5a2a9e2a5d5..f1ebd585db9 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -48,5 +48,11 @@ /obj/item/clothing/suit/storage/labcoat/fr_jacket name = "first responder jacket" - desc = "\"The first moments are the most crucial.\"" + desc = "A high-visibility jacket worn by medical first responders." icon_state = "fr_jacket_open" + item_state = "fr_jacket" + +/obj/item/clothing/suit/storage/labcoat/fr_jacket/sleeve + name = "first responder jacket" + desc = "A high-visibility jacket worn by medical first responders. Has rolled up sleeves." + icon_state = "fr_sleeve_open" diff --git a/code/modules/clothing/uniforms/lawyer.dm b/code/modules/clothing/uniforms/lawyer.dm index 5bce12301ab..95592729258 100644 --- a/code/modules/clothing/uniforms/lawyer.dm +++ b/code/modules/clothing/uniforms/lawyer.dm @@ -60,6 +60,6 @@ desc = "This robe commands authority." icon_state = "judge" item_state = "judge" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/money) diff --git a/code/modules/critters/critter.dm b/code/modules/critters/critter.dm index 854765817c1..cffef459002 100644 --- a/code/modules/critters/critter.dm +++ b/code/modules/critters/critter.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/effect/critter name = "Critter" desc = "Generic critter." @@ -6,79 +8,78 @@ layer = 5.0 density = 1 anchored = 0 - var - alive = 1 - health = 10 - max_health = 10 - aggression = 100 - speed = 8 - list/access_list = list()//accesses go here + var/alive = 1 + var/health = 10 + var/max_health = 10 + var/aggression = 100 + var/speed = 8 + var/list/access_list = list()//accesses go here //AI things - task = "thinking" + var/task = "thinking" //Attacks at will - aggressive = 1 + var/aggressive = 1 //Will target an attacker - defensive = 0 + var/defensive = 0 //Will randomly move about - wanderer = 1 + var/wanderer = 1 //Will open doors it bumps ignoring access - opensdoors = 0 + var/opensdoors = 0 //Will randomly travel through vents - ventcrawl = 0 + var/ventcrawl = 0 //Internal tracking ignore - frustration = 0 - max_frustration = 8 - attack = 0 - attacking = 0 - steps = 0 - last_found = null - target = null - oldtarget_name = null - target_lastloc = null + var/frustration = 0 + var/max_frustration = 8 + var/attack = 0 + var/attacking = 0 + var/steps = 0 + var/last_found = null + var/target = null + var/oldtarget_name = null + var/target_lastloc = null - thinkspeed = 15 - chasespeed = 4 - wanderspeed = 10 + var/thinkspeed = 15 + var/chasespeed = 4 + var/wanderspeed = 10 //The last guy who attacked it - attacker = null + var/attacker = null //Will not attack this thing - friend = null + var/friend = null //How far to look for things dont set this overly high - seekrange = 7 + var/seekrange = 7 //If true will attack these things - atkcarbon = 1 - atksilicon = 0 - atkcritter = 0 + var/atkcarbon = 1 + var/atksilicon = 0 + var/atkcritter = 0 //Attacks critters of the same type - atksame = 0 - atkmech = 0 + var/atksame = 0 + var/atkmech = 0 //Attacks syndies/traitors (distinguishes via mind) - atksynd = 1 + var/atksynd = 1 //Attacks things NOT in its obj/req_access list - atkreq = 0 + var/atkreq = 0 //Damage multipliers - brutevuln = 1 - firevuln = 1 + var/brutevuln = 1 + var/firevuln = 1 //DR - armor = 0 + var/armor = 0 //How much damage it does it melee - melee_damage_lower = 1 - melee_damage_upper = 2 + var/melee_damage_lower = 1 + var/melee_damage_upper = 2 //Basic attack message when they move to attack and attack - angertext = "charges at" - attacktext = "attacks" - deathtext = "dies!" + var/angertext = "charges at" + var/attacktext = "attacks" + var/deathtext = "dies!" - chasestate = null // the icon state to use when attacking or chasing a target - attackflick = null // the icon state to flick when it attacks - attack_sound = null // the sound it makes when it attacks! + var/chasestate = null // the icon state to use when attacking or chasing a target + var/attackflick = null // the icon state to flick when it attacks + var/attack_sound = null // the sound it makes when it attacks! - attack_speed = 25 // delay of attack + var/attack_speed = 25 // delay of attack proc @@ -135,4 +136,4 @@ -*/ \ No newline at end of file +*/ diff --git a/code/modules/critters/hivebots/hivebot.dm b/code/modules/critters/hivebots/hivebot.dm index 329660fe248..bfc2709fbe5 100644 --- a/code/modules/critters/hivebots/hivebot.dm +++ b/code/modules/critters/hivebots/hivebot.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/projectile/hivebotbullet damage = 5 damage_type = BRUTE @@ -25,9 +27,8 @@ melee_damage_upper = 3 angertext = "leaps at" attacktext = "claws" - var - ranged = 0 - rapid = 0 + var/ranged = 0 + var/rapid = 0 proc Shoot(var/target, var/start, var/user, var/bullet = 0) OpenFire(var/thing)//bluh ill rename this later or somethin @@ -186,12 +187,11 @@ seekrange = 2 armor = 10 - var - bot_type = "norm" - bot_amt = 10 - spawn_delay = 600 - turn_on = 0 - auto_spawn = 1 + var/bot_type = "norm" + var/bot_amt = 10 + var/spawn_delay = 600 + var/turn_on = 0 + var/auto_spawn = 1 proc warpbots() @@ -247,4 +247,4 @@ /obj/effect/critter/hivebot/tele/rapid bot_type = "rapid" - spawn_delay = 800 \ No newline at end of file + spawn_delay = 800 diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 0d87b19a3dc..7b2c7e55916 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -96,7 +96,7 @@ icon_state = "johann_erzatz_1" volume = 50 -/obj/item/weapon/lighter/zippo/fluff/li_tsun_1 //mangled: Li Tsun +/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda name = "blue zippo lighter" desc = "A zippo lighter made of some blue metal." icon = 'custom_items.dmi' @@ -142,6 +142,16 @@ //////////// Clothing //////////// ////////////////////////////////// +//////////// Gloves //////////// + +/obj/item/clothing/gloves/fluff/walter_brooks_1 //botanistpower: Walter Brooks + name = "mittens" + desc = "A pair of well worn, blue mittens." + icon = 'custom_items.dmi' + icon_state = "walter_brooks_1" + item_state = "bluegloves" + color="blue" + //////////// Eye Wear //////////// /obj/item/clothing/glasses/meson/fluff/book_berner_1 //asanadas: Book Berner diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 8750adbc0c0..ee260eeecbe 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -37,14 +37,14 @@ mob/living/carbon/proc/handle_hallucinations() //src << "Traitor Items" if(!halitem) halitem = new - var/list/slots_free = list("1,1","3,1") - if(l_hand) slots_free -= "1,1" - if(r_hand) slots_free -= "3,1" + var/list/slots_free = list(ui_lhand,ui_rhand) + if(l_hand) slots_free -= ui_lhand + if(r_hand) slots_free -= ui_rhand if(istype(src,/mob/living/carbon/human)) var/mob/living/carbon/human/H = src - if(!H.belt) slots_free += "3,0" - if(!H.l_store) slots_free += "4,0" - if(!H.r_store) slots_free += "5,0" + if(!H.belt) slots_free += ui_belt + if(!H.l_store) slots_free += ui_storage1 + if(!H.r_store) slots_free += ui_storage2 if(slots_free.len) halitem.screen_loc = pick(slots_free) halitem.layer = 50 diff --git a/code/modules/flufftext/TextFilters.dm b/code/modules/flufftext/TextFilters.dm index cc228dbbe19..613454ff550 100644 --- a/code/modules/flufftext/TextFilters.dm +++ b/code/modules/flufftext/TextFilters.dm @@ -1,9 +1,11 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + proc/Intoxicated(phrase) phrase = html_decode(phrase) - var - leng=lentext(phrase) - counter=lentext(phrase) - newphrase="";newletter="" + var/leng=lentext(phrase) + var/counter=lentext(phrase) + var/newphrase="" + var/newletter="" while(counter>=1) newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2) if(rand(1,3)==3) @@ -78,4 +80,4 @@ proc/Ellipsis(original_msg, chance = 50) new_msg = dd_list2text(new_words," ") - return new_msg \ No newline at end of file + return new_msg diff --git a/code/modules/food/food.dm b/code/modules/food/food.dm index b820fd6c179..774c5c457d2 100644 --- a/code/modules/food/food.dm +++ b/code/modules/food/food.dm @@ -20,6 +20,8 @@ // name = "Xenoburger" //Name that displays in the UI. // desc = "Smells caustic. Tastes like heresy." //Duh // icon_state = "xburger" //Refers to an icon in food.dmi +// eatsound = 'eatfood.ogg' //Don't touch this if you want your food to have a crunch sound. +// trash = "plate" //Refers to the trash item. // New() //Don't mess with this. // ..() //Same here. // reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste @@ -944,6 +946,7 @@ name = "Meatball soup" desc = "Smells like copper" icon_state = "meatballsoup" + eatsound = 'drink.ogg' New() ..() reagents.add_reagent("nutriment", 2) @@ -954,6 +957,7 @@ /obj/item/weapon/reagent_containers/food/snacks/clownstears name = "Clown's Tears" desc = "Not very funny." + eatsound = 'drink.ogg' icon_state = "clownstears" New() ..() @@ -967,6 +971,7 @@ desc = "A true vegan meal" //TODO icon_state = "vegetablesoup" trash = "snack_bowl" + eatsound = 'drink.ogg' New() ..() reagents.add_reagent("nutriment", 10) @@ -977,6 +982,7 @@ name = "Nettle soup" desc = "To think, the botanist would've beat you to death with one of these." icon_state = "nettlesoup" + eatsound = 'drink.ogg' trash = "snack_bowl" New() ..() @@ -989,6 +995,7 @@ name = "Mystery soup" desc = "The mystery is, why aren't you eating it?" icon_state = "mysterysoup" + eatsound = 'drink.ogg' trash = "snack_bowl" New() ..() @@ -1035,6 +1042,7 @@ desc = "I wish this was soup." icon_state = "wishsoup" trash = "snack_bowl" + eatsound = 'drink.ogg' New() ..() reagents.add_reagent("water", 10) @@ -1096,7 +1104,7 @@ reagents.add_reagent("nutriment",12) afterattack(obj/O as obj, mob/user as mob) - if(istype(O,/obj/machinery/sink) && !wrapped) + if(istype(O,/obj/structure/sink) && !wrapped) user << "You place [name] under a stream of water..." loc = get_turf(O) return Expand() @@ -1224,6 +1232,7 @@ desc = "Drinking this feels like being a vampire! A tomato vampire..." icon_state = "tomatosoup" trash = "snack_bowl" + eatsound = 'drink.ogg' New() ..() reagents.add_reagent("nutriment", 5) @@ -1245,6 +1254,7 @@ name = "Stew" desc = "A nice and warm stew. Healthy and strong." icon_state = "stew" + eatsound = 'drink.ogg' New() ..() reagents.add_reagent("nutriment", 20) @@ -1416,6 +1426,7 @@ name = "chantrelle soup" desc = "A delicious and hearty mushroom soup." icon_state = "mushroomsoup" + eatsound = 'drink.ogg' trash = "snack_bowl" New() ..() @@ -1471,6 +1482,20 @@ reagents.add_reagent("nutriment", 8) bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/liquidfood + name = "\improper \"LiquidFood\" ration" + icon_state = "liquidfood" + desc = "A bland, tasteless pulp of what you need to survive. Packaged in a airtight bag, which you can drink through a straw. Strangely crunchy." + eatsound = 'drink.ogg' + trash = "liquidfood" + var/flavored = 0 + New() + ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 2) + bitesize = 6 + /////////////////////////////////////////////////Sliceable//////////////////////////////////////// // All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels @@ -2022,6 +2047,27 @@ else ..() +// Liquidfood + Flavoring = Flavored Liquidfood! :P +/obj/item/weapon/reagent_containers/food/snacks/liquidfood/attackby(obj/item/weapon/flavor/W as obj, mob/user as mob) + // Check if already flavored + if(istype(W)) + if (flavored) + user << "You cannot add flavoring to an already flavored ration, however bland it may be." + return + + user.visible_message("\The [user] adds [prob(30) ? "some of" : ""] \a [W] to \a [src], mixing it into [W.descriptor] gruel.",\ + "You add \the [W] into your bland [src]. As you mix it into a grotesquely [W.color] paste, you reflect that this was not a wise decision.",\ + "You hear a small tinfoil package being ripped open, then the sound of a thick paste being mixed.") + name = "[W.color] \"LiquidFood\" ration" + icon_state = "liquidfood-[W.color]" + desc = "A flavored pulp of nutritional essentials. [W.newDesc]" + flavored = 1 + + del(W) + return + + return ..() + /obj/item/weapon/reagent_containers/food/snacks/taco name = "taco" desc = "Take a bite!" diff --git a/code/modules/icon generation/Bluespaced.dm b/code/modules/icon generation/Bluespaced.dm new file mode 100644 index 00000000000..697b9e97196 --- /dev/null +++ b/code/modules/icon generation/Bluespaced.dm @@ -0,0 +1,243 @@ +/proc/bsi_cast_ray(icon/I, list/start, list/end) + + if(abs(start[1] - end[1]) > abs(start[2] - end[2])) + var/dist = abs(start[1] - end[1]) * 2 + + for(var/i = 1, i <= dist, i++) + var/x = round((start[1] * i / dist) + (end[1] * (1 - i / dist))) + var/y = round((start[2] * i / dist) + (end[2] * (1 - i / dist))) + + if(I.GetPixel(x, y) != null) + return list(x, y) + + else + var/dist = abs(start[2] - end[2]) * 2 + + for(var/i = 1, i <= dist, i++) + var/x = round((start[1] * i / dist) + (end[1] * (1 - i / dist))) + var/y = round((start[2] * i / dist) + (end[2] * (1 - i / dist))) + + if(I.GetPixel(x, y) != null) + return list(x, y) + + return null + +/proc/bsi_split_colors(color) + if(color == null) + return list(0, 0, 0, 0) + + var/list/colors = list(0, 0, 0, 0) + colors[1] = hex2num(copytext(color, 2, 4)) + colors[2] = hex2num(copytext(color, 4, 6)) + colors[3] = hex2num(copytext(color, 6, 8)) + colors[4] = (length(color) > 7)? hex2num(copytext(color, 8, 10)) : 255 + + return colors + +/proc/bsi_spread(icon/I, list/start_point) + var/list/queue = list() + queue[++queue.len] = start_point + + var/i = 0 + + while(i++ < length(queue)) + var/x = queue[i][1] + var/y = queue[i][2] + + var/list/pixel = bsi_split_colors(I.GetPixel(x, y)) + if(pixel[4] == 0) + continue + + var/list/n = (y < I.Height())? bsi_split_colors(I.GetPixel(x, y + 1)) : list(0, 0, 0, 0) + var/list/s = (y > 1)? bsi_split_colors(I.GetPixel(x, y - 1)) : list(0, 0, 0, 0) + var/list/e = (x < I.Width())? bsi_split_colors(I.GetPixel(x + 1, y)) : list(0, 0, 0, 0) + var/list/w = (x > 1)? bsi_split_colors(I.GetPixel(x - 1, y)) : list(0, 0, 0, 0) + + var/value = (i == 1)? 16 : max(n[1] - 1, e[1] - 1, s[1] - 1, w[1] - 1) + + if(prob(50)) + value = max(0, value - 1) + + if(prob(50)) + value = max(0, value - 1) + + if(prob(50)) + value = max(0, value - 1) + + if(value <= pixel[1]) + continue + + var/v2 = 256 - ((16 - value) * (16 - value)) + + I.DrawBox(rgb(value, v2, pixel[4] - v2, pixel[4]), x, y) + + if(n[4] != 0 && n[1] < value - 1) + queue[++queue.len] = list(x, y + 1) + + if(s[4] != 0 && s[1] < value - 1) + queue[++queue.len] = list(x, y - 1) + + if(e[4] != 0 && e[1] < value - 1) + queue[++queue.len] = list(x + 1, y) + + if(w[4] != 0 && w[1] < value - 1) + queue[++queue.len] = list(x - 1, y) + + + + + +/proc/bsi_generate_mask(icon/source, state) + var/icon/mask = icon(source, state) + + mask.MapColors( + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 1, 1, + 0, 0, 0, 0) + + var/hits = 0 + + for(var/i = 1, i <= 10, i++) + var/point1 + var/point2 + + if(prob(50)) + if(prob(50)) + point1 = list(rand(1, mask.Width()), mask.Height()) + point2 = list(rand(1, mask.Width()), 1) + + else + point2 = list(rand(1, mask.Width()), mask.Height()) + point1 = list(rand(1, mask.Width()), 1) + + else + if(prob(50)) + point1 = list(mask.Width(), rand(1, mask.Height())) + point2 = list(1, rand(1, mask.Height())) + + else + point2 = list(mask.Width(), rand(1, mask.Height())) + point1 = list(1, rand(1, mask.Height())) + + var/hit = bsi_cast_ray(mask, point1, point2) + + if(hit == null) + continue + + hits++ + + bsi_spread(mask, hit) + + if(prob(20 + hits * 20)) + break + + if(hits == 0) + return null + + else + return mask + +/proc/generate_bluespace_icon(icon/source, state) + + var/icon/mask = bsi_generate_mask(source, state) + + if(mask == null) + return source + + var/icon/unaffected = icon(mask) + unaffected.MapColors( + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 1, + 0, 0, 0, 0, + 255, 255, 255, 0) + + var/icon/temp = icon(source, state) //Mask already contains the original alpha values, avoid squaring them + temp.MapColors( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 0, + 0, 0, 0, 255) + + unaffected.Blend(temp, ICON_MULTIPLY) + + var/icon/bluespaced = icon(mask) + bluespaced.MapColors( + 0, 0, 0, 0, + 0, 0, 0, 1, + 0, 0, 0, 0, + 0, 0, 0, 0, + 1, 1, 1, 0) + + bluespaced.Blend(icon(source, state), ICON_MULTIPLY) + + var/list/frames = list( + list(0.000,20), + list(0.020, 5), + list(0.050, 4), + list(0.080, 5), + list(0.100,10), + list(0.080, 5), + list(0.050, 4), + list(0.020, 5), + + list(0.000,20), + list(0.020, 5), + list(0.050, 4), + list(0.080, 5), + list(0.100,10), + list(0.080, 5), + list(0.050, 4), + list(0.020, 5), + + list(0.000,20), + list(0.020, 5), + list(0.050, 4), + list(0.080, 5), + list(0.100,10), + list(0.080, 5), + list(0.050, 4), + list(0.020, 5), + ) + + var/list/colors = list( + list( 75, 75, 75, 0), + list( 25, 25, 25, 0), + list( 75, 75, 75, 0), + list( 25, 25, 75, 0), + list( 75, 75, 300, 0), + list( 25, 25, 300, 0), + list(255, 255, 255, 0), + list( 0, 0, 0, 255), + list( 0, 0, 0, 0), + list( 0, 0, 0, 0), + ) + + for(var/i = 1, i <= rand(1, 5), i++) + var/f = rand(1, length(frames)) + + if(frames[f][2] > 1) + frames[f][2]-- + frames.Insert(f, 0) + + frames[f] = list(0.8, 1) + + var/icon/result = generate_color_animation(bluespaced, colors, frames) + result.Blend(unaffected, ICON_UNDERLAY) + + return result + + + +/atom/verb/test() + set src in view() + src.icon = generate_bluespace_icon(src.icon, src.icon_state) + +/mob/verb/bluespam() + for(var/turf/t in view(5)) + var/obj/s = new /obj/square(t) + s.icon = generate_bluespace_icon(s.icon, s.icon_state) + diff --git a/code/modules/icon generation/Icon_color_animation.dm b/code/modules/icon generation/Icon_color_animation.dm new file mode 100644 index 00000000000..9681722fcb3 --- /dev/null +++ b/code/modules/icon generation/Icon_color_animation.dm @@ -0,0 +1,96 @@ +//---------------------------------------- +// +// Return a copy of the provided icon, +// after calling MapColors on it. The +// color values are linearily interpolated +// between the pairs provided, based on +// the ratio argument. +// +//---------------------------------------- + +/proc/MapColors_interpolate(icon/input, ratio, + rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2, + gr1, gg1, gb1, ga1, gr2, gg2, gb2, ga2, + br1, bg1, bb1, ba1, br2, bg2, bb2, ba2, + ar1, ag1, ab1, aa1, ar2, ag2, ab2, aa2, + zr1, zg1, zb1, za1, zr2, zg2, zb2, za2) + var/r = ratio + var/i = 1 - ratio + var/icon/I = icon(input) + + I.MapColors( + (rr1 * r + rr2 * i) / 255.0, (rg1 * r + rg2 * i) / 255.0, (rb1 * r + rb2 * i) / 255.0, (ra1 * r + ra2 * i) / 255.0, + (gr1 * r + gr2 * i) / 255.0, (gg1 * r + gg2 * i) / 255.0, (gb1 * r + gb2 * i) / 255.0, (ga1 * r + ga2 * i) / 255.0, + (br1 * r + br2 * i) / 255.0, (bg1 * r + bg2 * i) / 255.0, (bb1 * r + bb2 * i) / 255.0, (ba1 * r + ba2 * i) / 255.0, + (ar1 * r + ar2 * i) / 255.0, (ag1 * r + ag2 * i) / 255.0, (ab1 * r + ab2 * i) / 255.0, (aa1 * r + aa2 * i) / 255.0, + (zr1 * r + zr2 * i) / 255.0, (zg1 * r + zg2 * i) / 255.0, (zb1 * r + zb2 * i) / 255.0, (za1 * r + za2 * i) / 255.0) + + return I + + + + +//---------------------------------------- +// +// Extension of the above that takes a +// list of lists of color values, rather +// than a large number of arguments. +// +//---------------------------------------- + +/proc/MapColors_interpolate_list(icon/I, ratio, list/colors) + var/list/c[10] + + //Provide default values for any missing colors (without altering the original list + for(var/i = 1, i <= 10, i++) + c[i] = list(0, 0, 0, (i == 7 || i == 8)? 255 : 0) + + if(istype(colors[i], /list)) + for(var/j = 1, j <= 4, j++) + if(j <= length(colors[i]) && isnum(colors[i][j])) + c[i][j] = colors[i][j] + + return MapColors_interpolate(I, ratio, + colors[ 1][1], colors[ 1][2], colors[ 1][3], colors[ 1][4], // Red 1 + colors[ 2][1], colors[ 2][2], colors[ 2][3], colors[ 2][4], // Red 2 + colors[ 3][1], colors[ 3][2], colors[ 3][3], colors[ 3][4], // Green 1 + colors[ 4][1], colors[ 4][2], colors[ 4][3], colors[ 4][4], // Green 2 + colors[ 5][1], colors[ 5][2], colors[ 5][3], colors[ 5][4], // Blue 1 + colors[ 6][1], colors[ 6][2], colors[ 6][3], colors[ 6][4], // Blue 2 + colors[ 7][1], colors[ 7][2], colors[ 7][3], colors[ 7][4], // Alpha 1 + colors[ 8][1], colors[ 8][2], colors[ 8][3], colors[ 8][4], // Alpha 2 + colors[ 9][1], colors[ 9][2], colors[ 9][3], colors[ 9][4], // Added 1 + colors[10][1], colors[10][2], colors[10][3], colors[10][4]) // Added 2 + + + + + +//---------------------------------------- +// +// Take the source image, and return an animated +// version, that transitions between the provided +// color mappings, according to the provided +// pattern. +// +// Colors should be in a format suitable for +// MapColors_interpolate_list, and frames should +// be a list of 'frames', where each frame is itself +// a list, element 1 being the ratio of the first +// color to the second, and element 2 being how +// long the frame lasts, in tenths of a second. +// +//---------------------------------------- + +/proc/generate_color_animation(icon/icon, list/colors, list/frames) + var/icon/out = icon('uristrunes.dmi', "") + var/frame_num = 1 + + for(var/frame in frames) + var/icon/I = MapColors_interpolate_list(icon, frame[1], colors) + out.Insert(I, "", 2, frame_num++, 0, frame[2]) + + return out + + + diff --git a/code/modules/icon generation/Uristrunes.dm b/code/modules/icon generation/Uristrunes.dm new file mode 100644 index 00000000000..3f33f8fed53 --- /dev/null +++ b/code/modules/icon generation/Uristrunes.dm @@ -0,0 +1,268 @@ +//---------------------------------------- +// +// Take a source icon, convert into a mask, +// then create a border around it. +// +// The output then uses the colors and +// alpha values provided. +// +//---------------------------------------- + +/proc/create_border_image(icon/input, border_color = "#000000", fill_color = "#000000", border_alpha = 255, fill_alpha = 255) + var/icon/I = icon('uristrunes.dmi', "blank") + I.Blend(input, ICON_OVERLAY) + + //Discard the image + I.MapColors(0, 0, 0, 0, //-\ Ignore + 0, 0, 0, 0, //--> The + 0, 0, 0, 0, //-/ Colors + 0,255, 0, 1, //Keep alpha channel, any pixel with non-zero alpha gets max green channel + 0, 0, 0, 0) + + //Loop over the image, calculating the border value, and storing it in the red channel + //Store border's alpha in the blue channel + for(var/x = 1, x <= 32, x++) + for(var/y = 1, y <= 32, y++) + var/p = I.GetPixel(x, y) + + if(p == null) + var/n = I.GetPixel(x, y + 1) + var/s = I.GetPixel(x, y - 1) + var/e = I.GetPixel(x + 1, y) + var/w = I.GetPixel(x - 1, y) + var/ne = I.GetPixel(x + 1, y + 1) + var/se = I.GetPixel(x + 1, y - 1) + var/nw = I.GetPixel(x - 1, y + 1) + var/sw = I.GetPixel(x - 1, y - 1) + + var/sum_adj = ((n == "#00ff00"? 1 : 0) \ + + (s == "#00ff00"? 1 : 0) \ + + (e == "#00ff00"? 1 : 0) \ + + (w == "#00ff00"? 1 : 0)) + + var/sum_diag = ((ne == "#00ff00"? 1 : 0) \ + + (se == "#00ff00"? 1 : 0) \ + + (nw == "#00ff00"? 1 : 0) \ + + (sw == "#00ff00"? 1 : 0)) + + + if(sum_adj) + I.DrawBox(rgb(255, 0, 200, 0), x, y) + + else if(sum_diag) + I.DrawBox(rgb(255, 0, 100, 0), x, y) + + else + I.DrawBox(rgb(0, 0, 0, 0), x, y) + + else if(p != "#00ff00") + var/a = 255 + + if(length(p) == 9) // "#rrggbbaa", we want the aa + a = hex2num(copytext(p, 8)) + + I.DrawBox(rgb(255 - a, a, 255 - a, a), x, y) + + //Map the red and green channels to the desired output colors + I.MapColors(border_color, fill_color, rgb(0, 0, 0, border_alpha), rgb(0, 0, 0, fill_alpha), "#00000000") + + return I + + + + +//---------------------------------------- +// +// Take a source icon, convert into a mask, +// and border. Color them according to args, +// and animate. +// +//---------------------------------------- + +/proc/animate_rune_full(icon/input, rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2, br1, bg1, bb1, ba1, br2, bg2, bb2, ba2, ar1, ag1, ab1, aa1, ar2, ag2, ab2, aa2, or1, og1, ob1, oa1, or2, og2, ob2, oa2, frames) + + var/list/colors[10] + colors[ 1] = list(rr1, rg1, rb1, ra1) //Rune color 1 + colors[ 2] = list(rr2, rg2, rb2, ra2) //Rune color 2 + colors[ 3] = list(br1, bg1, bb1, ba1) //Border color 1 + colors[ 4] = list(br2, bg2, bb2, ba2) //Border color 2 + colors[ 5] = list( 0, 0, 0, 0) //Unused + colors[ 6] = list( 0, 0, 0, 0) //Unused + colors[ 7] = list(ar1, ag1, ab1, aa1) //Alpha color 1 + colors[ 8] = list(ar2, ag2, ab2, aa2) //Alpha color 2 + colors[ 9] = list(or1, og1, ob1, oa1) //Added color 1 + colors[10] = list(or2, og2, ob2, oa2) //Added color 2 + + var/icon/base = create_border_image(input, "#00ff0000", "#ff000000") + + return generate_color_animation(base, colors, frames) + + + + +//---------------------------------------- +// +// Calls the above, but accepts colors in +// the form of "#RRGGBBAA", and provides +// default values. +// +// Main limit is that it doesn't accept +// negative values, which you probably +// don't need anyway. Also missing a few +// color inputs, which would also be rarely +// used. +// +//---------------------------------------- + + +/proc/animate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000", rune_color2 = "#00000000", border_color2 = "#d8380000", alpha = 255, alpha2 = 255, frames = rune_animation) + var/rr1 = hex2num(copytext(rune_color, 2, 4)) + var/rg1 = hex2num(copytext(rune_color, 4, 6)) + var/rb1 = hex2num(copytext(rune_color, 6, 8)) + var/ra1 = hex2num(copytext(rune_color, 8, 10)) + var/rr2 = hex2num(copytext(rune_color2, 2, 4)) + var/rg2 = hex2num(copytext(rune_color2, 4, 6)) + var/rb2 = hex2num(copytext(rune_color2, 6, 8)) + var/ra2 = hex2num(copytext(rune_color2, 8, 10)) + var/br1 = hex2num(copytext(border_color, 2, 4)) + var/bg1 = hex2num(copytext(border_color, 4, 6)) + var/bb1 = hex2num(copytext(border_color, 6, 8)) + var/ba1 = hex2num(copytext(border_color, 8, 10)) + var/br2 = hex2num(copytext(border_color2, 2, 4)) + var/bg2 = hex2num(copytext(border_color2, 4, 6)) + var/bb2 = hex2num(copytext(border_color2, 6, 8)) + var/ba2 = hex2num(copytext(border_color2, 8, 10)) + + return animate_rune_full(input, rr1, rg1, rb1, ra1, rr2, rg2, rb2, ra2, br1, bg1, bb1, ba1, br2, bg2, bb2, ba2, 0, 0, 0, alpha, 0, 0, 0, alpha2, 0, 0, 0, 0, 0, 0, 0, 0, frames) + + +/proc/inanimate_rune(icon/input, rune_color = "#00000000", border_color = "#c8000000") + var/icon/base = create_border_image(input, "#00ff0000", "#ff000000") + + base.MapColors(rune_color, border_color, "#00000000", "#000000ff", "#00000000") + + return base + +var/list/rune_animation = list( + list(0.000, 5), + list(0.020, 1), + list(0.050, 1), + list(0.090, 1), + list(0.140, 1), + list(0.200, 1), + list(0.270, 1), + list(0.340, 1), + list(0.420, 1), + list(0.500, 1), + list(0.590, 1), + list(0.675, 1), + list(0.750, 1), + list(0.900, 1), + list(1.000, 6), + list(0.875, 1), + list(0.750, 1), + list(0.625, 1), + list(0.500, 1), + list(0.375, 1), + list(0.250, 1), + list(0.125, 1), + ) + +/var/list/rune_cache = list() + +/proc/get_rune(rune_bits, animated = 0) + var/lookup = "[rune_bits]-[animated]" + + if(lookup in rune_cache) + return rune_cache[lookup] + + var/icon/base = icon('uristrunes.dmi', "") + + for(var/i = 0, i < 10, i++) + if(rune_bits & (1 << i)) + base.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY) + + var/icon/result + + if(animated == 1) + result = animate_rune(base) + + else + result = inanimate_rune(base) + + rune_cache[lookup] = result + return result + + + + + +// Testing procs and Fun procs + + + + +/mob/verb/create_rune() + var/obj/o = new(locate(x, y, z)) + o.icon = get_rune(rand(1, 1023), 1) + +/mob/verb/runes_15x15() + for(var/turf/t in range(7)) + var/obj/o = new /obj(t) + o.icon = get_rune(rand(1, 1023), 1) + + +/* +/mob/verb/create_rune_custom(rune as num, color1 as color, border1 as color, color2 as color, border2 as color, alpha1 as num, alpha2 as num) + var/icon/I = icon('uristrunes.dmi', "blank") + + for(var/i = 0, i < 10, i++) + if(rune & (1 << i)) + I.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY) + + var/obj/o = new(locate(x, y, z)) + o.icon = animate_rune(I, color1, border1, color2, border2, alpha1, alpha2) + +/mob/verb/spam() + for(var/turf/t in range(4)) + var/icon/I = icon('uristrunes.dmi', "blank") + + var/rune = rand(1, 1023) + for(var/i = 0, i < 10, i++) + if(rune & (1 << i)) + I.Blend(icon('uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY) + + var/obj/o = new(t) + o.icon = animate_rune_full(I, rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255), + rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255), + rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255), + rand(0, 255), rand(0, 255), rand(0, 255), rand(-255, 255), + 0, 0, 0, rand(0, 255), + 0, 0, 0, rand(0, 255), + 0, 0, 0, 0, + 0, 0, 0, 0, + list( + list(0.000, 5), + list(0.020, 1), + list(0.050, 1), + list(0.090, 1), + list(0.140, 1), + list(0.200, 1), + list(0.270, 1), + list(0.340, 1), + list(0.420, 1), + list(0.500, 1), + list(0.590, 1), + list(0.675, 1), + list(0.750, 1), + list(0.900, 1), + list(1.000, 6), + list(0.875, 1), + list(0.750, 1), + list(0.625, 1), + list(0.500, 1), + list(0.375, 1), + list(0.250, 1), + list(0.125, 1), + )) +*/ \ No newline at end of file diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 9b4425c396a..3f3faa0499f 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -88,6 +88,7 @@ proc/move_mining_shuttle() icon = 'computer.dmi' icon_state = "shuttle" req_access = list(access_mining) + circuit = "/obj/item/weapon/circuitboard/mining_shuttle" var/hacked = 0 var/location = 0 //0 = station, 1 = mining base @@ -126,6 +127,28 @@ proc/move_mining_shuttle() hacked = 1 usr << "You fried the consoles ID checking system. It's now available to everyone!" + else if(istype(W, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/mining_shuttle/M = new /obj/item/weapon/circuitboard/mining_shuttle( A ) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.anchored = 1 + + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + new /obj/item/weapon/shard( src.loc ) + A.state = 3 + A.icon_state = "3" + else + user << "\blue You disconnect the monitor." + A.state = 4 + A.icon_state = "4" + + del(src) + /******************************Lantern*******************************/ /obj/item/device/flashlight/lantern @@ -154,7 +177,8 @@ proc/move_mining_shuttle() name = "Miner's pickaxe" icon = 'items.dmi' icon_state = "pickaxe" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 15.0 throwforce = 4.0 item_state = "pickaxe" @@ -165,6 +189,7 @@ proc/move_mining_shuttle() hammer name = "Mining Sledge Hammer" + //icon_state = "sledgehammer" Waiting on sprite desc = "A mining hammer made of reinforced metal. You feel like smashing your boss in the face with this." silver @@ -238,7 +263,8 @@ proc/move_mining_shuttle() name = "Shovel" icon = 'items.dmi' icon_state = "shovel" - flags = FPRINT | TABLEPASS| CONDUCT | ONBELT + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT force = 8.0 throwforce = 4.0 item_state = "shovel" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index c06fd1cd656..c9fcec5e234 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -315,6 +315,9 @@ dug = 1 icon_plating = "asteroid_dug" icon_state = "asteroid_dug" + return + else + return else ..(W,user) if ((istype(W,/obj/item/weapon/pickaxe/drill))) @@ -336,6 +339,9 @@ dug = 1 icon_plating = "asteroid_dug" icon_state = "asteroid_dug" + return + else + return else ..(W,user) @@ -358,6 +364,9 @@ dug = 1 icon_plating = "asteroid_dug" icon_state = "asteroid_dug" + return + else + return else ..(W,user) diff --git a/code/modules/mining/satchel_ore_box.dm b/code/modules/mining/satchel_ore_box.dm index 581b97a6848..75c99097c54 100644 --- a/code/modules/mining/satchel_ore_box.dm +++ b/code/modules/mining/satchel_ore_box.dm @@ -6,7 +6,8 @@ name = "Mining Satchel" var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 50; //the number of ore pieces it can carry. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT w_class = 1 /obj/item/weapon/satchel/attack_self(mob/user as mob) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 49cb49d38b6..8340911662c 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -63,7 +63,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/proc/ghost() set category = "Ghost" set name = "Ghost" - set desc = "You cannot be revived as a ghost." /*if(stat != 2) //this check causes nothing but troubles. Commented out for Nar-Sie's sake. --rastaf0 src << "Only dead people and admins get to ghost, and admins don't use this verb to ghost while alive." diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index ba3034ad531..6b714b2dd31 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -47,7 +47,8 @@ /mob/proc/death(gibbed) timeofdeath = world.time - client.onDeath() + if(client) + client.onDeath() var/cancel = 0 for(var/mob/M in world) diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index 7c4cd8eeeca..8c271791a2d 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /mob/living/blob name = "blob fragment" real_name = "blob fragment" @@ -6,9 +8,8 @@ pass_flags = PASSBLOB see_in_dark = 8 see_invisible = 2 - var - ghost_name = "Unknown" - creating_blob = 0 + var/ghost_name = "Unknown" + var/creating_blob = 0 New() diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm index 64274d21912..ceb8536feab 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm @@ -13,7 +13,7 @@ src.resting_icon = new /icon('alien.dmi', "aliend_sleep") src.running_icon = new /icon('alien.dmi', "aliend_running") src.icon = src.stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" //Drones use the same base as generic humanoids. diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 0c156b04320..953dd4a9814 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -12,7 +12,7 @@ src.resting_icon = new /icon('alien.dmi', "alienh_sleep") src.running_icon = new /icon('alien.dmi', "alienh_running") src.icon = src.stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index 3c4e0a5a17d..b0222d60c9e 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -12,7 +12,7 @@ src.resting_icon = new /icon('alien.dmi', "aliens_sleep") src.running_icon = new /icon('alien.dmi', "aliens_running") src.icon = src.stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" diff --git a/code/modules/mob/living/carbon/alien/humanoid/hud.dm b/code/modules/mob/living/carbon/alien/humanoid/hud.dm index 67223c85fb2..7b2accc6227 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/hud.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/hud.dm @@ -146,7 +146,7 @@ using.name = "drop" using.icon = 'screen1_alien.dmi' using.icon_state = "act_drop" - using.screen_loc = ui_dropbutton + using.screen_loc = ui_dropbutton_old using.layer = 19 src.adding += using diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index bd1da4e2990..707490f2202 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -13,7 +13,7 @@ resting_icon = new /icon('alien.dmi', "alienh_sleep") running_icon = new /icon('alien.dmi', "alienh_running") icon = stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" ..() @@ -327,7 +327,7 @@ // Automatically drop anything in store / id / belt if you're not wearing a uniform. if (zone_sel) zone_sel.overlays = null - zone_sel.overlays += body_standing + zone_sel.overlays += damageicon_standing zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting)) if (lying) @@ -344,7 +344,7 @@ else icon = stand_icon - overlays += body_lying + overlays += damageicon_lying if (face_lying) overlays += face_lying @@ -352,7 +352,7 @@ if(update_icon) icon = stand_icon - overlays += body_standing + overlays += damageicon_standing if (face_standing) overlays += face_standing @@ -392,12 +392,12 @@ var/t1 = wear_suit.item_state if (!t1) t1 = wear_suit.icon_state - overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_LAYER) if (wear_suit.blood_DNA) if (istype(wear_suit, /obj/item/clothing/suit/armor)) - overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER) else - overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER) wear_suit.screen_loc = ui_alien_oclothing if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) if (handcuffed) @@ -417,9 +417,9 @@ var/t1 = head.item_state if (!t1) t1 = head.icon_state - overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = HEAD_LAYER) if (head.blood_DNA) - overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = B_HEAD_LAYER) head.screen_loc = ui_alien_head if (l_store) @@ -433,12 +433,12 @@ client.screen += contents if (r_hand) - overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1) + overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER) r_hand.screen_loc = ui_rhand if (l_hand) - overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1) + overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = INHANDS_LAYER) l_hand.screen_loc = ui_lhand @@ -601,11 +601,12 @@ ..() - if(M.gloves) - if(M.gloves.cell) + if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.cell) if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(M.gloves.cell.charge >= 2500) - M.gloves.cell.charge -= 2500 + if(G.cell.charge >= 2500) + G.cell.charge -= 2500 Weaken(5) if (stuttering < 5) @@ -678,7 +679,7 @@ attack_verb = "slash" if (prob(90)) - if (M.mutations & HULK)//HULK SMASH + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH damage += 14 spawn(0) Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index edef1ab43a4..5ab8023f2e2 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -1,10 +1,11 @@ -/mob/living/carbon/alien/humanoid - var - oxygen_alert = 0 - toxins_alert = 0 - fire_alert = 0 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - temperature_alert = 0 +/mob/living/carbon/alien/humanoid + var/oxygen_alert = 0 + var/toxins_alert = 0 + var/fire_alert = 0 + + var/temperature_alert = 0 /mob/living/carbon/alien/humanoid/Life() @@ -126,15 +127,15 @@ handle_mutations_and_radiation() if(src.getFireLoss()) - if(src.mutations & COLD_RESISTANCE || prob(50)) + if((COLD_RESISTANCE in src.mutations) || prob(50)) switch(src.getFireLoss()) if(1 to 50) src.adjustFireLoss(-1) if(51 to 100) src.adjustFireLoss(-5) - if (src.mutations & HULK && src.health <= 25) - src.mutations &= ~HULK + if ((HULK in src.mutations) && src.health <= 25) + src.mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -183,7 +184,7 @@ if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return var/datum/gas_mixture/environment = loc.return_air() - var/datum/air_group/breath + var/datum/gas_mixture/breath // HACK NEED CHANGING LATER if(src.health < 0) src.losebreath++ @@ -283,7 +284,7 @@ breath.toxins -= toxins_used breath.oxygen += toxins_used - if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -339,7 +340,7 @@ thermal_protection += 0.2 if(wear_suit && (wear_suit.flags & SUITSPACE)) thermal_protection += 3 - if(src.mutations & COLD_RESISTANCE) + if(COLD_RESISTANCE in src.mutations) thermal_protection += 5 return thermal_protection @@ -363,16 +364,17 @@ if(reagents) reagents.metabolize(src) - /*if(src.nutrition > 500 && !(src.mutations & FAT)) +/* if(src.nutrition > 500 && !(FAT in src.mutations)) if(prob(5 + round((src.nutrition - 200) / 2))) src << "\red You suddenly feel blubbery!" - src.mutations |= FAT - update_body() - if (src.nutrition < 100 && src.mutations & FAT) + src.mutations.Add(FAT) +// update_body() + if (src.nutrition < 100 && (FAT in src.mutations)) if(prob(round((50 - src.nutrition) / 100))) src << "\blue You feel fit again!" - src.mutations &= ~FAT - update_body()*/ + src.mutations.Remove(FAT) +// update_body() +*/ if (src.nutrition > 0) src.nutrition -= HUNGER_FACTOR @@ -487,7 +489,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY) + if (src.stat == 2 || (XRAY in src.mutations)) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/alien/humanoid/login.dm b/code/modules/mob/living/carbon/alien/humanoid/login.dm index 52359b7e59b..188785a9bbe 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/login.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/login.dm @@ -1,7 +1,7 @@ /mob/living/carbon/alien/humanoid/Login() ..() - update_clothing() + rebuild_appearance() if (!isturf(src.loc)) src.client.eye = src.loc diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 2924f5b9b89..a4a620eb91b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -15,7 +15,7 @@ src.resting_icon = new /icon('alien.dmi', "queen_sleep") src.running_icon = new /icon('alien.dmi', "queen_running") src.icon = src.stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" diff --git a/code/modules/mob/living/carbon/alien/larva/hud.dm b/code/modules/mob/living/carbon/alien/larva/hud.dm index 9da16a0b3bf..2614a992bf2 100644 --- a/code/modules/mob/living/carbon/alien/larva/hud.dm +++ b/code/modules/mob/living/carbon/alien/larva/hud.dm @@ -56,7 +56,7 @@ using.dir = SOUTHWEST using.icon = 'screen1_alien.dmi' using.icon_state = (mymob.m_intent == "run" ? "running" : "walking") - using.screen_loc = ui_movi_old + using.screen_loc = ui_acti using.layer = 20 src.adding += using move_intent = using diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 5e0a8156a7b..5088bec1929 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -7,7 +7,7 @@ name = text("alien larva ([rand(1, 1000)])") real_name = name spawn (1) - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" // spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist ..() @@ -28,7 +28,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) /* if(prob(70)) src << "\red You fail to push [tmob]'s fat ass out of the way." @@ -367,11 +367,12 @@ ..() - if(M.gloves) - if(M.gloves.cell) + if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.cell) if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(M.gloves.cell.charge >= 2500) - M.gloves.cell.charge -= 2500 + if(G.cell.charge >= 2500) + G.cell.charge -= 2500 Weaken(5) if (stuttering < 5) @@ -443,7 +444,7 @@ attack_verb = "slash" if (prob(90)) - if (M.mutations & HULK) + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations)) damage += 5 spawn(0) Paralyse(1) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 23e9a6ca067..a6197ad6259 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -1,10 +1,11 @@ -/mob/living/carbon/alien/larva - var - oxygen_alert = 0 - toxins_alert = 0 - fire_alert = 0 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - temperature_alert = 0 +/mob/living/carbon/alien/larva + var/oxygen_alert = 0 + var/toxins_alert = 0 + var/fire_alert = 0 + + var/temperature_alert = 0 /mob/living/carbon/alien/larva/Life() @@ -158,7 +159,7 @@ if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return var/datum/gas_mixture/environment = loc.return_air() - var/datum/air_group/breath + var/datum/gas_mixture/breath // HACK NEED CHANGING LATER if(health < 0) losebreath++ @@ -258,7 +259,7 @@ breath.toxins -= toxins_used breath.oxygen += toxins_used - if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -286,16 +287,17 @@ if(reagents) reagents.metabolize(src) - /* if(nutrition > 500 && !(mutations & FAT)) +/* if(nutrition > 500 && !(FAT in src.mutations)) if(prob(5 + round((nutrition - 200) / 2))) src << "\red You suddenly feel blubbery!" - mutations |= FAT - update_body() - if (nutrition < 100 && mutations & FAT) + mutations.Add(FAT) +// update_body() + if (nutrition < 100 && (FAT in src.mutations)) if(prob(round((50 - nutrition) / 100))) src << "\blue You feel fit again!" - mutations &= ~FAT - update_body()*/ + mutations.Add(FAT) +// update_body() +*/ if (nutrition > 0) nutrition-= HUNGER_FACTOR @@ -410,7 +412,7 @@ handle_regular_hud_updates() - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in src.mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/alien/larva/login.dm b/code/modules/mob/living/carbon/alien/larva/login.dm index e23cb0c122e..132915a70fa 100644 --- a/code/modules/mob/living/carbon/alien/larva/login.dm +++ b/code/modules/mob/living/carbon/alien/larva/login.dm @@ -1,7 +1,7 @@ /mob/living/carbon/alien/larva/Login() ..() - update_clothing() + rebuild_appearance() if (!isturf(src.loc)) src.client.eye = src.loc diff --git a/code/modules/mob/living/carbon/alien/special/_main.dm b/code/modules/mob/living/carbon/alien/special/_main.dm index 3d06fe82ac3..eb5594f3c9e 100644 --- a/code/modules/mob/living/carbon/alien/special/_main.dm +++ b/code/modules/mob/living/carbon/alien/special/_main.dm @@ -25,7 +25,7 @@ remove_special_verbs() - update_clothing() + rebuild_appearance() death(gibbed) ..() diff --git a/code/modules/mob/living/carbon/alien/special/snakeman.dm b/code/modules/mob/living/carbon/alien/special/snakeman.dm index 35dacff8788..d9829dee2be 100644 --- a/code/modules/mob/living/carbon/alien/special/snakeman.dm +++ b/code/modules/mob/living/carbon/alien/special/snakeman.dm @@ -33,7 +33,7 @@ M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/effect/snake_egg(src.loc)) visible_message("[src] injects [M] with an egg.") visible_message("The egg absorbs [M]") - M.mutations |= HUSK + M.mutations |= NOCLONE M.update_body() M.death() else diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index b0931dfee20..39b73876556 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/device/mmi name = "Man-Machine Interface" desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity." @@ -14,11 +16,10 @@ //Revised. Brainmob is now contained directly within object of transfer. MMI in this case. - var - locked = 0 - mob/living/carbon/brain/brainmob = null//The current occupant. - mob/living/silicon/robot = null//Appears unused. - obj/mecha = null//This does not appear to be used outside of reference in mecha.dm. + var/locked = 0 + var/mob/living/carbon/brain/brainmob = null//The current occupant. + var/mob/living/silicon/robot = null//Appears unused. + var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm. attackby(var/obj/item/O as obj, var/mob/user as mob) if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO @@ -132,4 +133,4 @@ brainmob << "Can't do that while incapacitated or dead." radio.listening = radio.listening==1 ? 0 : 1 - brainmob << "\blue Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast." \ No newline at end of file + brainmob << "\blue Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast." diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index fc7e81cf2a8..f9d6ce11f0b 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -1,7 +1,8 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /mob/living/carbon/brain - var - obj/item/container = null - timeofhostdeath = 0 + var/obj/item/container = null + var/timeofhostdeath = 0 New() var/datum/reagents/R = new/datum/reagents(1000) @@ -41,4 +42,4 @@ if (!container || !istype(container, /obj/item/device/mmi)) src.verbs += /mob/proc/ghost - return \ No newline at end of file + return diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index ea528b7e03f..f92036b423e 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -243,7 +243,7 @@ handle_regular_hud_updates() - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in src.mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6bf1114f09b..7c90d38b410 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -5,9 +5,9 @@ src.nutrition -= HUNGER_FACTOR/10 if(src.m_intent == "run") src.nutrition -= HUNGER_FACTOR/10 - /*if(src.mutations & FAT && src.m_intent == "run" && src.bodytemperature <= 360) - src.bodytemperature += 2*/ - +/* if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360) + src.bodytemperature += 2 +*/ /mob/living/carbon/relaymove(var/mob/user, direction) if(user in src.stomach_contents) if(prob(40)) @@ -204,10 +204,9 @@ if(src == M && istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) - src.visible_message( \ - text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \ - "\blue You check yourself for injuries." \ - ) + visible_message("\blue [src] examines [get_gender_form("itself")].", \ + "\blue You check yourself for injuries.", \ + "You hear a rustle, as someone checks about their person.") for(var/datum/organ/external/org in damaged) var/status = "" @@ -222,9 +221,11 @@ if(brutedamage > 0) status = "bruised" if(brutedamage > 20) - status = "bleeding" + status = "blugeoned" if(brutedamage > 40) status = "mangled" + if(org.bleeding && brutedamage) + status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]" if(brutedamage > 0 && burndamage > 0) status += " and " if(burndamage > 40) @@ -242,11 +243,6 @@ src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1) src.show_message(text("\blue You finish checking yourself."),1) else - var/t_him = "it" - if (src.gender == MALE) - t_him = "him" - else if (src.gender == FEMALE) - t_him = "her" if (istype(src,/mob/living/carbon/human) && src:w_uniform) var/mob/living/carbon/human/H = src H.w_uniform.add_fingerprint(M) @@ -259,9 +255,9 @@ AdjustWeakened(-3) playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) M.visible_message( \ - "\blue [M] shakes [src] trying to wake [t_him] up!", \ - "\blue You shake [src] trying to wake [t_him] up!", \ - ) + "\blue \The [M] shakes \the [src] trying to wake them up!", \ + "\blue You shake \the [src] trying to wake them up!", \ + "You hear someone get shaken.") //Using it or its here have he or his, which made no sense, so sticking with gender neutral for now /mob/living/carbon/proc/eyecheck() return 0 diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index a2599014cd9..b160bf1e985 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -65,7 +65,7 @@ //For ninjas exploding when they die./N if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized) src << browse(null, "window=spideros")//Just in case. - var/location = loc + var/turf/location = get_turf(src) explosion(location, 1, 2, 3, 4) canmove = 0 @@ -100,17 +100,17 @@ return ..(gibbed) /mob/living/carbon/human/proc/ChangeToHusk() - if(mutations & HUSK) + if(HUSK in src.mutations) return var/datum/organ/external/head/head = get_organ("head") if(head) head.disfigured = 1 name = get_visible_name() - mutations |= HUSK + mutations.Add(HUSK) update_body() return /mob/living/carbon/human/proc/Drain() ChangeToHusk() - mutations2 |= NOCLONE + mutations.Add(NOCLONE) return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 66137de8578..21337db9b32 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -76,7 +76,7 @@ param = trim(param) var/input if(!param) - input = input("Choose an emote to display.") as text|null + input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN) else input = param if(input) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index d09f4351544..a88f4b3c801 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -27,32 +27,21 @@ skipears = src.head.flags_inv & HIDEEARS // crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :< - var/t_He = "It" //capitalised for use at the start of each line. - var/t_his = "its" - var/t_him = "it" - var/t_has = "has" - var/t_is = "is" + var/list/proper_forms = get_visible_gender() + var/t_He = proper_forms["It"] //capitalised for use at the start of each line. + var/t_his = proper_forms["its"] + var/t_him = proper_forms["it"] + var/t_has = proper_forms["has"] + var/t_is = proper_forms["is"] + + if(mutantrace == "lizard") + examine_text = "one of those lizard-like Soghuns" + if(mutantrace == "skrell") + examine_text = "one of those gelatinous Skrells" var/msg = "*---------*\nThis is " - - if( skipjumpsuit && (wear_mask || skipmask) ) //big suits/masks make it hard to tell their gender - t_He = "They" - t_his = "their" - t_him = "them" - t_has = "have" - t_is = "are" - else - if(src.icon) - msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated - switch(src.gender) - if(MALE) - t_He = "He" - t_his = "his" - t_him = "him" - if(FEMALE) - t_He = "She" - t_his = "her" - t_him = "her" + if(icon) + msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated msg += "\a [src][examine_text ? ", [examine_text]":""]!\n" diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm index 086271d8d6f..d489bf24543 100644 --- a/code/modules/mob/living/carbon/human/hud.dm +++ b/code/modules/mob/living/carbon/human/hud.dm @@ -786,3 +786,163 @@ src.hud_used.hotkey_ui_hidden = 1 + +/* + +Radar-related things + +*/ + +/mob/living/carbon/human/proc/close_radar() + radar_open = 0 + for(var/obj/screen/x in client.screen) + if( (x.name == "radar" && x.icon == 'radar.dmi') || (x in radar_blips) ) + client.screen -= x + del(x) + + place_radar_closed() + +/mob/living/carbon/human/proc/place_radar_closed() + var/obj/screen/closedradar = new() + closedradar.icon = 'radar.dmi' + closedradar.icon_state = "radarclosed" + closedradar.screen_loc = "WEST,NORTH-1" + closedradar.name = "radar closed" + client.screen += closedradar + +/mob/living/carbon/human/proc/start_radar() + + for(var/obj/screen/x in client.screen) + if(x.name == "radar closed" && x.icon == 'radar.dmi') + client.screen -= x + del(x) + + var/obj/screen/cornerA = new() + cornerA.icon = 'radar.dmi' + cornerA.icon_state = "radar(1,1)" + cornerA.screen_loc = "WEST,NORTH-2" + cornerA.name = "radar" + + var/obj/screen/cornerB = new() + cornerB.icon = 'radar.dmi' + cornerB.icon_state = "radar(2,1)" + cornerB.screen_loc = "WEST+1,NORTH-2" + cornerB.name = "radar" + + var/obj/screen/cornerC = new() + cornerC.icon = 'radar.dmi' + cornerC.icon_state = "radar(1,2)" + cornerC.screen_loc = "WEST,NORTH-1" + cornerC.name = "radar" + + var/obj/screen/cornerD = new() + cornerD.icon = 'radar.dmi' + cornerD.icon_state = "radar(2,2)" + cornerD.screen_loc = "WEST+1,NORTH-1" + cornerD.name = "radar" + + client.screen += cornerA + client.screen += cornerB + client.screen += cornerC + client.screen += cornerD + + radar_open = 1 + + while(radar_open && (RADAR in augmentations)) + update_radar() + sleep(6) + +/mob/living/carbon/human/proc/update_radar() + + if(!client) return + var/list/found_targets = list() + + var/max_dist = 29 // 29 tiles is the max distance + + // If the mob is inside a turf, set the center to the object they're in + var/atom/distance_ref = src + if(!isturf(src.loc)) + distance_ref = loc + + // Clear the radar_blips cache + for(var/x in radar_blips) + client.screen -= x + del(x) + radar_blips = list() + + var/starting_px = 3 + var/starting_py = 3 + + for(var/mob/living/M in orange(max_dist, distance_ref)) + if(M.stat == 2) continue + found_targets.Add(M) + + for(var/obj/effect/critter/C in orange(max_dist, distance_ref)) + if(!C.alive) continue + found_targets.Add(C) + + for(var/obj/mecha/M in orange(max_dist, distance_ref)) + if(!M.occupant) continue + found_targets.Add(M) + + for(var/obj/structure/closet/C in orange(max_dist, distance_ref)) + for(var/mob/living/M in C.contents) + if(M.stat == 2) continue + found_targets.Add(M) + + // Loop through all living mobs in a range. + for(var/atom/A in found_targets) + + var/a_x = A.x + var/a_y = A.y + + if(!isturf(A.loc)) + a_x = A.loc.x + a_y = A.loc.y + + var/blip_x = max_dist + (-( distance_ref.x-a_x ) ) + starting_px + var/blip_y = max_dist + (-( distance_ref.y-a_y ) ) + starting_py + var/obj/screen/blip = new() + blip.icon = 'radar.dmi' + blip.name = "Blip" + blip.layer = 21 + blip.screen_loc = "WEST:[blip_x-1],NORTH-2:[blip_y-1]" // offset -1 because the center of the blip is not at the bottomleft corner (14) + + if(istype(A, /mob/living)) + var/mob/living/M = A + if(ishuman(M)) + if(M:wear_id) + var/job = M:wear_id:GetJobName() + if(job == "Security Officer") + blip.icon_state = "secblip" + blip.name = "Security Officer" + else if(job == "Captain" || job == "Research Director" || job == "Chief Engineer" || job == "Chief Medical Officer" || job == "Head of Security" || job == "Head of Personnel") + blip.icon_state = "headblip" + blip.name = "Station Head" + else + blip.icon_state = "civblip" + blip.name = "Civilian" + else + blip.icon_state = "civblip" + blip.name = "Civilian" + + else if(issilicon(M)) + blip.icon_state = "roboblip" + blip.name = "Robotic Organism" + + else + blip.icon_state = "unknownblip" + blip.name = "Unknown Organism" + + else if(istype(A, /obj/effect/critter)) + blip.icon_state = "unknownblip" + blip.name = "Unknown Organism" + + else if(istype(A, /obj/mecha)) + blip.icon_state = "roboblip" + blip.name = "Robotic Organism" + + radar_blips.Add(blip) + client.screen += blip + + diff --git a/code/modules/mob/living/carbon/human/hud_overlays.dm b/code/modules/mob/living/carbon/human/hud_overlays.dm new file mode 100644 index 00000000000..9163a8a6af9 --- /dev/null +++ b/code/modules/mob/living/carbon/human/hud_overlays.dm @@ -0,0 +1,19 @@ +mob/var/image/antag_img +mob/living/carbon/human + var/image/med_img + var/image/sec_img + var/image/sec2_img + var/image/imp_img + var/image/health_img + +mob/New() + . = ..() + antag_img = image('icons/mob/hud.dmi',src) + +mob/living/carbon/human/New() + . = ..() + med_img = image('icons/mob/hud.dmi',src) + sec_img = image('icons/mob/hud.dmi',src) + sec2_img = image('icons/mob/hud.dmi',src) + imp_img = image('icons/mob/hud.dmi',src) + health_img = image('icons/mob/hud.dmi',src) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index df52c824503..a88e1e6aea8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -27,19 +27,19 @@ var/list/skills = null // var/b_type - var/obj/item/clothing/suit/wear_suit = null - var/obj/item/clothing/under/w_uniform = null - var/obj/item/clothing/shoes/shoes = null - var/obj/item/weapon/belt = null - var/obj/item/clothing/gloves/gloves = null - var/obj/item/clothing/glasses/glasses = null - var/obj/item/clothing/head/head = null - var/obj/item/clothing/ears/l_ear = null - var/obj/item/clothing/ears/r_ear = null + var/obj/item/wear_suit = null + var/obj/item/w_uniform = null + var/obj/item/shoes = null + var/obj/item/belt = null + var/obj/item/gloves = null + var/obj/item/glasses = null + var/obj/item/head = null + var/obj/item/l_ear = null + var/obj/item/r_ear = null var/obj/item/weapon/card/id/wear_id = null - var/obj/item/weapon/r_store = null - var/obj/item/weapon/l_store = null - var/obj/item/weapon/s_store = null + var/obj/item/r_store = null + var/obj/item/l_store = null + var/obj/item/s_store = null var/icon/stand_icon = null var/icon/lying_icon = null @@ -52,8 +52,8 @@ var/hair_icon_state = "hair_a" var/face_icon_state = "bald" - var/list/body_standing = list() - var/list/body_lying = list() + var/image/damageicon_standing + var/image/damageicon_lying var/mutantrace = null @@ -133,14 +133,13 @@ stand_icon = new /icon('human.dmi', "body_[g]_s") lying_icon = new /icon('human.dmi', "body_[g]_l") icon = stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" spawn(10) // Failsafe for.. weirdness. - update_clothing() - update_body() + rebuild_appearance() vessel = new/datum/reagents(600) vessel.my_atom = src @@ -228,11 +227,6 @@ Metroid.UpdateFeed() return - /*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) - if(prob(40) && !(mutations & FAT)) - src << "\red You fail to push [tmob]'s fat ass out of the way." - now_pushing = 0 - return*/ if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot)) if(prob(99)) now_pushing = 0 @@ -297,10 +291,13 @@ if(shoes) tally += shoes.slowdown - /*if(mutations & FAT) - tally += 1.5*/ - if(bodytemperature < 283.222) + if (bodytemperature < 283.222) tally += (283.222 - bodytemperature) / 10 * 1.75 + if(mutantrace == "lizard") //Soghun are more affected by the cold + tally += 1 + if(istajaran()) //But Tajarans are slightly resistant + if(tally != 0) + tally -= tally*0.1 if (stuttering < 10) stuttering = 10 @@ -309,12 +306,12 @@ if(tally < 0) tally = 0 - if(mutations & mRun) - tally = 0 - if(istype(M) && M.lying) //Pulling lying down people is slower tally += 3 + if(mRun in mutations) + tally = 0 + return tally /mob/living/carbon/human/Stat() @@ -489,8 +486,9 @@ head = null if(prev_head && (prev_head.flags & BLOCKHAIR)) // rebuild face - del(face_standing) - del(face_lying) +// del(face_standing) +// del(face_lying) + update_face() else if (W == l_ear) l_ear = null @@ -509,8 +507,9 @@ wear_mask = null if(prev_mask && (prev_mask.flags & BLOCKHAIR)) // rebuild face - del(face_standing) - del(face_lying) +// del(face_standing) +// del(face_lying) + update_face() else if (W == wear_id) wear_id = null @@ -561,7 +560,7 @@ return if (!istype(W, /obj/item)) return - if (!( W.flags & ONBACK )) + if (!( W.slot_flags & SLOT_BACK )) return if(istype(W,/obj/item/weapon/twohanded) && W:wielded) usr << "Unwield the [initial(W.name)] first!" @@ -585,11 +584,12 @@ if (emptyHand) wear_suit.DblClick() return - if (!( istype(W, /obj/item/clothing/suit) )) + if (!istype(W, /obj/item)) + return + + if (!( W.slot_flags & SLOT_OCLOTHING )) + return return - /*if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) - src << "\red You're too fat to wear the [W.name]!" - return*/ u_equip(W) wear_suit = W W.equipped(src, text) @@ -598,7 +598,9 @@ if (emptyHand) gloves.DblClick() return - if (!( istype(W, /obj/item/clothing/gloves) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_GLOVES )) return u_equip(W) gloves = W @@ -608,7 +610,9 @@ if (emptyHand) shoes.DblClick() return - if (!( istype(W, /obj/item/clothing/shoes) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_FEET )) return u_equip(W) shoes = W @@ -618,7 +622,9 @@ if (emptyHand) belt.DblClick() return - if (!W || !W.flags || !( W.flags & ONBELT )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_BELT )) return u_equip(W) belt = W @@ -628,7 +634,9 @@ if (emptyHand) glasses.DblClick() return - if (!( istype(W, /obj/item/clothing/glasses) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_EYES )) return u_equip(W) glasses = W @@ -638,10 +646,9 @@ if (emptyHand) head.DblClick() return - if (( istype(W, /obj/item/weapon/paper) )) - u_equip(W) - head = W - else if (!( istype(W, /obj/item/clothing/head) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_HEAD )) return u_equip(W) head = W @@ -693,11 +700,11 @@ if (emptyHand) w_uniform.DblClick() return - if (!( istype(W, /obj/item/clothing/under) )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_ICLOTHING )) + return return - /*if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) - src << "\red You're too fat to wear the [W.name]!" - return*/ u_equip(W) w_uniform = W W.equipped(src, text) @@ -708,7 +715,9 @@ return if (!w_uniform) return - if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) ) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_ID )) return u_equip(W) wear_id = W @@ -718,19 +727,25 @@ if (emptyHand) l_store.DblClick() return - if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) + if (!istype(W, /obj/item)) return - u_equip(W) - l_store = W + if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) + return + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + l_store = W if("storage2") if (r_store) if (emptyHand) r_store.DblClick() return - if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) + if (!istype(W, /obj/item)) return - u_equip(W) - r_store = W + if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) + return + if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) + u_equip(W) + r_store = W if("suit storage") if (s_store) if (emptyHand) @@ -853,141 +868,75 @@ M.UpdateFeed(src) return -/mob/living/carbon/human/update_clothing() - ..() +/mob/living/carbon/human/proc/rebuild_body_overlays() + // This proc REBUILDS the body overlays. These are the overlays displayed under the clothing. + // Builds the body overlays both for lying and standing states. + // + // This is necessary whenever something about the mob's body appearance changes, for example: + // - When the mutantrace changes + // - When a visible wound is added to the mob's skin + // - When the mob loses a limb + body_overlays_standing.Cut() + body_overlays_lying.Cut() - if (monkeyizing) - return + if (HULK in mutations) + body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "hulk_[gender]_s") + body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "hulk_[gender]_l") - overlays = null + if (COLD_RESISTANCE in mutations) + body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "fire_s") + body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "fire_l") - // lol - var/fat = "" - if (mutations & FAT) - fat = "fat" + if (TK in mutations) + body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead_s") + body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead_l") - if (mutations & HULK) - overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat]_[gender][!lying ? "_s" : "_l"]") - - if (mutations & COLD_RESISTANCE) - overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]") - - if (mutations & TK) - overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]") - - if (mutations & LASER) - overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]") - - if (mutantrace) - switch(mutantrace) - if("golem","metroid") - overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!lying ? "_s" : "_l"]") - if(face_standing) - del(face_standing) - if(face_lying) - del(face_lying) - if(stand_icon) - del(stand_icon) - if(lying_icon) - del(lying_icon) - if("lizard") - overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]") - if(face_standing) - del(face_standing) - if(face_lying) - del(face_lying) - if(stand_icon) - del(stand_icon) - if(lying_icon) - del(lying_icon) - if("plant") - if(stat != 2) //if not dead, that is - overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]") - else - overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d") - if(face_standing) - del(face_standing) - if(face_lying) - del(face_lying) - if(stand_icon) - del(stand_icon) - if(lying_icon) - del(lying_icon) - else - if(!face_standing || !face_lying) - update_face() - if(!stand_icon || !lying_icon) - update_body() - - if(buckled) - if(istype(buckled, /obj/structure/stool/bed/chair)) - lying = 0 - else - lying = 1 - - // Automatically drop anything in store / id / belt if you're not wearing a uniform. - if (!w_uniform) - for (var/obj/item/thing in list(r_store, l_store, wear_id, belt)) - if (thing) - u_equip(thing) - if (client) - client.screen -= thing - - if (thing) - thing.loc = loc - thing.dropped(src) - thing.layer = initial(thing.layer) + if (LASER in mutations) + body_overlays_standing += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes_s") + body_overlays_lying += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes_l") - //if (zone_sel) - // zone_sel.overlays = null - // zone_sel.overlays += body_standing - // zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting)) + // Other procs(probably update_face() and update_body() ) also rebuild their own + // kinds of overlay lists. Think about merging those procs into this proc. + body_overlays_lying += damageicon_lying + body_overlays_standing += damageicon_standing - if (lying) - icon = lying_icon + // face_lying and face_standing are the face icons, not a flag + body_overlays_lying += face_lying + body_overlays_standing += face_standing - overlays += body_lying - if (face_lying) - overlays += face_lying - else - icon = stand_icon - overlays += body_standing +/mob/living/carbon/human/proc/rebuild_clothing_overlays() + // This proc REBUILDS the clothing overlays entirely. + // This is necessary whenever clothing changes, or when the mob switches from laying + // into standing state or vice verca. - if (face_standing) - overlays += face_standing + // This should possibly be split into two categories: + // - "under", which is stuff that is worn at the lowest clothing layer and doesn't change often, + // such as jumpsuits, gloves, headset, etc. + // - "over", which is stuff that is worn at the highest clothing layer and changes very often, + // such as stuff in the user's hand, space suits, helmets, etc. + + // Delete all items from the overlay lists + clothing_overlays.Cut() // Uniform if(w_uniform) - /*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL)) - src << "\red You burst out of the [w_uniform.name]!" - var/obj/item/clothing/c = w_uniform - u_equip(c) - if(client) - client.screen -= c - if(c) - c:loc = loc - c:dropped(src) - c:layer = initial(c:layer)*/ if(w_uniform)//I should really not need these w_uniform.screen_loc = ui_iclothing if(istype(w_uniform, /obj/item/clothing/under)) var/t1 = w_uniform.color if (!t1) t1 = icon_state - if (mutations & FAT) - overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) - else - overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = UNIFORM_LAYER) if (w_uniform.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = stain_icon, "layer" = B_UNIFORM_LAYER) if (wear_id) if(wear_id.over_jumpsuit) - overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = ID_LAYER) if (client) client.screen -= hud_used.intents @@ -1010,32 +959,35 @@ gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) if(ro.destroyed) gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) - overlays += image(gloves_icon, "layer" = MOB_LAYER) + clothing_overlays += image(gloves_icon, "layer" = GLOVES_LAYER) if (gloves.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) else if(ro.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER) else if (blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) else if(ro.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER) + // Glasses if (glasses) var/t1 = glasses.icon_state - overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = GLASSES_LAYER) + // Ears if (l_ear) var/t1 = l_ear.icon_state - overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = EARS_LAYER) if (r_ear) var/t1 = r_ear.icon_state - overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = EARS_LAYER) + // Shoes lo = organs["l_foot"] ro = organs["r_foot"] @@ -1046,100 +998,34 @@ shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY) else if(ro.destroyed && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY) - overlays += image(shoes_icon, "layer" = MOB_LAYER) + clothing_overlays += image(shoes_icon, "layer" = SHOES_LAYER) if (shoes.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "shoeblood[!lying ? "" : "2"]") if(lo.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) else if(ro.destroyed) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio -/* if (w_radio) - overlays += image("icon" = 'ears.dmi', "icon_state" = "headset[!lying ? "" : "2"]", "layer" = MOB_LAYER) */ + clothing_overlays += image("icon" = stain_icon, "layer" = B_SHOES_LAYER) // Radio if (s_store) var/t1 = s_store.item_state if (!t1) t1 = s_store.icon_state if(!istype(wear_suit, /obj/item/clothing/suit/storage/armoredundersuit)) - overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_STORE_LAYER) s_store.screen_loc = ui_sstore1 - if (client) - if (i_select) - if (intent) - client.screen += hud_used.intents - - var/list/L = dd_text2list(intent, ",") - L[1] += ":-11" - i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT - else - i_select.screen_loc = null - if (m_select) - if (m_int) - client.screen += hud_used.mov_int - - var/list/L = dd_text2list(m_int, ",") - L[1] += ":-11" - m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT - else - m_select.screen_loc = null - if (wear_suit) - /*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL)) - src << "\red You burst out of the [wear_suit.name]!" - var/obj/item/clothing/c = wear_suit - u_equip(c) - if(client) - client.screen -= c - if(c) - c:loc = loc - c:dropped(src) - c:layer = initial(c:layer)*/ - if (istype(wear_suit, /obj/item/clothing/suit)) - var/t1 = wear_suit.icon_state - overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) - if (wear_suit) - if (wear_suit.blood_DNA) - var/icon/stain_icon = null - if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/storage/wcoat)) - stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") - else if (istype(wear_suit, /obj/item/clothing/suit/storage/det_suit || /obj/item/clothing/suit/storage/labcoat)) - stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]") - else - stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) - wear_suit.screen_loc = ui_oclothing - if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) - if (handcuffed) - handcuffed.loc = loc - handcuffed.layer = initial(handcuffed.layer) - handcuffed = null - if ((l_hand || r_hand)) - var/h = hand - hand = 1 - drop_item() - hand = 0 - drop_item() - hand = h - - - if (lying) - if (face_lying) - overlays += face_lying - else - if (face_standing) - overlays += face_standing if (wear_mask) if (istype(wear_mask, /obj/item/clothing/mask)) var/t1 = wear_mask.icon_state - overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = FACEMASK_LAYER) if (!istype(wear_mask, /obj/item/clothing/mask/cigarette)) if (wear_mask.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = stain_icon, "layer" = B_FACEMASK_LAYER) wear_mask.screen_loc = ui_mask // Head @@ -1148,12 +1034,12 @@ var/icon/head_icon = icon('head.dmi', text("[][]", t1, (!( lying ) ? null : "2"))) if(istype(head,/obj/item/clothing/head/kitty)) head_icon = (( lying ) ? head:mob2 : head:mob) - overlays += image("icon" = head_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = head_icon, "layer" = HEAD_LAYER) if(gimmick_hat) - overlays += image("icon" = icon('gimmick_head.dmi', "[gimmick_hat][!lying ? "" : "2"]"), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = icon('gimmick_head.dmi', "[gimmick_hat][!lying ? "" : "2"]"), "layer" = HEAD_LAYER) if (head.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + clothing_overlays += image("icon" = stain_icon, "layer" = B_HEAD_LAYER) head.screen_loc = ui_head // Belt @@ -1161,7 +1047,7 @@ var/t1 = belt.item_state if (!t1) t1 = belt.icon_state - overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = BELT_LAYER) belt.screen_loc = ui_belt @@ -1178,45 +1064,73 @@ if (back) var/t1 = back.icon_state - overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = BACK_LAYER) back.screen_loc = ui_back if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar - //to hide / show them. + //to hide / show them. + // WHAT IS THIS DOING IN UPDATE_CLOTHING(), AHHHHHHHHHHHHH if (handcuffed) pulling = null var/h1 = handcuffed.icon_state if (!lying) - overlays += image("icon" = 'mob.dmi', "icon_state" = "[h1]1", "layer" = MOB_LAYER) + clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[h1]1", "layer" = CUFFED_LAYER) else - overlays += image("icon" = 'mob.dmi', "icon_state" = "[h1]2", "layer" = MOB_LAYER) - - if (client) - client.screen -= contents - client.screen += contents + clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[h1]2", "layer" = CUFFED_LAYER) if (r_hand) - overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1) - + clothing_overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER) r_hand.screen_loc = ui_rhand if (l_hand) - overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1) - + clothing_overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = INHANDS_LAYER) l_hand.screen_loc = ui_lhand + var/shielded = 0 for (var/obj/item/weapon/cloaking_device/S in src) if (S.active) shielded = 2 break - if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active) - shielded = 3 + + if (wear_suit) + + + + if (wear_suit) + if (istype(wear_suit, /obj/item/clothing/suit)) + var/t1 = wear_suit.icon_state + clothing_overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_LAYER) + if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) + if (handcuffed) + handcuffed.loc = loc + handcuffed.layer = initial(handcuffed.layer) + handcuffed = null + if ((l_hand || r_hand)) + // I don't know what this does, but it looks horrible + var/h = hand + hand = 1 + drop_item() + hand = 0 + drop_item() + hand = h + else if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active) + shielded = 3 + if (wear_suit.blood_DNA) + var/icon/stain_icon = null + if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/storage/wcoat)) + stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") + else if (istype(wear_suit, /obj/item/clothing/suit/storage/det_suit || /obj/item/clothing/suit/storage/labcoat)) + stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]") + else + stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]") + clothing_overlays += image("icon" = stain_icon, "layer" = B_SUIT_LAYER) + wear_suit.screen_loc = ui_oclothing switch(shielded) if(1) - overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = MOB_LAYER+1) + overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = SHIELD_LAYER) if(2) invisibility = 2 //New stealth. Hopefully doesn't lag too much. /N @@ -1237,12 +1151,12 @@ else if (shielded == 2) invisibility = 2 else - invisibility = 0 +// invisibility = 0 //This should hopefully be taken care of by the above if(targeted_by && target_locked) - overlays += target_locked + clothing_overlays += target_locked else if(targeted_by) target_locked = new /obj/effect/target_locked(src) - overlays += target_locked + clothing_overlays += target_locked else if(!targeted_by && target_locked) del(target_locked) @@ -1255,6 +1169,99 @@ */ last_b_state = stat +/mob/living/carbon/human/proc/misc_clothing_updates() + // Temporary proc to shove stuff in that was put into update_clothing() + // for questionable reasons + + if (client) + if (i_select) + if (intent) + client.screen += hud_used.intents + + var/list/L = dd_text2list(intent, ",") + L[1] += ":-11" + i_select.screen_loc = dd_list2text(L,",") //ICONS4 + else + i_select.screen_loc = null + if (m_select) + if (m_int) + client.screen += hud_used.mov_int + + var/list/L = dd_text2list(m_int, ",") + L[1] += ":-11" + m_select.screen_loc = dd_list2text(L,",") //ICONS4 + else + m_select.screen_loc = null + + // Probably a lazy way to make sure all items are on the screen exactly once + if (client) + client.screen -= contents + client.screen += contents + +/mob/living/carbon/human/rebuild_appearance() + // Lazy method: Just rebuild everything. + // This can be called when the mob is created, but on other occasions, rebuild_body_overlays(), + // rebuild_clothing_overlays() etc. should be called individually. + + handle_clothing() // nonvisual stuff + misc_clothing_updates() // silly stuff + + rebuild_body_overlays() // rebuild the body itself, that is mutant race traits, hair, limbs, etc. + rebuild_clothing_overlays() // rebuild the entire clothing + + update_overlays_from_lists() + +/mob/living/carbon/human/proc/update_overlays_from_lists() + // This will simply update the overlays without actually + // rebuilding anything. Can be called often without much + // effect on performance. + + + // Update the actual overlays from our prebuilt lists + overlays = null + + if (monkeyizing) // while monkeyizing we do not wish to display any overlays + return + + if(lying) + icon = lying_icon + overlays += body_overlays_lying + + if(!lying) + icon = stand_icon + overlays += body_overlays_standing + + + + overlays += clothing_overlays + +/mob/living/carbon/human/update_body_appearance() + // Should be called whenever something about the body appearance itself changes. + + rebuild_body_overlays() + update_overlays_from_lists() + +/mob/living/carbon/human/update_lying() + // Should be called whenever something about the lying status of the mob might have changed. + + if(visual_lying != lying) + visual_lying = lying + rebuild_clothing_overlays() + update_overlays_from_lists() + +/mob/living/carbon/human/update_clothing() + // Should be called only when something about the clothing itself changed + // which is not handled by the equip code. + rebuild_appearance() + return + + // TODO: once I have replaced the udpate_clothing() calls with update_lying() or + // update_body_appearance() calls where suitable, the following code should + // be used. furthermore, handle_clothes() should be moved to Life() + + rebuild_clothing_overlays() + update_overlays_from_lists() + /mob/living/carbon/human/hand_p(mob/M as mob) var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) @@ -1358,26 +1365,19 @@ return 0 /mob/living/carbon/human/proc/update_body() - if(stand_icon) - del(stand_icon) - if(lying_icon) - del(lying_icon) - - if (mutantrace) - return + if(stand_icon) del(stand_icon) + if(lying_icon) del(lying_icon) +// if(mutantrace) return var/g = "m" - if (gender == MALE) - g = "m" - else if (gender == FEMALE) - g = "f" + if(gender == FEMALE) g = "f" + var/husk = (HUSK in src.mutations) +// var/obese = (FAT in src.mutations) + //Base mob icon stand_icon = new /icon('human.dmi', "torso_[g]_s") lying_icon = new /icon('human.dmi', "torso_[g]_l") - var/husk = (mutations & HUSK) - var/obese = (mutations & FAT) - stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY) @@ -1402,6 +1402,31 @@ stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY) + if (mutantrace) + switch(mutantrace) + if("golem","metroid") + stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_l"), ICON_OVERLAY) + if("lizard") + stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY) + if("skrell") + stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY) + if("plant") + if(stat != 2) //if not dead, that is + stand_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_[gender]_l"), ICON_OVERLAY) + else + // not sure why this doesn't need separate lying/standing states + lying_icon.Blend(new /icon('genetics.dmi', "icon_state" = "[mutantrace]_d"), ICON_OVERLAY) + else + // TODO: rewrite update_face() and update_body() if necessary + if(!face_standing || !face_lying) + update_face() + if(!stand_icon || !lying_icon) + update_body() + if (husk) var/icon/husk_s = new /icon('human.dmi', "husk_s") var/icon/husk_l = new /icon('human.dmi', "husk_l") @@ -1417,12 +1442,9 @@ stand_icon.Blend(husk_s, ICON_OVERLAY) lying_icon.Blend(husk_l, ICON_OVERLAY) - else if(obese) - stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY) - // Skin tone - if (s_tone >= 0) + //Skin tone + if(s_tone >= 0) stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) else @@ -1432,11 +1454,14 @@ stand_icon.Blend(rgb(100,100,100)) lying_icon.Blend(rgb(100,100,100)) - if (underwear < 6 && underwear > 0) + //Underwear + if(underwear < 6 && underwear > 0) // if(!obese) stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY) + + /mob/living/carbon/human/proc/update_face() if(organs) var/datum/organ/external/head = organs["head"] @@ -1446,22 +1471,18 @@ del(face_lying) return if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now - del(face_standing) - del(face_lying) - - if (mutantrace) - return + if(face_standing) del(face_standing) + if(face_lying) del(face_lying) +// if(mutantrace) return var/g = "m" - if (gender == MALE) - g = "m" - else if (gender == FEMALE) - g = "f" + if (gender == FEMALE) g = "f" var/icon/eyes_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_s") var/icon/eyes_l = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_l") - eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) - eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + if(species != "Skrell") + eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") @@ -1481,8 +1502,9 @@ eyes_s.Blend(hair_s, ICON_OVERLAY) eyes_l.Blend(hair_l, ICON_OVERLAY) - eyes_s.Blend(mouth_s, ICON_OVERLAY) - eyes_l.Blend(mouth_l, ICON_OVERLAY) + if(species == "Human") + eyes_s.Blend(mouth_s, ICON_OVERLAY) + eyes_l.Blend(mouth_l, ICON_OVERLAY) // if BLOCKHAIR, do not apply facial hair if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR))) @@ -1493,9 +1515,9 @@ face_standing = new /image() face_lying = new /image() face_standing.icon = eyes_s - face_standing.layer = MOB_LAYER + face_standing.layer = FACE_LAYER face_lying.icon = eyes_l - face_lying.layer = MOB_LAYER + face_lying.layer = FACE_LAYER del(mouth_l) del(mouth_s) @@ -1745,6 +1767,8 @@ It can still be worn/put on as normal. return var/obj/item/clothing/W = target.wear_mask target.u_equip(W) + if (W.flags & BLOCKHAIR) + target.update_face() if (target.client) target.client.screen -= W if (W) @@ -1833,7 +1857,7 @@ It can still be worn/put on as normal. W.add_fingerprint(source) else if(!item) return - if ((istype(item, /obj) && item.flags & 128 && target.w_uniform)) + if ((istype(item, /obj) && (item.slot_flags & SLOT_BELT) && target.w_uniform)) source.drop_item() loc = target item.layer = 20 @@ -1874,6 +1898,8 @@ It can still be worn/put on as normal. target.u_equip(W) if (target.client) target.client.screen -= W + if (W.flags & BLOCKHAIR) + target.update_face() if (W) W.loc = target.loc W.dropped(target) @@ -2127,7 +2153,7 @@ It can still be worn/put on as normal. W.add_fingerprint(source) else if(!item) return - if ((istype(item, /obj/item) && item.flags & 1)) + if ((istype(item, /obj/item) && (item.slot_flags & SLOT_BACK))) source.drop_item() loc = target item.layer = 20 @@ -2588,24 +2614,24 @@ It can still be worn/put on as normal. heal_overall_damage(0, -amount) /mob/living/carbon/human/Stun(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() /mob/living/carbon/human/Weaken(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() /mob/living/carbon/human/Paralyse(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() /mob/living/carbon/human/proc/morph() set name = "Morph" set category = "Superpower" - if(!(src.mutations & mMorph)) + if(!(mMorph in mutations)) src.verbs -= /mob/living/carbon/human/proc/morph return @@ -2685,9 +2711,7 @@ It can still be worn/put on as normal. gender = MALE else gender = FEMALE - update_body() - update_face() - update_clothing() + rebuild_appearance() check_dna() for(var/mob/M in view()) @@ -2696,7 +2720,7 @@ It can still be worn/put on as normal. /mob/living/carbon/human/proc/remotesay() set name = "Project mind" set category = "Superpower" - if(!(src.mutations & mRemotetalk)) + if(!(mRemotetalk in src.mutations)) src.verbs -= /mob/living/carbon/human/proc/remotesay return var/list/creatures = list() @@ -2705,7 +2729,7 @@ It can still be worn/put on as normal. var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures var/say = input ("What do you wish to say") - if(target.mutations & mRemotetalk) + if(mRemotetalk in target.mutations) target.show_message("\blue You hear [src.real_name]'s voice: [say]") else target.show_message("\blue You hear a voice that seems to echo around the room: [say]") @@ -2719,7 +2743,7 @@ It can still be worn/put on as normal. set name = "Remote View" set category = "Superpower" - if(!(src.mutations & mRemote)) + if(!(mRemote in src.mutations)) reset_view(0) remoteobserve = null src.verbs -= /mob/living/carbon/human/proc/remoteobserve @@ -2750,3 +2774,14 @@ It can still be worn/put on as normal. reset_view(0) remoteobserve = null src.tkdisable = 0 + +/mob/living/carbon/human/get_visible_gender() + var/skip_gender = (wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask)) + + if( !skip_gender ) //big suits/masks make it hard to tell their gender + switch(gender) + if(MALE) + return list("It" = "He", "its" = "his", "it" = "he", "has" = "has", "is" = "is", "itself" = "himself") + if(FEMALE) + return list("It" = "She", "its" = "her", "it" = "she", "has" = "has", "is" = "is", "itself" = "herself") + return list("It" = "They", "its" = "their", "it" = "them", "has" = "have", "is" = "are", "itself" = "themselves") diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm index 1f82eb28591..09cb279b540 100644 --- a/code/modules/mob/living/carbon/human/human_attackalien.dm +++ b/code/modules/mob/living/carbon/human/human_attackalien.dm @@ -70,5 +70,4 @@ for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has tried to disarm []!", M, src), 1) - update_clothing() return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 0e4eef42825..3a72f0647d8 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -9,11 +9,13 @@ visible_message("\red [M] attempted to touch [src]!") return 0 - if(M.gloves) - if(M.gloves.cell) - if(M.a_intent == "hurt") - if(M.gloves.cell.charge >= 2500) - M.gloves.cell.charge -= 2500 + + if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.cell) + if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(G.cell.charge >= 2500) + G.cell.charge -= 2500 visible_message("\red [src] has been touched with the stun gloves by [M]!") M.attack_log += text("\[[time_stamp()]\] Stungloved [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been stungloved by [M.name] ([M.ckey])") @@ -42,7 +44,9 @@ var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(M.mutations & HULK) damage += 5 + if(HULK in M.mutations) damage += 5 + if(SUPRSTR in M.augmentations) damage += 5 + playsound(loc, "punch", 25, 1, -1) visible_message("\red [M] has punched [src]!") @@ -101,6 +105,28 @@ return 1 if("hurt") + + if(ELECTRICHANDS in M.augmentations) + var/gendertxt = "their" + if(M.gender == "male") + gendertxt = "his" + if(M.gender == "female") + gendertxt = "her" + + visible_message("\red [M] has shocked [src] with [gendertxt] bare hands!") + M.attack_log += text("\[[time_stamp()]\] Used Electric Hands nanoaug power on [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])") + + log_admin("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them .") + message_admins("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them .") + log_attack("[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them ") + + + var/armorblock = run_armor_check(M.zone_sel.selecting, "energy") + apply_effects(5,5,0,0,5,0,0,armorblock) + + return + if(M.type != /mob/living/carbon/human/tajaran) M.attack_log += text("\[[time_stamp()]\] Punched [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been punched by [M.name] ([M.ckey])") @@ -128,11 +154,10 @@ var/damage = rand(0, 5) if(!damage) - switch(attack_verb) - if(("slash") || ("scratch")) - playsound(loc, 'slashmiss.ogg', 25, 1, -1) - else - playsound(loc, 'punchmiss.ogg', 25, 1, -1) + if(attack_verb == "scratch" || attack_verb == "slash") + playsound(loc, 'slashmiss.ogg', 25, 1, -1) + else + playsound(loc, 'punchmiss.ogg', 25, 1, -1) visible_message("\red [M] has attempted to [attack_verb] [src]!") return 0 @@ -141,14 +166,13 @@ var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(M.mutations & HULK) damage += 5 - - switch(attack_verb) - if(("slash") || ("scratch")) - damage += 10 - playsound(loc, 'slice.ogg', 25, 1, -1) - else - playsound(loc, "punch", 25, 1, -1) + if(HULK in M.mutations) damage += 5 + if(SUPRSTR in M.augmentations) damage += 5 + if(attack_verb == "scratch" || attack_verb == "slash") + damage += 7 + playsound(loc, 'slice.ogg', 25, 1, -1) + else + playsound(loc, "punch", 25, 1, -1) visible_message("\red [M] has [attack_verb]ed [src]!") @@ -211,7 +235,6 @@ playsound(loc, 'punchmiss.ogg', 25, 1, -1) visible_message("\red [M] attempted to disarm [src]!") - update_clothing() return /mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) diff --git a/code/modules/mob/living/carbon/human/human_attackpaw.dm b/code/modules/mob/living/carbon/human/human_attackpaw.dm index 568ca9969d5..8d01ca3e8f2 100644 --- a/code/modules/mob/living/carbon/human/human_attackpaw.dm +++ b/code/modules/mob/living/carbon/human/human_attackpaw.dm @@ -20,5 +20,4 @@ src = null src = H.monkeyize() contract_disease(D,1,0) - update_clothing() return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index bfa163f82e6..45041e244b2 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -21,11 +21,8 @@ // now constructs damage icon for each organ from mask * damage field /mob/living/carbon/human/UpdateDamageIcon() - del(body_standing) - body_standing = list() - del(body_lying) - body_lying = list() - + var/icon/standing = new /icon('dam_human.dmi', "00") + var/icon/lying = new /icon('dam_human.dmi', "00-2") for(var/name in organs) var/datum/organ/external/O = organs[name] if(!O.destroyed) @@ -33,11 +30,13 @@ var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels // world << "[O.icon_name] [O.damage_state] \icon[DI]" - body_standing += DI + standing.Blend(DI,ICON_OVERLAY) DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY) // world << "[O.r_name]2 [O.d_i_state]-2 \icon[DI]" - body_lying += DI + lying.Blend(DI,ICON_OVERLAY) + damageicon_standing = new /image("icon" = standing, "layer" = DAMAGE_LAYER) + damageicon_lying = new /image("icon" = lying, "layer" = DAMAGE_LAYER) /mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null) @@ -57,6 +56,9 @@ if(blocked) damage = (damage/(blocked+1)) + if(DERMALARMOR in augmentations) + damage = damage - (round(damage*0.35)) // reduce damage by 35% + switch(damagetype) if(BRUTE) organ.take_damage(damage, 0, sharp, used_weapon) @@ -68,5 +70,4 @@ UpdateDamageIcon() updatehealth() - update_clothing() return 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index df20678c13d..d72b6fca9ff 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -10,6 +10,12 @@ emp_act /mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone) + if(REFLEXES in augmentations) + if(prob(50)) + var/message = pick("[src] skillfully dodges the [P.name]!", "[src] ducks, dodging the [P.name]!", "[src] effortlessly jumps out of the way of the [P.name]!", "[src] dodges the [P.name] in one graceful movement!", "[src] leans back, dodging the [P.name] narrowly!") + visible_message("\red [message]") + return -1 + if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof)) if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)) var/reflectchance = 40 - round(P.damage/3) @@ -153,10 +159,11 @@ emp_act if(H.wear_suit) H.wear_suit.add_blood(src) else if(H.w_uniform) H.w_uniform.add_blood(src) if(H.shoes) H.shoes.add_blood(src) - if (H.gloves) - H.gloves.add_blood(H) - H.gloves.transfer_blood = 2 - H.gloves.bloody_hands_mob = H + if (H.gloves && istype(H.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = H.gloves + G.add_blood(H) + G.transfer_blood = 2 + G.bloody_hands_mob = H else H.add_blood(H) H.bloody_hands = 2 @@ -198,4 +205,3 @@ emp_act if(src.w_uniform) src.w_uniform.add_blood(src) UpdateDamageIcon() - update_clothing() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b30bc302ceb..fbb1c2f4fcf 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1,19 +1,20 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + #define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. No air applies this value. /mob/living/carbon/human - var - oxygen_alert = 0 - toxins_alert = 0 - fire_alert = 0 + var/oxygen_alert = 0 + var/toxins_alert = 0 + var/fire_alert = 0 - temperature_alert = 0 + var/temperature_alert = 0 // used to do some stuff only on every X life tick - life_tick = 0 - isbreathing = 1 - holdbreath = 0 - lyingcheck = 0 - buckle_check = 0 + var/life_tick = 0 + var/isbreathing = 1 + var/holdbreath = 0 + var/lyingcheck = 0 + var/buckle_check = 0 /mob/living/carbon/human/Life() set invisibility = 0 @@ -29,16 +30,16 @@ //Being buckled to a chair or bed check_if_buckled() + handle_clothing() - // Update clothing -// update_clothing() + // TODO: this check and the lyingcheck variable should probably be removed in favor of the visual_lying check if((lyingcheck != lying) || (buckle_check != (buckled ? 1 : 0))) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every spawn(5) update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal. if(stat == 2) - if((!lying || !lyingcheck) && !buckled) + if(!lying && !buckled) lying = 1 update_clothing() return @@ -164,7 +165,7 @@ handle_disabilities() - if(mutations2 & mHallucination) + if(mHallucination in mutations) hallucination = 100 halloss = 0 @@ -194,7 +195,7 @@ Paralyse(15) setHalLoss(99) - if(mutations2 & mSmallsize) + if(mSmallsize in mutations) if(!(pass_flags & PASSTABLE)) pass_flags |= PASSTABLE else @@ -203,7 +204,7 @@ - if (mutations & mRegen) + if (mRegen in mutations) adjustBruteLoss(-2) adjustToxLoss(-2) adjustOxyLoss(-2) @@ -216,24 +217,24 @@ updatehealth() if(!(/mob/living/carbon/human/proc/morph in src.verbs)) - if(mutations & mMorph) + if(mMorph in mutations) src.verbs += /mob/living/carbon/human/proc/morph else - if(!(mutations & mMorph)) + if(!(mMorph in mutations)) src.verbs -= /mob/living/carbon/human/proc/morph if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs)) - if(mutations & mRemote) + if(mRemote in mutations) src.verbs += /mob/living/carbon/human/proc/remoteobserve else - if(!(mutations & mRemote)) + if(!(mRemote in mutations)) src.verbs -= /mob/living/carbon/human/proc/remoteobserve if(!(/mob/living/carbon/human/proc/remotesay in src.verbs)) - if(mutations & mRemotetalk) + if(mRemotetalk in mutations) src.verbs += /mob/living/carbon/human/proc/remotesay else - if(!(mutations & mRemotetalk)) + if(!(mRemotetalk in mutations)) src.verbs -= /mob/living/carbon/human/proc/remotesay @@ -284,11 +285,37 @@ handle_mutations_and_radiation() if(getFireLoss()) - if(mutations & COLD_RESISTANCE || (prob(1) && prob(75))) + if((COLD_RESISTANCE in mutations) || (prob(1) && prob(75))) heal_organ_damage(0,1) - if (mutations & HULK && health <= 25) - mutations &= ~HULK + // Make nanoregen heal youu, -3 all damage types + if(NANOREGEN in augmentations) + var/healed = 0 + if(getToxLoss()) + adjustToxLoss(-3) + healed = 1 + if(getOxyLoss()) + adjustOxyLoss(-3) + healed = 1 + if(getCloneLoss()) + adjustCloneLoss(-3) + healed = 1 + if(getBruteLoss()) + heal_organ_damage(3,0) + healed = 1 + if(getFireLoss()) + heal_organ_damage(0,3) + healed = 1 + if(halloss > 0) + halloss -= 3 + if(halloss < 0) halloss = 0 + healed = 1 + if(healed) + if(prob(5)) + src << "\blue You feel your wounds mending..." + + if ((HULK in mutations) && health <= 25) + mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -359,7 +386,7 @@ if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return var/datum/gas_mixture/environment = loc.return_air() - var/datum/air_group/breath + var/datum/gas_mixture/breath // HACK NEED CHANGING LATER if(isbreathing && health < config.health_threshold_crit) @@ -420,6 +447,16 @@ smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? break // If they breathe in the nasty stuff once, no need to continue checking + if(istype(wear_mask, /obj/item/clothing/mask/gas)) + var/datum/gas_mixture/filtered = new() + filtered.toxins = breath.toxins + filtered.trace_gases = breath.trace_gases.Copy() + filtered.update_values() + breath.toxins = 0 + breath.trace_gases = list() + breath.update_values() + loc.assume_air(filtered) + else //Still give containing object the chance to interact if(istype(loc, /obj/)) var/obj/location_as_object = loc @@ -452,7 +489,7 @@ canmove = 1 handle_breath(datum/gas_mixture/breath) - if(nodamage || (mutations & mNobreath)) + if(nodamage || REBREATHER in augmentations || (mNobreath in mutations)) return if(!breath || (breath.total_moles == 0)) @@ -469,7 +506,7 @@ var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa //var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now) var/safe_co2_max = 10 // Yes it's an arbitrary value who cares? - var/safe_toxins_max = 0.005 + var/safe_toxins_max = 0.0025 var/SA_para_min = 1 var/SA_sleep_min = 5 var/oxygen_used = 0 @@ -541,7 +578,7 @@ SA.moles = 0 //Hack to stop the damned surgeon from giggling. - if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -648,8 +685,10 @@ */ //Account for massive pressure differences. Done by Polymorph + + var/pressure = environment.return_pressure() - if(!istype(wear_suit, /obj/item/clothing/suit/space)) + if(!istype(wear_suit, /obj/item/clothing/suit/space) && !istype(wear_suit, /obj/item/clothing/suit/fire)) /*if(pressure < 20) if(prob(25)) src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking." @@ -658,6 +697,9 @@ if(pressure > HAZARD_HIGH_PRESSURE) adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE)) + if(environment.toxins > MOLES_PLASMA_VISIBLE) + pl_effects() + return //TODO: DEFERRED adjust_body_temperature(current, loc_temp, boost) @@ -670,11 +712,17 @@ increments = difference/10 var/change = increments*boost // Get the amount to change by (x per increment) var/temp_change - if(current < loc_temp) - temperature = min(loc_temp, temperature+change) - else if(current > loc_temp) - temperature = max(loc_temp, temperature-change) - temp_change = (temperature - current) + if(current < loc_temp) //If your body temp is less than loc, then try to heat up + if(istajaran(src)) //If Tajaran, you heat up faster + change = change*4 + temperature = min(loc_temp, temperature+change) //Pick the minimum of these two + else if(current > loc_temp) //If your body temp is more than loc, then try to cool down + if(istajaran(src)) //If Tajaran, you cool down slower + change = change*0.5 + if(mutantrace == "lizard") //If Soghun, you cool down faster + change = change*3 + temperature = max(loc_temp, temperature-change) //Pick the max of these two + temp_change = (temperature - current) //Work out the actual change of temp return temp_change get_thermal_protection() @@ -700,7 +748,7 @@ thermal_protection += 3 if(head && (head.flags & HEADSPACE)) thermal_protection += 1 - if(mutations & COLD_RESISTANCE) + if(COLD_RESISTANCE in mutations) thermal_protection += 5 return thermal_protection @@ -780,20 +828,25 @@ adjustToxLoss(-1) adjustOxyLoss(-1) - /*if(overeatduration > 500 && !(mutations & FAT)) +/* if(overeatduration > 500 && !(FAT in mutations)) src << "\red You suddenly feel blubbery!" - mutations |= FAT + mutations.Add(FAT) update_body() - if (overeatduration < 100 && mutations & FAT) + if ((overeatduration < 100 && (FAT in mutations))) src << "\blue You feel fit again!" - mutations &= ~FAT - update_body()*/ - + mutations.Remove(FAT) + update_body() +*/ // nutrition decrease if (nutrition > 0 && stat != 2) // sleeping slows the metabolism, hunger increases more slowly if(stat == 1) - nutrition = max (0, nutrition - HUNGER_FACTOR) + if(istajaran(src)) //Tajarans get hungry slightly faster + nutrition = max (0, nutrition - HUNGER_FACTOR*1.25) + if(mutantrace == "lizard") //Soghuns get hungry much slower + nutrition = max (0, nutrition - HUNGER_FACTOR*0.5) + else + nutrition = max (0, nutrition - HUNGER_FACTOR) else nutrition = max (0, nutrition - HUNGER_FACTOR / 4) @@ -1079,11 +1132,11 @@ // Apparently deletes all the hud_ icons for(var/image/hud in client.images) if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe - del(hud) + client.images -= hud//del(hud) // Handle special vision stuff, such as thermals or ghost vision // ------------------------------------------------------------- - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS @@ -1098,16 +1151,16 @@ else seer = 0 see_invisible = 0 + else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)) switch(wear_mask:mode) if(0) - if(client) - var/target_list[] = list() - for(var/mob/living/target in oview(src)) - if( target.mind&&(target.mind.special_role||issilicon(target)) )//They need to have a mind. - target_list += target - if(target_list.len)//Everything else is handled by the ninja mask proc. - wear_mask:assess_targets(target_list, src) + var/target_list[] = list() + for(var/mob/living/target in oview(src)) + if( target.mind&&(target.mind.special_role||issilicon(target)) )//They need to have a mind. + target_list += target + if(target_list.len)//Everything else is handled by the ninja mask proc. + wear_mask:assess_targets(target_list, src) if (!druggy) see_invisible = 0 if(1) @@ -1122,6 +1175,7 @@ sight |= SEE_TURFS if(!druggy) see_invisible = 0 + else if(istype(glasses, /obj/item/clothing/glasses/meson)) sight |= SEE_TURFS if(!druggy) @@ -1131,10 +1185,12 @@ see_in_dark = 5 if(!druggy) see_invisible = 0 + else if(istype(glasses, /obj/item/clothing/glasses/thermal)) sight |= SEE_MOBS if(!druggy) see_invisible = 2 + else if(istype(glasses, /obj/item/clothing/glasses/material)) sight |= SEE_OBJS if (!druggy) @@ -1165,11 +1221,6 @@ see_invisible = 0 - - - - - else if(istype(head, /obj/item/clothing/head/helmet/welding)) // wat. This is never fucking called. if(!head:up && tinted_weldhelh) see_in_dark = 1 @@ -1183,23 +1234,20 @@ // Special on-map HUDs like the medical HUD // ---------------------------------------- if(istype(glasses, /obj/item/clothing/glasses/hud/health)) - if(client) - glasses:process_hud(src) + glasses:process_hud(src) if (!druggy) see_invisible = 0 - if(istype(glasses, /obj/item/clothing/glasses/hud/security)) - if(client) - glasses:process_hud(src) + else if(istype(glasses, /obj/item/clothing/glasses/hud/security)) + glasses:process_hud(src) if (!druggy) see_invisible = 0 - if(istype(glasses, /obj/item/clothing/glasses/sunglasses)) + else if(istype(glasses, /obj/item/clothing/glasses/sunglasses)) see_in_dark = 1 if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud)) - if(client) - if(glasses:hud) - glasses:hud:process_hud(src) + if(glasses:hud) + glasses:hud:process_hud(src) if (!druggy) see_invisible = 0 @@ -1339,8 +1387,20 @@ else blind.layer = 0 - if ((disabilities & 1 && ((glasses && !glasses.prescription) || !glasses)) || (glasses && glasses.prescription && !(disabilities & 1))) - client.screen += hud_used.vimpaired + if(disabilities & 1) + if(!glasses) + client.screen += hud_used.vimpaired + else if (glasses && istype(glasses,/obj/item/clothing/glasses)) + var/obj/item/clothing/glasses/G = glasses + if(!G.prescription) + client.screen += hud_used.vimpaired + else + client.screen += hud_used.vimpaired + else + if(glasses && istype(glasses,/obj/item/clothing/glasses)) + var/obj/item/clothing/glasses/G = glasses + if(G.prescription) + client.screen += hud_used.vimpaired if (eye_blurry) client.screen += hud_used.blurry @@ -1366,7 +1426,7 @@ if (machine) if (!( machine.check_eye(src) )) reset_view(null) - else if(!(mutations & mRemote) && !client.adminobs) + else if(!(mRemote in mutations) && !client.adminobs) reset_view(null) if(remoteobserve) remoteobserve = null @@ -1494,4 +1554,29 @@ else if(shock_stage == 40) src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") else if(shock_stage == 80) - src << ""+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.") \ No newline at end of file + src << ""+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.") + + +/mob/living/carbon/human/proc/handle_clothing() + // Non-visual stuff that was in update_clothing() + + if(buckled) + if(istype(buckled, /obj/structure/stool/bed/chair)) + lying = 0 + else + lying = 1 + + if(!w_uniform) + // Automatically drop anything in store / id / belt if you're not wearing a uniform. + for (var/obj/item/thing in list(r_store, l_store, wear_id, belt)) + if (thing) + u_equip(thing) + if (client) + client.screen -= thing + if (thing) + thing.loc = loc + thing.dropped(src) + thing.layer = initial(thing.layer) + + + name = get_visible_name() diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index 6bbbc532d27..78cf259a7cd 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/Login() ..() - update_clothing() + rebuild_appearance() if (!isturf(src.loc)) src.client.eye = src.loc diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index b647811511c..7537122a78c 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -26,6 +26,28 @@ pick_list -= H message = dd_list2text(temp_message, " ") + if(istype(src.wear_mask, /obj/item/clothing/mask/luchador)) + if(copytext(message, 1, 2) != "*") + message = dd_replacetext(message, "captain", "CAPITÁN") + message = dd_replacetext(message, "station", "ESTACIÓN") + message = dd_replacetext(message, "sir", "SEÑOR") + message = dd_replacetext(message, "the ", "el ") + message = dd_replacetext(message, "my ", "mi ") + message = dd_replacetext(message, "is ", "es ") + message = dd_replacetext(message, "it's", "es") + message = dd_replacetext(message, "friend", "amigo") + message = dd_replacetext(message, "buddy", "amigo") + message = dd_replacetext(message, "hello", "hola") + message = dd_replacetext(message, " hot", " caliente") + message = dd_replacetext(message, " very ", " muy ") + message = dd_replacetext(message, "sword", "espada") + message = dd_replacetext(message, "library", "biblioteca") + message = dd_replacetext(message, "traitor", "traidor") + message = dd_replacetext(message, "wizard", "mago") + message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image. + if(prob(25)) + message += " OLE!" + //Ninja mask obscures text and voice if set to do so. //Would make it more global but it's sort of ninja specific. if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown") diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm index 2356f425505..7815971e947 100644 --- a/code/modules/mob/living/carbon/metroid/death.dm +++ b/code/modules/mob/living/carbon/metroid/death.dm @@ -11,7 +11,7 @@ if (ghost.client) ghost.client.eye = ghost - explosion(src.loc, -1,-1,3,12) + explosion(get_turf(src), -1,-1,3,12) sleep(2) del(src) else diff --git a/code/modules/mob/living/carbon/metroid/login.dm b/code/modules/mob/living/carbon/metroid/login.dm index 6b696c8a516..e954e353e76 100644 --- a/code/modules/mob/living/carbon/metroid/login.dm +++ b/code/modules/mob/living/carbon/metroid/login.dm @@ -1,7 +1,7 @@ /mob/living/carbon/metroid/Login() ..() - update_clothing() + rebuild_appearance() if (!isturf(src.loc)) src.client.eye = src.loc diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 912b88aa8c4..59b8eb1f9a8 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -9,7 +9,7 @@ real_name = name spawn (1) - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" ..() @@ -384,7 +384,7 @@ for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\red [M.name] has bit [src]!"), 1) - bruteloss += rand(1, 3) + adjustBruteLoss(rand(1, 3)) updatehealth() return @@ -463,11 +463,13 @@ - if(M.gloves) - if(M.gloves.cell) + + if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.cell) if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. - if(M.gloves.cell.charge >= 2500) - M.gloves.cell.charge -= 2500 + if(G.cell.charge >= 2500) + G.cell.charge -= 2500 for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall.", 2) @@ -503,6 +505,16 @@ O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) else + if(ELECTRICHANDS in M.augmentations) + var/gendertxt = "their" + if(M.gender == "male") + gendertxt = "his" + if(M.gender == "female") + gendertxt = "her" + + visible_message("\red [M] has shocked [src] with [gendertxt] bare hands!") + return + var/damage = rand(1, 9) var/attack_verb @@ -519,7 +531,7 @@ attacked += 10 if (prob(90)) - if (M.mutations & HULK) + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations)) damage += 5 if(Victim) Victim = null diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 70489c1117a..33b6ed641b5 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -13,6 +13,7 @@ var/oxygen_alert = 0 var/toxins_alert = 0 var/fire_alert = 0 + var/temperature_alert = 0 @@ -131,15 +132,15 @@ handle_mutations_and_radiation() if(src.getFireLoss()) - if(src.mutations & COLD_RESISTANCE || prob(50)) + if((COLD_RESISTANCE in mutations) || prob(50)) switch(src.getFireLoss()) if(1 to 50) src.adjustFireLoss(-1) if(51 to 100) src.adjustFireLoss(-5) - if (src.mutations & HULK && src.health <= 25) - src.mutations &= ~HULK + if ((HULK in mutations) && src.health <= 25) + src.mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -187,7 +188,7 @@ if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite var/datum/gas_mixture/environment = loc.return_air() - var/datum/air_group/breath + var/datum/gas_mixture/breath if(losebreath>0) //Suffocating so do not take a breath src.losebreath-- @@ -369,7 +370,10 @@ if(stat==2) bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000) + //Account for massive pressure differences + + var/pressure = environment.return_pressure() // if(!wear_suit) Monkies cannot into space. @@ -384,6 +388,9 @@ if(pressure > HAZARD_HIGH_PRESSURE) adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE)) + + + return //TODO: DEFERRED handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) @@ -405,7 +412,7 @@ src.drowsyness-- src.eye_blurry = max(2, src.eye_blurry) if (prob(5)) - src.sleeping = 1 + src.sleeping += 1 Paralyse(5) confused = max(0, confused - 1) @@ -527,7 +534,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY) + if (src.stat == 2 || (XRAY in mutations)) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS @@ -566,6 +573,7 @@ src.healths.icon_state = "health6" else src.healths.icon_state = "health7" + if (pressure) var/datum/gas_mixture/environment = loc.return_air() if(environment) @@ -668,4 +676,4 @@ if (mind.special_role == "Changeling" && changeling) changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage) if ((changeling.geneticdamage > 0)) - changeling.geneticdamage = changeling.geneticdamage-1 \ No newline at end of file + changeling.geneticdamage = changeling.geneticdamage-1 diff --git a/code/modules/mob/living/carbon/monkey/login.dm b/code/modules/mob/living/carbon/monkey/login.dm index 9f24a42fec6..1fb31db3874 100644 --- a/code/modules/mob/living/carbon/monkey/login.dm +++ b/code/modules/mob/living/carbon/monkey/login.dm @@ -1,7 +1,7 @@ /mob/living/carbon/monkey/Login() ..() - update_clothing() + rebuild_appearance() /* if (!( src.primary )) var/t1 = rand(1000, 1500) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 688ad10eafc..06ec610f526 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -69,7 +69,7 @@ if(!lying_icon) lying_icon = new /icon('monkey.dmi', "monkey0") icon = stand_icon - update_clothing() + rebuild_appearance() src << "\blue Your icons have been generated!" ..() @@ -98,7 +98,7 @@ if(ismob(AM)) var/mob/tmob = AM /* - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(70)) usr << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 @@ -167,7 +167,7 @@ for(var/mob/O in viewers(src, null)) O.show_message(text("\red [M.name] has bit []!", src), 1) var/damage = rand(1, 5) - if (mutations & HULK) damage += 10 + if (HULK in mutations) damage += 10 adjustBruteLoss(damage) updatehealth() @@ -210,11 +210,13 @@ if (istype(loc, /turf) && istype(loc.loc, /area/start)) M << "No attacking people at spawn, you jackass." return - if(M.gloves) - if(M.gloves.cell) - if(M.a_intent == "hurt") - if(M.gloves.cell.charge >= 2500) - M.gloves.cell.charge -= 2500 + + if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = M.gloves + if(G.cell) + if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(G.cell.charge >= 2500) + G.cell.charge -= 2500 Weaken(5) if (stuttering < 5) stuttering = 5 @@ -928,7 +930,6 @@ UpdateDamageIcon() updatehealth() - update_clothing() return 1 /*/mob/living/carbon/monkey/UpdateDamageIcon() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 78e4257cf86..19c10cedb4d 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -14,7 +14,7 @@ if(BRUTE) adjustBruteLoss(damage/(blocked+1), used_weapon) if(BURN) - if(mutations & COLD_RESISTANCE) damage = 0 + if(COLD_RESISTANCE in mutations) damage = 0 adjustFireLoss(damage/(blocked+1), used_weapon) if(TOX) adjustToxLoss(damage/(blocked+1)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index aa829b0930e..20d6de34bd1 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,19 +1,3 @@ -/mob/living/Life() - - ..() - - // While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata. -//Whoever wrote this should go suck a choad. This was causing runtimes, asshat. IN ADDITION, YOU PUT IT IN THE LIFE PROC YOU ASSHAT -// if(!src.storedpreferences) -// src.storedpreferences = new -// storedpreferences.savefile_load(src, 0) - - - - - return - - /mob/living/verb/succumb() set hidden = 1 if ((src.health < 0 && src.health > -95.0)) @@ -33,26 +17,20 @@ //sort of a legacy burn method for /electrocute, /shock, and the e_chair /mob/living/proc/burn_skin(burn_amount, used_weapon = null) if(istype(src, /mob/living/carbon/human)) - if(src.mutations2 & mShock) + if(mShock in src.mutations) return 0 //world << "DEBUG: burn_skin(), mutations=[mutations]" - if (src.mutations & COLD_RESISTANCE) //fireproof + if (COLD_RESISTANCE in src.mutations) //fireproof return 0 var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part var/divided_damage = (burn_amount)/(H.organs.len) - var/extradam = 0 //added to when organ is at max dam for(var/name in H.organs) - var/datum/organ/external/affecting = H.organs[name] - if(!affecting) continue - if(affecting.take_damage(0, divided_damage+extradam, 0, used_weapon)) - extradam = 0 - else - extradam += divided_damage + apply_damage(divided_damage, BURN, name, 0, 0, "Skin Burns") H.UpdateDamageIcon() H.updatehealth() return 1 else if(istype(src, /mob/living/carbon/monkey)) - if (src.mutations & COLD_RESISTANCE) //fireproof + if (COLD_RESISTANCE in src.mutations) //fireproof return 0 var/mob/living/carbon/monkey/M = src M.adjustFireLoss(burn_amount) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm new file mode 100644 index 00000000000..a368bd25524 --- /dev/null +++ b/code/modules/mob/living/login.dm @@ -0,0 +1,12 @@ +/mob/living/Login() + ..() + if(ticker && ticker.mode) + switch(ticker.mode.name) + if("sandbox") + CanBuild() + if("revolution") + if ((src.mind in ticker.mode:revolutionaries) || (src.mind in ticker.mode:head_revolutionaries)) + ticker.mode:update_rev_icons_added(src.mind) + if("cult") + if (src.mind in ticker.mode:cult) + ticker.mode:update_cult_icons_added(src.mind) \ No newline at end of file diff --git a/code/modules/mob/living/parasite/meme.dm b/code/modules/mob/living/parasite/meme.dm index e3d7b53d467..9a246143412 100644 --- a/code/modules/mob/living/parasite/meme.dm +++ b/code/modules/mob/living/parasite/meme.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + // === MEMETIC ANOMALY === // ======================= @@ -18,8 +20,7 @@ var/global/const/MAXIMUM_MEME_POINTS = 750 mob/living/carbon/var/list/parasites = list() mob/living/parasite - var - mob/living/carbon/host // the host that this parasite occupies + var/mob/living/carbon/host // the host that this parasite occupies Login() ..() @@ -498,7 +499,6 @@ mob/living/parasite/meme/verb/Analgesic() mob/proc/clearHUD() - update_clothing() if(client) client.screen.Cut() // Take control of the mob @@ -593,4 +593,4 @@ mob/living/parasite/check_contents_for(t) mob/living/parasite/check_contents_for_reagent(t) if(!host) return 0 - return host.check_contents_for_reagent(t) \ No newline at end of file + return host.check_contents_for_reagent(t) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 1e9cb3248a3..9531b79fbca 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -69,9 +69,10 @@ return emote(copytext(message, 2)) var/alt_name = "" - if (istype(src, /mob/living/carbon/human) && name != real_name) + if (istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = src - alt_name = " (as [H.get_id_name("Unknown")])" + if(H.get_face_name() != real_name) + alt_name = " (as [H.get_id_name("Unknown")])" var/italics = 0 var/message_range = null var/message_mode = null @@ -156,6 +157,21 @@ if (!message) return + //work out if we're speaking skrell or not + var/is_speaking_skrell = 0 + + if(copytext(message, 1, 3) == ":k" || copytext(message, 1, 3) == ":K") + message = copytext(message, 3) + if(skrell_talk_understand || universal_speak) + is_speaking_skrell = 1 + + //work out if we're speaking soghun or not + var/is_speaking_soghun = 0 + if(copytext(message, 1, 3) == ":o" || copytext(message, 1, 3) == ":O") + message = copytext(message, 3) + if(soghun_talk_understand || universal_speak) + is_speaking_soghun = 1 + if( !message_mode && (disease_symptoms & DISEASE_WHISPER)) message_mode = "whisper" @@ -403,7 +419,12 @@ var/list/heard_b = list() // didn't understand us for (var/mob/M in listening) - if (M.say_understands(src)) + //if speaking in skrell, only let other skrell understand + if (M.say_understands(src) && !is_speaking_skrell && !is_speaking_soghun) //This could probably be merged into say_understands(), but I'm too lazy + heard_a += M + else if(is_speaking_skrell && (M.skrell_talk_understand || M.universal_speak)) + heard_a += M + else if(is_speaking_soghun && (M.soghun_talk_understand || M.universal_speak)) heard_a += M else heard_b += M @@ -413,18 +434,20 @@ var/rendered = null if (length(heard_a)) - var/message_a = say_quote(message) + var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell) if (italics) message_a = "[message_a]" if (!istype(src, /mob/living/carbon/human)) rendered = "[name] [message_a]" else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) + var/mob/living/carbon/human/H = src if(wear_mask:vchange) rendered = "[wear_mask:voice] [message_a]" else - rendered = "[name] [message_a]" + rendered = "[H.get_visible_name()] [message_a]" else - rendered = "[real_name][alt_name] [message_a]" + var/mob/living/carbon/human/H = src + rendered = "[H.get_face_name()][alt_name] [message_a]" /* // Create speech bubble @@ -491,7 +514,7 @@ message_b = voice_message else message_b = stars(message) - message_b = say_quote(message_b) + message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell) if (italics) message_b = "[message_b]" diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 9e2dc1ab40d..d627f74b44e 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -123,6 +123,8 @@ var/list/icons = list("Blue", "Monochrome", "Rainbow", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Red", "Static") if (src.name == "B.A.N.N.E.D." && src.ckey == "spaceman96") icons += "B.A.N.N.E.D." + if (src.name == "M00X-BC" && src.ckey == "searif") + icons += "M00X-BC" icontype = input("Please, select a display!", "AI", null/*, null*/) in icons if(icontype == "Blue") icon_state = "ai" @@ -148,6 +150,8 @@ icon_state = "ai-bliss" else if(icontype == "B.A.N.N.E.D.") icon_state = "ai-banned" + else if(icontype == "M00X-BC") + icon_state = "ai-searif" else if(icontype == "Red") icon_state = "ai-malf" else if(icontype == "Static") diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 79c4a7783c4..1e506b0b8e5 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -39,7 +39,7 @@ if(explosive) spawn(10) - explosion(src.loc, 3, 6, 12, 15) + explosion(get_turf(src), 3, 6, 12, 15) for(var/obj/machinery/ai_status_display/O in world) //change status spawn( 0 ) diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index 959a83abcf3..5f70bdb7754 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -1,6 +1,10 @@ /mob/living/silicon/ai/Login() + for(var/obj/effect/rune/rune in world) + var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]") + blood.override = 1 + client.images += blood ..() - update_clothing() + rebuild_appearance() for(var/S in src.client.screen) del(S) src.flash = new /obj/screen( null ) diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm index e6af3a40428..6c37d2b13ab 100644 --- a/code/modules/mob/living/silicon/decoy/death.dm +++ b/code/modules/mob/living/silicon/decoy/death.dm @@ -2,7 +2,7 @@ src.stat = 2 src.icon_state = "ai-crash" spawn(10) - explosion(src.loc, 3, 6, 12, 15) + explosion(get_turf(src), 3, 6, 12, 15) for(var/obj/machinery/ai_status_display/O in world) //change status spawn( 0 ) diff --git a/code/modules/mob/living/silicon/pai/hud.dm b/code/modules/mob/living/silicon/pai/hud.dm index 974c041116a..a3761f2da26 100644 --- a/code/modules/mob/living/silicon/pai/hud.dm +++ b/code/modules/mob/living/silicon/pai/hud.dm @@ -2,16 +2,16 @@ if(client) for(var/image/hud in client.images) if(copytext(hud.icon_state,1,4) == "hud") - del(hud) + client.images -= hud /mob/living/silicon/pai/proc/securityHUD() if(client) - var/icon/tempHud = 'hud.dmi' var/turf/T = get_turf_or_move(src.loc) for(var/mob/living/carbon/human/perp in view(T)) if(perp.wear_id) - client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") - var/perpname = "wot" + perp.sec_img.icon_state = "hud[ckey(perp:wear_id:GetJobName())]" + client.images += perp.sec_img + var/perpname = "wot no name?" if(istype(perp.wear_id,/obj/item/weapon/card/id)) perpname = perp.wear_id:registered_name else if(istype(perp.wear_id,/obj/item/device/pda)) @@ -21,17 +21,19 @@ if (E.fields["name"] == perpname) for (var/datum/data/record/R in data_core.security) if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - client.images += image(tempHud,perp,"hudwanted") + perp.sec2_img.icon_state = "hudwanted" + client.images += perp.sec2_img break else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - client.images += image(tempHud,perp,"hudprisoner") + perp.sec2_img.icon_state = "hudprisoner" + client.images += perp.sec2_img break else - client.images += image(tempHud,perp,"hudunknown") + perp.sec_img.icon_state = "hudunknown" + client.images += perp.sec_img /mob/living/silicon/pai/proc/medicalHUD() if(client) - var/icon/tempHud = 'hud.dmi' var/turf/T = get_turf_or_move(src.loc) for(var/mob/living/carbon/human/patient in view(T)) @@ -40,15 +42,17 @@ if(!D.hidden[SCANNER]) foundVirus = 1 - client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") + patient.health_img.icon_state = "hud[RoundHealth(patient.health)]" + client.images += patient.health_img if(patient.stat == 2) - client.images += image(tempHud,patient,"huddead") + patient.med_img.icon_state = "huddead" else if(patient.alien_egg_flag) - client.images += image(tempHud,patient,"hudxeno") + patient.med_img.icon_state = "hudxeno" else if(foundVirus) - client.images += image(tempHud,patient,"hudill") + patient.med_img.icon_state = "hudill" else - client.images += image(tempHud,patient,"hudhealthy") + patient.med_img.icon_state = "hudhealthy" + client.images += patient.med_img /mob/living/silicon/pai/proc/RoundHealth(health) switch(health) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 8f238e23135..49a0baadd26 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -1,15 +1,16 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + // Recruiting observers to play as pAIs var/datum/paiController/paiController // Global handler for pAI candidates /datum/paiCandidate - var - name - key - description - role - comments - ready = 0 + var/name + var/key + var/description + var/role + var/comments + var/ready = 0 @@ -217,4 +218,4 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(response == "Yes") recruitWindow(C.mob) else if (response == "Never for this round") - C.be_pai = 0 \ No newline at end of file + C.be_pai = 0 diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index d5e7b4514e8..d9c13ba48f8 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -54,10 +54,9 @@ m_type = 2 if ("custom") - var/input = input("Choose an emote to display.") as text|null + var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN) if (!input) return - input = sanitize(input) var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") if (input2 == "Visible") m_type = 1 diff --git a/code/modules/mob/living/silicon/robot/hud.dm b/code/modules/mob/living/silicon/robot/hud.dm index d272c96f3a4..41100e1066c 100644 --- a/code/modules/mob/living/silicon/robot/hud.dm +++ b/code/modules/mob/living/silicon/robot/hud.dm @@ -202,7 +202,7 @@ mymob.pullin.icon = 'screen1_robot.dmi' mymob.pullin.icon_state = "pull0" mymob.pullin.name = "pull" - mymob.pullin.screen_loc = ui_pull_old + mymob.pullin.screen_loc = ui_pull_borg mymob.blind = new /obj/screen( null ) mymob.blind.icon = 'screen1_robot.dmi' diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 3c8f5f5f5ca..efda4d97562 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -153,7 +153,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY || src.sight_mode & BORGXRAY) + if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 1127d6bebb7..728112e394e 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,7 +1,7 @@ /mob/living/silicon/robot/Login() ..() - update_clothing() + rebuild_appearance() if (!isturf(src.loc)) src.client.eye = src.loc diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index c3e26236073..e8523031224 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -331,7 +331,7 @@ if(ismob(AM)) var/mob/tmob = AM /* - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(20)) usr << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 2962b346929..19d219ac77a 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/robot_module name = "robot module" icon = 'module.dmi' @@ -5,10 +7,10 @@ w_class = 100.0 item_state = "electronic" flags = FPRINT|TABLEPASS | CONDUCT - var - list/modules = list() - obj/item/emag = null - obj/item/borg/upgrade/jetpack = null + + var/list/modules = list() + var/obj/item/emag = null + var/obj/item/borg/upgrade/jetpack = null emp_act(severity) @@ -59,12 +61,12 @@ ..() src.modules += new /obj/item/borg/sight/hud/med(src) src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/weapon/reagent_containers/borghypo + src.modules += new /obj/item/weapon/reagent_containers/borghypo(src) src.modules += new /obj/item/weapon/reagent_containers/glass/large(src) src.modules += new /obj/item/weapon/reagent_containers/robodropper(src) - src.modules += new /obj/item/weapon/reagent_containers/syringe - src.modules += new /obj/item/weapon/extinguisher/mini - src.emag = new /obj/item/weapon/circular_saw + src.modules += new /obj/item/weapon/reagent_containers/syringe(src) + src.modules += new /obj/item/weapon/extinguisher/mini(src) + src.emag = new /obj/item/weapon/circular_saw(src) return @@ -142,8 +144,8 @@ New() ..() src.modules += new /obj/item/weapon/soap/nanotrasen(src) - src.modules += new /obj/item/weapon/trashbag - src.modules += new/obj/item/weapon/mop + src.modules += new /obj/item/weapon/trashbag(src) + src.modules += new/obj/item/weapon/mop(src) src.emag = new /obj/item/weapon/cleaner(src) var/datum/reagents/R = new/datum/reagents(1000) diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 4eaddf543b9..b6df38e8ef1 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -48,14 +48,18 @@ if (!message) return - var/obj/machinery/hologram/holopad/T = client.eye//Client eye centers on an object. - if(istype(T)&&T.hologram&&T.master==src)//If there is a hologram and its master is the user. + if(!isAI(src)) + return + + var/mob/living/silicon/ai/A = src + var/obj/machinery/hologram/holopad/T = A.current//Client eye centers on an object. + if(istype(T) && T.hologram && T.master==src) var/message_a = say_quote(message) //Human-like, sorta, heard by those who understand humans. var/rendered_a = "[name] [message_a]" - //Speach distorted, heard by those who do not understand AIs. + //Speech distorted, heard by those who do not understand AIs. message = stars(message) var/message_b = say_quote(message) var/rendered_b = "[voice_name] [message_b]" diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index e7a8d19da5b..5d55ee62c7f 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -1,32 +1,32 @@ -/mob/Login() - log_access("Login: [key_name(src)] from [src.client.address ? src.client.address : "localhost"]") - src.lastKnownIP = src.client.address - src.computer_id = src.client.computer_id - if (config.log_access) - for (var/mob/M in world) - if(M == src) - continue - if(M.client && M.client.address == src.client.address) - log_access("Notice: [key_name(src)] has same IP address as [key_name(M)]") - message_admins("Notice: [key_name_admin(src)] has the same IP address as [key_name_admin(M)]", 1) - else if (M.lastKnownIP && M.lastKnownIP == src.client.address && M.ckey != src.ckey && M.key) - log_access("Notice: [key_name(src)] has same IP address as [key_name(M)] did ([key_name(M)] is no longer logged in).") - message_admins("Notice: [key_name_admin(src)] has the same IP address as [key_name_admin(M)] did ([key_name_admin(M)] is no longer logged in).", 1) - if(M.client && M.client.computer_id == src.client.computer_id) - log_access("Notice: [key_name(src)] has same computer ID as [key_name(M)]") - message_admins("Notice: [key_name_admin(src)] has the same computer ID as [key_name_admin(M)]", 1) - spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") - else if (M.computer_id && M.computer_id == src.client.computer_id && M.ckey != src.ckey && M.key) - log_access("Notice: [key_name(src)] has same computer ID as [key_name(M)] did ([key_name(M)] is no longer logged in).") - message_admins("Notice: [key_name_admin(src)] has the same computer ID as [key_name_admin(M)] did ([key_name_admin(M)] is no longer logged in).", 1) - spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") - if(!src.dna) src.dna = new /datum/dna(null) - //src.client.screen -= main_hud1.contents - world.update_status() - //if (!src.hud_used) - // src.hud_used = main_hud1 +//handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying +/mob/proc/update_Login_details() + lastKnownIP = client.address + computer_id = client.computer_id + log_access("Login: [key_name(src)] from [lastKnownIP ? lastKnownIP : "localhost"]-[computer_id] || BYOND v[client.byond_version]") + if(config.log_access) + for(var/mob/M in world) + if(M == src) continue + if( M.key && (M.key != key) ) + var/matches + if( (M.lastKnownIP == client.address) ) + matches += "IP ([client.address])" + if( (M.computer_id == client.computer_id) ) + if(matches) matches += " and " + matches += "ID ([client.computer_id])" + spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") + if(matches) + if(M.client) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") + else + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") - if (!src.hud_used) +/mob/Login() + update_Login_details() + if(!src.dna) src.dna = new /datum/dna(null) + world.update_status() + if(!src.hud_used) src.hud_used = new/obj/hud( src ) else del(src.hud_used) @@ -34,20 +34,4 @@ src.next_move = 1 src.sight |= SEE_SELF - src.logged_in = 1 - - if(istype (src, /mob/living)) - if(ticker) - if(ticker.mode) - if(ticker.mode.name == "revolution") - if ((src.mind in ticker.mode:revolutionaries) || (src.mind in ticker.mode:head_revolutionaries)) - ticker.mode:update_rev_icons_added(src.mind) - if(ticker.mode.name == "cult") - if (src.mind in ticker.mode:cult) - ticker.mode:update_cult_icons_added(src.mind) - if(isAI(src)) - for(var/obj/effect/rune/rune in world) - var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]") - blood.override = 1 - client.images += blood - ..() + ..() diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 8f9ad4c9732..b58ae225fb7 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -2,7 +2,6 @@ log_access("Logout: [key_name(src)]") if (admins[src.ckey]) message_admins("Admin logout: [key_name(src)]") - src.logged_in = 0 ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 36e3cee295d..b8e66cf0e39 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -64,28 +64,6 @@ src << msg return -// Show a message to all mobs in sight of this one -// This would be for visible actions by the src mob -// message is the message output to anyone who can see e.g. "[src] does something!" -// self_message (optional) is what the src mob sees e.g. "You do something!" -// blind_message (optional) is what blind people will hear e.g. "You hear something!" - -/mob/visible_message(var/message, var/self_message, var/blind_message) - for(var/mob/M in viewers(src)) - var/msg = message - if(self_message && M==src) - msg = self_message - M.show_message( msg, 1, blind_message, 2) - -// Show a message to all mobs in sight of this atom -// Use for objects performing visible actions -// message is output to anyone who can see, e.g. "The [src] does something!" -// blind_message (optional) is what blind people will hear e.g. "You hear something!" -/atom/proc/visible_message(var/message, var/blind_message) - for(var/mob/M in viewers(src)) - M.show_message( message, 1, blind_message, 2) - - /mob/proc/findname(msg) for(var/mob/M in world) if (M.real_name == text("[]", msg)) @@ -96,8 +74,6 @@ return 0 /mob/proc/Life() -// if(organStructure) -// organStructure.ProcessOrgans() return /mob/proc/update_clothing() @@ -172,16 +148,13 @@ var/turf/T = get_turf(loc) if (istype(T)) T.Entered(W) - update_clothing() + update_clothing() return /mob/proc/before_take_item(var/obj/item/item) item.loc = null item.layer = initial(item.layer) u_equip(item) - //if (client) - // client.screen -= item - //update_clothing() return /mob/proc/get_active_hand() @@ -243,7 +216,19 @@ /mob/proc/show_inv(mob/user as mob) user.machine = src - var/dat = text("\n[]
    \n\tHead(Mask): []
    \n\tLeft Hand: []
    \n\tRight Hand: []
    \n\tBack: []
    \n\t[]
    \n\t[]
    \n\t[]
    \n\tEmpty Pockets
    \nClose
    \n
    ", name, src, (wear_mask ? text("[]", wear_mask) : "Nothing"), src, (l_hand ? text("[]", l_hand) : "Nothing"), src, (r_hand ? text("[]", r_hand) : "Nothing"), src, (back ? text("[]", back) : "Nothing"), ((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""), (internal ? text("Remove Internal", src) : ""), (handcuffed ? text("Handcuffed", src) : text("Not Handcuffed", src)), src, user, name) + var/dat = {" +
    [name]
    +

    +
    Head(Mask): [(wear_mask ? wear_mask : "Nothing")] +
    Left Hand: [(l_hand ? l_hand : "Nothing")] +
    Right Hand: [(r_hand ? r_hand : "Nothing")] +
    Back: [(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
    [(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))] +
    [(internal ? text("Remove Internal") : "")] +
    Empty Pockets +
    Refresh +
    Close +
    "} user << browse(dat, text("window=mob[];size=325x500", name)) onclose(user, "mob[name]") return @@ -467,11 +452,6 @@ M.Login() return -/mob/verb/cmd_rules() - set name = "Rules" - set category = "OOC" - src << browse(rules, "window=rules;size=480x320") - /mob/verb/changes() set name = "Changelog" set category = "OOC" @@ -750,55 +730,6 @@ //usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" return -/client/New() - if(findtextEx(key, "Telnet @")) - src << "Sorry, this game does not support Telnet." - del(src) - if (CheckBan(src)) - del(src) - -/* - if (!guests_allowed && IsGuestKey(key)) - log_access("Failed Login: [src] - Guests not allowed") - message_admins("\blue Failed Login: [src] - Guests not allowed") - alert(src,"You cannot play here.\nReason : Guests not allowed","Guests not allowed","Ok") - del(src) -*/ - - if(IsGuestKey(key)) - alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK") - del(src) - - if (((world.address == address || !(address)) && !(host))) - host = key - world.update_status() - - ..() - makejson() - if (join_motd) - src << "
    [join_motd]
    " - - if(custom_event_msg && custom_event_msg != "") - src << "

    Custom Event

    " - src << "

    A custom event is taking place. OOC Info:

    " - src << "[html_encode(custom_event_msg)]" - src << "
    " - - if(admins.Find(ckey)) - holder = new /obj/admins(src) - holder.rank = admins[ckey] - update_admins(admins[ckey]) - - if(ticker && ticker.mode && ticker.mode.name =="sandbox") - mob.CanBuild() - -/client/Del() - spawn(0) - if(holder) - del(holder) - makejson() - return ..() - /mob/proc/can_use_hands() if(handcuffed) return 0 @@ -1153,4 +1084,36 @@ note dizziness decrements automatically in the mob's Life() proc. for(var/file in args) src << browse_rsc(file) return 1 - return 0 \ No newline at end of file + return 0 + + +/** The stuff below here really should be in /mob/living, but due to tons of procs that should only + take /mob/living only taking /mob(or, indeed, some silly procs relying on usr.. yes, *procs*, not verbs..), + I'm putting this stuff into /mob for now +**/ +/mob/proc/rebuild_appearance() + // Rebuild the entire mob appearance completely, this should ONLY be called in rare cases, + // e.g. when the mob spawns. + return update_clothing() // most mobs still implement update_clothing() by simply rebuilding the entire appearance + +/mob/proc/update_body_appearance() + // Call this proc whenever something about the appearance of the body itself changes. + // For example, this must be called when you add a wound to a mob. + +/mob/proc/update_lying() + // Call this whenever the lying status of a mob changes. + +/mob/update_clothing() + // Call this proc whenever something about the clothing of a mob changes. Normally, you + // don't need to call this by hand, as the equip procs will do it for you. + ..() + +/mob/proc/get_visible_gender() + //Returns the proper words to use based on the mob's visible gender. Used in text creation. + return list("It" = "It", "its" = "its", "it" = "it", "has" = "has", "is" = "is", "itself" = "itself") + +/mob/proc/get_gender_form(var/form) + if(!istext(form)) + return + var/list/proper_forms = get_visible_gender() + return proper_forms[form] \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f72051a457a..7e7daa258ab 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -98,6 +98,8 @@ var/real_name = null var/original_name = null //Original name is only used in ghost chat! It is not to be edited by anything! var/flavor_text = "" + var/med_record = "" + var/sec_record = "" var/blinded = null var/bhunger = 0//Carbon var/ajourn = 0 @@ -180,7 +182,6 @@ var/job = null//Living var/nodamage = 0 - var/logged_in = 0 var/underwear = 1//Human var/backbag = 2//Human @@ -194,15 +195,12 @@ var/datum/dna/dna = null//Carbon var/radiation = 0.0//Carbon - var/mutations = 0//Carbon - var/mutations2 = 0//Carbon - //telekinesis = 1 - //firemut = 2 - //xray = 4 - //hulk = 8 - //clumsy = 16 - //obese = 32 - //husk = 64 + var/list/mutations = list() //Carbon -- Doohl + //see: setup.dm for list of mutations + + var/list/augmentations = list() //Carbon -- Doohl + //see: setup.dm for list of augmentations + var/tkdisable = 0//For remote viewing and stuff. Disables TK. var/voice_name = "unidentifiable voice" @@ -257,6 +255,8 @@ var/robot_talk_understand = 0 var/alien_talk_understand = 0 var/taj_talk_understand = 0 + var/soghun_talk_understand = 0 + var/skrell_talk_understand = 0 //You can guess what these are for. --SkyMarshal var/list/atom/hallucinations = list() @@ -291,4 +291,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/grav_delay = 0 var/being_strangled = 0 + var/list/radar_blips = list() // list of screen objects, radar blips + var/radar_open = 0 // nonzero is radar is open diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 7f887d4215b..73968a1a7c1 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -4,6 +4,7 @@ icon_state = "grabbed" var/obj/screen/grab/hud1 = null var/mob/affecting = null + var/atom/movable/structure = null // if the grab is not grabbing a mob var/mob/assailant = null var/state = 1.0 var/killing = 0.0 @@ -21,32 +22,52 @@ spawn(0) del(src) return grabee + + else if(structure) + var/grabee = structure + spawn(0) + del(src) + return grabee + return null /obj/item/weapon/grab/proc/synch() - if(affecting.anchored)//This will prevent from grabbing people that are anchored. - del(src) - if (assailant.r_hand == src) - hud1.screen_loc = ui_rhand - else - hud1.screen_loc = ui_lhand + if(affecting) + if(affecting.anchored)//This will prevent from grabbing people that are anchored. + del(src) + if (assailant.r_hand == src) + hud1.screen_loc = ui_rhand + else + hud1.screen_loc = ui_lhand return /obj/item/weapon/grab/process() - if(!assailant || !affecting) - del(src) - return - if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1)))) - //SN src = null + if(!assailant || (!affecting && !structure)) del(src) return + + if(affecting && !structure) + if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1)))) + //SN src = null + del(src) + return + else if(!affecting && structure) + if (!isturf(structure.loc) || !isturf(structure.loc) || (assailant.loc != structure.loc && get_dist(assailant, structure) > 1)) + del(src) + return + if (assailant.client) assailant.client.screen -= hud1 assailant.client.screen += hud1 - if (assailant.pulling == affecting) + if (assailant.pulling == affecting || assailant.pulling == structure) assailant.pulling = null + + if (structure) + structure.loc = assailant.loc + structure.layer = assailant.layer + 1 + if (state <= 2) allow_upgrade = 1 if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab))) @@ -117,6 +138,9 @@ /obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj) //if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 ))) // return + + if (!affecting) + return if ((!( assailant.canmove ) || assailant.lying)) del(src) return @@ -137,12 +161,12 @@ return else if (state < 3) - /*if(istype(affecting, /mob/living/carbon/human)) +/* if(istype(affecting, /mob/living/carbon/human)) var/mob/living/carbon/human/H = affecting - if(H.mutations & FAT) + if(FAT in H.mutations) assailant << "\blue You can't strangle [affecting] through all that fat!" - return*/ - + return +*/ /*Hrm might want to add this back in //we should be able to strangle the Captain if he is wearing a hat for(var/obj/item/clothing/C in list(H.head, H.wear_suit, H.wear_mask, H.w_uniform)) @@ -205,6 +229,7 @@ /obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob) + if(!affecting) return if (M == affecting) if (state < 3) s_dbclick(hud1) @@ -212,7 +237,7 @@ s_click(hud1) return if(M == assailant && state >= 2) - if( ( ishuman(user) && (user.mutations & FAT) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) ) + if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) ) var/mob/living/carbon/attacker = user for(var/mob/N in viewers(user, null)) if(N.client) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index b84e24a47f3..c01be193cc2 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -212,10 +212,10 @@ proc/hasorgans(A) proc/slur(phrase) phrase = html_decode(phrase) - var - leng=lentext(phrase) - counter=lentext(phrase) - newphrase="";newletter="" + var/leng=lentext(phrase) + var/counter=lentext(phrase) + var/newphrase="" + var/newletter="" while(counter>=1) newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2) if(rand(1,3)==3) @@ -343,7 +343,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return 0 -/mob/proc/put_in_hands(var/obj/item/I) +/mob/proc/put_in_hands(var/obj/item/I) //A suprisingly useful proc. Allows a simple way to place an object in a mob's hands, or, if they are full, on the ground below them. if(!r_hand) I.loc = src r_hand = I diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 9cda9325cf4..e9cf67d60e4 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /mob/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 @@ -223,8 +225,7 @@ if(mob.stat==2) return if(isAI(mob)) return AIMove(n,direct,mob) - - if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var + if(mob.monkeyizing) return //This is sota the goto stop mobs from moving var if(mob.incorporeal_move)//Move though walls Process_Incorpmove(direct) diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm new file mode 100644 index 00000000000..2718a1e8312 --- /dev/null +++ b/code/modules/mob/new_player/login.dm @@ -0,0 +1,94 @@ +/mob/new_player/Login() + update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying + if (join_motd) + src << "
    [join_motd]
    " + + if(!preferences) + preferences = new + + if(!mind) + mind = new + mind.key = key + mind.current = src + + var/starting_loc = pick(newplayer_start) + if(!starting_loc) starting_loc = locate(1,1,1) + loc = starting_loc + lastarea = starting_loc + + sight |= SEE_TURFS + + var/list/watch_locations = list() + for(var/obj/effect/landmark/landmark in world) + if(landmark.tag == "landmark*new_player") + watch_locations += landmark.loc + + if(watch_locations.len>0) + loc = pick(watch_locations) + + if(!preferences.savefile_load(src, 1)) + preferences.ShowChoices(src) + if(!client.changes) + changes() + else + var/lastchangelog = length('changelog.html') + if(!client.changes && preferences.lastchangelog!=lastchangelog) + changes() + preferences.lastchangelog = lastchangelog + preferences.savefile_save(src, 1) + + if(preferences.pregame_music) + spawn() Playmusic() // git some tunes up in heeyaa~ + + if(client.has_news()) + src << "There are some unread news for you! Please make sure to read all news, as they may contain important updates about roleplay rules or canon." + + new_player_panel() + + //PDA Resource Initialisation =======================================================> + /* + Quick note: local dream daemon instances don't seem to cache images right. Might be + a local problem with my machine but it's annoying nontheless. + */ + if(client) + //load the PDA iconset into the client + src << browse_rsc('pda_atmos.png') + src << browse_rsc('pda_back.png') + src << browse_rsc('pda_bell.png') + src << browse_rsc('pda_blank.png') + src << browse_rsc('pda_boom.png') + src << browse_rsc('pda_bucket.png') + src << browse_rsc('pda_crate.png') + src << browse_rsc('pda_cuffs.png') + src << browse_rsc('pda_eject.png') + src << browse_rsc('pda_exit.png') + src << browse_rsc('pda_flashlight.png') + src << browse_rsc('pda_honk.png') + src << browse_rsc('pda_mail.png') + src << browse_rsc('pda_medical.png') + src << browse_rsc('pda_menu.png') + src << browse_rsc('pda_mule.png') + src << browse_rsc('pda_notes.png') + src << browse_rsc('pda_power.png') + src << browse_rsc('pda_rdoor.png') + src << browse_rsc('pda_reagent.png') + src << browse_rsc('pda_refresh.png') + src << browse_rsc('pda_scanner.png') + src << browse_rsc('pda_signaler.png') + src << browse_rsc('pda_status.png') + //Loads icons for SpiderOS into client + src << browse_rsc('sos_1.png') + src << browse_rsc('sos_2.png') + src << browse_rsc('sos_3.png') + src << browse_rsc('sos_4.png') + src << browse_rsc('sos_5.png') + src << browse_rsc('sos_6.png') + src << browse_rsc('sos_7.png') + src << browse_rsc('sos_8.png') + src << browse_rsc('sos_9.png') + src << browse_rsc('sos_10.png') + src << browse_rsc('sos_11.png') + src << browse_rsc('sos_12.png') + src << browse_rsc('sos_13.png') + src << browse_rsc('sos_14.png') + //End PDA Resource Initialisation =====================================================> \ No newline at end of file diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f8770588285..5e6e9f2a5c1 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -1,10 +1,11 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /mob/new_player - var - datum/preferences/preferences = null - ready = 0 - spawning = 0//Referenced when you want to delete the new_player later on in the code. - totalPlayers = 0 //Player counts for the Lobby tab - totalPlayersReady = 0 + var/datum/preferences/preferences = null + var/ready = 0 + var/spawning = 0//Referenced when you want to delete the new_player later on in the code. + var/totalPlayers = 0 //Player counts for the Lobby tab + var/totalPlayersReady = 0 invisibility = 101 @@ -14,97 +15,6 @@ anchored = 1 // don't get pushed around - Login() - if(!preferences) - preferences = new - - if(!mind) - mind = new - mind.key = key - mind.current = src - - var/starting_loc = pick(newplayer_start) - if(!starting_loc) starting_loc = locate(1,1,1) - loc = starting_loc - lastarea = starting_loc - - sight |= SEE_TURFS - - var/list/watch_locations = list() - for(var/obj/effect/landmark/landmark in world) - if(landmark.tag == "landmark*new_player") - watch_locations += landmark.loc - - if(watch_locations.len>0) - loc = pick(watch_locations) - - if(!preferences.savefile_load(src, 1)) - preferences.ShowChoices(src) - if(!client.changes) - changes() - else - var/lastchangelog = length('changelog.html') - if(!client.changes && preferences.lastchangelog!=lastchangelog) - changes() - preferences.lastchangelog = lastchangelog - preferences.savefile_save(src, 1) - - if(preferences.pregame_music) - spawn() Playmusic() // git some tunes up in heeyaa~ - - if(client.has_news()) - src << "There are some unread news for you! Please make sure to read all news, as they may contain important updates about roleplay rules or canon." - - new_player_panel() - //PDA Resource Initialisation =======================================================> - /* - Quick note: local dream daemon instances don't seem to cache images right. Might be - a local problem with my machine but it's annoying nontheless. - */ - if(client) - //load the PDA iconset into the client - src << browse_rsc('pda_atmos.png') - src << browse_rsc('pda_back.png') - src << browse_rsc('pda_bell.png') - src << browse_rsc('pda_blank.png') - src << browse_rsc('pda_boom.png') - src << browse_rsc('pda_bucket.png') - src << browse_rsc('pda_crate.png') - src << browse_rsc('pda_cuffs.png') - src << browse_rsc('pda_eject.png') - src << browse_rsc('pda_exit.png') - src << browse_rsc('pda_flashlight.png') - src << browse_rsc('pda_honk.png') - src << browse_rsc('pda_mail.png') - src << browse_rsc('pda_medical.png') - src << browse_rsc('pda_menu.png') - src << browse_rsc('pda_mule.png') - src << browse_rsc('pda_notes.png') - src << browse_rsc('pda_power.png') - src << browse_rsc('pda_rdoor.png') - src << browse_rsc('pda_reagent.png') - src << browse_rsc('pda_refresh.png') - src << browse_rsc('pda_scanner.png') - src << browse_rsc('pda_signaler.png') - src << browse_rsc('pda_status.png') - //Loads icons for SpiderOS into client - src << browse_rsc('sos_1.png') - src << browse_rsc('sos_2.png') - src << browse_rsc('sos_3.png') - src << browse_rsc('sos_4.png') - src << browse_rsc('sos_5.png') - src << browse_rsc('sos_6.png') - src << browse_rsc('sos_7.png') - src << browse_rsc('sos_8.png') - src << browse_rsc('sos_9.png') - src << browse_rsc('sos_10.png') - src << browse_rsc('sos_11.png') - src << browse_rsc('sos_12.png') - src << browse_rsc('sos_13.png') - src << browse_rsc('sos_14.png') - //End PDA Resource Initialisation =====================================================> - - Logout() ready = 0 ..() @@ -306,10 +216,11 @@ var/obj/item/weapon/card/id/C = H.wear_id if (C) G.fields["rank"] = C.assignment + G.fields["real_rank"] = H.mind.assigned_role else if(H.mind && H.mind.assigned_role) - G.fields["rank"] = H.mind.assigned_role + G.fields["rank"] = H.mind.role_alt_title ? H.mind.role_alt_title : H.mind.assigned_role G.fields["real_rank"] = H.mind.assigned_role else G.fields["rank"] = "Unassigned" @@ -330,21 +241,58 @@ G.fields["m_stat"] = "Stable" M.fields["b_type"] = text("[]", H.dna.b_type) M.fields["b_dna"] = H.dna.unique_enzymes - M.fields["mi_dis"] = "None" - M.fields["mi_dis_d"] = "No minor disabilities have been declared." - M.fields["ma_dis"] = "None" - M.fields["ma_dis_d"] = "No major disabilities have been diagnosed." + + var/minor_dis = null + if(H.disabilities) + if(H.disabilities & 1) + minor_dis += "Myopia, " + if(H.disabilities & 4) + minor_dis += "Persistant Cough, " + if(H.disabilities & 16) + minor_dis += "Stuttering, " + if(minor_dis) + M.fields["mi_dis"] = minor_dis + else + M.fields["mi_dis"] = "None" + + M.fields["mi_dis_d"] = "No additional minor disability notes." + + var/major_dis = null + if(H.disabilities) + if(H.disabilities & 2) + major_dis += "Epilepsy, " + if(H.disabilities & 8) + major_dis += "Tourette's Syndrome, " + if(H.disabilities & 32) + major_dis += "Deafness, " + if(major_dis) + M.fields["ma_dis"] = major_dis + else + M.fields["ma_dis"] = "None" + + M.fields["ma_dis_d"] = "No additional major disability notes." M.fields["alg"] = "None" - M.fields["alg_d"] = "No allergies have been detected in this patient." + M.fields["alg_d"] = "No additional allergy notes." M.fields["cdi"] = "None" - M.fields["cdi_d"] = "No diseases have been diagnosed at the moment." - M.fields["notes"] = "No notes." + M.fields["cdi_d"] = "No additional disease notes." + + if(H.med_record && !jobban_isbanned(H, "Records")) + M.fields["notes"] = H.med_record + else + M.fields["notes"] = "No notes found." + S.fields["criminal"] = "None" S.fields["mi_crim"] = "None" S.fields["mi_crim_d"] = "No minor crime convictions." S.fields["ma_crim"] = "None" S.fields["ma_crim_d"] = "No major crime convictions." - S.fields["notes"] = "No notes." + + if(H.sec_record && !jobban_isbanned(H, "Records")) + S.fields["notes"] = H.sec_record + else + S.fields["notes"] = "No notes." + + //Begin locked reporting L.fields["name"] = H.real_name @@ -410,6 +358,12 @@ preferences.copy_to(new_character) if((preferences.species == "Soghun") && (is_alien_whitelisted(src, "Soghun"))) //This probably shouldn't be here, but I can't think of any other way new_character.mutantrace = "lizard" + new_character.soghun_talk_understand = 1 + new_character.voice_name = "Soghun" + if((preferences.species == "Skrell") && (is_alien_whitelisted(src, "Skrell"))) + new_character.mutantrace = "skrell" + new_character.skrell_talk_understand = 1 + new_character.voice_name = "Skrell" src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) new_character.dna.ready_dna(new_character) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 1e776e3dbb2..84c4f0f27a1 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + #define UI_OLD 0 #define UI_NEW 1 @@ -29,18 +31,17 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "infested monkey" = ispath(text2path("/datum/game_mode/monkey")), ) */ -var/const - BE_TRAITOR =(1<<0) - BE_OPERATIVE =(1<<1) - BE_CHANGELING=(1<<2) - BE_WIZARD =(1<<3) - BE_MALF =(1<<4) - BE_REV =(1<<5) - BE_ALIEN =(1<<6) - BE_CULTIST =(1<<7) - BE_MONKEY =(1<<8) - BE_PAI =(1<<9) - BE_MEME =(1<<10) +var/const/BE_TRAITOR =(1<<0) +var/const/BE_OPERATIVE =(1<<1) +var/const/BE_CHANGELING=(1<<2) +var/const/BE_WIZARD =(1<<3) +var/const/BE_MALF =(1<<4) +var/const/BE_REV =(1<<5) +var/const/BE_ALIEN =(1<<6) +var/const/BE_CULTIST =(1<<7) +var/const/BE_MONKEY =(1<<8) +var/const/BE_PAI =(1<<9) +var/const/BE_MEME =(1<<10) @@ -125,6 +126,9 @@ datum/preferences var/flavor_text = "" + var/med_record = "" + var/sec_record = "" + // slot stuff (Why were they var/var? --SkyMarshal) var/slotname var/curslot = 0 @@ -319,6 +323,10 @@ datum/preferences dat += "
    Disabilities
    " + if(jobban_isbanned(user, "Records")) + dat += "
    You are banned from using character records.
    " + else + dat += "
    Character Records
    " dat += "
    Flavor Text
    " dat += "Change
    " if(lentext(flavor_text) <= 40) @@ -391,6 +399,33 @@ datum/preferences user << browse(HTML, "window=disabil;size=350x300") return + proc/SetRecords(mob/user) + var/HTML = "" + HTML += "
    " + HTML += "Set Character Records
    " + + HTML += "Medical Records
    " + + if(lentext(med_record) <= 40) + HTML += "[med_record]" + else + HTML += "[copytext(med_record, 1, 37)]..." + + HTML += "

    Security Records
    " + + if(lentext(sec_record) <= 40) + HTML += "[sec_record]
    " + else + HTML += "[copytext(sec_record, 1, 37)]...
    " + + HTML += "
    " + HTML += "\[Done\]" + HTML += "
    " + + user << browse(null, "window=preferences") + user << browse(HTML, "window=records;size=350x300") + return + proc/GetAltTitle(datum/job/job) return job_alt_titles.Find(job.title) > 0 \ ? job_alt_titles[job.title] \ @@ -633,16 +668,15 @@ datum/preferences switch(link_tags["real_name"]) if("input") - new_name = input(user, "Please select a name:", "Character Generation") as text + new_name = copytext( (input(user, "Please select a name:", "Character Generation") as text) ,1,MAX_NAME_LEN) var/list/bad_characters = list("_", "'", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9") for(var/c in bad_characters) new_name = dd_replacetext(new_name, c, "") + if(!new_name || (new_name == "Unknown") || (new_name == "floor") || (new_name == "wall") || (new_name == "r-wall")) alert("Invalid name. Don't do that!") return - if(length(new_name) >= 26) - alert("That name is too long.") - return + //Make it so number one. (means you can have names like McMillian). Credit to: Jtgibson new_name = simple_titlecase(new_name) /* @@ -660,8 +694,6 @@ datum/preferences randomize_name() if(new_name) - if(length(new_name) >= 26) - new_name = copytext(new_name, 1, 26) real_name = new_name if(link_tags["age"]) @@ -675,17 +707,9 @@ datum/preferences if(link_tags["OOC"]) var/tempnote = "" - tempnote = input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text - var/list/bad_characters = list("_", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9") - - for(var/c in bad_characters) - tempnote = dd_replacetext(tempnote, c, "") - - if(length(tempnote) >= 255) - alert("That name is too long. (255 character max, please)") - return - - metadata = tempnote + tempnote = copytext(sanitize(input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text),1,MAX_MESSAGE_LEN) + if(tempnote) + metadata = tempnote return @@ -707,17 +731,25 @@ datum/preferences if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it! if(is_alien_whitelisted(user, "Soghun")) //Check for Soghun and admins new_species += "Soghun" - if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran + if(is_alien_whitelisted(user, "Tajaran")) //Check for Tajaran and admins new_species += "Tajaran" + if(is_alien_whitelisted(user, "Skrell")) //Check for Skrell and admins + new_species += "Skrell" else //Not using the whitelist? Aliens for everyone! new_species += "Tajaran" new_species += "Soghun" + new_species += "Skrell" species = input("Please select a species", "Character Generation", null) in new_species h_style = "Bald" //Try not to carry face/head hair over. f_style = "Shaved" s_tone = 0 //Don't carry over skintone either. hair_style = new/datum/sprite_accessory/hair/bald facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved + if(species == "Skrell") + if(gender == FEMALE) + hair_style = new/datum/sprite_accessory/hair/alien/skrell/female/tentacle + else + hair_style = new/datum/sprite_accessory/hair/alien/skrell/male/tentacle if(link_tags["hair"]) switch(link_tags["hair"]) @@ -757,18 +789,19 @@ datum/preferences if("random") randomize_skin_tone() if("input") - var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as text + var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for other species.", "Character Generation") as num if(new_tone) - if(species == "Tajaran") + if(species != "Human") s_tone = max(min(round(text2num(new_tone)), 70), 20) else s_tone = max(min(round(text2num(new_tone)), 220), 1) s_tone = -s_tone + 35 if(link_tags["h_style"]) - if(species != "Human") + if(species == "Tajaran" || species == "Soghun") return switch(link_tags["h_style"]) + // New and improved hair selection code, by Doohl if("random") // random hair selection @@ -778,7 +811,13 @@ datum/preferences if("input") // input hair selection // Generate list of hairs via typesof() - var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair + var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair - typesof(/datum/sprite_accessory/hair/alien) + + if(species == "Skrell") + if(gender == FEMALE) + all_hairs = typesof(/datum/sprite_accessory/hair/alien/skrell/female) - /datum/sprite_accessory/hair/alien/skrell/female + else + all_hairs = typesof(/datum/sprite_accessory/hair/alien/skrell/male) - /datum/sprite_accessory/hair/alien/skrell/male // List of hair names var/list/hairs = list() @@ -811,7 +850,7 @@ datum/preferences src.ooccolor = ooccolor if(link_tags["f_style"]) - if(species != "Human") //Tajarans and Soghuns don't have hair stuff yet. + if(species != "Human") //Non-humans don't have hair stuff yet. return switch(link_tags["f_style"]) @@ -843,8 +882,12 @@ datum/preferences if(link_tags["gender"]) if(gender == MALE) gender = FEMALE + if(species == "Skrell") + hair_style = new/datum/sprite_accessory/hair/alien/skrell/female/tentacle else gender = MALE + if(species == "Skrell") + hair_style = new/datum/sprite_accessory/hair/alien/skrell/male/tentacle if(link_tags["UI"]) switch(UI_style) @@ -993,6 +1036,7 @@ datum/preferences midis = 1 ghost_ears = 1 disabilities = 0 + if(link_tags["disabilities"]) if(text2num(link_tags["disabilities"]) >= -1) if(text2num(link_tags["disabilities"]) >= 0) @@ -1002,6 +1046,33 @@ datum/preferences else user << browse(null, "window=disabil") + if(link_tags["records"]) + if(text2num(link_tags["records"]) >= 1) + SetRecords(user) + return + else + user << browse(null, "window=records") + + if(link_tags["med_record"]) + var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message + + if(medmsg != null) + medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN) + medmsg = html_encode(medmsg) + + med_record = medmsg + SetRecords(user) + + if(link_tags["sec_record"]) + var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message + + if(secmsg != null) + secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN) + secmsg = html_encode(secmsg) + + sec_record = secmsg + SetRecords(user) + ShowChoices(user) proc/copy_to(mob/living/carbon/human/character, safety = 0) @@ -1010,7 +1081,11 @@ datum/preferences character.real_name = real_name character.original_name = real_name //Original name is only used in ghost chat! It is not to be edited by anything! + character.species = species + character.flavor_text = flavor_text + character.med_record = med_record + character.sec_record = sec_record character.gender = gender @@ -1103,4 +1178,4 @@ datum/preferences character.disabilities = disabilities #undef UI_OLD -#undef UI_NEW \ No newline at end of file +#undef UI_NEW diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 49be3db4503..7c3c2a2f1e7 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -27,7 +27,7 @@ datum/preferences proc/randomize_hair(var/gender) // Generate list of all possible hairs via typesof(), subtract the parent type however - var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair + var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair - typesof(/datum/sprite_accessory/hair/alien) // List of hair datums. Used in pick() to select random hair var/list/hairs = list() @@ -204,10 +204,7 @@ datum/preferences del(preview_icon) var/g = "m" - if (gender == MALE) - g = "m" - else if (gender == FEMALE) - g = "f" + if (gender == FEMALE) g = "f" if(species == "Tajaran") preview_icon = new /icon('tajaran.dmi', "body_[g]_s", "dir" = preview_dir) @@ -216,6 +213,11 @@ datum/preferences preview_icon = new /icon('genetics.dmi', "lizard_male_s", "dir" = preview_dir) else if(g == "f") preview_icon = new /icon('genetics.dmi', "lizard_female_s", "dir" = preview_dir) + else if(species == "Skrell") + if(g == "m") + preview_icon = new /icon('genetics.dmi', "skrell_male_s", "dir" = preview_dir) + else if(g == "f") + preview_icon = new /icon('genetics.dmi', "skrell_female_s", "dir" = preview_dir) else preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir) @@ -229,7 +231,8 @@ datum/preferences preview_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s", "dir" = preview_dir), ICON_OVERLAY) var/icon/eyes_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_s", "dir" = preview_dir) - eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + if(species != "Skrell") + eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) // Hair and facial hair, improved by Doohl @@ -243,7 +246,8 @@ datum/preferences var/icon/mouth_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "mouth_[g]_s", "dir" = preview_dir) eyes_s.Blend(hair_s, ICON_OVERLAY) - eyes_s.Blend(mouth_s, ICON_OVERLAY) + if(species == "Human") + eyes_s.Blend(mouth_s, ICON_OVERLAY) eyes_s.Blend(facial_s, ICON_OVERLAY) preview_icon.Blend(eyes_s, ICON_OVERLAY) @@ -271,4 +275,4 @@ datum/preferences if(H.name == f_style) facial_hair_style = H else - del(H) + del(H) \ No newline at end of file diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index 30c49843a89..f0c4c3a6bd6 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -98,6 +98,8 @@ datum/preferences/proc/savefile_save(mob/user, slot) F["name_is_always_random"] << src.be_random_name F["flavor_text"] << flavor_text + F["med_record"] << med_record + F["sec_record"] << sec_record F["gender"] << src.gender F["age"] << src.age @@ -196,6 +198,8 @@ datum/preferences/proc/savefile_load(mob/user, slot) F["age"] >> src.age F["flavor_text"] >> flavor_text + F["med_record"] >> med_record + F["sec_record"] >> sec_record F["hair_red"] >> src.r_hair F["hair_green"] >> src.g_hair diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 5195257a8cb..58cb8a5b8ce 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -153,6 +153,22 @@ spikey name = "Spikey" icon_state = "hair_spikey" +////// +//Begin Alien Hairstyle +////// + alien +//Skrell + skrell + + male + tentacle + name = "Skrell Male Tentacles" + icon_state = "skrell_hair_m" + + female + tentacle + name = "Skrell Female Tentacles" + icon_state = "skrell_hair_f" /* /////////////////////////////////// diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 4070542e6c7..fb150d03627 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -1,10 +1,11 @@ -/datum/organ - var - name = "organ" - mob/living/carbon/human/owner = null +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 - list/datum/autopsy_data/autopsy_data = list() - list/trace_chemicals = list() // traces of chemicals in the organ, +/datum/organ + var/name = "organ" + var/mob/living/carbon/human/owner = null + + var/list/datum/autopsy_data/autopsy_data = list() + var/list/trace_chemicals = list() // traces of chemicals in the organ, // links chemical IDs to number of ticks for which they'll stay in the blood @@ -15,12 +16,11 @@ return 0 /datum/autopsy_data - var - weapon = null - pretend_weapon = null - damage = 0 - hits = 0 - time_inflicted = 0 + var/weapon = null + var/pretend_weapon = null + var/damage = 0 + var/hits = 0 + var/time_inflicted = 0 proc/copy() var/datum/autopsy_data/W = new() @@ -36,38 +36,37 @@ ****************************************************/ /datum/organ/external name = "external" - var - icon_name = null - body_part = null + var/icon_name = null + var/body_part = null - damage_state = "00" - brute_dam = 0 - burn_dam = 0 - bandaged = 0 - max_damage = 0 - max_size = 0 - tmp/list/obj/item/weapon/implant/implant = list() + var/damage_state = "00" + var/brute_dam = 0 + var/burn_dam = 0 + var/bandaged = 0 + var/max_damage = 0 + var/max_size = 0 + var/tmp/list/obj/item/weapon/implant/implant = list() - display_name - tmp/list/wounds = list() - tmp/bleeding = 0 - tmp/perma_injury = 0 - tmp/perma_dmg = 0 - tmp/broken = 0 - tmp/destroyed = 0 - tmp/destspawn = 0 //Has it spawned the broken limb? - tmp/gauzed = 0 //Has the missing limb been patched? - tmp/robot = 0 //ROBOT ARM MAN! - tmp/cutaway = 0 //First part of limb reattachment. - tmp/attachable = 0 //Can limb be attached? - min_broken_damage = 30 - datum/organ/external/parent - list/datum/organ/external/children - damage_msg = "\red You feel a intense pain" + var/display_name + var/tmp/list/wounds = list() + var/tmp/bleeding = 0 + var/tmp/perma_injury = 0 + var/tmp/perma_dmg = 0 + var/tmp/broken = 0 + var/tmp/destroyed = 0 + var/tmp/destspawn = 0 //Has it spawned the broken limb? + var/tmp/gauzed = 0 //Has the missing limb been patched? + var/tmp/robot = 0 //ROBOT ARM MAN! + var/tmp/cutaway = 0 //First part of limb reattachment. + var/tmp/attachable = 0 //Can limb be attached? + var/min_broken_damage = 30 + var/datum/organ/external/parent + var/list/datum/organ/external/children + var/damage_msg = "\red You feel a intense pain" - var/open = 0 - var/stage = 0 - var/wound = 0 + var/open = 0 + var/stage = 0 + var/wound = 0 New(mob/living/carbon/H) ..(H) @@ -104,7 +103,7 @@ burn *= 0.66 //~2/3 damage for ROBOLIMBS if(owner && !robot) - owner.pain(display_name, (brute+burn)*3, 1) + owner.pain(display_name, (brute+burn)*3, 1, burn > brute) if(sharp) var/nux = brute * rand(10,15) if(brute_dam >= max_damage) @@ -235,7 +234,8 @@ var/datum/autopsy_data/W = autopsy_data[V] del W autopsy_data = list() - return update_icon() + var/result = update_icon() + return result proc/add_wound(var/used_weapon, var/damage) var/datum/autopsy_data/W = autopsy_data[used_weapon] @@ -248,6 +248,7 @@ W.damage += damage W.time_inflicted = world.time + owner.update_body_appearance() proc/get_damage() //returns total damage @@ -314,6 +315,7 @@ var/n_is = damage_state_text() if (n_is != damage_state) damage_state = n_is + owner.update_body_appearance() // I'm not sure about this, Sky probably knows better where to put it return 1 return 0 @@ -412,7 +414,7 @@ for(var/datum/organ/wound/W in wounds) W.update_health() del(W) - owner.update_body() + owner.update_body_appearance() owner.update_clothing() proc/createwound(var/size = 1, var/type = 0, var/damage) @@ -599,4 +601,4 @@ INTERNAL ORGANS ****************************************************/ /datum/organ/internal - name = "internal" \ No newline at end of file + name = "internal" diff --git a/code/modules/mob/organ/pain.dm b/code/modules/mob/organ/pain.dm index 21825ce8eaa..3213b26ffae 100644 --- a/code/modules/mob/organ/pain.dm +++ b/code/modules/mob/organ/pain.dm @@ -7,7 +7,7 @@ mob/var/next_pain_time = 0 // partname is the name of a body part // amount is a num from 1 to 100 -mob/proc/pain(var/partname, var/amount, var/force) +mob/proc/pain(var/partname, var/amount, var/force, var/burning = 0) if(stat >= 2) return if(world.time < next_pain_time && !force) return @@ -17,15 +17,26 @@ mob/proc/pain(var/partname, var/amount, var/force) if(amount > 50 && prob(amount / 5)) src:drop_item() var/msg - switch(amount) - if(1 to 10) - msg = "Your [partname] hurts a bit." - if(11 to 90) - flash_weak_pain() - msg = "Ouch! Your [partname] hurts." - if(91 to 10000) - flash_pain() - msg = "OH GOD! Your [partname] is hurting terribly!" + if(burning) + switch(amount) + if(1 to 10) + msg = "\red Your [partname] burns." + if(11 to 90) + flash_weak_pain() + msg = "\red Your [partname] burns badly!" + if(91 to 10000) + flash_pain() + msg = "\red OH GOD! Your [partname] is on fire!" + else + switch(amount) + if(1 to 10) + msg = "Your [partname] hurts." + if(11 to 90) + flash_weak_pain() + msg = "Your [partname] hurts badly." + if(91 to 10000) + flash_pain() + msg = "OH GOD! Your [partname] is hurting terribly!" if(msg && (msg != last_pain_message || prob(10))) last_pain_message = msg src << msg diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 04f1c747853..28076938709 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -51,7 +51,7 @@ return 1 return 0 -/mob/proc/say_quote(var/text) +/mob/proc/say_quote(var/text,var/is_speaking_soghun,var/is_speaking_skrell) if(!text) return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code var/ending = copytext(text, length(text)) @@ -67,6 +67,10 @@ return "asks, \"[text]\""; if (ending == "!") return "exclaims, \"[text]\""; + if (is_speaking_soghun) + return "hisses, \"[text]\""; + if (is_speaking_skrell) + return "warbles, \"[text]\""; return "says, \"[text]\""; diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 1647152ada4..944ef8122c3 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -554,6 +554,12 @@ usr:inv3.icon_state = "inv3" usr:module_active = null + if("radar") + usr:close_radar() + + if("radar closed") + usr:start_radar() + if("Allow Walking") if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes. return @@ -687,7 +693,7 @@ displaytime = 4 usr.next_move = world.time + 100 usr.last_special = world.time + 100 - if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here. + if(isalienadult(usr) || (HULK in usr.mutations) || (SUPRSTR in usr.augmentations))//Don't want to do a lot of logic gating here. usr << "\green You attempt to break \the [usr:handcuffed]. (This will take around 5 seconds and you need to stand still)" for(var/mob/O in viewers(usr)) O.show_message(text("\red [] is trying to break \the [usr:handcuffed]!", usr), 1) @@ -737,7 +743,7 @@ if(istype(usr, /mob/living/carbon/human) && istype(usr:wear_suit, /obj/item/clothing/suit/straight_jacket) && usr:canmove && (usr.last_special <= world.time)) usr.next_move = world.time + 200 usr.last_special = world.time + 200 - if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here. + if(isalienadult(usr) || (HULK in usr.mutations) || (SUPRSTR in usr.augmentations))//Don't want to do a lot of logic gating here. usr << "\green You attempt to break out of your straight jacket. (This will take around 5 seconds and you need to stand still)" for(var/mob/O in viewers(usr)) O.show_message(text("\red [] is trying to break out of \his straight jacket!", usr), 1) diff --git a/code/modules/mob/simple_animal/constructs.dm b/code/modules/mob/simple_animal/constructs.dm index 7f9e41af6e9..74644fe668d 100644 --- a/code/modules/mob/simple_animal/constructs.dm +++ b/code/modules/mob/simple_animal/constructs.dm @@ -72,7 +72,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(5)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 @@ -204,7 +204,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(50)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 diff --git a/code/modules/mob/simple_animal/corgi.dm b/code/modules/mob/simple_animal/corgi.dm index 2461e55f6e6..09eb81ce2f5 100644 --- a/code/modules/mob/simple_animal/corgi.dm +++ b/code/modules/mob/simple_animal/corgi.dm @@ -47,7 +47,7 @@ /mob/living/simple_animal/corgi/Life() ..() - update_clothing() + rebuild_appearance() /mob/living/simple_animal/corgi/show_inv(mob/user as mob) /* @@ -182,7 +182,6 @@ usr.drop_item() item_to_add.loc = src src.inventory_head = item_to_add - update_clothing() //Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed. @@ -351,11 +350,11 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) +/* if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(70)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 - return + return*/ if(tmob.nopush) now_pushing = 0 return diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index d5575e28ae5..a1e940182ab 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -5,7 +5,7 @@ if (W==w_uniform) // will be teared continue drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 stunned = 1 @@ -69,7 +69,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null @@ -156,7 +156,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null @@ -222,7 +222,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null @@ -262,7 +262,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null @@ -313,7 +313,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null @@ -347,7 +347,7 @@ return for(var/obj/item/W in src) drop_from_slot(W) - update_clothing() + rebuild_appearance() monkeyizing = 1 canmove = 0 icon = null diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 5a469ee25e9..c56e123ebdb 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -9,7 +9,8 @@ throw_range = 10 var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/paper/toppaper //The topmost piece of paper. - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT pressure_resistance = 10 /obj/item/weapon/clipboard/New() diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index a22754c29d9..c7292180f47 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -5,10 +5,11 @@ icon_state = "filing_cabinet0" density = 1 anchored = 1 + var/list/items = new/list() /obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder)) - user << "You put the [P] in the [src]." + user << "You put the [P] in the [name]." user.drop_item() P.loc = src spawn() @@ -23,15 +24,34 @@ user << "You can't put a [P] in the [src]!" /obj/structure/filingcabinet/attack_hand(mob/user as mob) - if(src.contents.len <= 0) + if(contents.len <= 0) user << "The [src] is empty." return - icon_state = "filing_cabinet1" //make it look open for kicks - var/obj/item/P = input(user,"Choose a file or folder to take out.","[src]", "Cancel") as null|obj in contents - if(!isnull(P) && in_range(src,user)) - if(!user.get_active_hand()) - user.put_in_hand(P) - else - P.loc = get_turf_loc(src) - icon_state = "filing_cabinet0" - return \ No newline at end of file + + var/dat = "
    " + var/i + for(i=contents.len, i>=1, i--) + var/obj/item/P = contents[i] + dat += "" + dat += "
    [P.name]
    " + user << browse("[name][dat]", "window=filingcabinet;size=250x300") + + return + +/obj/structure/filingcabinet/Topic(href, href_list) + if(href_list["retrieve"]) + usr << browse("", "window=filingcabinet") // Close the menu + + //var/retrieveindex = text2num(href_list["retrieve"]) + var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex] + if(!isnull(P) && in_range(src,usr)) + if(!usr.get_active_hand()) + usr.put_in_hand(P) + else + P.loc = get_turf_loc(src) + + icon_state = "filing_cabinet1" + sleep(5) + icon_state = "filing_cabinet0" + + diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 9ad6a241b26..ba388b2d30e 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -35,8 +35,7 @@ user << "\blue You put the [W] into the folder." update_icon() else if(istype(W, /obj/item/weapon/pen)) - var/n_name = input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text - n_name = copytext(n_name, 1, 32) + var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text),1,MAX_NAME_LEN) if ((loc == usr && usr.stat == 0)) name = "folder[(n_name ? text("- '[n_name]'") : null)]" return diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 20d59e1e777..72c55adcc44 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -40,13 +40,10 @@ if(mode) usr << "\blue You turn on the hand labeler." //Now let them chose the text. - var/str = reject_bad_text(input(usr,"Label text?","Set label","")) //sanitize stuff! GOD DAMN THIS IS A SECURITY HOLE + var/str = copytext(reject_bad_text(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN) if(!str || !length(str)) usr << "\red Invalid text." return - if(length(str) > 64) - usr << "\red Text too long." - return label = str usr << "\blue You set the text to '[str]'." else diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 7504bce6dd1..6592f15da72 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -9,280 +9,278 @@ throw_range = 15 layer = 4 pressure_resistance = 1 + slot_flags = SLOT_HEAD + see_face = 1 + body_parts_covered = HEAD + protective_temperature = 0 - var - info //What's actually written on the paper. - info_links //A different version of the paper which includes html links at fields and EOF - stamps //The (text for the) stamps on the paper. - fields //Amount of user created fields - list/stamped - see_face = 1 - body_parts_covered = HEAD - protective_temperature = 0 - rigged = 0 - spam_flag = 0 + var/info //What's actually written on the paper. + var/info_links //A different version of the paper which includes html links at fields and EOF + var/stamps //The (text for the) stamps on the paper. + var/fields //Amount of user created fields + var/list/stamped + var/rigged = 0 + var/spam_flag = 0 - const - deffont = "Verdana" - signfont = "Times New Roman" - crayonfont = "Comic Sans MS" + var/const/deffont = "Verdana" + var/const/signfont = "Times New Roman" + var/const/crayonfont = "Comic Sans MS" - New() - ..() - src.pixel_y = rand(-8, 8) - src.pixel_x = rand(-9, 9) - spawn(2) - if(src.info) - src.overlays += "paper_words" - updateinfolinks() - return - - update_icon() +/obj/item/weapon/paper/New() + ..() + src.pixel_y = rand(-8, 8) + src.pixel_x = rand(-9, 9) + spawn(2) if(src.info) src.overlays += "paper_words" - return - - examine() - set src in oview(1) - - // ..() //We don't want them to see the dumb "this is a paper" thing every time. - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon))) - usr << browse("[name][stars(info)][stamps]", "window=[name]") - onclose(usr, "[name]") - else - usr << browse("[name][info][stamps]", "window=[name]") - onclose(usr, "[name]") - return - - verb/rename() - set name = "Rename paper" - set category = "Object" - set src in usr - - if ((usr.mutations & CLUMSY) && prob(50)) - usr << "\red You cut yourself on the paper." - return - var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text - n_name = copytext(n_name, 1, 32) - if ((loc == usr && usr.stat == 0)) - name = "paper[(n_name ? text("- '[n_name]'") : null)]" - add_fingerprint(usr) - return - - attack_self(mob/living/user as mob) - examine() - if(rigged && (Holiday == "April Fool's Day")) - if(spam_flag == 0) - spam_flag = 1 - playsound(src.loc, 'bikehorn.ogg', 50, 1) - spawn(20) - spam_flag = 0 - return - - attack_ai(var/mob/living/silicon/ai/user as mob) - var/dist - if (istype(user) && user.current) //is AI - dist = get_dist(src, user.current) - else //cyborg or AI not seeing through a camera - dist = get_dist(src, user) - if (dist < 2) - usr << browse("[name][info][stamps]", "window=[name]") - onclose(usr, "[name]") - else - usr << browse("[name][stars(info)][stamps]", "window=[name]") - onclose(usr, "[name]") - return - - proc - addtofield(var/id, var/text, var/links = 0) - var/locid = 0 - var/laststart = 1 - var/textindex = 1 - while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck - var/istart = 0 - if(links) - istart = findtext(info_links, "", laststart) - else - istart = findtext(info, "", laststart) - - if(istart==0) - return // No field found with matching id - - laststart = istart+1 - locid++ - if(locid == id) - var/iend = 1 - if(links) - iend = findtext(info_links, "", istart) - else - iend = findtext(info, "", istart) - - //textindex = istart+26 - textindex = iend - break - - if(links) - var/before = copytext(info_links, 1, textindex) - var/after = copytext(info_links, textindex) - info_links = before + text + after - else - var/before = copytext(info, 1, textindex) - var/after = copytext(info, textindex) - info = before + text + after - updateinfolinks() - updateinfolinks() - info_links = info - var/i = 0 - for(i=1,i<=fields,i++) - addtofield(i, "write", 1) - info_links = info_links + "write" + return - parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0) - t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) +/obj/item/weapon/paper/update_icon() + if(src.info) + src.overlays += "paper_words" + return - t = dd_replacetext(t, "\[center\]", "
    ") - t = dd_replacetext(t, "\[/center\]", "
    ") - t = dd_replacetext(t, "\[br\]", "
    ") - t = dd_replacetext(t, "\[b\]", "") - t = dd_replacetext(t, "\[/b\]", "") - t = dd_replacetext(t, "\[i\]", "") - t = dd_replacetext(t, "\[/i\]", "") - t = dd_replacetext(t, "\[u\]", "") - t = dd_replacetext(t, "\[/u\]", "") - t = dd_replacetext(t, "\[large\]", "") - t = dd_replacetext(t, "\[/large\]", "") - t = dd_replacetext(t, "\[sign\]", "[user.real_name]") - t = dd_replacetext(t, "\[field\]", "") +/obj/item/weapon/paper/examine() + set src in oview(1) - if(!iscrayon) - t = dd_replacetext(t, "\[*\]", "
  • ") - t = dd_replacetext(t, "\[hr\]", "
    ") - t = dd_replacetext(t, "\[small\]", "") - t = dd_replacetext(t, "\[/small\]", "") - t = dd_replacetext(t, "\[list\]", "
      ") - t = dd_replacetext(t, "\[/list\]", "
    ") +// ..() //We don't want them to see the dumb "this is a paper" thing every time. + if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon))) + usr << browse("[name][stars(info)][stamps]", "window=[name]") + onclose(usr, "[name]") + else + usr << browse("[name][info][stamps]", "window=[name]") + onclose(usr, "[name]") + return - t = "[t]" - else // If it is a crayon, and he still tries to use these, make them empty! - t = dd_replacetext(t, "\[*\]", "") - t = dd_replacetext(t, "\[hr\]", "") - t = dd_replacetext(t, "\[small\]", "") - t = dd_replacetext(t, "\[/small\]", "") - t = dd_replacetext(t, "\[list\]", "") - t = dd_replacetext(t, "\[/list\]", "") +/obj/item/weapon/paper/verb/rename() + set name = "Rename paper" + set category = "Object" + set src in usr - t = "[t]" + if ((CLUMSY in usr.mutations) && prob(50)) + usr << "\red You cut yourself on the paper." + return + var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text + n_name = copytext(n_name, 1, 32) + if ((loc == usr && usr.stat == 0)) + name = "paper[(n_name ? text("- '[n_name]'") : null)]" + add_fingerprint(usr) + return - //Count the fields - var/laststart = 1 - while(1) - var/i = findtext(t, "", laststart) - if(i==0) - break - laststart = i+1 - fields++ +/obj/item/weapon/paper/attack_self(mob/living/user as mob) + examine() + if(rigged && (Holiday == "April Fool's Day")) + if(spam_flag == 0) + spam_flag = 1 + playsound(src.loc, 'bikehorn.ogg', 50, 1) + spawn(20) + spam_flag = 0 + return - return t +/obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob) + var/dist + if (istype(user) && user.current) //is AI + dist = get_dist(src, user.current) + else //cyborg or AI not seeing through a camera + dist = get_dist(src, user) + if (dist < 2) + usr << browse("[name][info][stamps]", "window=[name]") + onclose(usr, "[name]") + else + usr << browse("[name][stars(info)][stamps]", "window=[name]") + onclose(usr, "[name]") + return - openhelp(mob/user as mob) - user << browse({"Pen Help - -
    Crayon&Pen commands

    -
    - \[br\] : Creates a linebreak.
    - \[center\] - \[/center\] : Centers the text.
    - \[b\] - \[/b\] : Makes the text bold.
    - \[i\] - \[/i\] : Makes the text italic.
    - \[u\] - \[/u\] : Makes the text underlined.
    - \[large\] - \[/large\] : Increases the size of the text.
    - \[sign\] : Inserts a signature of your name in a foolproof way.
    - \[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.
    -
    -
    Pen exclusive commands

    - \[small\] - \[/small\] : Decreases the size of the text.
    - \[list\] - \[/list\] : A list.
    - \[*\] : A dot used for lists.
    - \[hr\] : Adds a horizontal rule. - "}, "window=paper_help") +/obj/item/weapon/paper/proc/addtofield(var/id, var/text, var/links = 0) + var/locid = 0 + var/laststart = 1 + var/textindex = 1 + while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck + var/istart = 0 + if(links) + istart = findtext(info_links, "", laststart) + else + istart = findtext(info, "", laststart) + if(istart==0) + return // No field found with matching id - Topic(href, href_list) - ..() - if ((usr.stat || usr.restrained())) - return - - if(href_list["write"]) - var/id = href_list["write"] - var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text - - var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen. - var/iscrayon = 0 - if(!istype(i, /obj/item/weapon/pen)) - if(!istype(i, /obj/item/toy/crayon)) - return - iscrayon = 1 - - - if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write - return - - t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html - - if(id!="end") - addtofield(text2num(id), t) // He wants to edit a field, let him. + laststart = istart+1 + locid++ + if(locid == id) + var/iend = 1 + if(links) + iend = findtext(info_links, "", istart) else - info += t // Oh, he wants to edit to the end of the file, let him. - updateinfolinks() + iend = findtext(info, "", istart) - usr << browse("[name][info_links][stamps]", "window=[name]") // Update the window + //textindex = istart+26 + textindex = iend + break - if(!overlays.Find("paper_words")) - overlays += "paper_words" + if(links) + var/before = copytext(info_links, 1, textindex) + var/after = copytext(info_links, textindex) + info_links = before + text + after + else + var/before = copytext(info, 1, textindex) + var/after = copytext(info, textindex) + info = before + text + after + updateinfolinks() - attackby(obj/item/weapon/P as obj, mob/user as mob) - ..() - var/clown = 0 - if(user.mind && (user.mind.assigned_role == "Clown")) - clown = 1 +/obj/item/weapon/paper/proc/updateinfolinks() + info_links = info + var/i = 0 + for(i=1,i<=fields,i++) + addtofield(i, "write", 1) + info_links = info_links + "write" - if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon)) - usr << browse("[name][info_links][stamps]", "window=[name]") - //openhelp(user) - return - else if(istype(P, /obj/item/weapon/stamp)) - if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P)) +/obj/item/weapon/paper/proc/parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0) + t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) + + t = dd_replacetext(t, "\[center\]", "
    ") + t = dd_replacetext(t, "\[/center\]", "
    ") + t = dd_replacetext(t, "\[br\]", "
    ") + t = dd_replacetext(t, "\[b\]", "") + t = dd_replacetext(t, "\[/b\]", "") + t = dd_replacetext(t, "\[i\]", "") + t = dd_replacetext(t, "\[/i\]", "") + t = dd_replacetext(t, "\[u\]", "") + t = dd_replacetext(t, "\[/u\]", "") + t = dd_replacetext(t, "\[large\]", "") + t = dd_replacetext(t, "\[/large\]", "") + t = dd_replacetext(t, "\[sign\]", "[user.real_name]") + t = dd_replacetext(t, "\[field\]", "") + + if(!iscrayon) + t = dd_replacetext(t, "\[*\]", "
  • ") + t = dd_replacetext(t, "\[hr\]", "
    ") + t = dd_replacetext(t, "\[small\]", "") + t = dd_replacetext(t, "\[/small\]", "") + t = dd_replacetext(t, "\[list\]", "
      ") + t = dd_replacetext(t, "\[/list\]", "
    ") + + t = "[t]" + else // If it is a crayon, and he still tries to use these, make them empty! + t = dd_replacetext(t, "\[*\]", "") + t = dd_replacetext(t, "\[hr\]", "") + t = dd_replacetext(t, "\[small\]", "") + t = dd_replacetext(t, "\[/small\]", "") + t = dd_replacetext(t, "\[list\]", "") + t = dd_replacetext(t, "\[/list\]", "") + + t = "[t]" + + //Count the fields + var/laststart = 1 + while(1) + var/i = findtext(t, "", laststart) + if(i==0) + break + laststart = i+1 + fields++ + + return t + +/obj/item/weapon/paper/proc/openhelp(mob/user as mob) + user << browse({"Pen Help + +
    Crayon&Pen commands

    +
    + \[br\] : Creates a linebreak.
    + \[center\] - \[/center\] : Centers the text.
    + \[b\] - \[/b\] : Makes the text bold.
    + \[i\] - \[/i\] : Makes the text italic.
    + \[u\] - \[/u\] : Makes the text underlined.
    + \[large\] - \[/large\] : Increases the size of the text.
    + \[sign\] : Inserts a signature of your name in a foolproof way.
    + \[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.
    +
    +
    Pen exclusive commands

    + \[small\] - \[/small\] : Decreases the size of the text.
    + \[list\] - \[/list\] : A list.
    + \[*\] : A dot used for lists.
    + \[hr\] : Adds a horizontal rule. + "}, "window=paper_help") + + +/obj/item/weapon/paper/Topic(href, href_list) + ..() + if ((usr.stat || usr.restrained())) + return + + if(href_list["write"]) + var/id = href_list["write"] + var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text + + var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen. + var/iscrayon = 0 + if(!istype(i, /obj/item/weapon/pen)) + if(!istype(i, /obj/item/toy/crayon)) return + iscrayon = 1 - stamps += (stamps=="" ? "
    " : "
    ") + "This paper has been stamped with the [P.name]." - switch(P.type) - if(/obj/item/weapon/stamp/captain) - overlays += "paper_stamped_cap" - if(/obj/item/weapon/stamp/hop) - overlays += "paper_stamped_hop" - if(/obj/item/weapon/stamp/hos) - overlays += "paper_stamped_hos" - if(/obj/item/weapon/stamp/ce) - overlays += "paper_stamped_ce" - if(/obj/item/weapon/stamp/rd) - overlays += "paper_stamped_rd" - if(/obj/item/weapon/stamp/cmo) - overlays += "paper_stamped_cmo" - if(/obj/item/weapon/stamp/denied) - overlays += "paper_stamped_denied" - if(/obj/item/weapon/stamp/clown) - if (!clown) - usr << "\red You are totally unable to use the stamp. HONK!" - return - else - overlays += "paper_stamped_clown" + if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write + return + + t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html + + if(id!="end") + addtofield(text2num(id), t) // He wants to edit a field, let him. + else + info += t // Oh, he wants to edit to the end of the file, let him. + updateinfolinks() + + usr << browse("[name][info_links][stamps]", "window=[name]") // Update the window + + if(!overlays.Find("paper_words")) + overlays += "paper_words" + +/obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob) + ..() + var/clown = 0 + if(user.mind && (user.mind.assigned_role == "Clown")) + clown = 1 + + if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon)) + usr << browse("[name][info_links][stamps]", "window=[name]") + //openhelp(user) + return + else if(istype(P, /obj/item/weapon/stamp)) + if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P)) + return + + stamps += (stamps=="" ? "
    " : "
    ") + "This paper has been stamped with the [P.name]." + + switch(P.type) + if(/obj/item/weapon/stamp/captain) + overlays += "paper_stamped_cap" + if(/obj/item/weapon/stamp/hop) + overlays += "paper_stamped_hop" + if(/obj/item/weapon/stamp/hos) + overlays += "paper_stamped_hos" + if(/obj/item/weapon/stamp/ce) + overlays += "paper_stamped_ce" + if(/obj/item/weapon/stamp/rd) + overlays += "paper_stamped_rd" + if(/obj/item/weapon/stamp/cmo) + overlays += "paper_stamped_cmo" + if(/obj/item/weapon/stamp/denied) + overlays += "paper_stamped_denied" + if(/obj/item/weapon/stamp/clown) + if (!clown) + usr << "\red You are totally unable to use the stamp. HONK!" + return else - overlays += "paper_stamped" - if(!stamped) - stamped = new - stamped += P.type + overlays += "paper_stamped_clown" + else + overlays += "paper_stamped" + if(!stamped) + stamped = new + stamped += P.type - user << "\blue You stamp the paper with your rubber stamp." - add_fingerprint(user) - return \ No newline at end of file + user << "\blue You stamp the paper with your rubber stamp." + add_fingerprint(user) + return \ No newline at end of file diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 6419d16a04e..0f833d809f7 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/paper_bin name = "paper bin" icon = 'bureaucracy.dmi' @@ -8,10 +10,9 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 10 - var - amount = 30 //How much paper is in the bin. - list/papers = new/list() //List of papers put in the bin for reference. - sealed = 1 //If it's brandnew and unopened, it's sealed. + var/amount = 30 //How much paper is in the bin. + var/list/papers = new/list() //List of papers put in the bin for reference. + var/sealed = 1 //If it's brandnew and unopened, it's sealed. MouseDrop(mob/user as mob) if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) @@ -86,4 +87,4 @@ if(amount < 1) icon_state = "paper_bin0" else - icon_state = "paper_bin1" \ No newline at end of file + icon_state = "paper_bin1" diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 54f845211c1..c5c50889465 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -3,7 +3,8 @@ name = "pen" icon = 'bureaucracy.dmi' icon_state = "pen" - flags = FPRINT | ONBELT | TABLEPASS + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT | SLOT_EARS throwforce = 0 w_class = 1.0 throw_speed = 7 diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index dfbf6b8dd32..3f0fbb7b3ce 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/photocopier name = "Photocopier" icon = 'library.dmi' @@ -8,11 +10,10 @@ idle_power_usage = 30 active_power_usage = 200 power_channel = EQUIP - var - obj/item/weapon/paper/copy = null //what's in the copier! - copies = 1 //how many copies to print! - toner = 30 //how much toner is left! woooooo~ - maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier! + var/obj/item/weapon/paper/copy = null //what's in the copier! + var/copies = 1 //how many copies to print! + var/toner = 30 //how much toner is left! woooooo~ + var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier! attack_ai(mob/user as mob) return src.attack_hand(user) @@ -132,4 +133,4 @@ /obj/item/device/toner name = "toner cartridge" - icon_state = "tonercartridge" \ No newline at end of file + icon_state = "tonercartridge" diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 18a5e9e2feb..60a34babe83 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -10,7 +10,7 @@ throw_speed = 7 throw_range = 15 m_amt = 60 - var/color = "cargo" + color = "cargo" pressure_resistance = 5 /obj/item/weapon/stamp/captain diff --git a/code/modules/power/antimatter/computer.dm b/code/modules/power/antimatter/computer.dm index 31e52fc5b60..6e8d49cc9ef 100644 --- a/code/modules/power/antimatter/computer.dm +++ b/code/modules/power/antimatter/computer.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/computer/am_engine name = "Antimatter Engine Console" icon = 'stationobjs.dmi' @@ -8,10 +10,9 @@ var/obj/machinery/power/am_engine/engine/connected_E = null var/obj/machinery/power/am_engine/injector/connected_I = null var/state = STATE_DEFAULT - var/const - STATE_DEFAULT = 1 - STATE_INJECTOR = 2 - STATE_ENGINE = 3 + var/const/STATE_DEFAULT = 1 + var/const/STATE_INJECTOR = 2 + var/const/STATE_ENGINE = 3 /obj/machinery/computer/am_engine/New() ..() diff --git a/code/modules/power/antimatter/engine.dm b/code/modules/power/antimatter/engine.dm index ae54faa10ce..824e3fe0e89 100644 --- a/code/modules/power/antimatter/engine.dm +++ b/code/modules/power/antimatter/engine.dm @@ -2,7 +2,7 @@ icon = 'AM_Engine.dmi' density = 1 anchored = 1.0 - flags = 512.0 + flags = ON_BORDER /obj/machinery/power/am_engine/bits name = "Antimatter Engine" diff --git a/code/modules/power/antimatter/fuel.dm b/code/modules/power/antimatter/fuel.dm index 71b22d32647..dc261110b00 100644 --- a/code/modules/power/antimatter/fuel.dm +++ b/code/modules/power/antimatter/fuel.dm @@ -46,7 +46,7 @@ var/strength = convert2energy(mass) if (strength < 773.0) - var/turf/T = get_turf(src.loc) + var/turf/T = get_turf(src) if (strength > (450+T0C)) explosion(T, 0, 1, 2, 4) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 1972513d46f..ce87f5a4caf 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -284,7 +284,7 @@ return else - user << "You transfer [MAXCOIL - src.amount ] length\s of cable from one coil to the other." + user << "You transfer [MAXCOIL - C.amount ] length\s of cable from one coil to the other." src.amount -= (MAXCOIL-C.amount) src.updateicon() C.amount = MAXCOIL diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3f9cc581540..b845d9f0eb6 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -230,7 +230,7 @@ continue M.show_message("[user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2) if(on && (W.flags & CONDUCT)) - //if(!user.mutations & COLD_RESISTANCE) + //if(!(COLD_RESISTANCE in user.mutations)) if (prob(12)) electrocute_mob(user, get_area(src), src, 0.3) broken() @@ -245,7 +245,7 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) s.start() - //if(!user.mutations & COLD_RESISTANCE) + //if(!(COLD_RESISTANCE in user.mutations)) if (prob(75)) electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) @@ -297,7 +297,7 @@ else prot = 1 - if(prot > 0 || (user.mutations & COLD_RESISTANCE)) + if(prot > 0 || (COLD_RESISTANCE in user.mutations)) user << "You remove the light [fitting]" else user << "You try to remove the light [fitting], but you burn your hand on it!" @@ -399,7 +399,7 @@ // explode the light /obj/machinery/light/proc/explode() - var/turf/T = get_turf(src.loc) + var/turf/T = get_turf(src) spawn(0) broken() // break it first to give a warning sleep(2) diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index 98d3eb1e8fa..4aa6e60525f 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -1,14 +1,15 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + //Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power). /obj/machinery/power/port_gen/pacman2 name = "Pacman II" desc = "P.A.C.M.A.N. type II portable generator. Uses liquid plasma as a fuel source." power_gen = 4500 - var - obj/item/weapon/tank/plasma/P = null - board_path = "/obj/item/weapon/circuitboard/pacman2" - emagged = 0 - heat = 0 + var/obj/item/weapon/tank/plasma/P = null + var/board_path = "/obj/item/weapon/circuitboard/pacman2" + var/emagged = 0 + var/heat = 0 /* process() if(P) @@ -69,7 +70,7 @@ proc overheat() - explosion(src.loc, 2, 5, 2, -1) + explosion(get_turf(src), 2, 5, 2, -1) attackby(var/obj/item/O as obj, var/mob/user as mob) if(istype(O, /obj/item/weapon/tank/plasma)) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index bf2875e3051..be46259e7ff 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /* new portable generator - work in progress /obj/machinery/power/port_gen @@ -49,12 +51,11 @@ display round(lastgen) and plasmatank amount directwired = 1 use_power = 0 - var - active = 0 - power_gen = 5000 - open = 0 - recent_fault = 0 - power_output = 1 + var/active = 0 + var/power_gen = 5000 + var/open = 0 + var/recent_fault = 0 + var/power_output = 1 proc HasFuel() //Placeholder for fuel check. @@ -98,14 +99,13 @@ display round(lastgen) and plasmatank amount /obj/machinery/power/port_gen/pacman name = "P.A.C.M.A.N.-type Portable Generator" - var - sheets = 0 - max_sheets = 100 - sheet_path = /obj/item/stack/sheet/plasma - board_path = "/obj/item/weapon/circuitboard/pacman" - sheet_left = 0 // How much is left of the sheet - time_per_sheet = 10 - heat = 0 + var/sheets = 0 + var/max_sheets = 100 + var/sheet_path = /obj/item/stack/sheet/plasma + var/board_path = "/obj/item/weapon/circuitboard/pacman" + var/sheet_left = 0 // How much is left of the sheet + var/time_per_sheet = 10 + var/heat = 0 New() ..() @@ -183,7 +183,7 @@ display round(lastgen) and plasmatank amount proc overheat() - explosion(src.loc, 2, 5, 2, -1) + explosion(get_turf(src), 2, 5, 2, -1) attackby(var/obj/item/O as obj, var/mob/user as mob) if(istype(O, sheet_path)) @@ -302,7 +302,7 @@ display round(lastgen) and plasmatank amount time_per_sheet = 25 board_path = "/obj/item/weapon/circuitboard/pacman/super" overheat() - explosion(src.loc, 3, 3, 3, -1) + explosion(get_turf(src), 3, 3, 3, -1) /obj/machinery/power/port_gen/pacman/mrs name = "M.R.S.P.A.C.M.A.N.-type Portable Generator" @@ -312,7 +312,7 @@ display round(lastgen) and plasmatank amount time_per_sheet = 30 board_path = "/obj/item/weapon/circuitboard/pacman/mrs" overheat() - explosion(src.loc, 4, 4, 4, -1) + explosion(get_turf(src), 4, 4, 4, -1) /obj/machinery/power/port_gen/pacman/industrial name = "Industrial P.A.C.M.A.N.-type Portable Generator" @@ -322,4 +322,4 @@ display round(lastgen) and plasmatank amount time_per_sheet = 30 board_path = "/obj/item/weapon/circuitboard/pacman/industrial" overheat() - explosion(src.loc, 4, 4, 4, -1) \ No newline at end of file + explosion(get_turf(src), 4, 4, 4, -1) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 41074362513..311ceef1b94 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -82,7 +82,6 @@ for(var/L = 1 to netcount) var/datum/powernet/PN = new() - //PN.tag = "powernet #[L]" powernets += PN PN.number = L @@ -287,7 +286,6 @@ // not looped, so make a new powernet var/datum/powernet/PN = new() - //PN.tag = "powernet #[L]" powernets += PN PN.number = powernets.len diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 8a4514cfee7..84755edda04 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 + /obj/machinery/power/rad_collector name = "Radiation Collector Array" @@ -9,16 +11,16 @@ directwired = 1 req_access = list(access_engine) // use_power = 0 - var - obj/item/weapon/tank/plasma/P = null - last_power = 0 - active = 0 - locked = 0 - drainratio = 1 + var/obj/item/weapon/tank/plasma/P = null + var/last_power = 0 + var/active = 0 + var/locked = 0 + var/drainratio = 1 process() if(P) if(P.air_contents.toxins <= 0) + investigate_log("out of fuel.","singulo") P.air_contents.toxins = 0 eject() else @@ -32,6 +34,7 @@ toggle_power() user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \ "You turn the [src.name] [active? "on":"off"].") + investigate_log("turned [active?"on":"off"] by [user.key]. [P?"Fuel: [round(P.air_contents.toxins/0.29)]%":"It is empty"].","singulo") return else user << "\red The controls are locked!" @@ -96,48 +99,47 @@ return ..() - proc - eject() - var/obj/item/weapon/tank/plasma/Z = src.P - if (!Z) - return - Z.loc = get_turf(src) - Z.layer = initial(Z.layer) - src.P = null - if(active) - toggle_power() - else - updateicon() - - receive_pulse(var/pulse_strength) - if(P && active) - var/power_produced = 0 - power_produced = P.air_contents.toxins*pulse_strength*20 - add_avail(power_produced) - last_power = power_produced - return + proc/eject() + locked = 0 + var/obj/item/weapon/tank/plasma/Z = src.P + if (!Z) return - - - updateicon() - overlays = null - if(P) - overlays += image('singularity.dmi', "ptank") - if(stat & (NOPOWER|BROKEN)) - return - if(active) - overlays += image('singularity.dmi', "on") - - - toggle_power() - active = !active - if(active) - icon_state = "ca_on" - flick("ca_active", src) - - else - icon_state = "ca" - flick("ca_deactive", src) + Z.loc = get_turf(src) + Z.layer = initial(Z.layer) + src.P = null + if(active) + toggle_power() + else updateicon() - return + + proc/receive_pulse(var/pulse_strength) + if(P && active) + var/power_produced = 0 + power_produced = P.air_contents.toxins*pulse_strength*20 + add_avail(power_produced) + last_power = power_produced + return + return + + + proc/updateicon() + overlays = null + if(P) + overlays += image('singularity.dmi', "ptank") + if(stat & (NOPOWER|BROKEN)) + return + if(active) + overlays += image('singularity.dmi', "on") + + + proc/toggle_power() + active = !active + if(active) + icon_state = "ca_on" + flick("ca_active", src) + else + icon_state = "ca" + flick("ca_deactive", src) + updateicon() + return diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 1e49b8c2ca8..4cfcd3bbaa4 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/containment_field name = "Containment Field" desc = "An energy field." @@ -7,9 +9,8 @@ density = 0 unacidable = 1 use_power = 0 - var - obj/machinery/field_generator/FG1 = null - obj/machinery/field_generator/FG2 = null + var/obj/machinery/field_generator/FG1 = null + var/obj/machinery/field_generator/FG2 = null New() spawn(1) @@ -92,4 +93,4 @@ return 0 FG1 = master1 FG2 = master2 - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index e8ce8d4a364..6a439efe201 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/emitter name = "Emitter" desc = "A heavy duty industrial laser" @@ -11,16 +13,15 @@ idle_power_usage = 10 active_power_usage = 300 - var - frequency = 1 - active = 0 - fire_delay = 100 - last_shot = 0 - shot_number = 0 - state = 0 - locked = 0 - energy = 0 - mega_energy = 0 + var/frequency = 1 + var/active = 0 + var/fire_delay = 100 + var/last_shot = 0 + var/shot_number = 0 + var/state = 0 + var/locked = 0 + var/energy = 0 + var/mega_energy = 0 verb/rotate() @@ -39,6 +40,9 @@ ..() return + Del() + investigate_log("deleted at ([x],[y],[z])","singulo") + ..() update_icon() if (active && !(stat & (NOPOWER|BROKEN))) @@ -55,12 +59,14 @@ src.active = 0 user << "You turn off the [src]." src.use_power = 1 + investigate_log("turned off by [user.key]","singulo") else src.active = 1 user << "You turn on the [src]." src.shot_number = 0 src.fire_delay = 100 src.use_power = 2 + investigate_log("turned on by [user.key]","singulo") update_icon() else user << "\red The controls are locked!" @@ -207,4 +213,4 @@ power_change() ..() update_icon() - return \ No newline at end of file + return diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index ccefe0cf57a..cbf636bbb76 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + var/containment_fail_announced = 0 /* @@ -20,17 +22,16 @@ field_generator power level display anchored = 0 density = 1 use_power = 0 - var - const/num_power_levels = 6 // Total number of power level icon has - Varedit_start = 0 - Varpower = 0 - active = 0 - power = 20 // Current amount of power - state = 0 - warming_up = 0 - list/obj/machinery/containment_field/fields - list/obj/machinery/field_generator/connected_gens - clean_up = 0 + var/const/num_power_levels = 6 // Total number of power level icon has + var/Varedit_start = 0 + var/Varpower = 0 + var/active = 0 + var/power = 20 // Current amount of power + var/state = 0 + var/warming_up = 0 + var/list/obj/machinery/containment_field/fields + var/list/obj/machinery/field_generator/connected_gens + var/clean_up = 0 update_icon() @@ -87,6 +88,8 @@ field_generator power level display "You turn on the [src.name].", \ "You hear heavy droning") turn_on() + investigate_log("activated by [user.key].","singulo") + src.add_fingerprint(user) else user << "The [src] needs to be firmly secured to the floor first." @@ -214,6 +217,7 @@ field_generator power level display for(var/mob/M in viewers(src)) M.show_message("\red The [src.name] shuts down!") turn_off() + investigate_log("ran out of power and deactivated","singulo") src.power = 0 return 0 diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 9cf20a8f394..bd2cbc5b371 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /////SINGULARITY SPAWNER /obj/machinery/the_singularitygen/ @@ -8,8 +10,7 @@ anchored = 0 density = 1 use_power = 0 - var - energy = 0 + var/energy = 0 //////////////////////Singularity gen START @@ -56,4 +57,4 @@ for (var/obj/X in orange(4,T)) //TODO: do we need requirement to singularity be actually _surrounded_ by field? if(istype(X, /obj/machinery/containment_field) || istype(X, /obj/machinery/shieldwall)) checkpointC ++ - return checkpointC >= 20 \ No newline at end of file + return checkpointC >= 20 diff --git a/code/modules/power/singularity/investigate.dm b/code/modules/power/singularity/investigate.dm new file mode 100644 index 00000000000..6389f10707c --- /dev/null +++ b/code/modules/power/singularity/investigate.dm @@ -0,0 +1,4 @@ +/area/engine/engineering/poweralert(var/state, var/source) + if (state != poweralm) + investigate_log("has a power alarm!","singulo") + ..() \ No newline at end of file diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index a76077f58e4..459159f8fcd 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/effect/accelerated_particle name = "Accelerated Particles" desc = "Small things moving very fast." @@ -5,17 +7,16 @@ icon_state = "particle"//Need a new icon for this anchored = 1 density = 1 - var - movement_range = 10 - energy = 10 //energy in eV - mega_energy = 0 //energy in MeV - frequency = 1 - ionizing = 0 - particle_type - additional_particles = 0 - turf/target - turf/source - movetotarget = 1 + var/movement_range = 10 + var/energy = 10 //energy in eV + var/mega_energy = 0 //energy in MeV + var/frequency = 1 + var/ionizing = 0 + var/particle_type + var/additional_particles = 0 + var/turf/target + var/turf/source + var/movetotarget = 1 weak movement_range = 8 energy = 5 diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index ed1f0b3e193..95c565aee5d 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /*Composed of 7 parts 3 Particle emitters proc @@ -62,13 +64,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin icon_state = "none" anchored = 0 density = 1 - var - obj/machinery/particle_accelerator/control_box/master = null - construction_state = 0 - reference = null - powered = 0 - strength = null - desc_holder = null + var/obj/machinery/particle_accelerator/control_box/master = null + var/construction_state = 0 + var/reference = null + var/powered = 0 + var/strength = null + var/desc_holder = null end_cap name = "Alpha Particle Generation Array" @@ -151,6 +152,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return + Move() + ..() + if(master && master.active) + master.toggle_power() + investigate_log("was moved whilst active; it powered down.","singulo") + ex_act(severity) switch(severity) if(1.0) @@ -181,9 +188,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin update_icon() switch(construction_state) - if(0) - icon_state="[reference]" - if(1) + if(0,1) icon_state="[reference]" if(2) icon_state="[reference]w" @@ -291,13 +296,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin use_power = 0 idle_power_usage = 0 active_power_usage = 0 - var - construction_state = 0 - active = 0 - reference = null - powered = null - strength = 0 - desc_holder = null + var/construction_state = 0 + var/active = 0 + var/reference = null + var/powered = null + var/strength = 0 + var/desc_holder = null verb/rotate() @@ -376,7 +380,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin del(src) return - proc update_state() return 0 @@ -440,4 +443,4 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin use_power = 1 update_icon() return 1 - return 0 \ No newline at end of file + return 0 diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 758a27eb4ac..025b3f901ee 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/machinery/particle_accelerator/control_box name = "Particle Accelerator Control Computer" desc = "This controls the density of the particles." @@ -11,10 +13,9 @@ active_power_usage = 10000 construction_state = 0 active = 0 - var - list/obj/structure/particle_accelerator/connected_parts - assembled = 0 - parts = null + var/list/obj/structure/particle_accelerator/connected_parts + var/assembled = 0 + var/parts = null New() @@ -48,7 +49,6 @@ if(use_power) icon_state = "[reference]p" else - icon_state = "[reference]c" switch(construction_state) if(0) icon_state = "[reference]" @@ -56,7 +56,7 @@ icon_state = "[reference]" if(2) icon_state = "[reference]w" - if(3) + else icon_state = "[reference]c" return @@ -78,34 +78,34 @@ return if(href_list["togglep"]) src.toggle_power() + investigate_log("turned [active?"ON":"OFF"] by [usr.key]","singulo") message_admins("[usr] toggled particle accelerator power to [active ? "on" : "off"].") log_admin("[usr] toggled particle accelerator power to [active ? "on" : "off"].") - if(href_list["scan"]) + else if(href_list["scan"]) src.part_scan() - if(href_list["strengthup"]) - src.strength++ + else if(href_list["strengthup"]) + strength++ + if(strength > 2) + strength = 2 + else + investigate_log("increased to [strength] by [usr.key]","singulo") + message_admins("[usr] increased particle accelerator power to [strength].") + log_admin("[usr] increased particle accelerator power to [strength].") for(var/obj/structure/particle_accelerator/part in connected_parts) - part.strength++ + part.strength = strength part.update_icon() - if(src.strength > 2) - src.strength = 2 - for(var/obj/structure/particle_accelerator/part in connected_parts) - part.strength = 2 - part.update_icon() - message_admins("[usr] increased particle accelerator power to [strength].") - log_admin("[usr] increased particle accelerator power to [strength].") - if(href_list["strengthdown"]) - src.strength-- + + else if(href_list["strengthdown"]) + strength-- + if(strength < 0) + strength = 0 + else + message_admins("[usr] decreased particle accelerator power to [strength].") + log_admin("[usr] decreased particle accelerator power to [strength].") + investigate_log("decreased to [strength] by [usr.key]","singulo") for(var/obj/structure/particle_accelerator/part in connected_parts) - part.strength-- + part.strength = strength part.update_icon() - if(src.strength < 0) - src.strength = 0 - for(var/obj/structure/particle_accelerator/part in connected_parts) - part.strength = 0 - part.update_icon() - message_admins("[usr] decreased particle accelerator power to [strength].") - log_admin("[usr] decreased particle accelerator power to [strength].") src.updateDialog() src.update_icon() return @@ -123,14 +123,15 @@ process() if(src.active) + //a part is missing! + if( length(connected_parts) < 6 ) + investigate_log("lost a connected part; It powered down.","singulo") + src.toggle_power() + return + //emit some particles for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts) if(PE) PE.emit_particle(src.strength) -// for(var/obj/structure/particle_accelerator/fuel_chamber/PF in connected_parts) -// PF.doshit() -// for(var/obj/structure/particle_accelerator/power_box/PB in connected_parts) -// PB.doshit() - //finish up putting the fuel run and power use things in here return diff --git a/code/modules/power/singularity/particle_accelerator/particle_emitter.dm b/code/modules/power/singularity/particle_accelerator/particle_emitter.dm index 509a1ed0c14..1a338c7e00f 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_emitter.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_emitter.dm @@ -1,11 +1,12 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/structure/particle_accelerator/particle_emitter name = "EM Containment Grid" desc_holder = "This launchs the Alpha particles, might not want to stand near this end." icon = 'particle_accelerator.dmi' icon_state = "none" - var - fire_delay = 50 - last_shot = 0 + var/fire_delay = 50 + var/last_shot = 0 center icon_state = "emitter_center" @@ -46,4 +47,4 @@ if(A) A.dir = src.dir return 1 - return 0 \ No newline at end of file + return 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 668b969d3f2..70a87130b92 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + var/global/list/uneatable = list( /turf/space, /obj/effect/overlay, @@ -15,23 +17,22 @@ var/global/list/uneatable = list( layer = 6 unacidable = 1 //Don't comment this out. use_power = 0 - var - current_size = 1 - allowed_size = 1 - contained = 1 //Are we going to move around? - energy = 100 //How strong are we? - dissipate = 1 //Do we lose energy over time? - dissipate_delay = 10 - dissipate_track = 0 - dissipate_strength = 1 //How much energy do we lose? - move_self = 1 //Do we move on our own? - grav_pull = 4 //How many tiles out do we pull? - consume_range = 0 //How many tiles out do we eat - event_chance = 15 //Prob for event each tick - target = null //its target. moves towards the target if it has one - last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing - teleport_del = 0 - last_warning + var/current_size = 1 + var/allowed_size = 1 + var/contained = 1 //Are we going to move around? + var/energy = 100 //How strong are we? + var/dissipate = 1 //Do we lose energy over time? + var/dissipate_delay = 10 + var/dissipate_track = 0 + var/dissipate_strength = 1 //How much energy do we lose? + var/move_self = 1 //Do we move on our own? + var/grav_pull = 4 //How many tiles out do we pull? + var/consume_range = 0 //How many tiles out do we eat + var/event_chance = 15 //Prob for event each tick + var/target = null //its target. moves towards the target if it has one + var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing + var/teleport_del = 0 + var/last_warning New(loc, var/starting_energy = 50, var/temp = 0) //CARN: admin-alert for chuckle-fuckery. @@ -41,6 +42,7 @@ var/global/list/uneatable = list( count = 1 break if(!count) message_admins("A singulo has been created without containment fields active ([x],[y],[z])",1) + investigate_log("was created. [count?"":"No containment fields were active"]","singulo") src.energy = starting_energy if(temp) @@ -93,7 +95,7 @@ var/global/list/uneatable = list( process() - spawn(0) + spawn(0) //Keep this in - Erthilo eat() dissipate() check_energy() @@ -183,6 +185,7 @@ var/global/list/uneatable = list( consume_range = 4 dissipate = 0 //It cant go smaller due to e loss if(current_size == allowed_size) + investigate_log("grew to size [current_size]","singulo") return 1 else if(current_size < (--temp_allowed_size)) expand(temp_allowed_size) @@ -255,7 +258,7 @@ var/global/list/uneatable = list( if (istype(A,/obj/item/weapon/storage/backpack/holding)) var/dist = max((current_size - 2),1) - explosion(src.loc,(dist),(dist*2),(dist*4)) + explosion(get_turf(src),(dist),(dist*2),(dist*4)) return if(istype(A, /obj/machinery/singularity))//Welp now you did it @@ -263,7 +266,7 @@ var/global/list/uneatable = list( src.energy += (S.energy/2)//Absorb most of it del(S) var/dist = max((current_size - 2),1) - explosion(src.loc,(dist),(dist*2),(dist*4)) + explosion(get_turf(src),(dist),(dist*2),(dist*4)) return//Quits here, the obj should be gone, hell we might be if((teleport_del) && (!istype(A, /obj/machinery)))//Going to see if it does not lag less to tele items over to Z 2 @@ -552,4 +555,4 @@ var/global/list/uneatable = list( consume(X) if(defer_powernet_rebuild != 2) defer_powernet_rebuild = 0 - return \ No newline at end of file + return diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index fa4b1988f3c..3b25a10d9e3 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -294,7 +294,7 @@ output += d output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range - + investigate_log("input/output; [chargelevel>output?"":""][chargelevel]/[output] | Output-mode: [online?"on":"off"] | Input-mode: [chargemode?"auto":"off"] by [usr.key]","singulo") src.updateUsrDialog() else @@ -304,9 +304,9 @@ proc/ion_act() - if(src.z == 1) + if(z == 1) if(prob(1)) //explosion - world << "\red SMES explosion in [src.loc.loc]" + world << "\red SMES explosion in \the [get_turf(src)]" 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) sleep(10*pick(4,5,6,7,10,14)) @@ -314,11 +314,11 @@ smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() - explosion(src.loc, -1, 0, 1, 3, 0) + explosion(get_turf(src), -1, 0, 1, 3, 0) del(src) return if(prob(15)) //Power drain - world << "\red SMES power drain in [src.loc.loc]" + world << "\red SMES power drain in \the [get_turf(src)]" var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) s.start() @@ -327,7 +327,7 @@ else emp_act(2) if(prob(5)) //smoke only - world << "\red SMES smoke in [src.loc.loc]" + world << "\red SMES smoke in \the [get_turf(src)]" var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread() smoke.set_up(3, 0, src.loc) smoke.attach(src) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 462755b9be1..9cbbbf4fa2d 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + #define SOLARGENRATE 1500 /obj/machinery/power/solar name = "solar panel" @@ -10,15 +12,14 @@ use_power = 0 idle_power_usage = 0 active_power_usage = 0 - var - health = 10 - id = 1 - obscured = 0 - sunfrac = 0 - adir = SOUTH - ndir = SOUTH - turn_angle = 0 - obj/machinery/power/solar_control/control = null + var/health = 10 + var/id = 1 + var/obscured = 0 + var/sunfrac = 0 + var/adir = SOUTH + var/ndir = SOUTH + var/turn_angle = 0 + var/obj/machinery/power/solar_control/control = null proc healthcheck() updateicon() @@ -162,15 +163,14 @@ use_power = 1 idle_power_usage = 5 active_power_usage = 20 - var - id = 1 - cdir = 0 - gen = 0 - lastgen = 0 - track = 2 // 0= off 1=timed 2=auto (tracker) - trackrate = 600 // 300-900 seconds - trackdir = 1 // 0 =CCW, 1=CW - nexttime = 0 + var/id = 1 + var/cdir = 0 + var/gen = 0 + var/lastgen = 0 + var/track = 2 // 0= off 1=timed 2=auto (tracker) + var/trackrate = 600 // 300-900 seconds + var/trackdir = 1 // 0 =CCW, 1=CW + var/nexttime = 0 proc updateicon() tracker_update(var/angle) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index a8802a7f1a3..614249889c4 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -1,15 +1,17 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/ammo_casing name = "bullet casing" desc = "A bullet casing." icon = 'ammo.dmi' icon_state = "s-casing" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT throwforce = 1 w_class = 1.0 - var - caliber = "" //Which kind of guns it can be loaded into - projectile_type = ""//The bullet type to create when New() is called - obj/item/projectile/BB = null //The loaded bullet + var/caliber = "" //Which kind of guns it can be loaded into + var/projectile_type = ""//The bullet type to create when New() is called + var/obj/item/projectile/BB = null //The loaded bullet New() @@ -28,18 +30,18 @@ desc = "A box of ammo" icon_state = "357" icon = 'ammo.dmi' - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT item_state = "syringe_kit" m_amt = 50000 throwforce = 2 w_class = 1.0 throw_speed = 4 throw_range = 10 - var - list/stored_ammo = list() - ammo_type = "/obj/item/ammo_casing" - max_ammo = 7 - multiple_sprites = 0 + var/list/stored_ammo = list() + var/ammo_type = "/obj/item/ammo_casing" + var/max_ammo = 7 + var/multiple_sprites = 0 New() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e1c1f79d9f8..8c1c43e6a9c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -4,7 +4,8 @@ icon = 'gun.dmi' icon_state = "detective" item_state = "gun" - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT m_amt = 2000 w_class = 3.0 throwforce = 5 @@ -13,19 +14,18 @@ force = 5.0 origin_tech = "combat=1" - var - fire_sound = 'Gunshot.ogg' - tmp/obj/item/projectile/in_chamber = null - caliber = "" - silenced = 0 - recoil = 0 - ejectshell = 1 - tmp/list/mob/living/target //List of who yer targeting. - tmp/lock_time = -100 - tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.> - automatic = 0 //Used to determine if you can target multiple people. - tmp/mob/living/last_moved_mob //Used to fire faster at more than one person. - tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them. + var/fire_sound = 'Gunshot.ogg' + var/tmp/obj/item/projectile/in_chamber = null + var/caliber = "" + var/silenced = 0 + var/recoil = 0 + var/ejectshell = 1 + var/tmp/list/mob/living/target //List of who yer targeting. + var/tmp/lock_time = -100 + var/tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.> + var/automatic = 0 //Used to determine if you can target multiple people. + var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person. + var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them. proc/load_into_chamber() return 0 @@ -114,12 +114,12 @@ update_icon() return if (prob(50)) - if (M.paralysis < 60 && (!(M.mutations & 8)) ) + if (M.paralysis < 60 && (!(HULK in M.mutations)) ) M.paralysis = 60 else - if (M.weakened < 60 && (!(M.mutations & 8)) ) + if (M.weakened < 60 && (!(HULK in M.mutations)) ) M.weakened = 60 - if (M.stuttering < 60 && (!(M.mutations & 8)) ) + if (M.stuttering < 60 && (!(HULK in M.mutations)) ) M.stuttering = 60 if(silenced) playsound(user, fire_sound, 10, 1) @@ -147,7 +147,7 @@ proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params)//TODO: go over this if(istype(user, /mob/living)) var/mob/living/M = user - if ((M.mutations & CLUMSY) && prob(50)) ///Who ever came up with this... + if ((CLUMSY in M.mutations) && prob(50)) ///Who ever came up with this... M << "\red \the [src] blows up in your face." M.take_organ_damage(0,20) M.drop_item() @@ -165,14 +165,16 @@ if (!istype(targloc) || !istype(curloc)) return - if(!special_check(user)) return + if(!special_check(user)) + return if(!load_into_chamber()) user.visible_message("*click click*", "\red *click*") for(var/mob/K in viewers(usr)) K << 'empty.ogg' return - if(!in_chamber) return + if(!in_chamber) + return in_chamber.firer = user in_chamber.def_zone = user.zone_sel.selecting @@ -191,7 +193,7 @@ playsound(user, fire_sound, 10, 1) else playsound(user, fire_sound, 50, 1) - user.visible_message("\red [user] fires the [src]!", "\red You fire the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!") + user.visible_message("\red [user] fires \the [src]!", "\red You fire \the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!") in_chamber.original = targloc in_chamber.loc = get_turf(user) @@ -210,7 +212,8 @@ in_chamber.p_y = text2num(mouse_control["icon-y"]) spawn() - if(in_chamber) in_chamber.fired() + if(in_chamber) + in_chamber.fired() sleep(1) in_chamber = null @@ -385,7 +388,7 @@ mob/proc spawn(0) //Make it show the 2 states properly if(target_locked) target_locked.icon_state = "locking" - update_clothing() + update_clothing() // update_clothing clears overlays, so this might break stuff sleep(20) if(target_locked) target_locked.icon_state = "locked" diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 5e70bb37411..5e51c673b54 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -1,15 +1,16 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/gun/energy icon_state = "energy" name = "energy gun" desc = "A basic energy-based gun." fire_sound = 'Taser.ogg' - var - obj/item/weapon/cell/power_supply //What type of power cell this uses - charge_cost = 100 //How much energy is needed to fire. - cell_type = "/obj/item/weapon/cell" - projectile_type = "/obj/item/projectile/energy" - modifystate + var/obj/item/weapon/cell/power_supply //What type of power cell this uses + var/charge_cost = 100 //How much energy is needed to fire. + var/cell_type = "/obj/item/weapon/cell" + var/projectile_type = "/obj/item/projectile/energy" + var/modifystate emp_act(severity) power_supply.use(round(power_supply.maxcharge / severity)) diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 8df4b8bb451..dc32ba1f085 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/gun/energy/gun icon_state = "energystun100" item_state = "energystun100" @@ -10,8 +12,7 @@ origin_tech = "combat=3;magnets=2" modifystate = "energystun" - var - mode = 0 //0 = stun, 1 = kill + var/mode = 0 //0 = stun, 1 = kill attack_self(mob/living/user as mob) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 9fc41c86cee..9a27af99726 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -5,7 +5,8 @@ fire_sound = 'Laser.ogg' origin_tech = "combat=2;magnets=4" w_class = 4.0 - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BACK charge_cost = 100 projectile_type = "/obj/item/projectile/ion" @@ -27,7 +28,8 @@ obj/item/weapon/gun/energy/staff icon_state = "staffofchange" item_state = "staffofchange" fire_sound = 'emitter.ogg' - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BACK w_class = 4.0 charge_cost = 200 projectile_type = "/obj/item/projectile/change" diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 618e04722e2..a14bf65ebe5 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -69,7 +69,7 @@ /obj/item/weapon/gun/energy/crossbow name = "mini energy-crossbow" - desc = "A weapon favored by many of the syndicates stealth specialists." + desc = "A crossbow that doesn't seem to have space for bolts." icon_state = "crossbow" w_class = 2.0 item_state = "crossbow" diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 25b9144fafe..385e1677194 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/gun/projectile desc = "A classic revolver. Uses 357 ammo" name = "revolver" @@ -8,12 +10,11 @@ m_amt = 1000 force = 10 //Pistol whipp'n good. (It was frigging SIXTY on pre-goon code) - var - ammo_type = "/obj/item/ammo_casing/a357" - list/loaded = list() - max_shells = 7 - load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine - obj/item/ammo_magazine/empty_mag = null + var/ammo_type = "/obj/item/ammo_casing/a357" + var/list/loaded = list() + var/max_shells = 7 + var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine + var/obj/item/ammo_magazine/empty_mag = null New() diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 32614de3a1d..98ddff24763 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -1,6 +1,6 @@ /obj/item/weapon/gun/projectile/detective desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds." - name = "\improper Revolver" + name = "revolver" icon_state = "detective" caliber = "357" origin_tech = "combat=2;materials=2" @@ -18,7 +18,8 @@ verb/rename_gun() set name = "Name Gun" - set desc = "Click to rename your gun." + set category = "Object" + set desc = "Click to rename your gun. If you're the detective." var/mob/M = usr if(!M.mind) return 0 @@ -26,8 +27,7 @@ M << "\red You don't feel cool enough to name this gun, chump." return 0 - var/input = input("What do you want to name the gun?",,"") - input = sanitize(input) + var/input = copytext(sanitize(input("What do you want to name the gun?",,"")),1,MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) name = input @@ -38,7 +38,7 @@ /obj/item/weapon/gun/projectile/mateba - name = "\improper Mateba" + name = "mateba" desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo." icon_state = "mateba" origin_tech = "combat=2;materials=2" \ No newline at end of file diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 72daf9dc61a..4ad2b395132 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /obj/item/weapon/gun/projectile/shotgun/pump name = "shotgun" desc = "Useful for sweeping alleys." @@ -6,14 +8,14 @@ max_shells = 4 w_class = 4.0 force = 10 - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BACK caliber = "shotgun" origin_tech = "combat=4;materials=2" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" - var - recentpump = 0 // to prevent spammage - pumped = 0 - obj/item/ammo_casing/current_shell = null + var/recentpump = 0 // to prevent spammage + var/pumped = 0 + var/obj/item/ammo_casing/current_shell = null load_into_chamber() @@ -66,7 +68,8 @@ max_shells = 2 w_class = 4.0 force = 10 - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BACK caliber = "shotgun" origin_tech = "combat=3;materials=1" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" @@ -124,8 +127,8 @@ item_state = "sawnshotgun" w_class = 3.0 item_state = "gun" - flags &= ~ONBACK //you can't sling it on your back - flags |= ONBELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) + slot_flags &= ~SLOT_BACK //you can't sling it on your back + slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) name = "sawn-off shotgun" desc = "Omar's coming!" - user << "You shorten the barrel of \the [src]!" \ No newline at end of file + user << "You shorten the barrel of \the [src]!" diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 9e223da1b16..7b119584bf6 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /* #define BRUTE "brute" #define BURN "burn" @@ -19,33 +21,32 @@ flags = FPRINT | TABLEPASS pass_flags = PASSTABLE mouse_opacity = 0 - var - bumped = 0 //Prevents it from hitting more than one guy at once - def_zone = "" //Aiming at - mob/firer = null//Who shot it - silenced = 0 //Attack message - yo = null - xo = null - current = null - turf/original = null // the original turf clicked - turf/starting = null // the projectile's starting turf + var/bumped = 0 //Prevents it from hitting more than one guy at once + var/def_zone = "" //Aiming at + var/mob/firer = null//Who shot it + var/silenced = 0 //Attack message + var/yo = null + var/xo = null + var/current = null + var/turf/original = null // the original turf clicked + var/turf/starting = null // the projectile's starting turf - p_x = 16 - p_y = 16 // the pixel location of the tile that the player clicked. Default is the center + var/p_x = 16 + var/p_y = 16 // the pixel location of the tile that the player clicked. Default is the center - damage = 10 - damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here - nodamage = 0 //Determines if the projectile will skip any damage inflictions - flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb - projectile_type = "/obj/item/projectile" + var/damage = 10 + var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here + var/nodamage = 0 //Determines if the projectile will skip any damage inflictions + var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb + var/projectile_type = "/obj/item/projectile" //Effects - stun = 0 - weaken = 0 - paralyze = 0 - irradiate = 0 - stutter = 0 - eyeblur = 0 - drowsy = 0 + var/stun = 0 + var/weaken = 0 + var/paralyze = 0 + var/irradiate = 0 + var/stutter = 0 + var/eyeblur = 0 + var/drowsy = 0 proc/on_hit(var/atom/target, var/blocked = 0) @@ -154,9 +155,8 @@ invisibility = 101 //Nope! Can't see me! yo = null xo = null - var - target = null - result = 0 //To pass the message back to the gun. + var/target = null + var/result = 0 //To pass the message back to the gun. Bump(atom/A as mob|obj|turf|area) if(A == firer) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 44c42ab7ccd..f041e96828b 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -1,4 +1,5 @@ // Disposal pipe construction +// This is the pipe that you drag around, not the attached ones. /obj/structure/disposalconstruct @@ -12,7 +13,7 @@ m_amt = 1850 level = 2 var/ptype = 0 - // 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=junction-j1s, 7=junction-j2s + // 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet, 9=junction-j1s, 10=junction-j2s var/dpdir = 0 // directions as disposalpipe var/base_state = "pipe-s" @@ -42,15 +43,32 @@ if(5) base_state = "pipe-t" dpdir = dir + // disposal bin has only one dir, thus we don't need to care about setting it if(6) + if(anchored) + base_state = "disposal" + else + base_state = "condisposal" + + if(7) + base_state = "outlet" + dpdir = dir + + if(8) + base_state = "intake" + dpdir = dir + if(9) base_state = "pipe-j1s" dpdir = dir | right | flip - if(7) + if(10) base_state = "pipe-j2s" dpdir = dir | left | flip - icon_state = "con[base_state]" + if(ptype<6 && ptype != 9 && ptype != 10) + icon_state = "con[base_state]" + else + icon_state = base_state if(invisibility) // if invisible, fade icon icon -= rgb(0,0,0,128) @@ -99,7 +117,13 @@ return /obj/structure/disposalpipe/junction if(5) return /obj/structure/disposalpipe/trunk - if(6,7) + if(6) + return /obj/machinery/disposal + if(7) + return /obj/structure/disposaloutlet + if(8) + return /obj/machinery/disposal/deliveryChute + if(9,10) return /obj/structure/disposalpipe/sortjunction return @@ -110,57 +134,98 @@ // weldingtool: convert to real pipe attackby(var/obj/item/I, var/mob/user) + var/nicetype = "pipe" + var/ispipe = 0 // Indicates if we should change the level of this pipe + switch(ptype) + if(6) + nicetype = "disposal bin" + if(7) + nicetype = "disposal outlet" + if(8) + nicetype = "delivery chute" + else + nicetype = "pipe" + ispipe = 1 + var/turf/T = src.loc if(T.intact) - user << "You can only attach the pipe if the floor plating is removed." + user << "You can only attach the [nicetype] if the floor plating is removed." return var/obj/structure/disposalpipe/CP = locate() in T - if(CP) - update() - var/pdir = CP.dpdir - if(istype(CP, /obj/structure/disposalpipe/broken)) - pdir = CP.dir - if(pdir & dpdir) - user << "There is already a pipe at that location." + if(ptype>=6 && ptype != 9 && ptype != 10) // Disposal or outlet + if(CP) // There's something there + if(!istype(CP,/obj/structure/disposalpipe/trunk)) + user << "The [nicetype] requires a trunk underneath it in order to work." + return + else // Nothing under, fuck. + user << "The [nicetype] requires a trunk underneath it in order to work." return + else + if(CP) + update() + var/pdir = CP.dpdir + if(istype(CP, /obj/structure/disposalpipe/broken)) + pdir = CP.dir + if(pdir & dpdir) + user << "There is already a [nicetype] at that location." + return + + var/obj/structure/disposalpipe/trunk/Trunk = CP if(istype(I, /obj/item/weapon/wrench)) if(anchored) anchored = 0 - level = 2 - density = 1 - user << "You detach the pipe from the underfloor." + if(ispipe) + level = 2 + density = 0 + else + density = 1 + user << "You detach the [nicetype] from the underfloor." else anchored = 1 - level = 1 - density = 0 - user << "You attach the pipe to the underfloor." + if(ispipe) + level = 1 // We don't want disposal bins to disappear under the floors + density = 0 + else + density = 1 // We don't want disposal bins or outlets to go density 0 + user << "You attach the [nicetype] to the underfloor." playsound(src.loc, 'Ratchet.ogg', 100, 1) + update() else if(istype(I, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src.loc, 'Welder2.ogg', 100, 1) - user << "Welding the pipe in place." + user << "Welding the [nicetype] in place." W:welding = 2 if(do_after(user, 20)) - update() - var/pipetype = dpipetype() - var/obj/structure/disposalpipe/P = new pipetype(src.loc) - P.base_icon_state = base_state - P.dir = dir - if(ptype >= 6) - var/obj/structure/disposalpipe/sortjunction/V = P - V.posdir = dir - if(ptype == 6) - V.sortdir = turn(dir, -90) - V.negdir = turn(dir, 180) - else - V.sortdir = turn(dir, 90) - V.negdir = turn(dir, 180) - P.dpdir = dpdir - P.updateicon() + user << "The [nicetype] has been welded in place!" + update() // TODO: Make this neat + if(ispipe) // Pipe + + var/pipetype = dpipetype() + var/obj/structure/disposalpipe/P = new pipetype(src.loc) + P.base_icon_state = base_state + P.dir = dir + P.dpdir = dpdir + P.updateicon() + + else if(ptype==6) // Disposal bin + var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc) + P.mode = 0 // start with pump off + + else if(ptype==7) // Disposal outlet + + var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc) + P.dir = dir + Trunk.linked = P + + else if(ptype==8) // Disposal outlet + + var/obj/machinery/disposal/deliveryChute/P = new /obj/machinery/disposal/deliveryChute(src.loc) + P.dir = dir + del(src) return W:welding = 1 diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 80ec3ea55e6..5d9c16139a6 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -47,6 +47,37 @@ if(isrobot(user) && !istype(I, /obj/item/weapon/trashbag)) return + if(mode<=0) // It's off + if(istype(I, /obj/item/weapon/screwdriver)) + if(mode==0) // It's off but still not unscrewed + mode=-1 // Set it to doubleoff l0l + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You remove the screws around the power connection." + return + else if(mode==-1) + mode=0 + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You attach the screws around the power connection." + return + else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1) + var/obj/item/weapon/weldingtool/W = I + if(W.remove_fuel(0,user)) + playsound(src.loc, 'Welder2.ogg', 100, 1) + user << "You start slicing the floorweld off the disposal unit." + W:welding = 2 + if(do_after(user,20)) + user << "You sliced the floorweld off the disposal unit." + var/obj/structure/disposalconstruct/C = new (src.loc) + C.ptype = 6 // 6 = disposal unit + C.anchored = 1 + C.density = 1 + C.update() + del(src) + W:welding = 1 + return + else + user << "You need more welding fuel to complete this task." + return if(istype(I, /obj/item/weapon/melee/energy/blade)) user << "You can't place that item inside the disposal unit." @@ -70,26 +101,6 @@ update() return - if(istype(I, /obj/item/weapon/weldingtool) && I:welding) - var/obj/item/weapon/weldingtool/W = I - playsound(src.loc, 'Welder.ogg', 100, 1) - var/turf/T = get_turf(user) - user.visible_message("[user] welds apart the disposal.", "You start to weld apart the disposal.") - sleep(40) - if(get_turf(user) == T && W.remove_fuel(2,user)) - var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc) - M.state = 2 - M.icon_state = "box_1" - for(var/obj/O in component_parts) - if(O.reliability != 100 && crit_fail) - O.crit_fail = 1 - O.loc = src.loc - // the stuff still in the disposal - for(var/obj/O in src) - O.loc = src.loc - del(src) - return - var/obj/item/weapon/grab/G = I if(istype(G)) // handle grabbed mob if(ismob(G.affecting)) @@ -102,13 +113,11 @@ GM.client.eye = src GM.loc = src for (var/mob/C in viewers(src)) - - log_attack("[usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") - log_admin("ATTACK: [usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") - // message_admins("ATTACK: [usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") - C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3) del(G) + log_attack("[usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") + log_admin("ATTACK: [usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") + message_admins("ATTACK: [usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a disposals unit.") else if(!I || isnull(I)) //CRASH("disposal/attackby() was called, but I was nulled before calling user.drop_item()") @@ -256,6 +265,11 @@ if(user && user.loc == src) usr << "\red You cannot reach the controls from inside." return + /* + if(mode==-1) + usr << "\red The disposal units power is disabled." + return + */ interact(user, 0) // user interaction @@ -276,7 +290,7 @@ dat += "

    Eject contents
    " - if(mode == 0) + if(mode <= 0) dat += "Pump: Off On
    " else if(mode == 1) dat += "Pump: Off On (pressurizing)
    " @@ -298,6 +312,10 @@ if(usr.loc == src) usr << "\red You cannot reach the controls from inside." return + + if(mode==-1 && !href_list["eject"]) // only allow ejecting if mode is -1 + usr << "\red The disposal units power is disabled." + return ..() src.add_fingerprint(usr) if(stat & BROKEN) @@ -354,7 +372,7 @@ overlays += image('disposal.dmi', "dispover-handle") // only handle is shown if no power - if(stat & NOPOWER) + if(stat & NOPOWER || mode == -1) return // check for items in disposal - occupied light @@ -373,6 +391,10 @@ if(stat & BROKEN) // nothing can happen if broken return + if(!air_contents) // Potentially causes a runtime otherwise (if this is really shitty, blame pete //Donkie) + return + + if(length(src.contents) > 0) if(timeleft == 0) flush = 1 @@ -492,96 +514,6 @@ else return ..() -//The toilet does not need to pressurized but can only handle small items. -//You can also choke people by dunking them into the toilet. -/obj/machinery/disposal/toilet - name = "toilet" - desc = "A torque rotation-based, waste disposal unit for small matter." - icon_state = "toilet" - density = 0//So you can stand on it. - mode = 2 - - attackby(var/obj/item/I, var/mob/user) - if( !(stat & BROKEN) ) - if(istype(I, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = I - if(istype(G)) // handle grabbed mob - if(ismob(G.affecting)) - var/mob/GM = G.affecting - for (var/mob/V in viewers(usr)) - V.show_message("[user] dunks [GM.name] into the toilet!", 3) - if(do_after(user, 30)) - if(G && G.state>1 && !GM.internal) - GM.oxyloss += 5 - - else if(I.w_class < 4) - user.drop_item() - I.loc = src - user << "You place \the [I] into the [src]." - for(var/mob/M in viewers(src)) - if(M == user) - continue - M.show_message("[user.name] places \the [I] into the [src].", 3) - else - user << "\red That item cannot be placed into the toilet." - return - - MouseDrop_T(mob/target, mob/user) - if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai)) - return//Damn that list is long - - for (var/mob/V in viewers(usr)) - if(target == user && !user.stat) - V.show_message("[user] sits on the toilet.", 3) - if(target != user && !user.restrained()) - V.show_message("[user] places [target.name] on the toilet.", 3) - target.loc = loc - return - - interact(mob/user) - if(isAI(user) || isrobot(user)) - return - - add_fingerprint(user) - for (var/mob/V in viewers(user)) - V.show_message("[user] eagerly drinks the toilet water!", 3)//Yum yum yum - return - - update() - overlays = null - if( !(stat & BROKEN) ) - if(flush) - overlays += image('disposal.dmi',"toilet-handle",,dir) - if( !(stat & NOPOWER) ) - overlays += image('disposal.dmi',"toilet-ready",,dir) - else - icon_state = "toilet-broken" - mode = 0 - flush = 0 - return - - process() - if( !((stat & BROKEN)||(stat & NOPOWER)) )// nothing can happen if broken or not powered. - updateDialog() - if(!flush&&contents.len) - flush++ - flush() - use_power(100)// base power usage - update() - return - - flush() - flick("toilet-flush", src) - var/obj/structure/disposalholder/H = new() - H.init(src) - sleep(10) - playsound(src, 'disposalflush.ogg', 50, 0, 0) - sleep(30) // To prevent spam. - H.start(src) - flush-- - update() - return - // virtual disposal object // travels through pipes in lieu of actual items // contents will be items flushed by the disposal @@ -600,8 +532,8 @@ // initialize a holder from the contents of a disposal unit proc/init(var/obj/machinery/disposal/D) - if(!istype(D, /obj/machinery/disposal/toilet))//So it does not drain gas from a toilet which does not function on it. - gas = D.air_contents// transfer gas resv. into holder object + gas = D.air_contents// transfer gas resv. into holder object + // now everything inside the disposal gets put into the holder // note AM since can contain mobs or objs @@ -609,7 +541,7 @@ AM.loc = src /*if(istype(AM, /mob/living/carbon/human)) var/mob/living/carbon/human/H = AM - if(H.mutations & FAT) // is a human and fat? + if(FAT in H.mutations) // is a human and fat? has_fat_guy = 1 // set flag on holder */ if(istype(AM, /obj/structure/bigDelivery))// && !hasmob) Already have a check for this. @@ -1001,6 +933,8 @@ C.ptype = 5 C.dir = dir + C.density = 0 + C.anchored = 1 C.update() del(src) @@ -1076,17 +1010,16 @@ desc = "An underfloor disposal pipe with a package sorting mechanism." icon_state = "pipe-j1s" - var - list/sortType = list() - list/backType = list() - backsort = 0 //For sending disposal packets to upstream destinations. - mailsort = 0 - posdir = 0 - negdir = 0 - sortdir = 0 - service = 0 - screen = 0 - icon_state_old = null + var/list/sortType = list() + var/list/backType = list() + var/backsort = 0 //For sending disposal packets to upstream destinations. + var/mailsort = 0 + var/posdir = 0 + var/negdir = 0 + var/sortdir = 0 + var/service = 0 + var/screen = 0 + var/icon_state_old = null nonsorting NE @@ -1249,11 +1182,10 @@ name = "\improper Package Discrimination Unit" desc = "An underfloor disposal pipe that is racist against packages." icon_state = "pipe-j1s" - var - posdir = 0 - negdir = 0 - sortdir = 0 - screen = 0 + var/posdir = 0 + var/negdir = 0 + var/sortdir = 0 + var/screen = 0 New() @@ -1335,6 +1267,37 @@ update() return + // Override attackby so we disallow trunkremoval when somethings ontop + attackby(var/obj/item/I, var/mob/user) + + if(linked != null) + return + + var/turf/T = src.loc + if(T.intact) + return // prevent interaction with T-scanner revealed pipes + + if(istype(I, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/W = I + + if(W.welding) + if(W.remove_fuel(0,user)) + W:welding = 2 + playsound(src.loc, 'Welder2.ogg', 100, 1) + // check if anything changed over 2 seconds + var/turf/uloc = user.loc + var/atom/wloc = W.loc + user << "Slicing the disposal pipe." + sleep(30) + if(user.loc == uloc && wloc == W.loc) + welded() + else + user << "You must stay still while welding the pipe." + W:welding = 1 + else + user << "You need more welding fuel to cut the pipe." + return + // would transfer to next pipe segment, but we are in a trunk // if not entering from disposal bin, // transfer to linked object (outlet or bin) @@ -1396,6 +1359,7 @@ anchored = 1 var/active = 0 var/turf/target // this will be where the output objects are 'thrown' to. + var/mode = 0 var/playing_sound = 0 var/playing_buzzer = 0 @@ -1428,13 +1392,47 @@ for(var/atom/movable/AM in H) AM.loc = src.loc AM.pipe_eject(dir) - spawn(1) + spawn(5) AM.throw_at(target, 3, 1) H.vent_gas(src.loc) del(H) return + attackby(var/obj/item/I, var/mob/user) + if(!I || !user) + return + + if(istype(I, /obj/item/weapon/screwdriver)) + if(mode==0) + mode=1 + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You remove the screws around the power connection." + return + else if(mode==1) + mode=0 + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You attach the screws around the power connection." + return + else if(istype(I,/obj/item/weapon/weldingtool) && mode==1) + var/obj/item/weapon/weldingtool/W = I + if(W.remove_fuel(0,user)) + playsound(src.loc, 'Welder2.ogg', 100, 1) + user << "You start slicing the floorweld off the disposal outlet." + W:welding = 2 + if(do_after(user,20)) + user << "You sliced the floorweld off the disposal outlet." + var/obj/structure/disposalconstruct/C = new (src.loc) + C.ptype = 7 // 7 = outlet + C.update() + C.anchored = 1 + C.density = 1 + del(src) + W:welding = 1 + return + else + user << "You need more welding fuel to complete this task." + return diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index c9d2a6860d7..d47bd60b162 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -19,7 +19,7 @@ proc/unwrap() if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 - wrapped.loc = (get_turf(src.loc)) + wrapped.loc = (get_turf(loc)) if(istype(wrapped, /obj/structure/closet)) var/obj/structure/closet/O = wrapped O.welded = waswelded @@ -47,34 +47,29 @@ if(istype(W, /obj/item/device/destTagger)) var/obj/item/device/destTagger/O = W user << "\blue *TAGGED*" - src.sortTag = O.currTag + sortTag = O.currTag update_icon() else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) if("Title") - var/str = input(usr,"Label text?","Set label","") + var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN) if(!str || !length(str)) usr << "\red Invalid text." return - if(length(str) > 64) - usr << "\red Text too long." - return - var/label = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] as [label]." - src.name = "[src.name] ([label])" + user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\ + "\blue You title \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") + name = "[name] ([str])" update_icon() if("Description") - var/str = input(usr,"Label text?","Set label","") + var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_MESSAGE_LEN) if(!str || !length(str)) usr << "\red Invalid text." return - if(length(str) > 64) - usr << "\red Text too long." - return examtext = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] with the note: [examtext]." + user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\ + "\blue You label \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") update_icon() return @@ -94,11 +89,29 @@ F.opened = 0 break + ex_act(severity) + switch(severity) + if(1.0) + del(src) + if(2.0) + if(prob(10)) + del(src) + else + wrapped.loc = get_turf(src) + wrapped:welded = waswelded + del(src) + return + if(3.0) + wrapped.loc = get_turf(src) + wrapped:welded = waswelded + del(src) + return + /obj/item/smallDelivery desc = "A small wrapped package." name = "small parcel" icon = 'storage.dmi' - icon_state = "deliverycrateSmall" + icon_state = "deliverycrate1" var/tmp/obj/item/wrapped = null var/sortTag = null flags = FPRINT @@ -106,9 +119,8 @@ attack_self(mob/user) - if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 - src.wrapped.loc = (get_turf(src.loc)) - + if (wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 + wrapped.loc = (get_turf(loc)) del(src) return @@ -123,34 +135,29 @@ if(istype(W, /obj/item/device/destTagger)) var/obj/item/device/destTagger/O = W user << "\blue *TAGGED*" - src.sortTag = O.currTag + sortTag = O.currTag update_icon() else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) if("Title") - var/str = input(usr,"Label text?","Set label","") + var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN) if(!str || !length(str)) usr << "\red Invalid text." return - if(length(str) > 64) - usr << "\red Text too long." - return - var/label = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] as [label]." - src.name = "[src.name] ([label])" + user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[examtext]\"",\ + "\blue You title \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") + name = "[name] ([str])" update_icon() if("Description") - var/str = input(usr,"Label text?","Set label","") + var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_MESSAGE_LEN) if(!str || !length(str)) usr << "\red Invalid text." return - if(length(str) > 64) - usr << "\red Text too long." - return examtext = str - for(var/mob/M in viewers()) - M << "\blue [user] labels [src] with the note: [examtext]." + user.visible_message("\The [user] labels \the [src] with \a [W], scribbling down: \"[examtext]\"",\ + "\blue You label \the [src]: \"[examtext]\"",\ + "You hear someone scribbling a note.") update_icon() return @@ -163,6 +170,22 @@ ..() return + ex_act(severity) + switch(severity) + if(1.0) + del(src) + if(2.0) + if(prob(40)) + del(src) + else + wrapped.loc = get_turf(src) + del(src) + return + if(3.0) + wrapped.loc = get_turf(src) + del(src) + return + /obj/item/weapon/packageWrap name = "package wrapper" icon = 'items.dmi' @@ -172,6 +195,8 @@ afterattack(var/obj/target as obj, mob/user as mob) + if(!in_range(target,user)) + return if(!(istype(target, /obj))) //this really shouldn't be necessary (but it is). -Pete return if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) || istype(target,/obj/item/smallDelivery)) @@ -181,43 +206,67 @@ if(target in user) return - user.attack_log += text("\[[time_stamp()]\] Has used [src.name] on \ref[target]") + user.attack_log += text("\[[time_stamp()]\] Has used \a [src] on \ref[target]") if (istype(target, /obj/item)) var/obj/item/O = target - if (src.amount > 1) + if (amount > 1) var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc)) //Aaannd wrap it up! if(!istype(O.loc, /turf)) if(user.client) user.client.screen -= O P.wrapped = O O.loc = P - src.amount -= 1 + amount -= 1 + P.w_class = O.w_class + P.icon_state = "deliverycrate[P.w_class]" + var/t + switch(P.w_class) + if(1.0) + t = "tiny" + if(2.0) + t = "small" + if(3.0) + t = "normal-sized" + if(4.0) + t = "bulky" + if(5.0) + t = "huge" + P.name = "[t] package" + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone taping paper around a small object.") else if (istype(target, /obj/structure/closet/crate)) var/obj/structure/closet/crate/O = target - if (src.amount > 3 && !O.opened) + if (amount > 3 && !O.opened) var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc)) P.icon_state = "deliverycrate" P.wrapped = O O.loc = P - src.amount -= 3 - else if(src.amount < 3) + amount -= 3 + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone pondering a problem, using a tape measure, and taping paper around a large object.") + else if(amount < 3) user << "\blue You need more paper." else if (istype (target, /obj/structure/closet)) var/obj/structure/closet/O = target - if (src.amount > 3 && !O.opened) + if (amount > 3 && !O.opened) var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc)) P.wrapped = O P.waswelded = O.welded O.welded = 1 O.loc = P - src.amount -= 3 - else if(src.amount < 3) + amount -= 3 + user.visible_message("\The [user] wraps \a [target] with \a [src], producing \a [P].",\ + "\blue You wrap \the [target], leaving [amount] units of paper on your [src].",\ + "You hear someone pondering a problem, using a tape measure, and taping paper around a large object.") + else if(amount < 3) user << "\blue You need more paper." else user << "\blue The object you are trying to wrap is unsuitable for the sorting machinery!" - if (src.amount <= 0) - new /obj/item/weapon/c_tube( src.loc ) + if (amount <= 0) + new /obj/item/weapon/c_tube( loc ) del(src) return return @@ -266,7 +315,8 @@ w_class = 1 item_state = "electronic" - flags = FPRINT | TABLEPASS | ONBELT | CONDUCT + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT attack_self(mob/user as mob) interact(user) @@ -289,15 +339,15 @@ Topic(href, href_list) usr.machine = src - src.add_fingerprint(usr) + add_fingerprint(usr) if(href_list["nextTag"]) var/n = text2num(href_list["nextTag"]) if(n > locationList.len) var/t1 = input("Which tag?","Tag") as null|text if(t1) - src.currTag = t1 + currTag = t1 else - src.currTag = locationList[n] + currTag = locationList[n] if(istype(loc,/mob)) interact(loc) else @@ -305,18 +355,15 @@ return attack(target as obj, mob/user as mob) - if (istype(target, /obj/structure/bigDelivery)) - user << "\blue *TAGGED*" - var/obj/structure/bigDelivery/O = target - O.sortTag = src.currTag - O.update_icon() - else if (istype(target, /obj/item/smallDelivery)) - user << "\blue *TAGGED*" - var/obj/item/smallDelivery/O = target - O.sortTag = src.currTag - O.update_icon() + if (istype(target, /obj/structure/bigDelivery) || istype(target, /obj/item/smallDelivery)) + user.visible_message("\The [user] tags \a [target] with \a [src].", "\blue *TAGGED*",\ + "You hear a short electronic click-shunk, like something being printed on a surface.") + target:sortTag = currTag + target:update_icon() else - user << "\blue You can only tag properly wrapped delivery packages!" + user.visible_message("\The [user] tries to tag \a [target], but their [src] refuses to work on anything but packages.",\ + "\blue Your [src] flashes: \"You can only tag properly wrapped delivery packages!\"",\ + "You hear a short click then a sad synthesized noise.") return /obj/machinery/disposal/deliveryChute @@ -325,10 +372,15 @@ density = 0 icon_state = "intake" var/currentlyFlushing = 0 + var/defaultDestination = "Disposals" + var/c_mode = 0 interact() return + update() + return + HasEntered(AM as mob|obj) //Go straight into the chute if (istype(AM, /obj)) var/obj/O = AM @@ -336,7 +388,7 @@ else if (istype(AM, /mob)) var/mob/M = AM M.loc = src - src.flush() + flush() flush() flushing = 1 @@ -347,13 +399,13 @@ for(var/obj/structure/bigDelivery/O in src) deliveryCheck = 1 if(!O.sortTag) - O.sortTag = "Disposals" + O.sortTag = defaultDestination for(var/obj/item/smallDelivery/O in src) deliveryCheck = 1 if (!O.sortTag) - O.sortTag = "Disposals" + O.sortTag = defaultDestination if(deliveryCheck == 0) - H.destinationTag = "Disposals" + H.destinationTag = defaultDestination H.init(src) // copy the contents of disposer to holder @@ -379,12 +431,47 @@ update() return + attackby(var/obj/item/I, var/mob/user) + if(!I || !user) + return + + if(istype(I, /obj/item/weapon/screwdriver)) + if(c_mode==0) + c_mode=1 + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You remove the screws around the power connection." + return + else if(c_mode==1) + c_mode=0 + playsound(src.loc, 'Screwdriver.ogg', 50, 1) + user << "You attach the screws around the power connection." + return + else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1) + var/obj/item/weapon/weldingtool/W = I + if(W.remove_fuel(0,user)) + playsound(src.loc, 'Welder2.ogg', 100, 1) + user << "You start slicing the floorweld off the delivery chute." + W:welding = 2 + if(do_after(user,20)) + user << "You sliced the floorweld off the delivery chute." + var/obj/structure/disposalconstruct/C = new (src.loc) + C.ptype = 8 // 8 = Delivery chute + C.update() + C.anchored = 1 + C.density = 1 + del(src) + W:welding = 1 + return + else + user << "You need more welding fuel to complete this task." + return + CanPass(atom/A, turf/T) - if(istype(A, /mob/living)) // You Shall Not Pass! + if(istype(A, /mob/living)) // You Shall Get Sucked In And Killed! var/mob/living/M = A HasEntered(M) return 0 - if(istype(A, /obj)) // You Shall Not Pass! + if(istype(A, /obj)) // You Shall Get Mailed! var/obj/M = A HasEntered(M) return 1 diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index f99231a3d35..2c69de7ebbd 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 + /*///////////////Circuit Imprinter (By Darem)//////////////////////// Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of @@ -8,11 +10,11 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). name = "Circuit Imprinter" icon_state = "circuit_imprinter" flags = OPENCONTAINER - var - g_amount = 0 - gold_amount = 0 - diamond_amount = 0 - max_material_amount = 75000.0 + + var/g_amount = 0 + var/gold_amount = 0 + var/diamond_amount = 0 + var/max_material_amount = 75000.0 New() ..() diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 9470049029d..e3cae5c9f63 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /*************************************************************** ** Design Datums ** ** All the data for building stuff and tracking reliability. ** @@ -39,18 +41,17 @@ other types of metals and chemistry for reagents). datum design //Datum for object designs, used in construction - var - name = "Name" //Name of the created object. - desc = "Desc" //Description of the created object. - id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols - list/req_tech = list() //IDs of that techs the object originated from and the minimum level requirements. - reliability_mod = 0 //Reliability modifier of the device at it's starting point. - reliability_base = 100 //Base reliability of a device before modifiers. - reliability = 100 //Reliability of the device. - build_type = null //Flag as to what kind machine the design is built in. See defines. - list/materials = list() //List of materials. Format: "id" = amount. - build_path = "" //The file path of the object that gets created - locked = 0 //If true it will spawn inside a lockbox with currently sec access + var/name = "Name" //Name of the created object. + var/desc = "Desc" //Description of the created object. + var/id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols + var/list/req_tech = list() //IDs of that techs the object originated from and the minimum level requirements. + var/reliability_mod = 0 //Reliability modifier of the device at it's starting point. + var/reliability_base = 100 //Base reliability of a device before modifiers. + var/reliability = 100 //Reliability of the device. + var/build_type = null //Flag as to what kind machine the design is built in. See defines. + var/list/materials = list() //List of materials. Format: "id" = amount. + var/build_path = "" //The file path of the object that gets created + var/locked = 0 //If true it will spawn inside a lockbox with currently sec access proc //A proc to calculate the reliability of a design based on tech levels and innate modifiers. diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 5b120e5117a..2a108a49868 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /* Destructive Analyzer @@ -8,9 +10,8 @@ Note: Must be placed within 3 tiles of the R&D Console /obj/machinery/r_n_d/destructive_analyzer name = "Destructive Analyzer" icon_state = "d_analyzer" - var - obj/item/weapon/loaded_item = null - decon_mod = 1 + var/obj/item/weapon/loaded_item = null + var/decon_mod = 1 New() ..() @@ -109,4 +110,4 @@ Note: Must be placed within 3 tiles of the R&D Console icon_state = "d20" g_amt = 5000 m_amt = 5000 - origin_tech = "materials=5;plasmatech=5;syndicate=5;programming=9"*/ \ No newline at end of file + origin_tech = "materials=5;plasmatech=5;syndicate=5;programming=9"*/ diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index c4da96269a8..a8f69b78a78 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /* Protolathe @@ -11,17 +13,16 @@ Note: Must be placed west/left of and R&D console to function. name = "Protolathe" icon_state = "protolathe" flags = OPENCONTAINER - var - max_material_storage = 100000 //All this could probably be done better with a list but meh. - m_amount = 0.0 - g_amount = 0.0 - gold_amount = 0.0 - silver_amount = 0.0 - plasma_amount = 0.0 - uranium_amount = 0.0 - diamond_amount = 0.0 - clown_amount = 0.0 - adamantine_amount = 0.0 + var/max_material_storage = 100000 //All this could probably be done better with a list but meh. + var/m_amount = 0.0 + var/g_amount = 0.0 + var/gold_amount = 0.0 + var/silver_amount = 0.0 + var/plasma_amount = 0.0 + var/uranium_amount = 0.0 + var/diamond_amount = 0.0 + var/clown_amount = 0.0 + var/adamantine_amount = 0.0 New() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index a309ea13b39..35a86f1d777 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /* Research and Development (R&D) Console @@ -32,18 +34,17 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole name = "R&D Console" icon_state = "rdcomp" - var - datum/research/files //Stores all the collected research data. - obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk. - obj/item/weapon/disk/design_disk/d_disk = null //Stores the design disk. + var/datum/research/files //Stores all the collected research data. + var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk. + var/obj/item/weapon/disk/design_disk/d_disk = null //Stores the design disk. - obj/machinery/r_n_d/destructive_analyzer/linked_destroy = null //Linked Destructive Analyzer - obj/machinery/r_n_d/protolathe/linked_lathe = null //Linked Protolathe - obj/machinery/r_n_d/circuit_imprinter/linked_imprinter = null //Linked Circuit Imprinter + var/obj/machinery/r_n_d/destructive_analyzer/linked_destroy = null //Linked Destructive Analyzer + var/obj/machinery/r_n_d/protolathe/linked_lathe = null //Linked Protolathe + var/obj/machinery/r_n_d/circuit_imprinter/linked_imprinter = null //Linked Circuit Imprinter - screen = 1.0 //Which screen is currently showing. - id = 0 //ID of the computer (for server restrictions). - sync = 1 //If sync = 0, it doesn't show up on Server Control Console + var/screen = 1.0 //Which screen is currently showing. + var/id = 0 //ID of the computer (for server restrictions). + var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console req_access = list(access_tox) //Data and setting manipulation requires scientist access. @@ -351,6 +352,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, screen = 0.3 linked_lathe.busy = 1 flick("protolathe_n",linked_lathe) + var/key = usr.key //so we don't lose the info during the spawn delay spawn(16) use_power(power) spawn(16) @@ -379,6 +381,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(being_built.build_path) var/obj/new_item = new being_built.build_path(src) + if( new_item.type == /obj/item/weapon/storage/backpack/holding ) + new_item.investigate_log("built by [key]","singulo") new_item.reliability = being_built.reliability if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0) if(being_built.locked) @@ -890,4 +894,4 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(linked_imprinter.diamond_amount >= 3750) dat += "(Max Sheets)" user << browse("Research and Development Console
    [dat]", "window=rdconsole;size=575x400") - onclose(user, "rdconsole") \ No newline at end of file + onclose(user, "rdconsole") diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 43f92517bf2..a496c609a9c 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + //All devices that link into the R&D console fall into thise type for easy identification and some shared procs. @@ -6,17 +8,16 @@ density = 1 anchored = 1 use_power = 1 - var - busy = 0 - hacked = 0 - disabled = 0 - shocked = 0 - list/wires = list() - hack_wire - disable_wire - shock_wire - opened = 0 - obj/machinery/computer/rdconsole/linked_console + var/busy = 0 + var/hacked = 0 + var/disabled = 0 + var/shocked = 0 + var/list/wires = list() + var/hack_wire + var/disable_wire + var/shock_wire + var/opened = 0 + var/obj/machinery/computer/rdconsole/linked_console New() ..() @@ -102,4 +103,4 @@ if(src.shock_wire == temp_wire) src.shocked = !src.shocked src.shock(usr,50) - src.updateUsrDialog() \ No newline at end of file + src.updateUsrDialog() diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 34ee129b99f..6815f4a46b0 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /* General Explination: The research datum is the "folder" where all the research information is stored in a R&D console. It's also a holder for all the @@ -45,12 +47,11 @@ research holder datum. ***************************************************************/ /datum/research //Holder for all the existing, archived, and known tech. Individual to console. - var - list //Datum/tech go here. - possible_tech = list() //List of all tech in the game that players have access to (barring special events). - known_tech = list() //List of locally known tech. - possible_designs = list() //List of all designs (at base reliability). - known_designs = list() //List of available designs (at base reliability). + //Datum/tech go here. + var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events). + var/list/known_tech = list() //List of locally known tech. + var/list/possible_designs = list() //List of all designs (at base reliability). + var/list/known_designs = list() //List of available designs (at base reliability). New() //Insert techs into possible_tech here. Known_tech automatically updated. for(var/T in typesof(/datum/tech) - /datum/tech) @@ -170,12 +171,11 @@ research holder datum. datum tech //Datum of individual technologies. - var - name = "name" //Name of the technology. - desc = "description" //General description of what it does and what it makes. - id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols. - level = 1 //A simple number scale of the research level. Level 0 = Secret tech. - list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = # + var/name = "name" //Name of the technology. + var/desc = "description" //General description of what it does and what it makes. + var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols. + var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech. + var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = # //Trunk Technologies (don't require any other techs and you start knowning them). @@ -268,4 +268,4 @@ datum var/datum/tech/stored New() src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) \ No newline at end of file + src.pixel_y = rand(-5.0, 5) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 604a31c5d57..3ce78f337fe 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -1,18 +1,18 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /obj/machinery/r_n_d/server name = "R&D Server" icon_state = "server" - var - datum/research/files - health = 100 - list - id_with_upload = list() //List of R&D consoles with upload to server access. - id_with_download = list() //List of R&D consoles with download from server access. - id_with_upload_string = "" //String versions for easy editing in map editor. - id_with_download_string = "" - server_id = 0 - heat_gen = 100 - heating_power = 40000 - delay = 10 + var/datum/research/files + var/health = 100 + var/list/id_with_upload = list() //List of R&D consoles with upload to server access. + var/list/id_with_download = list() //List of R&D consoles with download from server access. + var/id_with_upload_string = "" //String versions for easy editing in map editor. + var/id_with_download_string = "" + var/server_id = 0 + var/heat_gen = 100 + var/heating_power = 40000 + var/delay = 10 req_access = list(access_rd) //Only the R&D can change server settings. New() @@ -159,13 +159,11 @@ /obj/machinery/computer/rdservercontrol name = "R&D Server Controller" icon_state = "rdcomp" - var - screen = 0 - obj/machinery/r_n_d/server/temp_server - list - servers = list() - consoles = list() - badmin = 0 + var/screen = 0 + var/obj/machinery/r_n_d/server/temp_server + var/list/servers = list() + var/list/consoles = list() + var/badmin = 0 Topic(href, href_list) if(..()) diff --git a/code/setup.dm b/code/setup.dm index 05e8e837728..b0f59df3799 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + #define PI 3.1415 #define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol) @@ -14,6 +16,16 @@ #define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible +#define SPECIFIC_HEAT_TOXIN 200 +#define SPECIFIC_HEAT_AIR 20 +#define SPECIFIC_HEAT_CDO 30 +#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \ + (carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN) + +#define MINIMUM_HEAT_CAPACITY 0.0003 +#define QUANTIZE(variable) (round(variable,0.0001)) +#define TRANSFER_FRACTION 5 //What fraction (1/#) of the air difference to try and transfer + #define BREATH_VOLUME 0.5 //liters in a normal breath #define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME //Amount of air to take a from a tile @@ -99,8 +111,23 @@ var/MAX_EXPLOSION_RANGE = 14 #define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up +//ITEM INVENTORY SLOT BITMASKS: (HUMANS ONLY!) +#define SLOT_OCLOTHING 1 +#define SLOT_ICLOTHING 2 +#define SLOT_GLOVES 4 +#define SLOT_EYES 8 +#define SLOT_EARS 16 +#define SLOT_MASK 32 +#define SLOT_HEAD 64 +#define SLOT_FEET 128 +#define SLOT_ID 256 +#define SLOT_BELT 512 +#define SLOT_BACK 1024 +#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets. +#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets. + + //FLAGS BITMASK -#define ONBACK 1 // can be put in back slot #define TABLEPASS 2 // can pass by a table or rack /******************************************************************************** @@ -111,53 +138,79 @@ var/MAX_EXPLOSION_RANGE = 14 #define HEADSPACE 4 // head wear protects against space -#define MASKINTERNALS 8 // mask allows internals -#define SUITSPACE 8 // suit protects against space +#define MASKINTERNALS 8 // mask allows internals +#define SUITSPACE 8 // suit protects against space -#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) -#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. -#define NOSHIELD 32 // weapon not affected by shield -#define CONDUCT 64 // conducts electricity (metal etc.) -#define ONBELT 128 // can be put in belt slot -#define FPRINT 256 // takes a fingerprint -#define ON_BORDER 512 // item has priority to check when entering or leaving +#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) +#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. +#define NOSHIELD 32 // weapon not affected by shield +#define CONDUCT 64 // conducts electricity (metal etc.) +#define FPRINT 256 // takes a fingerprint +#define ON_BORDER 512 // item has priority to check when entering or leaving -#define GLASSESCOVERSEYES 1024 -#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags -#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes -#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head -#define HEADCOVERSMOUTH 2048 +#define GLASSESCOVERSEYES 1024 +#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags +#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes +#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head +#define HEADCOVERSMOUTH 2048 -#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc +#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc #define OPENCONTAINER 4096 // is an open container for chemistry purposes -#define ONESIZEFITSALL 8192 // can be worn by fatties (or children? ugh) +// #define ONESIZEFITSALL 8192 // can be worn by fatties (or children? ugh) -#define NOREACT 16384 //Reagents dont' react inside this container. +#define NOREACT 16384 //Reagents dont' react inside this container. -#define BLOCKHAIR 32768 // temporarily removes the user's hair icon +#define BLOCKHAIR 32768 // temporarily removes the user's hair icon #define PLASMAGUARD 65536 //Does not get contaminated by plasma. //flags for pass_flags -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 +#define PASSTABLE 1 +#define PASSGLASS 2 +#define PASSGRILLE 4 +#define PASSBLOB 8 //turf-only flags -#define NOJAUNT 1 +#define NOJAUNT 1 //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEMASK 1 //APPLIES ONLY TO HELMETS!! -#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!! -#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!! +#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEMASK 1 //APPLIES ONLY TO HELMETS!! +#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!! +#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!! + +//clothing-overlay layers. They are floats so they always appear above the Mob +#define DAMAGE_LAYER -23 +#define UNIFORM_LAYER -22 +#define B_UNIFORM_LAYER -21 +#define SHOES_LAYER -20 +#define B_SHOES_LAYER -19 +#define ID_LAYER -18 +#define GLOVES_LAYER -17 +#define B_GLOVES_LAYER -16 +#define EARS_LAYER -15 +#define SUIT_LAYER -14 +#define B_SUIT_LAYER -13 +#define FACE_LAYER -12 +#define GLASSES_LAYER -11 +#define FACEMASK_LAYER -10 +#define B_FACEMASK_LAYER -9 +#define HEAD_LAYER -8 +#define B_HEAD_LAYER -7 +#define SUIT_STORE_LAYER -6 +#define BELT_LAYER -5 +#define BACK_LAYER -4 +#define CUFFED_LAYER -3 +#define SHIELD_LAYER -2 +#define INHANDS_LAYER -1 + + //Cant seem to find a mob bitflags area other than the powers one @@ -178,73 +231,126 @@ var/MAX_EXPLOSION_RANGE = 14 #define HAND_LEFT 512 #define HAND_RIGHT 1024 #define HANDS 1536 - #define FULL_BODY 2047 +/* //bitflags for mutations -var/const - TK =(1<<0) - COLD_RESISTANCE =(1<<1) - XRAY =(1<<2) - HULK =(1<<3) - CLUMSY =(1<<4) - FAT =(1<<5) - HUSK =(1<<6) - LASER =(1<<7) - HEAL =(1<<8) - mNobreath =(1<<9) - mRemote =(1<<10) - mRegen =(1<<11) - mRun =(1<<12) - mRemotetalk =(1<<13) - mMorph =(1<<14) - mBlend =(1<<15) -//the "&" operator cannot go higher than (2^16)-1 - mHallucination =(1<<0) - mFingerprints =(1<<1) - mShock =(1<<2) - mSmallsize =(1<<3) - NOCLONE =(1<<4) + // Extra powers: +#define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM (1<<11) // supersonic screaming (25%) +#define EXPLOSIVE (1<<12) // exploding on-demand (15%) +#define REGENERATION (1<<13) // superhuman regeneration (30%) +#define REPROCESSOR (1<<14) // eat anything (50%) +#define SHAPESHIFTING (1<<15) // take on the appearance of anything (40%) +#define PHASING (1<<16) // ability to phase through walls (40%) +#define SHIELD (1<<17) // shielding from all projectile attacks (30%) +#define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) + + + // Nanoaugmentations: +#define SUPRSTR (1<<20) // super strength +#define RADAR (1<<21) // on-screen mob radar +#define ELECTRICHANDS (1<<22) // electric hands +#define ESWORDSYNTH (1<<23) // esword synthesizer +#define REBREATHER (1<<24) // removes the need to breathe +#define DERMALARMOR (1<<25) // 35% damage decrease +#define REFLEXES (1<<26) // dodge 50% of projectiles, dodge 25% of melee attacks +#define NANOREGEN (1<<27) // regenerative nanobots, -3 all damage types per second +*/ + +// String identifiers for associative list lookup + +// mob/var/list/mutations + + // Generic mutations: +#define TK 1 +#define COLD_RESISTANCE 2 +#define XRAY 3 +#define HULK 4 +#define CLUMSY 5 +#define FAT 6 +#define HUSK 7 +#define NOCLONE 8 + + + // Extra powers: +#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes +#define HEAL 10 // healing people with hands +#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM 12 // supersonic screaming (25%) +#define EXPLOSIVE 13 // exploding on-demand (15%) +#define REGENERATION 14 // superhuman regeneration (30%) +#define REPROCESSOR 15 // eat anything (50%) +#define SHAPESHIFTING 16 // take on the appearance of anything (40%) +#define PHASING 17 // ability to phase through walls (40%) +#define SHIELD 18 // shielding from all projectile attacks (30%) +#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY 20 // ability to shoot electric attacks (15%) + + +// mob/var/list/augmentations + + // Nanoaugmentations: +#define SUPRSTR 21 // super strength (hulk powers) +#define RADAR 22 // on-screen mob radar +#define ELECTRICHANDS 23 // electric hands +#define ESWORDSYNTH 24 // esword synthesizer +#define REBREATHER 25 // removes the need to breathe +#define DERMALARMOR 26 // 35% damage decrease +#define REFLEXES 27 // dodge 50% of projectiles +#define NANOREGEN 28 // regenerative nanobots, -3 all damage types per second + + // Other Mutations: +#define mNobreath 100 // no need to breathe +#define mRemote 101 // remote viewing +#define mRegen 102 // health regen +#define mRun 103 // no slowdown +#define mRemotetalk 104 // remote talking +#define mMorph 105 // changing appearance +#define mBlend 106 // nothing (seriously nothing) +#define mHallucination 107 // hallucinations +#define mFingerprints 108 // no fingerprints +#define mShock 109 // insulated hands +#define mSmallsize 110 // table climbing //mob/var/stat things -var/const - CONSCIOUS = 0 - UNCONSCIOUS = 1 - DEAD = 2 +#define CONSCIOUS 0 +#define UNCONSCIOUS 1 +#define DEAD 2 // channel numbers for power -#define EQUIP 1 -#define LIGHT 2 -#define ENVIRON 3 -#define TOTAL 4 //for total power used only +#define EQUIP 1 +#define LIGHT 2 +#define ENVIRON 3 +#define TOTAL 4 //for total power used only // bitflags for machine stat variable -#define BROKEN 1 -#define NOPOWER 2 -#define POWEROFF 4 // tbd -#define MAINT 8 // under maintaince -#define EMPED 16 // temporary broken by EMP pulse +#define BROKEN 1 +#define NOPOWER 2 +#define POWEROFF 4 // tbd +#define MAINT 8 // under maintaince +#define EMPED 16 // temporary broken by EMP pulse //bitflags for door switches. -#define OPEN 1 -#define IDSCAN 2 -#define BOLTS 4 -#define SHOCK 8 -#define SAFE 16 +#define OPEN 1 +#define IDSCAN 2 +#define BOLTS 4 +#define SHOCK 8 +#define SAFE 16 -#define ENGINE_EJECT_Z 3 +#define ENGINE_EJECT_Z 3 //metal, glass, rod stacks -#define MAX_STACK_AMOUNT_METAL 50 -#define MAX_STACK_AMOUNT_GLASS 50 -#define MAX_STACK_AMOUNT_RODS 60 +#define MAX_STACK_AMOUNT_METAL 50 +#define MAX_STACK_AMOUNT_GLASS 50 +#define MAX_STACK_AMOUNT_RODS 60 -var/const - GAS_O2 = 1 << 0 - GAS_N2 = 1 << 1 - GAS_PL = 1 << 2 - GAS_CO2 = 1 << 3 - GAS_N2O = 1 << 4 +#define GAS_O2 (1 << 0) +#define GAS_N2 (1 << 1) +#define GAS_PL (1 << 2) +#define GAS_CO2 (1 << 3) +#define GAS_N2O (1 << 4) var/list/accessable_z_levels = list("3" = 15, "4" = 35, "6" = 50) @@ -262,32 +368,54 @@ var/list/global_mutations = list() // list of hidden mutation things //Damage things -#define BRUTE "brute" -#define BURN "fire" -#define TOX "tox" -#define OXY "oxy" -#define CLONE "clone" -#define HALLOSS "halloss" +#define BRUTE "brute" +#define BURN "fire" +#define TOX "tox" +#define OXY "oxy" +#define CLONE "clone" +#define HALLOSS "halloss" -#define STUN "stun" -#define WEAKEN "weaken" -#define PARALYZE "paralize" -#define IRRADIATE "irradiate" -#define STUTTER "stutter" -#define SLUR "slur" -#define EYE_BLUR "eye_blur" -#define DROWSY "drowsy" +#define STUN "stun" +#define WEAKEN "weaken" +#define PARALYZE "paralize" +#define IRRADIATE "irradiate" +#define STUTTER "stutter" +#define SLUR "slur" +#define EYE_BLUR "eye_blur" +#define DROWSY "drowsy" var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','hiss1.ogg','hiss2.ogg','hiss3.ogg','hiss4.ogg','hiss5.ogg','hiss6.ogg','Glassbr1.ogg','Glassbr2.ogg','Glassbr3.ogg','Welder.ogg','Welder2.ogg','airlock.ogg','clownstep1.ogg','clownstep2.ogg') //Security levels -#define SEC_LEVEL_GREEN 0 -#define SEC_LEVEL_BLUE 1 -#define SEC_LEVEL_RED 2 -#define SEC_LEVEL_DELTA 3 +#define SEC_LEVEL_GREEN 0 +#define SEC_LEVEL_BLUE 1 +#define SEC_LEVEL_RED 2 +#define SEC_LEVEL_DELTA 3 -#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level +#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level // Maximum and minimum character ages. var/const/minimum_age = 20 -var/const/maximum_age = 65 \ No newline at end of file +var/const/maximum_age = 65 + +var/list/liftable_structures = list(\ + + /obj/machinery/autolathe, \ + /obj/machinery/constructable_frame, \ + /obj/machinery/hydroponics, \ + /obj/machinery/computer, \ + /obj/machinery/optable, \ + /obj/machinery/dispenser, \ + /obj/machinery/gibber, \ + /obj/machinery/microwave, \ + /obj/machinery/vending, \ + /obj/machinery/seed_extractor, \ + /obj/machinery/space_heater, \ + /obj/machinery/recharge_station, \ + /obj/machinery/flasher, \ + /obj/structure/stool, \ + /obj/structure/closet, \ +/* /obj/machinery/photocopier, \*/ + /obj/structure/filingcabinet, \ + /obj/structure/reagent_dispensers, \ + /obj/machinery/portable_atmospherics/canister) diff --git a/code/stylesheet.dm b/code/stylesheet.dm index a3401ade9fd..bf2272ba291 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -20,6 +20,10 @@ em {font-style: normal; font-weight: bold;} .adminobserver {color: #996600; font-weight: bold;} .admin {color: #386aff; font-weight: bold;} +.mod {color: #735638; font-weight: bold;} +.modooc {color: #184880; font-weight: bold;} +.adminmod {color: #402A14; font-weight: bold;} + .name { font-weight: bold;} .say {} diff --git a/code/unused/beast/bodypart.dm b/code/unused/beast/bodypart.dm index 84b966c5d0a..88300f978d9 100644 --- a/code/unused/beast/bodypart.dm +++ b/code/unused/beast/bodypart.dm @@ -1,7 +1,8 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + datum/bodypart - var - name = "unidentified bodypart" - health = 50 + var/name = "unidentified bodypart" + var/health = 50 datum/bodypart/body health = 100 @@ -12,4 +13,4 @@ datum/bodypart/head datum/bodypart/limb datum/bodypart/tail - health = 15 \ No newline at end of file + health = 15 diff --git a/code/unused/hivebot/hivebot.dm b/code/unused/hivebot/hivebot.dm index 0c11474d467..f782878bfae 100644 --- a/code/unused/hivebot/hivebot.dm +++ b/code/unused/hivebot/hivebot.dm @@ -158,7 +158,7 @@ src.now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - /*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + /*if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(20)) for(var/mob/M in viewers(src, null)) if(M.client) diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm index b87152cf328..27a7542963b 100644 --- a/code/unused/hivebot/life.dm +++ b/code/unused/hivebot/life.dm @@ -116,7 +116,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY) + if (src.stat == 2 || XRAY in src.mutations) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/unused/pda2/pda2.dm b/code/unused/pda2/pda2.dm index 29d3556292c..7aa1f538f57 100644 --- a/code/unused/pda2/pda2.dm +++ b/code/unused/pda2/pda2.dm @@ -34,7 +34,8 @@ icon_state = "pda" item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS | ONBELT + flags = FPRINT | TABLEPASS + slow_flags = SLOT_BELT var/owner = null var/default_cartridge = null // Access level defined by cartridge diff --git a/code/unused/spacecraft/manufacturing.dm b/code/unused/spacecraft/manufacturing.dm index 172ce5f519e..cfbc75c7c88 100644 --- a/code/unused/spacecraft/manufacturing.dm +++ b/code/unused/spacecraft/manufacturing.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + // Entirely unfinished. Mostly just bouncing ideas off the code. @@ -10,8 +12,7 @@ icon = 'mining.dmi' icon_state = "deploycrate" density = 1 - var - payload + var/payload /obj/deploycrate/attack_hand(mob/user as mob) switch(payload) @@ -30,20 +31,19 @@ icon_state = "sprayer" density = 1 anchored = 1 - var - payload - hacked = 0 - temp = 100 + var/payload + var/hacked = 0 + var/temp = 100 - usr_density = 5 - usr_lastupdate = 0 + var/usr_density = 5 + var/usr_lastupdate = 0 - time_started = 0 + var/time_started = 0 - points = 0 - totalpoints = 0 + var/points = 0 + var/totalpoints = 0 - state = 0 // 0 - Idle, 1 - Spraying, 2 - Done, 3 - Overheated + var/state = 0 // 0 - Idle, 1 - Spraying, 2 - Done, 3 - Overheated obj/machinery/nanosprayer/proc/update_temp() // 1 second : 1 degree @@ -102,7 +102,7 @@ obj/machinery/nanosprayer/attack_hand(user as mob) var/dat if(..()) return - dat += text("Core Temp: [temp]°C
    ") + dat += text("Core Temp: [temp]�C
    ") dat += text("Nanocloud Density: [usr_density] million
    ") dat += text("\[- / +\]
    ") if(payload) @@ -171,12 +171,11 @@ obj/machinery/nanosprayer/Topic(href, href_list) icon_state = "sprayer" density = 1 anchored = 1 - var - locked = 0 - closed = 0 - state = 0 // 0 - Idle, 1 - Smelt, 2 - Cool, 3 - Clean - slag = 0 - hacked = 0 + var/locked = 0 + var/closed = 0 + var/state = 0 // 0 - Idle, 1 - Smelt, 2 - Cool, 3 - Clean + var/slag = 0 + var/hacked = 0 obj/machinery/smelter/attack_hand(user as mob) var/dat @@ -239,11 +238,10 @@ obj/machinery/smelter/Topic(href, href_list) density = 1 anchored = 1 - var - gameticker - gameworld + var/gameticker + var/gameworld New() ..() gameticker = ticker - gameworld = world \ No newline at end of file + gameworld = world diff --git a/code/unused/spacecraft/shipcore.dm b/code/unused/spacecraft/shipcore.dm index 6bbaea164bf..d574a078dd8 100644 --- a/code/unused/spacecraft/shipcore.dm +++ b/code/unused/spacecraft/shipcore.dm @@ -1,3 +1,5 @@ +//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06 + /obj/machinery/shipcore icon = 'craft.dmi' icon_state = "core" @@ -193,10 +195,9 @@ obj/machinery/shipcore/Topic(href, href_list) obj/machinery/ship_component name = "ship component" icon = 'craft.dmi' - var - obj/machinery/shipcore/core - required_draw = 0 - active = 1 + var/obj/machinery/shipcore/core + var/required_draw = 0 + var/active = 1 proc draw_power(var/n as num) @@ -213,10 +214,9 @@ obj/machinery/ship_component/thruster density = 1 opacity = 1 - var - cooldown = 600 // In 1/10th seconds - lastused - ready = 0 + var/cooldown = 600 // In 1/10th seconds + var/lastused + var/ready = 0 required_draw = 100 proc @@ -249,9 +249,8 @@ obj/machinery/ship_component/engine density = 1 opacity = 1 - var - charge = 1000 - capacity = 1000 + var/charge = 1000 + var/capacity = 1000 draw_power(var/n as num) if(charge >= n) @@ -346,4 +345,4 @@ obj/machinery/ship_component/control_panel if(!active) return src.active = 0 - src.anchored = 0 \ No newline at end of file + src.anchored = 0 diff --git a/config/admins.txt b/config/admins.txt index b6ac8478c58..4946d49aba5 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -5,7 +5,6 @@ cacophony - Retired Admin cajoes - Game Admin cib - Game Master compactninja - Game Master -desiderium - Game Admin dysthymia - Retired Admin doughnuts - Game Admin erthilo - Game Admin diff --git a/config/alienwhitelist.txt b/config/alienwhitelist.txt index ae71abd2ab4..4acb829b75f 100644 --- a/config/alienwhitelist.txt +++ b/config/alienwhitelist.txt @@ -1,5 +1,10 @@ +botanistpower - Tajaran +fenrisian - Tajaran forsamori - Tajaran +forsamori - Soghun +galenus - Soghun searif - Soghun searif - Tajaran -galenus - Soghun -botanistpower - Tajaran \ No newline at end of file +searif - Skrell + + diff --git a/config/config.txt b/config/config.txt index b0446745487..5c47d1f156c 100644 --- a/config/config.txt +++ b/config/config.txt @@ -38,6 +38,9 @@ LOG_ATTACK ## log pda messages LOG_PDA +## log all Topic() calls (for use by coders in tracking down Topic issues) +# LOG_HREFS + ## log admin warning messages ##LOG_ADMINWARN ## Also duplicates a bunch of other messages. @@ -53,21 +56,22 @@ SQL_ENABLED 0 ## set to 0 to disable that mode ## Cult mode is in alpha test, enable at your own risk PROBABILITY EXTENDED 0 -PROBABILITY TRAITOR 3 +PROBABILITY TRAITOR 1 PROBABILITY METEOR 0 PROBABILITY MALFUNCTION 0 -PROBABILITY BLOB 1 +PROBABILITY BLOB 0 PROBABILITY NUCLEAR 0 PROBABILITY SANDBOX 0 PROBABILITY WIZARD 0 PROBABILITY RESTRUCTURING 0 PROBABILITY REVOLUTION 1 PROBABILITY CHANGELING 0 -PROBABILITY CULT 1 +PROBABILITY CULT 2 PROBABILITY MONKEY 0 PROBABILITY TRAITORCHAN 0 PROBABILITY EXTEND-A-TRAITORMONGOUS 3 PROBABILITY EPIDEMIC 1 +PROBABILITY MEME 0 ## Hash out to disable random events during the round. ALLOW_RANDOM_EVENTS @@ -78,7 +82,8 @@ TRAITOR_SCALING ## If security is prohibited from being most antagonists #PROTECT_ROLES_FROM_ANTAGONIST -## If the auto-tensioner is active by default. It creates more tratiors/other antagonists if it consideers the round slowing down. +## If the TG auto-tensioner is active by default. It creates more traitors/other antagonists if it consideers the round slowing down. +## On BS12 we use Traitor-among-us. #TENSIONER_ACTIVE ## If metadata is supported @@ -126,20 +131,14 @@ GUEST_JOBBAN 1 ## set a server location for world reboot. Don't include the byond://, just give the address and port. # SERVER ss13.example.com:2506 - - - - - - ## forum address -# FORUMURL http://baystation12.net/forums/ +# FORUMURL http://example.com ## Wiki address -# WIKIURL http://baystation12.net/wiki/index.php +# WIKIURL http://example.com ## Ban appeals URL - usually for a forum or wherever people should go to contact your admins. -# BANAPPEALS http://justanotherday.example.com +# BANAPPEALS http://example.com ## In-game features ## spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard @@ -156,7 +155,7 @@ GUEST_JOBBAN 1 #POPUP_ADMIN_PM ##What address should banned people appeal ther ban at? Remember to escape the characters, if needed! -APPEAL_ADDRESS http://baystation12.net/forums/index.php/board,2.0.html +# APPEAL_ADDRESS http://example.com ##Defines the ticklag for the world. 0.9 is the normal one, 0.5 is smoother. TICKLAG 0.9 diff --git a/config/custom_items.txt b/config/custom_items.txt index acfd9e7942c..ba2fe35bad2 100644 --- a/config/custom_items.txt +++ b/config/custom_items.txt @@ -1,5 +1,6 @@ asanadas: Book Berner: /obj/item/clothing/under/chameleon/psyche, /obj/item/clothing/glasses/meson/fluff/book_berner_1 atomicdog92: Seth Sealis: /obj/item/clothing/suit/storage/det_suit/fluff/leatherjack +botanistpower: Walter Brooks: /obj/item/clothing/gloves/fluff/walter_brooks_1 chinsky: Victor Kaminski: /obj/item/fluff/victor_kaminsky_1 chinsky: Summer Springfield: /obj/item/weapon/camera_test/fluff/orange compactninja: Ysyr Rylias: /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, /obj/item/weapon/reagent_containers/food/drinks/dry_ramen @@ -9,7 +10,6 @@ deusdactyl: Greg Anderson: /obj/item/clothing/head/helmet/hardhat/fluff/greg_and deusdactyl: Roger Wiles: /obj/item/clothing/under/rank/virologist/fluff/cdc_jumpsuit, /obj/item/clothing/suit/storage/labcoat/fluff/cdc_labcoat deusdactyl: James Girard: /obj/item/clothing/head/secsoft/fluff/swatcap eternal248: Maximilian Haynes: /obj/item/weapon/paper/certificate -erthilo: Farah Lants: /obj/item/clothing/under/rank/medical/fluff/short, /obj/item/clothing/suit/storage/labcoat/fluff/red fastler: Fastler Greay: /obj/item/weapon/card/id/fluff/lifetime fniff: Sarah Calvera: /obj/item/fluff/sarah_calvera_1 fniff: Angleo Wilkerson: /obj/item/fluff/angelo_wilkerson_1 @@ -18,7 +18,7 @@ leonheart11: Johann Erzatz: /obj/item/weapon/reagent_containers/food/drinks/fla lexusjjss: Lexus Langg: /obj/item/weapon/clipboard/fluff/smallnote, /obj/item/weapon/reagent_containers/food/drinks/flask/fluff/shinyflask lexusjjss: Zachary Tomlinson: /obj/item/weapon/clipboard/fluff/smallnote, /obj/item/weapon/reagent_containers/food/drinks/flask/fluff/shinyflask madmalicemccrea: Alice McCrea: /obj/item/clothing/head/helmet/welding/fluff/alice_mccrea_1 -mangled: Li Tsun: /obj/item/weapon/lighter/zippo/fluff/li_tsun_1 +mangled: Li Matsuda: /obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 misterfox: Rashid Siraj: /obj/item/weapon/storage/bible/tajaran morrinn: Maye Day: /obj/item/weapon/storage/fluff/maye_daye_1 orangebottle: Lillian Levett: /obj/item/weapon/pen/fluff/fancypen diff --git a/config/motd.txt b/config/motd.txt index 291a359327b..ad13a706722 100644 --- a/config/motd.txt +++ b/config/motd.txt @@ -4,8 +4,6 @@

    Bugtracker: https://github.com/Baystation12/Baystation12/issues
    -Changelog: http://baystation12.net/wiki/index.php/Changelog or the Changelog command. -
    Rules and roleplaying tips: http://baystation12.net/wiki/index.php/Rules or the Rules command.

    This is a roleplaying server, so don't forget to remain in character while playing. Make sure to read and abide by the rules and if you have any questions, feel free to adminhelp! Remember that even when there are no admins on, adminhelps are being sent to IRC and it is possible for an administrator to see it and respond. \ No newline at end of file diff --git a/config/rules.html b/config/rules.html index fad56a12e3d..3992b2a18e4 100644 --- a/config/rules.html +++ b/config/rules.html @@ -1,5 +1,5 @@ - +Server Rules diff --git a/html/archivedchangelog.html b/html/archivedchangelog.html index 6c80d65c641..772ca56b4d3 100644 --- a/html/archivedchangelog.html +++ b/html/archivedchangelog.html @@ -1,3 +1,409 @@ \ No newline at end of file +--> +
    +

    25 May 2012

    +

    Erthilo updated:

    +
      +
    • Virologists get their fancy green jumpsuit/labcoat back, yay!
    • +
    • Emergency Medical Technician renamed to Emergency Physician to reinforce their doctorness.
    • +
    • Pill bottles now pick up pills correctly.
    • +
    +
    + +
    +

    24 May 2012

    +

    cib updated:

    +
      +
    • Your nutrition now decreases at the same rate as before it was nerfed.
    • +
    • Low nutrition will now have a much smaller effect on your speed.
    • +
    • The hunger messages will start displaying a bit earlier.
    • +
    • A restart vote now calls the Crew Transfer Shuttle by default. A regular restart is still possible for the purpose of rebooting a glitched server.
    • +
    +
    + +
    +

    23 May 2012

    +

    CIB updated:

    +
      +
    • Added Apple_Master's entertaining messages, which will pop up from time to time on low nutrition.
    • +
    +

    TG & Erthilo updated:

    +
      +
    • New HUD Updates, see here: http://baystation12.net/forums/index.php/topic,4495.msg85026.html#msg85026 You can also pick from different styles of HUD again. Including new 'Midnight' blue.
    • +
    • RIG helmets can now be used as flashlights, just like hardhats
    • +
    • Medical borg overhaul. Instead of a dozen random one-use pills and syringes, they get an advanced hypospray that can switch between auto-replenishing tricordrazine, inprovaline, and spaceacillin.
    • +
    • Janitorborgs get a mop again, because without it they had no way of hitting anything.
    • +
    • Fixes robolimbs surgery.
    • +
    +
    + +
    +

    22 May 2012

    +

    cib updated:

    +
      +
    • Worked out a few problems with meme. They now can see, even if their mob is sleeping. Their actions are properly tracked in admin logs. Their points recharge slightly faster, and can now be seen in the Status tab.
    • +
    +

    Erthilo updated:

    +
      +
    • Some sleeping and resting fixes. Please report any more bugs with it!
    • +
    • Blood regeneration removed until errors can be fixed.
    • +
    • New in-hand sprites for shotgun! Credit to Flashkirby.
    • +
    • Money can now be split and stacked properly. Carry some with you! Still not used for anything!
    • +
    • Fixed an ATM exploit, thanks to BlackTea!
    • +
    +
    + +
    +

    21 May 2012

    +

    TG updated:

    +
      +
    • The new 'sleek' user interface is going live. This is currently undergoing changes at TG, so this is mostly a test run. Resist, Sleep, and Rest have all been moved to the IC tab.
    • +
    • When you receive a PDA message, the content is displayed to you if the PDA is located somewhere on your person (so not in your backpack). You will also get a reply button there. This will hopefully make PDA communication easier.
    • +
    • New hotkeys: Delete is the 'stop dragging' button and insert cycles through intents.
    • +
    +

    SkyMarshal updated:

    +
      +
    • Blood now regenerates if you're not bleeding.
    • +
    • Transformed changelings should no longer die from massive blood conflicts.
    • +
    +

    Uristqwerty updated:

    +
      +
    • Added a minimap for AI's. Click on a location to jump to that area. Minimap image updates every 2 minutes.
    • +
    +

    Erthilo updated:

    +
      +
    • Added implant removal. Steps are: Scalpel, Hemostat, Retractor, Hemostat (Might take a few goes!). Implants can then be loaded back into an implanter.
    • +
    • Made the damp rag stop causing attack messages. Also allows you to load it up with 5 units of something and smother people with it. Don't be sily now!
    • +
    • Added a Tajaran/Soghun whitelist. PM an admin on the forum for more details!
    • +
    • Fixed door accesses.
    • +
    +
    + +
    +

    20 May 2012

    +

    Erthilo updated:

    +
      +
    • You can now right-click pick up items and open/close closets items. This means cyborgs can now open/close closets with a bit of fiddling!
    • +
    • Added confirmation pop-up for character slot deletion.
    • +
    +
    + +
    +

    19 May 2012

    +

    cib updated:

    +
      +
    • Implemented Memetic Anomaly game mode. A meme is a kind of parasite that can live in a human host and jump from player to player. They have traitor-like objectives, but must achieve them by controlling hosts, rather than doing it themselves.
    • +
    • Credits for the idea goes to: SCP-1312-1 . Playtesters: Erthilo, Cael_Aislin, AfterShave and critica.
    • +
    +

    TG updated:

    +
      +
    • You can now swap hands by clicking with your middle mouse button (you have to click on a visible object though, that's the catch).
    • +
    • Tweaked the DNA modifier consoles a little bit so that it's much easier to see individual blocks instead of one jumbled mess of hexadecimal.
    • +
    • You can now properly emag AI turret controls and commsat turret controls.
    • +
    • Brand new ending animations!
    • +
    • Buckling into an office chair and using a fire extinguisher will lead to interesting results.
    • +
    • Recipe updates for some booze in an attempt to resolve recipe conflicts.
    • +
    • Wallets now fit in pockets.
    • +
    • If you are clicking on a storage item in your pocket with an empty hand it will return that item to your hand.
    • +
    • Extinguishers now say when they are empty.
    • +
    • New sprites for Cargo, HoP, and Captain's lockers.
    • +
    • Removed hat storage as it was never used and it cluttered the UI.
    • +
    +
    + +
    +

    17 May 2012

    +

    TG updated:

    +
      +
    • Added WJohnston's scrubs to Medical Doctor lockers.
    • +
    • Added two new syndicate bundles
    • +
    • Added WJohnston's CMO bio hood
    • +
    • Reduced cost of thermals to 3 telecrystals (formerly 4)
    • +
    • Singularity Beacons are now spawned from a smaller, portable device.
    • +
    • Large beaker cost reduced to 5000 glass
    • +
    • CMO and QM jumpsuits made more unique.
    • +
    • Updated Cargo Tech jumpsuit and sprite
    • +
    • Edited Warden's jumpsuit striping to match his jacket
    • +
    • Fixed misaligned downed sprites for HoS's coat
    • +
    +

    Erthilo updated:

    +
      +
    • Roller beds are now collapsible, just like body bags! They don't fit in anything though.
    • +
    • New sounds for cable cuffs and table smashing.
    • +
    • Cable cuffs now have a proper sprite!
    • +
    • Adds camera film which can be used to refill cameras. Added to detectives wardrobe and arts and crafts crate. Credit to Flashkirby99
    • +
    • ATM's now require a pin which is generated on round start and stored in notes. Space cash renamed to stack of credits, and same value credits can be stacked together. Initial round credits are generated randomly between 500 to 2000 credits. Credits or coins can be inserted into ATMs and converted to credits. Still not used for anything! Credit to EditorRUS at Animus Station.
    • +
    • Fixes police tape not appearing on doors.
    • +
    +

    Abi79 updated:

    +
      +
    • Fixed ID access requirements for the QM's office and the prison wing.
    • +
    +

    SkyMarshal updated:

    +
      +
    • Metal foam now blocks air.
    • +
    +
    + +
    +

    16 May 2012

    +

    Erthilo updated:

    +
      +
    • Hunger rate has been halved, and drinks no longer fill you up super fast. Most drinks will now keep your hunger stable. Eat food if you want to fill up!
    • +
    • Removed mining secret rooms due to them having some very silly things.
    • +
    • You can cut cable cuffs with wirecutters for quick removal.
    • +
    • Stops pod windows leaking air everywhere.
    • +
    +
    + +
    +

    15 May 2012

    +

    TG updated:

    +
      +
    • Beakers, small and large can now be made/recycled in autolathes.
    • +
    • New PDA's for roboticists and shaft miners.
    • +
    • Nettles now do damage based on their potency.
    • +
    • Reinforced tables are now made with table parts + four rods, rather than plasteel.
    • +
    • New sprites for bomb suit, in-hands for pulse rifles, advances energyguns, and laser guns.
    • +
    • Fix for contraband crates being empty.
    • +
    +

    Erthilo updated:

    +
      +
    • More customs!
    • +
    • New sprites for bomb suit, in-hands for pulse rifles, advanced energy guns, and laser guns. Credit to Flashkirby!
    • +
    • Allows AI to toggle saferty on and off, unless emagged.
    • +
    • Add ADVANCED INTERROGATION TECHNIQUES (smashing peoples faces with tables). Grab someone once and then click on a table. Don't abuse this!
    • +
    • Fixes sleep button not waking you up.
    • +
    • Fixes mech weapons not firing.
    • +
    • Added cable restraints, made from 15 lengths of cable coil by right-click a cable coil in-hand and choosing 'Make Cable Restraints'. These works just like handcuffs, but only take 30 seconds to break!
    • +
    • The Head of Personnel can now change alert levels.
    • +
    • Fixes lockdown computers being blank.
    • +
    +
    + +
    +

    13 May 2012

    +

    TG updated:

    +
      +
    • Harebells can now be harvested.
    • +
    • New sprites for mass-spectrometers and advanced mass-spectrometers.
    • +
    • New sprites for the SMES. Credit to Flashkirby99!
    • +
    • New sound effects for circular saws and surgical drills.
    • +
    +
    + +
    +

    10 May 2012

    +

    Erthilo updated:

    +
      +
    • Custom item updates!
    • +
    • Respawn should now work properly.
    • +
    • Even more customs!
    • +
    • Chemistry and Genetics is now strictly under the Chief Medical Officer. The Research Director no longer has access to chemistry.
    • +
    • You can now adjust breath masks to hang around your neck. Credit to Spamcat!
    • +
    +

    TG updated:

    +
      +
    • New drinks recipes!
    • +
    • Different types of cigarettes added to contraband ordering.
    • +
    • Emergency Toolboxes now contain smaller, lighter fire extinguishers that actually fit inside them!
    • +
    • AIs and Cyborgs can now understand PAIs and MMIs.
    • +
    • Adminwho now shows admin ranks.
    • +
    • You can't pull things with missing hands anymore.
    • +
    • Nuke ops now spawn with an extended oxygen tanks.
    • +
    • Botany leather gloves can now remove lights without burning yourself.
    • +
    • New xeno sprites when running.
    • +
    • Piano is now a Minimoog!
    • +
    • Switched back to oldbody bag sprites.
    • +
    • New Oddyseus destroyed sprites.
    • +
    +
    + +
    +

    07 May 2012

    +

    TG updated:

    +
      +
    • Added holodeck, can be used for a few interesting things, and possibly emagged for more nefarious purposes..
    • +
    • Added a brig prison wing. Accessible through the previous permacell, use this for permanent prisoners!
    • +
    • Added escape pods. These do not count towards escape alone, but otherwise work as escape shuttles. Two in arrivals, one in engineering, and on in security.
    • +
    • Added a new chemical: lipozine, a weight loss drug. Made with sodium chloride, ethanol, and radium.
    • +
    • You can build various upgrades for cyborgs, such as improved speed, from the fabricators.
    • +
    • AI can now ctrl-click APCs to turn them off.
    • +
    • AI can now track its cyborgs who speak on robotic talk.
    • +
    • Added a 'remove ID' verb to PDAs which attempts to remove the ID from a PDA. If your active hand is empty it puts it there, otherwise it puts it on the floor under you.
    • +
    • Tajaran can see in the dark.
    • +
    • Blind rune can no longer be made into a talisman.
    • +
    • Cyborgs now lose power much less quickly with no active modules. Active modules will drain charge more quickly though.
    • +
    • Mining cyborgs are now slightly more useful, having a much larger satchel, and an improved drill.
    • +
    • Constructs can now see who cultists are in cult mode.
    • +
    • Coffins are now sideways to better fit dead bodies.
    • +
    • People around you will no longer get a message when putting small items into storage items. Large items are unaffected.
    • +
    • New sprites for blob, PA, mech construction, field generators and power cells.
    • +
    +
    + +
    +

    06 May 2012

    +

    TG updated:

    +
      +
    • Artificers can now create cult floors.
    • +
    • Added soil to plant seeds in. Make it by crushing up sandstone. Soil does not have indicators like trays do! Watch your plants carefully!
    • +
    • Added money trees. When life gives you lemons, mutate them into cash.
    • +
    • RnD can create a new tool for botanists: The floral somatoray. Has two modes. Use it on your plants to induce mutations or boost yield.
    • +
    • Added chawanmushi recipe and beet soup recipes.
    • +
    • Added 1% chance for a species mutation whenever a plant's stats mutate.
    • +
    • New PDAs for the botanists and librarian. Sprites for cartridges for both too.
    • +
    • You can now only have ONE decal of blood per tile. This is to fix the millions of blood effect items that spawned to lag anyone who right clicked them. The most recently created blood item will be the one that remains. This does not effect gibs.
    • +
    • Hand tools now fit on your belt slot.
    • +
    • Changelings faking death can no longer have their brains cut out.
    • +
    • Updated the barman's shotgun, it acts like a double-barrel now, and he can saw it off.
    • +
    • New sprites for lots of medical computers!
    • +
    • New carrot in-tray sprites.
    • +
    • Soulstones can no longer capture the manifested ghosts. No more infinite constructs.
    • +
    • Changes rev objectives to use the proper objective so heads being off station actually works.
    • +
    +
    + +
    +

    05 May 2012

    +

    Erthilo updated:

    +
      +
    • Increases maximum brig timers to 60 minutes. This coincides with a new test version of Space Law. See here: http://baystation12.net/wiki/index.php/Space_Law or in-game Space Law books.
    • +
    +
    + +
    +

    04 May 2012

    +

    dopeghoti updated:

    +
      +
    • Fixes AI-less Cyborgs having Asimov laws.
    • +
    +
    + +
    +

    03 May 2012

    +

    TG updated:

    +
      +
    • CONTRABAND-CON UPDATE: Added posters.
    • +
    • POSTERS! Posters come in rolled packages that can adhere to any wall or r_wall, if it's uncluttered enough. +

      ?How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. +

      ?How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. +

      ?How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. +

      ?How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers. +
    • Merged 'Game' and 'Lobby' tabs during pre-game into one tab
    • +
    • Added the little red x to the late-join job list
    • +
    • Late-joiners are warned if the shuttle is past the point of recall, and if the shuttle has already left the station
    • +
    • Late-joiners now see how long the round has been going on.
    • +
    • Droppers are now used at the eyes, and thus, access to the eyes is required to have an effect.
    • +
    • Mining shuttle computer no longer spits out both 'Shuttle has been sent' and 'The shuttle is already moving' every time.
    • +
    • Adds a borg upgrade that increases their speed. Requires gold.
    • +
    • Fixes autolathes not doing anything.
    • +
    • Changed Chief Engineers Office door name. Stop breaking in!
    • +
    • Added new airlocks to mining dock, research, and atmospherics.
    • +
    • RCDs are disabled if they are used on the escape shuttle or hyperspace around it.
    • +
    • EMPs will now cause flashes to flash their holder.
    • +
    • Heads now get a silver ID!
    • +
    • Blenders can now be filled directly from plant bags. Chefs rejoice.
    • +
    • The biogenerator is now more robust. It can dispense fertilizer in batches, and make simple leather items at a high cost. Added more wood items for tower cap wood construction: Wooden doors and sandals. Added plump helmet biscuits and mushroom soup to kitchen recipes.
    • +
    • Watermelon and pumpkin biomass lowered a bit so biomass isn't totally trivial to acquire.
    • +
    +
    + +
    +

    2nd May 2012

    +

    TG updated:

    +
      +
    • Added carved pumpkins/jackolanterns. Carve them with any of the usual things you use to carve things. They work similarly to hardhats.
    • +
    • Added pumpkin pie and slices. Made with 5 milk, 5 sugar, 1 pumpkin, 1 flour, 1 egg.
    • +
    • Eating corn now makes corn cobs. Carve them with a saw, a knife, or a hatchet to make a corncob pipe.
    • +
    • Added the bit of transparency to biohelmets that they were always supposed to have.
    • +
    • Adds randomlly spawning rooms to the mining asteroid that contain various goodies.
    • +
    • Adds a borg upgrade system. Can be used to reset modules or 'restart' dead cyborgs.
    • +
    • Officers can now use huds to modify humans' criminal statuses on the go. To do this, simply examine a human and at the end should be a clickable link to change the status.
    • +
    • Cell charger and Recharger are now wrenchable to make them moveable
    • +
    • Cats and Dogs can see in the dark.
    • +
    • Changed around a few access levels; only jobs who need to do maintenance have access to maintenance tunnels. Also the heads and detective.
    • +
    • Shuttle call/recall announcements are now more noticeable.
    • +
    • Changes changling unstun time to 45 from 25
    • +
    • Can now repair the first stage of deconstruction of rwalls with metal rods.
    • +
    • Library machine now has a delay when printing bibles to prevent spam.
    • +
    • Bugfix to the 'resist' button, unless I don't understand how it works. I don't see how it could have ever worked before.
    • +
    • You can no longer toggle the welding helmet when stunned or restrained.
    • +
    • Fix for not being able to use pills as pill-satchels properly.
    • +
    +

    Erthilo updated:

    +
      +
    • Increases time between random events happening in low population round to a maximum of double. Random events are more likely to happen up to a limit of around 30 active players. Events now fire at the same rate as previously with around 20~ active players. Please report unusually high or low amounts of events on the bug tracker!
    • +
    +
    + +
    +

    1st May 2012

    +

    Mloc updated:

    +
      +
    • Added extra data to ID cards. Fingerprint, blood type, and DNA. Can all be changed in ID computer.
    • +
    +

    Erthilo updated:

    +
      +
    • You can now respawn after 30 minutes in any mode where the win/loss condition is not all crew dead.
    • +
    • New in-hand sprites for energy and taser guns courtesy of Flashkirby99.
    • +
    • Fixes emagging doors.
    • +
    • NT has recently upgraded their anti-telepathy double glazing. As such, you can no longer remote view people on any level except the station or the mining asteroid!
    • +
    • As a side effect of the above, remote viewing and telekinesis cannot be used at the same time.
    • +
    +
    + +
    +

    30th April 2012

    +

    Mloc updated:

    +
      +
    • Due to new NT hiring protocols, characters can now only be between the ages of 20-65 instead of 15-45.
    • +
    +

    Erthilo updated:

    +
      +
    • Switched to /tg/'s changelog format! Previous updates can be found here: http://baystation12.net/wiki/index.php/Changelog
    • +
    • New green alt satchel for Botanists.
    • +
    • Cyborgs can now view crew manifest and also state laws.
    • +
    • New ATM sprites.
    • +
    • Changes year to 2556 on medical/security records.
    • +
    +

    TG updated:

    +
      +
    • The escape shuttle will now spend two minutes travelling to CentCom, woo! Objectives are only complete when the shuttle reaches CentCom, and anyone leaving the shuttle during transit time will be lost in deep space! Also, anyone standing in the way of the shuttle when it arrives will be gibbed.
    • +
    • Added Antimov module. Very dangerous.
    • +
    • Pill bottles now work like ore satchels, click a tile full of pills to pick them all up.
    • +
    • Tower caps can now grow randomly as weeds
    • +
    • Using a minihoe on a Hydroponics tray removes all the weeds in the tray at once. Using a bucket on a sink now fills it entirely with water, instead of 10 units at a time.
    • +
    • You can no longer take photos of photos.
    • +
    • Malf AI's hopping between APCs no longer become longer and longer.
    • +
    • Secborgs now have modified tasers, it holds 6 shots and recharges one shot every 10 seconds automatically.
    • +
    • Turning off PANIC SYPHON now sets scrubbers to scrubbing (default) instead of off. Vents will not appear in the list instead of a timeout message. They also have a link with sets them back to one atmosphere kPa.
    • +
    • You now click on AI modules in-hand to set them, instead of just picking them up.
    • +
    • Fixes the way the safeguard module is written.
    • +
    +
    + +
    +

    TG

    +

    29th April 2012 updated:

    +
      +
    • Added new sprites for Killer Tomatoes.
    • +
    • Added lasertag vests, guns, projectiles. Sprites for the vests and guns from Muncher. Not actually mapped in. Lasertag guns are only usable if you're wearing the appropriate team vest. Lasertag projectiles will only stun people who are wearing vests belonging to the opposing team.
    • +
    • Adds Holodeck, also not mapped in.
    • +
    • Janitor borgs have been massively upgraded. They now clean as they move around.
    • +
    • Mining shuttle now shunts people where it wants to be. Shuttles now crush people if they fail to move out of where they want to be with the initial shunt.
    • +
    • Adds Halloss (Hallucination Damage) as a damage type weapons can do. Halloss can be healed by sleeping.
    • +
    • Windows can only be damaged by weapons that do brute or burn.
    • +
    • HUD damage indicator now updates with halloss. Inspecting yourself for organ damage now randomly shows damaged organs if you have halloss.
    • +
    • Nuke disk now respawns in all rounds.
    • +
    • Pinpointers now show the remaining time until a nuke goes off if it's been armed when examined.
    • +
    • Instead of z-level transition happening when you reach the edge of the map, it will now happen 7 tiles away from the edge. This means that you will no longer see the black edge, transition will likely happen without you even noticing.
    • +
    • Slight changes to examine messages. You cannot examine when blind/unconscious.
    • +
    • More new locker sprites!
    • +
    • Fixes glass knock sound having a pop at the end of it.
    • +
    • Telecomm traffic control now has its own circuitboard and doesn't transform into a server when the monitor is disconnected/reconnected.
    • +
    • Using an igniter on a flamethrower that already has one attached no longer uses up the igniter.
    • +
    • NTSL bugfixes.
    • +
    +
    \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index ec5d41f73d2..e0c8fb1ecaa 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -42,7 +42,8 @@ Header Section Code: Abi79, Aryn, Cael_Aislinn, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, Lexusjjss, Melonstorm, Miniature, Mloc, SkyMarshal, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
    Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, Miniature, Xenone
    - Thanks To: /tg/ station devs, Goonstation devs, and the original Spacestation 13 devs. + Sounds: Aryn
    + Thanks To: /tg/ station, Goonstation, Animus Station, Daedalus, and original Spacestation 13 devs. Skibiliano for the IRC bot. @@ -56,6 +57,99 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. --> +
    +

    07 June 2012

    +

    SkyMarshal updated:

    +
      +
    • ZAS now works properly. No perpetually leaking doors, no walls that hold air like a seive.
    • +
    • ZAS airflow is now enabled, and will move objects (AND PEOPLE!) when air moves with enough force. AIRLOCKS ARE NOW DEADLY DANGEROUS!
    • +
    • Packages will now reflect the size of what they contain
    • +
    +
    + +
    +

    06 June 2012

    +

    Erthilo updated:

    +
      +
    • Tajaran's are more vulnerable to high temperatures and get hungry faster, but deal well with colder temperatures. Soghun's are more susceptible to cold temperatures, but get hungry much slower.
    • +
    • Skrell update! Adds Skrell as a whitelisted race. They have their own language which can be used by typing :k
    • +
    • Soghun get their own language by typing :o
    • +
    • Skintone and eye colour of most species can now be changed, The preview picture should be a fairly accurate representation of what you'll get in-game.
    • +
    • All valves in atmosperics now start off, instead of having to turn them off, then on again.
    • +
    • Soy sauce recipe change to soymilk + water pending better ideas.
    • +
    • Fixes pAI's universal translator not being universal.
    • +
    +
    + +
    +

    04 June 2012

    +

    TG updated:

    +
      +
    • Added "Toggle Open" verb to all closets and crates
    • +
    • Added "Toggle Lock" verb to all lockable closets
    • +
    • Window doors are now breakable. They can still be emagged and hacktooled, and they have fairly high health.
    • +
    • Windoors are now constructable. See here for how to build them: http://baystation12.net/wiki/index.php/Construction#Window-door_.28Windoor.29
    • +
    • Lawyers can now access security records with their PDAs (read-only)
    • +
    • RIG suits have been renamed to hardsuits.
    • +
    +

    SkyMarshal updated:

    +
      +
    • Added the capability for the security PDA to scan items in like the detectives scanner, and for it to be loaded into the database in the same manner.
    • +
    +

    Erthilo updated:

    +
      +
    • You can now only build 2 cleanbots.
    • +
    • Fixed flavour text, it should now be possible to have it longer than 40 characters, and should stay properly formatted.
    • +
    • Fixes AI's not being able to talk through holopads.
    • +
    + +
    + +
    +

    01 June 2012

    +

    Erthilo updated:

    +
      +
    • Added character records. You can now add medical and security records to your character through Character Setup. These are official NanoTrasen records, and should be written as such. These will show up in-game on the medical and security records computers. Admins can 'jobban' people from records, so use them sensibly!
    • +
    • Added a megaphone to each Head's office. These broadcast messages in slightly larger font so you can be noticed. Please don't spam them.
    • +
    • Added Flashkirby's ERT suit sprites. Also tweaked ERT's loadout.
    • +
    +
    + +
    +

    29 May 2012

    +

    Aryn updated:

    +
      +
    • Airflow works on a room-by-room basis rather than on individual tiles. Rooms will depressurize much faster than they did, though not too fast for balance reasons.
    • +
    • Fire now works on a logarithmic scale based on oxygen and fuel content. This is a far more complex tweak under the hood than it is in game.
    • +
    • Plasma now has increased toxicity and can burn exposed skin and eyes. In addition, because of the new air, it fills the room instantaneously. Try not to spill any.
    • +
    +
    + +
    +

    28 May 2012

    +

    Erthilo updated:

    +
      +
    • Surgeons spawn with scrubs, Emergency Physicians spawn with first responder jackets.
    • +
    • Added water bottles to cola vending machines.
    • +
    • More HUD changes: https://dl.dropbox.com/u/4911517/ShareX/2012-05/2012-05-28_20-40-50.png
    • +
    +
    + +
    +

    27 May 2012

    +

    Abi79 updated:

    +
      +
    • Money withdrawn from the ATM will now be worth the proper value.
    • +
    +

    Erthilo updated:

    +
      +
    • Fixed PDA light not turning off when exploded by a detomax.
    • +
    • Fixes food not disappearing from hands when finished.
    • +
    • Fixed the bug where traitors would get an empty objectives list. Credit: thvortex.
    • +
    • New portalathe sprite, thanks to dezzmont and Furlucis.
    • +
    +
    +

    26 May 2012

    Erthilo updated:

    @@ -70,413 +164,6 @@ should be listed in the changelog upon commit though. Thanks. -->
-
-

25 May 2012

-

Erthilo updated:

-
    -
  • Virologists get their fancy green jumpsuit/labcoat back, yay!
  • -
  • Emergency Medical Technician renamed to Emergency Physician to reinforce their doctorness.
  • -
  • Pill bottles now pick up pills correctly.
  • -
-
- -
-

24 May 2012

-

cib updated:

-
    -
  • Your nutrition now decreases at the same rate as before it was nerfed.
  • -
  • Low nutrition will now have a much smaller effect on your speed.
  • -
  • The hunger messages will start displaying a bit earlier.
  • -
  • A restart vote now calls the Crew Transfer Shuttle by default. A regular restart is still possible for the purpose of rebooting a glitched server.
  • -
-
- -
-

23 May 2012

-

CIB updated:

-
    -
  • Added Apple_Master's entertaining messages, which will pop up from time to time on low nutrition.
  • -
-

TG & Erthilo updated:

-
    -
  • New HUD Updates, see here: http://baystation12.net/forums/index.php/topic,4495.msg85026.html#msg85026 You can also pick from different styles of HUD again. Including new 'Midnight' blue.
  • -
  • RIG helmets can now be used as flashlights, just like hardhats
  • -
  • Medical borg overhaul. Instead of a dozen random one-use pills and syringes, they get an advanced hypospray that can switch between auto-replenishing tricordrazine, inprovaline, and spaceacillin.
  • -
  • Janitorborgs get a mop again, because without it they had no way of hitting anything.
  • -
  • Fixes robolimbs surgery.
  • -
-
- -
-

22 May 2012

-

cib updated:

-
    -
  • Worked out a few problems with meme. They now can see, even if their mob is sleeping. Their actions are properly tracked in admin logs. Their points recharge slightly faster, and can now be seen in the Status tab.
  • -
-

Erthilo updated:

-
    -
  • Some sleeping and resting fixes. Please report any more bugs with it!
  • -
  • Blood regeneration removed until errors can be fixed.
  • -
  • New in-hand sprites for shotgun! Credit to Flashkirby.
  • -
  • Money can now be split and stacked properly. Carry some with you! Still not used for anything!
  • -
  • Fixed an ATM exploit, thanks to BlackTea!
  • -
-
- -
-

21 May 2012

-

TG updated:

-
    -
  • The new 'sleek' user interface is going live. This is currently undergoing changes at TG, so this is mostly a test run. Resist, Sleep, and Rest have all been moved to the IC tab.
  • -
  • When you receive a PDA message, the content is displayed to you if the PDA is located somewhere on your person (so not in your backpack). You will also get a reply button there. This will hopefully make PDA communication easier.
  • -
  • New hotkeys: Delete is the 'stop dragging' button and insert cycles through intents.
  • -
-

SkyMarshal updated:

-
    -
  • Blood now regenerates if you're not bleeding.
  • -
  • Transformed changelings should no longer die from massive blood conflicts.
  • -
-

Uristqwerty updated:

-
    -
  • Added a minimap for AI's. Click on a location to jump to that area. Minimap image updates every 2 minutes.
  • -
-

Erthilo updated:

-
    -
  • Added implant removal. Steps are: Scalpel, Hemostat, Retractor, Hemostat (Might take a few goes!). Implants can then be loaded back into an implanter.
  • -
  • Made the damp rag stop causing attack messages. Also allows you to load it up with 5 units of something and smother people with it. Don't be sily now!
  • -
  • Added a Tajaran/Soghun whitelist. PM an admin on the forum for more details!
  • -
  • Fixed door accesses.
  • -
-
- -
-

20 May 2012

-

Erthilo updated:

-
    -
  • You can now right-click pick up items and open/close closets items. This means cyborgs can now open/close closets with a bit of fiddling!
  • -
  • Added confirmation pop-up for character slot deletion.
  • -
-
- -
-

19 May 2012

-

cib updated:

-
    -
  • Implemented Memetic Anomaly game mode. A meme is a kind of parasite that can live in a human host and jump from player to player. They have traitor-like objectives, but must achieve them by controlling hosts, rather than doing it themselves.
  • -
  • Credits for the idea goes to: SCP-1312-1 . Playtesters: Erthilo, Cael_Aislin, AfterShave and critica.
  • -
-

TG updated:

-
    -
  • You can now swap hands by clicking with your middle mouse button (you have to click on a visible object though, that's the catch).
  • -
  • Tweaked the DNA modifier consoles a little bit so that it's much easier to see individual blocks instead of one jumbled mess of hexadecimal.
  • -
  • You can now properly emag AI turret controls and commsat turret controls.
  • -
  • Brand new ending animations!
  • -
  • Buckling into an office chair and using a fire extinguisher will lead to interesting results.
  • -
  • Recipe updates for some booze in an attempt to resolve recipe conflicts.
  • -
  • Wallets now fit in pockets.
  • -
  • If you are clicking on a storage item in your pocket with an empty hand it will return that item to your hand.
  • -
  • Extinguishers now say when they are empty.
  • -
  • New sprites for Cargo, HoP, and Captain's lockers.
  • -
  • Removed hat storage as it was never used and it cluttered the UI.
  • -
-
- -
-

17 May 2012

-

TG updated:

-
    -
  • Added WJohnston's scrubs to Medical Doctor lockers.
  • -
  • Added two new syndicate bundles
  • -
  • Added WJohnston's CMO bio hood
  • -
  • Reduced cost of thermals to 3 telecrystals (formerly 4)
  • -
  • Singularity Beacons are now spawned from a smaller, portable device.
  • -
  • Large beaker cost reduced to 5000 glass
  • -
  • CMO and QM jumpsuits made more unique.
  • -
  • Updated Cargo Tech jumpsuit and sprite
  • -
  • Edited Warden's jumpsuit striping to match his jacket
  • -
  • Fixed misaligned downed sprites for HoS's coat
  • -
-

Erthilo updated:

-
    -
  • Roller beds are now collapsible, just like body bags! They don't fit in anything though.
  • -
  • New sounds for cable cuffs and table smashing.
  • -
  • Cable cuffs now have a proper sprite!
  • -
  • Adds camera film which can be used to refill cameras. Added to detectives wardrobe and arts and crafts crate. Credit to Flashkirby99
  • -
  • ATM's now require a pin which is generated on round start and stored in notes. Space cash renamed to stack of credits, and same value credits can be stacked together. Initial round credits are generated randomly between 500 to 2000 credits. Credits or coins can be inserted into ATMs and converted to credits. Still not used for anything! Credit to EditorRUS at Animus Station.
  • -
  • Fixes police tape not appearing on doors.
  • -
-

Abi79 updated:

-
    -
  • Fixed ID access requirements for the QM's office and the prison wing.
  • -
-

SkyMarshal updated:

-
    -
  • Metal foam now blocks air.
  • -
-
- -
-

16 May 2012

-

Erthilo updated:

-
    -
  • Hunger rate has been halved, and drinks no longer fill you up super fast. Most drinks will now keep your hunger stable. Eat food if you want to fill up!
  • -
  • Removed mining secret rooms due to them having some very silly things.
  • -
  • You can cut cable cuffs with wirecutters for quick removal.
  • -
  • Stops pod windows leaking air everywhere.
  • -
-
- -
-

15 May 2012

-

TG updated:

-
    -
  • Beakers, small and large can now be made/recycled in autolathes.
  • -
  • New PDA's for roboticists and shaft miners.
  • -
  • Nettles now do damage based on their potency.
  • -
  • Reinforced tables are now made with table parts + four rods, rather than plasteel.
  • -
  • New sprites for bomb suit, in-hands for pulse rifles, advances energyguns, and laser guns.
  • -
  • Fix for contraband crates being empty.
  • -
-

Erthilo updated:

-
    -
  • More customs!
  • -
  • New sprites for bomb suit, in-hands for pulse rifles, advanced energy guns, and laser guns. Credit to Flashkirby!
  • -
  • Allows AI to toggle saferty on and off, unless emagged.
  • -
  • Add ADVANCED INTERROGATION TECHNIQUES (smashing peoples faces with tables). Grab someone once and then click on a table. Don't abuse this!
  • -
  • Fixes sleep button not waking you up.
  • -
  • Fixes mech weapons not firing.
  • -
  • Added cable restraints, made from 15 lengths of cable coil by right-click a cable coil in-hand and choosing 'Make Cable Restraints'. These works just like handcuffs, but only take 30 seconds to break!
  • -
  • The Head of Personnel can now change alert levels.
  • -
  • Fixes lockdown computers being blank.
  • -
-
- -
-

13 May 2012

-

TG updated:

-
    -
  • Harebells can now be harvested.
  • -
  • New sprites for mass-spectrometers and advanced mass-spectrometers.
  • -
  • New sprites for the SMES. Credit to Flashkirby99!
  • -
  • New sound effects for circular saws and surgical drills.
  • -
-
- -
-

10 May 2012

-

Erthilo updated:

-
    -
  • Custom item updates!
  • -
  • Respawn should now work properly.
  • -
  • Even more customs!
  • -
  • Chemistry and Genetics is now strictly under the Chief Medical Officer. The Research Director no longer has access to chemistry.
  • -
  • You can now adjust breath masks to hang around your neck. Credit to Spamcat!
  • -
-

TG updated:

-
    -
  • New drinks recipes!
  • -
  • Different types of cigarettes added to contraband ordering.
  • -
  • Emergency Toolboxes now contain smaller, lighter fire extinguishers that actually fit inside them!
  • -
  • AIs and Cyborgs can now understand PAIs and MMIs.
  • -
  • Adminwho now shows admin ranks.
  • -
  • You can't pull things with missing hands anymore.
  • -
  • Nuke ops now spawn with an extended oxygen tanks.
  • -
  • Botany leather gloves can now remove lights without burning yourself.
  • -
  • New xeno sprites when running.
  • -
  • Piano is now a Minimoog!
  • -
  • Switched back to oldbody bag sprites.
  • -
  • New Oddyseus destroyed sprites.
  • -
-
- -
-

07 May 2012

-

TG updated:

-
    -
  • Added holodeck, can be used for a few interesting things, and possibly emagged for more nefarious purposes..
  • -
  • Added a brig prison wing. Accessible through the previous permacell, use this for permanent prisoners!
  • -
  • Added escape pods. These do not count towards escape alone, but otherwise work as escape shuttles. Two in arrivals, one in engineering, and on in security.
  • -
  • Added a new chemical: lipozine, a weight loss drug. Made with sodium chloride, ethanol, and radium.
  • -
  • You can build various upgrades for cyborgs, such as improved speed, from the fabricators.
  • -
  • AI can now ctrl-click APCs to turn them off.
  • -
  • AI can now track its cyborgs who speak on robotic talk.
  • -
  • Added a 'remove ID' verb to PDAs which attempts to remove the ID from a PDA. If your active hand is empty it puts it there, otherwise it puts it on the floor under you.
  • -
  • Tajaran can see in the dark.
  • -
  • Blind rune can no longer be made into a talisman.
  • -
  • Cyborgs now lose power much less quickly with no active modules. Active modules will drain charge more quickly though.
  • -
  • Mining cyborgs are now slightly more useful, having a much larger satchel, and an improved drill.
  • -
  • Constructs can now see who cultists are in cult mode.
  • -
  • Coffins are now sideways to better fit dead bodies.
  • -
  • People around you will no longer get a message when putting small items into storage items. Large items are unaffected.
  • -
  • New sprites for blob, PA, mech construction, field generators and power cells.
  • -
-
- -
-

06 May 2012

-

TG updated:

-
    -
  • Artificers can now create cult floors.
  • -
  • Added soil to plant seeds in. Make it by crushing up sandstone. Soil does not have indicators like trays do! Watch your plants carefully!
  • -
  • Added money trees. When life gives you lemons, mutate them into cash.
  • -
  • RnD can create a new tool for botanists: The floral somatoray. Has two modes. Use it on your plants to induce mutations or boost yield.
  • -
  • Added chawanmushi recipe and beet soup recipes.
  • -
  • Added 1% chance for a species mutation whenever a plant's stats mutate.
  • -
  • New PDAs for the botanists and librarian. Sprites for cartridges for both too.
  • -
  • You can now only have ONE decal of blood per tile. This is to fix the millions of blood effect items that spawned to lag anyone who right clicked them. The most recently created blood item will be the one that remains. This does not effect gibs.
  • -
  • Hand tools now fit on your belt slot.
  • -
  • Changelings faking death can no longer have their brains cut out.
  • -
  • Updated the barman's shotgun, it acts like a double-barrel now, and he can saw it off.
  • -
  • New sprites for lots of medical computers!
  • -
  • New carrot in-tray sprites.
  • -
  • Soulstones can no longer capture the manifested ghosts. No more infinite constructs.
  • -
  • Changes rev objectives to use the proper objective so heads being off station actually works.
  • -
-
- -
-

05 May 2012

-

Erthilo updated:

-
    -
  • Increases maximum brig timers to 60 minutes. This coincides with a new test version of Space Law. See here: http://baystation12.net/wiki/index.php/Space_Law or in-game Space Law books.
  • -
-
- -
-

04 May 2012

-

dopeghoti updated:

-
    -
  • Fixes AI-less Cyborgs having Asimov laws.
  • -
-
- -
-

03 May 2012

-

TG updated:

-
    -
  • CONTRABAND-CON UPDATE: Added posters.
  • -
  • POSTERS! Posters come in rolled packages that can adhere to any wall or r_wall, if it's uncluttered enough. -

    ?How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. -

    ?How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. -

    ?How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. -

    ?How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers. -
  • Merged 'Game' and 'Lobby' tabs during pre-game into one tab
  • -
  • Added the little red x to the late-join job list
  • -
  • Late-joiners are warned if the shuttle is past the point of recall, and if the shuttle has already left the station
  • -
  • Late-joiners now see how long the round has been going on.
  • -
  • Droppers are now used at the eyes, and thus, access to the eyes is required to have an effect.
  • -
  • Mining shuttle computer no longer spits out both 'Shuttle has been sent' and 'The shuttle is already moving' every time.
  • -
  • Adds a borg upgrade that increases their speed. Requires gold.
  • -
  • Fixes autolathes not doing anything.
  • -
  • Changed Chief Engineers Office door name. Stop breaking in!
  • -
  • Added new airlocks to mining dock, research, and atmospherics.
  • -
  • RCDs are disabled if they are used on the escape shuttle or hyperspace around it.
  • -
  • EMPs will now cause flashes to flash their holder.
  • -
  • Heads now get a silver ID!
  • -
  • Blenders can now be filled directly from plant bags. Chefs rejoice.
  • -
  • The biogenerator is now more robust. It can dispense fertilizer in batches, and make simple leather items at a high cost. Added more wood items for tower cap wood construction: Wooden doors and sandals. Added plump helmet biscuits and mushroom soup to kitchen recipes.
  • -
  • Watermelon and pumpkin biomass lowered a bit so biomass isn't totally trivial to acquire.
  • -
-
- -
-

2nd May 2012

-

TG updated:

-
    -
  • Added carved pumpkins/jackolanterns. Carve them with any of the usual things you use to carve things. They work similarly to hardhats.
  • -
  • Added pumpkin pie and slices. Made with 5 milk, 5 sugar, 1 pumpkin, 1 flour, 1 egg.
  • -
  • Eating corn now makes corn cobs. Carve them with a saw, a knife, or a hatchet to make a corncob pipe.
  • -
  • Added the bit of transparency to biohelmets that they were always supposed to have.
  • -
  • Adds randomlly spawning rooms to the mining asteroid that contain various goodies.
  • -
  • Adds a borg upgrade system. Can be used to reset modules or 'restart' dead cyborgs.
  • -
  • Officers can now use huds to modify humans' criminal statuses on the go. To do this, simply examine a human and at the end should be a clickable link to change the status.
  • -
  • Cell charger and Recharger are now wrenchable to make them moveable
  • -
  • Cats and Dogs can see in the dark.
  • -
  • Changed around a few access levels; only jobs who need to do maintenance have access to maintenance tunnels. Also the heads and detective.
  • -
  • Shuttle call/recall announcements are now more noticeable.
  • -
  • Changes changling unstun time to 45 from 25
  • -
  • Can now repair the first stage of deconstruction of rwalls with metal rods.
  • -
  • Library machine now has a delay when printing bibles to prevent spam.
  • -
  • Bugfix to the 'resist' button, unless I don't understand how it works. I don't see how it could have ever worked before.
  • -
  • You can no longer toggle the welding helmet when stunned or restrained.
  • -
  • Fix for not being able to use pills as pill-satchels properly.
  • -
-

Erthilo updated:

-
    -
  • Increases time between random events happening in low population round to a maximum of double. Random events are more likely to happen up to a limit of around 30 active players. Events now fire at the same rate as previously with around 20~ active players. Please report unusually high or low amounts of events on the bug tracker!
  • -
-
- -
-

1st May 2012

-

Mloc updated:

-
    -
  • Added extra data to ID cards. Fingerprint, blood type, and DNA. Can all be changed in ID computer.
  • -
-

Erthilo updated:

-
    -
  • You can now respawn after 30 minutes in any mode where the win/loss condition is not all crew dead.
  • -
  • New in-hand sprites for energy and taser guns courtesy of Flashkirby99.
  • -
  • Fixes emagging doors.
  • -
  • NT has recently upgraded their anti-telepathy double glazing. As such, you can no longer remote view people on any level except the station or the mining asteroid!
  • -
  • As a side effect of the above, remote viewing and telekinesis cannot be used at the same time.
  • -
-
- -
-

30th April 2012

-

Mloc updated:

-
    -
  • Due to new NT hiring protocols, characters can now only be between the ages of 20-65 instead of 15-45.
  • -
-

Erthilo updated:

-
    -
  • Switched to /tg/'s changelog format! Previous updates can be found here: http://baystation12.net/wiki/index.php/Changelog
  • -
  • New green alt satchel for Botanists.
  • -
  • Cyborgs can now view crew manifest and also state laws.
  • -
  • New ATM sprites.
  • -
  • Changes year to 2556 on medical/security records.
  • -
-

TG updated:

-
    -
  • The escape shuttle will now spend two minutes travelling to CentCom, woo! Objectives are only complete when the shuttle reaches CentCom, and anyone leaving the shuttle during transit time will be lost in deep space! Also, anyone standing in the way of the shuttle when it arrives will be gibbed.
  • -
  • Added Antimov module. Very dangerous.
  • -
  • Pill bottles now work like ore satchels, click a tile full of pills to pick them all up.
  • -
  • Tower caps can now grow randomly as weeds
  • -
  • Using a minihoe on a Hydroponics tray removes all the weeds in the tray at once. Using a bucket on a sink now fills it entirely with water, instead of 10 units at a time.
  • -
  • You can no longer take photos of photos.
  • -
  • Malf AI's hopping between APCs no longer become longer and longer.
  • -
  • Secborgs now have modified tasers, it holds 6 shots and recharges one shot every 10 seconds automatically.
  • -
  • Turning off PANIC SYPHON now sets scrubbers to scrubbing (default) instead of off. Vents will not appear in the list instead of a timeout message. They also have a link with sets them back to one atmosphere kPa.
  • -
  • You now click on AI modules in-hand to set them, instead of just picking them up.
  • -
  • Fixes the way the safeguard module is written.
  • -
-
- -
-

TG

-

29th April 2012 updated:

-
    -
  • Added new sprites for Killer Tomatoes.
  • -
  • Added lasertag vests, guns, projectiles. Sprites for the vests and guns from Muncher. Not actually mapped in. Lasertag guns are only usable if you're wearing the appropriate team vest. Lasertag projectiles will only stun people who are wearing vests belonging to the opposing team.
  • -
  • Adds Holodeck, also not mapped in.
  • -
  • Janitor borgs have been massively upgraded. They now clean as they move around.
  • -
  • Mining shuttle now shunts people where it wants to be. Shuttles now crush people if they fail to move out of where they want to be with the initial shunt.
  • -
  • Adds Halloss (Hallucination Damage) as a damage type weapons can do. Halloss can be healed by sleeping.
  • -
  • Windows can only be damaged by weapons that do brute or burn.
  • -
  • HUD damage indicator now updates with halloss. Inspecting yourself for organ damage now randomly shows damaged organs if you have halloss.
  • -
  • Nuke disk now respawns in all rounds.
  • -
  • Pinpointers now show the remaining time until a nuke goes off if it's been armed when examined.
  • -
  • Instead of z-level transition happening when you reach the edge of the map, it will now happen 7 tiles away from the edge. This means that you will no longer see the black edge, transition will likely happen without you even noticing.
  • -
  • Slight changes to examine messages. You cannot examine when blind/unconscious.
  • -
  • More new locker sprites!
  • -
  • Fixes glass knock sound having a pop at the end of it.
  • -
  • Telecomm traffic control now has its own circuitboard and doesn't transform into a server when the monitor is disconnected/reconnected.
  • -
  • Using an igniter on a flamethrower that already has one attached no longer uses up the igniter.
  • -
  • NTSL bugfixes.
  • -
-
-