mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Initial merge http://code.google.com/p/tgstation13/source/browse/trunk/ rev 4489 (I think) with BS12
Conflicts: README.txt SQL/tgstation_schema.sql baystation12.dme code/ATMOSPHERICS/components/unary/vent_pump.dm code/ATMOSPHERICS/pipes.dm code/FEA/FEA_airgroup.dm code/FEA/FEA_fire.dm code/FEA/FEA_gas_mixture.dm code/FEA/FEA_turf_tile.dm code/TriDimension/Pipes.dm code/WorkInProgress/buildmode.dm code/WorkInProgress/organs/organs.dm code/WorkInProgress/virus2/Disease2/analyser.dm code/WorkInProgress/virus2/Disease2/biohazard destroyer.dm code/WorkInProgress/virus2/Disease2/cureimplanter.dm code/WorkInProgress/virus2/Disease2/diseasesplicer.dm code/WorkInProgress/virus2/Disease2/dishincubator.dm code/WorkInProgress/virus2/Disease2/isolator.dm code/WorkInProgress/virus2/Disease2/monkeydispensor.dm code/WorkInProgress/virus2/analyser.dm code/WorkInProgress/virus2/antibodies.dm code/WorkInProgress/virus2/base.dm code/WorkInProgress/virus2/biohazard destroyer.dm code/WorkInProgress/virus2/cureimplanter.dm code/WorkInProgress/virus2/curer.dm code/WorkInProgress/virus2/diseasesplicer.dm code/WorkInProgress/virus2/dishincubator.dm code/WorkInProgress/virus2/isolator.dm code/WorkInProgress/virus2/monkeydispensor.dm code/datums/ai_laws.dm code/datums/configuration.dm code/datums/datumvars.dm code/datums/diseases/alien_embryo.dm code/datums/diseases/appendicitis.dm code/datums/diseases/robotic_transformation.dm code/datums/diseases/xeno_transformation.dm code/datums/helper_datums/getrev.dm code/datums/helper_datums/teleport.dm code/datums/helper_datums/tension.dm code/datums/mind.dm code/datums/mixed.dm code/datums/shuttle_controller.dm code/datums/spell.dm code/datums/spells/ethereal_jaunt.dm code/datums/spells/genetic.dm code/datums/spells/wizard.dm code/defines/area/Space Station 13 areas.dm code/defines/atom.dm code/defines/global.dm code/defines/mob/dead/observer.dm code/defines/mob/living/carbon/alien.dm code/defines/mob/living/carbon/alien_humanoid.dm code/defines/mob/living/carbon/carbon.dm code/defines/mob/living/carbon/metroid.dm code/defines/mob/living/carbon/monkey.dm code/defines/mob/living/living.dm code/defines/mob/living/silicon/ai.dm code/defines/mob/living/silicon/robot.dm code/defines/obj.dm code/defines/obj/closet.dm code/defines/obj/clothing.dm code/defines/obj/clothing/costume.dm code/defines/obj/computer.dm code/defines/obj/costume.dm code/defines/obj/decal.dm code/defines/obj/door.dm code/defines/obj/hydro.dm code/defines/obj/machinery.dm code/defines/obj/storage.dm code/defines/obj/supplypacks.dm code/defines/obj/toy.dm code/defines/obj/vending.dm code/defines/obj/weapon.dm code/defines/procs/AStar.dm code/defines/procs/command_name.dm code/defines/procs/dbcore.dm code/defines/procs/forum_activation.dm code/defines/procs/gamehelpers.dm code/defines/procs/helpers.dm code/defines/procs/icon_procs.dm code/defines/procs/station_name.dm code/defines/procs/statistics.dm code/defines/turf.dm code/game/algorithm.dm code/game/area/areas.dm code/game/asteroid/artifacts.dm code/game/atom_procs.dm code/game/cellautomata.dm code/game/dna.dm code/game/events/EventProcs/clang.dm code/game/events/EventProcs/dust.dm code/game/events/EventProcs/ninja_abilities.dm code/game/events/EventProcs/ninja_equipment.dm code/game/events/EventProcs/space_ninja.dm code/game/events/EventProcs/spacevines.dm code/game/gamemodes/blob/blob.dm code/game/gamemodes/blob/blob_finish.dm code/game/gamemodes/blob/blob_report.dm code/game/gamemodes/blob/theblob.dm code/game/gamemodes/changeling/changeling.dm code/game/gamemodes/changeling/changeling_powers.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/changeling/traitor_chan.dm code/game/gamemodes/cult/cult.dm code/game/gamemodes/cult/cult_items.dm code/game/gamemodes/cult/cult_structures.dm code/game/gamemodes/events.dm code/game/gamemodes/events/black_hole.dm code/game/gamemodes/events/miniblob.dm code/game/gamemodes/factions.dm code/game/gamemodes/game_mode.dm code/game/gamemodes/gameticker.dm code/game/gamemodes/malfunction/malfunction.dm code/game/gamemodes/meteor/meteor.dm code/game/gamemodes/meteor/meteors.dm code/game/gamemodes/nuclear/nuclear.dm code/game/gamemodes/nuclear/nuclearbomb.dm code/game/gamemodes/nuclear/pinpointer.dm code/game/gamemodes/objective.dm code/game/gamemodes/revolution/revolution.dm code/game/gamemodes/sandbox/h_sandbox.dm code/game/gamemodes/sandbox/sandbox.dm code/game/gamemodes/setupgame.dm code/game/gamemodes/traitor/traitor.dm code/game/gamemodes/wizard/rightandwrong.dm code/game/gamemodes/wizard/soulstone.dm code/game/gamemodes/wizard/spellbook.dm code/game/gamemodes/wizard/spells.dm code/game/gamemodes/wizard/veilrender.dm code/game/gamemodes/wizard/wizard.dm code/game/hud.dm code/game/jobs/access.dm code/game/jobs/job/captain.dm code/game/jobs/job/civilian.dm code/game/jobs/job/civilian_chaplain.dm code/game/jobs/job/engineering.dm code/game/jobs/job/job.dm code/game/jobs/job/medical.dm code/game/jobs/job/science.dm code/game/jobs/job/security.dm code/game/jobs/job/silicon.dm code/game/jobs/job_controller.dm code/game/jobs/jobs.dm code/game/machinery/Beacon.dm code/game/machinery/OpTable.dm code/game/machinery/Sleeper.dm code/game/machinery/alarm.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/autolathe.dm code/game/machinery/biogenerator.dm code/game/machinery/bots/bots.dm code/game/machinery/bots/cleanbot.dm code/game/machinery/bots/ed209bot.dm code/game/machinery/bots/floorbot.dm code/game/machinery/bots/medbot.dm code/game/machinery/bots/mulebot.dm code/game/machinery/camera.dm code/game/machinery/cell_charger.dm code/game/machinery/cloning.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/Operating.dm code/game/machinery/computer/ai_core.dm code/game/machinery/computer/arcade.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/buildandrepair.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/communications.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/crew.dm code/game/machinery/computer/hologram.dm code/game/machinery/computer/law.dm code/game/machinery/computer/medical.dm code/game/machinery/computer/message.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/power.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/robot.dm code/game/machinery/computer/security.dm code/game/machinery/computer/shuttle.dm code/game/machinery/constructable_frame.dm code/game/machinery/deployable.dm code/game/machinery/door_control.dm code/game/machinery/doors/airlock.dm code/game/machinery/doors/airlock_electronics.dm code/game/machinery/doors/brigdoors.dm code/game/machinery/doors/door.dm code/game/machinery/doors/firedoor.dm code/game/machinery/doors/poddoor.dm code/game/machinery/doors/unpowered.dm code/game/machinery/doors/windowdoor.dm code/game/machinery/flasher.dm code/game/machinery/gateway.dm code/game/machinery/hologram.dm code/game/machinery/hydroponics.dm code/game/machinery/kitchen/gibber.dm code/game/machinery/morgue.dm code/game/machinery/newscaster.dm code/game/machinery/pipe/construction.dm code/game/machinery/pipe/pipe_dispenser.dm code/game/machinery/portable_turret.dm code/game/machinery/recharger.dm code/game/machinery/rechargestation.dm code/game/machinery/requests_console.dm code/game/machinery/shieldgen.dm code/game/machinery/spaceheater.dm code/game/machinery/suit_storage_unit.dm code/game/machinery/syndicatebeacon.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/telecomms/telemonitor.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/teleporter.dm code/game/machinery/turrets.dm code/game/machinery/vending.dm code/game/magic/cultist/ritual.dm code/game/magic/cultist/runes.dm code/game/magic/library.dm code/game/magic/musician.dm code/game/master_controller.dm code/game/mecha/combat/combat.dm code/game/mecha/combat/gygax.dm code/game/mecha/equipment/mecha_equipment.dm code/game/mecha/equipment/tools/tools.dm code/game/mecha/equipment/weapons/weapons.dm code/game/mecha/mech_fabricator.dm code/game/mecha/mecha.dm code/game/mecha/mecha_construction_paths.dm code/game/mecha/mecha_wreckage.dm code/game/mecha/medical/medical.dm code/game/mecha/medical/odysseus.dm code/game/mecha/working/ripley.dm code/game/objects/alien/facehugger.dm code/game/objects/alien/resin.dm code/game/objects/bodybag.dm code/game/objects/closets.dm code/game/objects/closets/emergency.dm code/game/objects/closets/extinguisher.dm code/game/objects/closets/fireaxe.dm code/game/objects/closets/firecloset.dm code/game/objects/closets/fitnesscloset.dm code/game/objects/closets/janitor.dm code/game/objects/closets/kitchen.dm code/game/objects/closets/nuclear.dm code/game/objects/closets/secure/bar.dm code/game/objects/closets/secure/cargo.dm code/game/objects/closets/secure/engineering.dm code/game/objects/closets/secure/hydroponics.dm code/game/objects/closets/secure/medical.dm code/game/objects/closets/secure/personal.dm code/game/objects/closets/secure/scientist.dm code/game/objects/closets/secure/secure_closets.dm code/game/objects/closets/secure/security.dm code/game/objects/closets/syndicate.dm code/game/objects/closets/wardrobe.dm code/game/objects/contraband.dm code/game/objects/crates.dm code/game/objects/devices/PDA/PDA.dm code/game/objects/devices/PDA/cart.dm code/game/objects/devices/PDA/chatroom.dm code/game/objects/devices/aicard.dm code/game/objects/devices/flash.dm code/game/objects/devices/flashlight.dm code/game/objects/devices/paicard.dm code/game/objects/devices/scanners.dm code/game/objects/devices/taperecorder.dm code/game/objects/devices/traitordevices.dm code/game/objects/door_assembly.dm code/game/objects/effect_system.dm code/game/objects/electricchair.dm code/game/objects/explosion.dm code/game/objects/gibs.dm code/game/objects/grille.dm code/game/objects/items.dm code/game/objects/items/blueprints.dm code/game/objects/items/candle.dm code/game/objects/items/clothing.dm code/game/objects/items/food.dm code/game/objects/items/helper_procs.dm code/game/objects/items/item.dm code/game/objects/items/robot_items.dm code/game/objects/items/robot_parts.dm code/game/objects/items/tk_grab.dm code/game/objects/items/weapons/AI_modules.dm code/game/objects/items/weapons/RCD.dm code/game/objects/items/weapons/RSF.dm code/game/objects/items/weapons/cameras.dm code/game/objects/items/weapons/cards_ids.dm code/game/objects/items/weapons/cigs_lighters.dm code/game/objects/items/weapons/clown_items.dm code/game/objects/items/weapons/dna_injector.dm code/game/objects/items/weapons/explosives.dm code/game/objects/items/weapons/flamethrower.dm code/game/objects/items/weapons/grenades.dm code/game/objects/items/weapons/hand_lablers.dm code/game/objects/items/weapons/hydroponics.dm code/game/objects/items/weapons/implants/implant.dm code/game/objects/items/weapons/implants/implantcase.dm code/game/objects/items/weapons/implants/implantchair.dm code/game/objects/items/weapons/implants/implanter.dm code/game/objects/items/weapons/implants/implantfreedom.dm code/game/objects/items/weapons/implants/implantnanoaug.dm code/game/objects/items/weapons/implants/implantpad.dm code/game/objects/items/weapons/kitchen.dm code/game/objects/items/weapons/manuals.dm code/game/objects/items/weapons/medical.dm code/game/objects/items/weapons/mops_cleaners.dm code/game/objects/items/weapons/papers_bins.dm code/game/objects/items/weapons/stunbaton.dm code/game/objects/items/weapons/surgery_tools.dm code/game/objects/items/weapons/swords_axes_etc.dm code/game/objects/items/weapons/table_rack_parts.dm code/game/objects/items/weapons/tools.dm code/game/objects/items/weapons/twohanded.dm code/game/objects/items/weapons/wrappingpaper.dm code/game/objects/mineral_doors.dm code/game/objects/radio/beacon.dm code/game/objects/radio/electropack.dm code/game/objects/radio/encryptionkey.dm code/game/objects/radio/headset.dm code/game/objects/radio/intercom.dm code/game/objects/radio/radio.dm code/game/objects/secstorage/sbriefcase.dm code/game/objects/secstorage/ssafe.dm code/game/objects/stacks/glass.dm code/game/objects/stacks/metal.dm code/game/objects/stacks/stack.dm code/game/objects/stacks/wood.dm code/game/objects/stool.dm code/game/objects/storage/backpack.dm code/game/objects/storage/belt.dm code/game/objects/storage/bible.dm code/game/objects/storage/briefcase.dm code/game/objects/storage/lockbox.dm code/game/objects/storage/storage.dm code/game/objects/storage/uplink_kits.dm code/game/objects/structures.dm code/game/objects/tables_racks.dm code/game/objects/tank.dm code/game/objects/tanks/emergency.dm code/game/objects/tanks/jetpack.dm code/game/objects/toys.dm code/game/objects/transfer_valve.dm code/game/objects/uplinks.dm code/game/objects/watercloset.dm code/game/objects/weapons.dm code/game/objects/windoor_assembly.dm code/game/objects/window.dm code/game/prisonshuttle.dm code/game/smoothwall.dm code/game/sound.dm code/game/step_triggers.dm code/game/structure/structure.dm code/game/supplyshuttle.dm code/game/throwing.dm code/game/topic.dm code/game/turf.dm code/game/vehicles/airtight/airtight.dm code/game/vehicles/airtight/land.dm code/game/vehicles/airtight/space.dm code/game/vehicles/vehicle.dm code/game/verbs/ooc.dm code/game/verbs/sound.dm code/game/verbs/suicide.dm code/game/verbs/who.dm code/game/vote.dm code/modules/admin/IsBanned.dm code/modules/admin/NewBan.dm code/modules/admin/admin.dm code/modules/admin/admin_investigate.dm code/modules/admin/admin_memo.dm code/modules/admin/admin_verbs.dm code/modules/admin/banjob.dm code/modules/admin/create_mob.dm code/modules/admin/create_object.dm code/modules/admin/create_turf.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/MC.dm code/modules/admin/verbs/adminhelp.dm code/modules/admin/verbs/adminjump.dm code/modules/admin/verbs/adminpm.dm code/modules/admin/verbs/adminsay.dm code/modules/admin/verbs/atmosdebug.dm code/modules/admin/verbs/cinematic.dm code/modules/admin/verbs/deadsay.dm code/modules/admin/verbs/debug.dm code/modules/admin/verbs/diagnostics.dm code/modules/admin/verbs/getlogs.dm code/modules/admin/verbs/mapping.dm code/modules/admin/verbs/massmodvar.dm code/modules/admin/verbs/modifyvariables.dm code/modules/admin/verbs/onlyone.dm code/modules/admin/verbs/playsound.dm code/modules/admin/verbs/possess.dm code/modules/admin/verbs/pray.dm code/modules/admin/verbs/randomverbs.dm code/modules/admin/verbs/striketeam.dm code/modules/admin/verbs/striketeam_syndicate.dm code/modules/assembly/assembly.dm code/modules/assembly/signaler.dm code/modules/chemical/Chemistry-Machinery.dm code/modules/chemical/Chemistry-Tools.dm code/modules/client/client defines.dm code/modules/client/client procs.dm code/modules/clothing/costume.dm code/modules/clothing/gimmick.dm code/modules/clothing/glasses.dm code/modules/clothing/glasses/glasses.dm code/modules/clothing/glasses/hud.dm code/modules/clothing/gloves.dm code/modules/clothing/head/hardhat.dm code/modules/clothing/jumpsuit.dm code/modules/clothing/mask.dm code/modules/clothing/shoes.dm code/modules/clothing/spacesuit.dm code/modules/clothing/spacesuits/captain.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/clothing/spacesuits/ninja.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/spacesuits/syndi.dm code/modules/clothing/spacesuits/void.dm code/modules/clothing/suit.dm code/modules/clothing/suits/armor.dm code/modules/clothing/suits/bio.dm code/modules/clothing/suits/bomb.dm code/modules/clothing/suits/detective.dm code/modules/clothing/suits/fire.dm code/modules/clothing/suits/heavy.dm code/modules/clothing/suits/hos.dm code/modules/clothing/suits/labcoat.dm code/modules/clothing/suits/miscellaneous.dm code/modules/clothing/suits/wiz_robe.dm code/modules/clothing/uniforms/lawyer.dm code/modules/critters/critter.dm code/modules/critters/critter_AI.dm code/modules/critters/critters.dm code/modules/critters/hivebots/hivebot.dm code/modules/flufftext/Dreaming.dm code/modules/flufftext/Hallucination.dm code/modules/flufftext/TextFilters.dm code/modules/food/food.dm code/modules/food/meat.dm code/modules/food/recipes_microwave.dm code/modules/maps/SwapMaps.dm code/modules/maps/dmm_suite.dm code/modules/maps/fromdmp.dm code/modules/maps/randomZlevel.dm code/modules/maps/reader.dm code/modules/maps/writer.dm code/modules/mining/machine_processing.dm code/modules/mining/machine_stacking.dm code/modules/mining/machine_unloading.dm code/modules/mining/mine_items.dm code/modules/mining/mine_turfs.dm code/modules/mining/mint.dm code/modules/mining/ores_materials_coins.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/dead/death.dm code/modules/mob/dead/observer/observer.dm code/modules/mob/death.dm code/modules/mob/living/blob/blob.dm code/modules/mob/living/carbon/alien/alien.dm code/modules/mob/living/carbon/alien/death.dm code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm code/modules/mob/living/carbon/alien/humanoid/death.dm code/modules/mob/living/carbon/alien/humanoid/hud.dm code/modules/mob/living/carbon/alien/humanoid/humanoid.dm code/modules/mob/living/carbon/alien/humanoid/life.dm code/modules/mob/living/carbon/alien/humanoid/login.dm code/modules/mob/living/carbon/alien/humanoid/queen.dm code/modules/mob/living/carbon/alien/larva/death.dm code/modules/mob/living/carbon/alien/larva/hud.dm code/modules/mob/living/carbon/alien/larva/larva.dm code/modules/mob/living/carbon/alien/larva/life.dm code/modules/mob/living/carbon/alien/larva/login.dm code/modules/mob/living/carbon/alien/larva/powers.dm code/modules/mob/living/carbon/alien/special/_main.dm code/modules/mob/living/carbon/alien/special/snakeman.dm code/modules/mob/living/carbon/brain/MMI.dm code/modules/mob/living/carbon/brain/brain.dm code/modules/mob/living/carbon/brain/death.dm code/modules/mob/living/carbon/brain/hud.dm code/modules/mob/living/carbon/brain/life.dm code/modules/mob/living/carbon/brain/say.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/human/death.dm code/modules/mob/living/carbon/human/emote.dm code/modules/mob/living/carbon/human/examine.dm code/modules/mob/living/carbon/human/hud.dm code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/human_attackalien.dm code/modules/mob/living/carbon/human/human_attackhand.dm code/modules/mob/living/carbon/human/human_damage.dm code/modules/mob/living/carbon/human/human_defense.dm code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/human/login.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/whisper.dm code/modules/mob/living/carbon/metroid/death.dm code/modules/mob/living/carbon/metroid/examine.dm code/modules/mob/living/carbon/metroid/life.dm code/modules/mob/living/carbon/metroid/login.dm code/modules/mob/living/carbon/metroid/metroid.dm code/modules/mob/living/carbon/metroid/powers.dm code/modules/mob/living/carbon/monkey/death.dm code/modules/mob/living/carbon/monkey/examine.dm code/modules/mob/living/carbon/monkey/hud.dm code/modules/mob/living/carbon/monkey/life.dm code/modules/mob/living/carbon/monkey/login.dm code/modules/mob/living/carbon/monkey/monkey.dm code/modules/mob/living/carbon/monkey/powers.dm code/modules/mob/living/damage_procs.dm code/modules/mob/living/living.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/login.dm code/modules/mob/living/say.dm code/modules/mob/living/silicon/ai/ai.dm code/modules/mob/living/silicon/ai/death.dm code/modules/mob/living/silicon/ai/examine.dm code/modules/mob/living/silicon/ai/life.dm code/modules/mob/living/silicon/ai/login.dm code/modules/mob/living/silicon/ai/move.dm code/modules/mob/living/silicon/death.dm code/modules/mob/living/silicon/decoy/death.dm code/modules/mob/living/silicon/pai/death.dm code/modules/mob/living/silicon/pai/hud.dm code/modules/mob/living/silicon/pai/pai.dm code/modules/mob/living/silicon/pai/recruit.dm code/modules/mob/living/silicon/pai/software.dm code/modules/mob/living/silicon/robot/death.dm code/modules/mob/living/silicon/robot/emote.dm code/modules/mob/living/silicon/robot/examine.dm code/modules/mob/living/silicon/robot/hud.dm code/modules/mob/living/silicon/robot/life.dm code/modules/mob/living/silicon/robot/login.dm code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/living/silicon/robot/robot_modules.dm code/modules/mob/living/silicon/robot/say.dm code/modules/mob/living/silicon/robot/wires.dm code/modules/mob/living/silicon/say.dm code/modules/mob/living/simple_animal/life.dm code/modules/mob/login.dm code/modules/mob/logout.dm code/modules/mob/mob.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_grab.dm code/modules/mob/mob_helpers.dm code/modules/mob/mob_movement.dm code/modules/mob/mob_transformation_simple.dm code/modules/mob/new_player/login.dm code/modules/mob/new_player/new_player.dm code/modules/mob/new_player/preferences.dm code/modules/mob/new_player/preferences_setup.dm code/modules/mob/new_player/savefile.dm code/modules/mob/new_player/sprite_accessories.dm code/modules/mob/organ/organ.dm code/modules/mob/organ/organ_external.dm code/modules/mob/organ/pain.dm code/modules/mob/say.dm code/modules/mob/screen.dm code/modules/mob/simple_animal/crab.dm code/modules/mob/transform_procs.dm code/modules/paperwork/clipboard.dm code/modules/paperwork/filingcabinet.dm code/modules/paperwork/folders.dm code/modules/paperwork/handlabeler.dm code/modules/paperwork/paper.dm code/modules/paperwork/paperbin.dm code/modules/paperwork/pen.dm code/modules/paperwork/photocopier.dm code/modules/paperwork/stamps.dm code/modules/power/antimatter/computer.dm code/modules/power/antimatter/engine.dm code/modules/power/antimatter/fuel.dm code/modules/power/apc.dm code/modules/power/cable.dm code/modules/power/cable_heavyduty.dm code/modules/power/cell.dm code/modules/power/generator.dm code/modules/power/generator_type2.dm code/modules/power/gravitygenerator.dm code/modules/power/lighting.dm code/modules/power/port_gen.dm code/modules/power/sd_DynamicAreaLighting.dm code/modules/power/singularity/collector.dm code/modules/power/singularity/containment_field.dm code/modules/power/singularity/emitter.dm code/modules/power/singularity/field_generator.dm code/modules/power/singularity/generator.dm code/modules/power/singularity/investigate.dm code/modules/power/singularity/particle_accelerator/particle.dm code/modules/power/singularity/particle_accelerator/particle_accelerator.dm code/modules/power/singularity/particle_accelerator/particle_chamber.dm code/modules/power/singularity/particle_accelerator/particle_control.dm code/modules/power/singularity/particle_accelerator/particle_emitter.dm code/modules/power/singularity/particle_accelerator/particle_power.dm code/modules/power/singularity/singularity.dm code/modules/power/smes.dm code/modules/power/solar.dm code/modules/power/switch.dm code/modules/power/turbine.dm code/modules/projectiles/ammunition.dm code/modules/projectiles/gun.dm code/modules/projectiles/guns/energy.dm code/modules/projectiles/guns/energy/laser.dm code/modules/projectiles/guns/energy/nuclear.dm code/modules/projectiles/guns/energy/pulse.dm code/modules/projectiles/guns/energy/special.dm code/modules/projectiles/guns/energy/stun.dm code/modules/projectiles/guns/projectile.dm code/modules/projectiles/guns/projectile/pistol.dm code/modules/projectiles/guns/projectile/revolver.dm code/modules/projectiles/guns/projectile/shotgun.dm code/modules/projectiles/projectile.dm code/modules/projectiles/projectile/beams.dm code/modules/projectiles/projectile/bullets.dm code/modules/projectiles/projectile/change.dm code/modules/projectiles/projectile/special.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Recipes.dm code/modules/recycling/conveyor2.dm code/modules/recycling/disposal-construction.dm code/modules/recycling/disposal.dm code/modules/recycling/sortingmachinery.dm code/modules/research/designs.dm code/modules/research/destructive_analyzer.dm code/modules/research/message_server.dm code/modules/research/protolathe.dm code/modules/research/rdconsole.dm code/modules/research/rdmachines.dm code/modules/research/research.dm code/modules/research/server.dm code/modules/scripting/AST/Operators/Binary Operators.dm code/modules/scripting/Implementations/Telecomms.dm code/modules/scripting/Parser/Keywords.dm code/modules/scripting/Scanner/Tokens.dm code/modules/scripting/stack.dm code/modules/security levels/keycard authentication.dm code/modules/security levels/security levels.dm code/setup.dm code/stylesheet.dm code/unused/AI_Visibility.dm code/unused/Ultralight.dm code/unused/airtunnel.dm code/unused/beast/bodypart.dm code/unused/conveyor.dm code/unused/disease2/analyser.dm code/unused/disease2/base.dm code/unused/disease2/biohazard destroyer.dm code/unused/disease2/cureimplanter.dm code/unused/disease2/curer.dm code/unused/disease2/diseasesplicer.dm code/unused/disease2/dishincubator.dm code/unused/disease2/isolator.dm code/unused/disease2/monkeydispensor.dm code/unused/dna.dm code/unused/gamemodes/deathmatch.dm code/unused/jobs.dm code/unused/mining/datum_processing_recipe.dm code/unused/mining/spaceship_builder_unused.dm code/unused/new_year.dm code/unused/spacecraft/manufacturing.dm code/unused/spacecraft/shipcore.dm config/README feedback.txt config/admins.txt config/config.txt config/rules.html data/mode.txt html/add-to-changelog.html html/archivedchangelog.html html/changelog.css html/changelog.html html/changelog.js icons/effects/blood.dmi icons/effects/genetics.dmi icons/misc/fullscreen.dmi icons/mob/AI.dmi icons/mob/alien.dmi icons/mob/animal.dmi icons/mob/back.dmi icons/mob/belt.dmi icons/mob/blob.dmi icons/mob/critter.dmi icons/mob/dam_human.dmi icons/mob/eyes.dmi icons/mob/feet.dmi icons/mob/hands.dmi icons/mob/head.dmi icons/mob/human.dmi icons/mob/human_face.dmi icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/livestock.dmi icons/mob/mask.dmi icons/mob/mecha.dmi icons/mob/mob.dmi icons/mob/monkey.dmi icons/mob/robots.dmi icons/mob/screen1.dmi icons/mob/screen1_Midnight.dmi icons/mob/screen1_Orange.dmi icons/mob/screen1_alien.dmi icons/mob/screen1_old.dmi icons/mob/suit.dmi icons/mob/uniform.dmi icons/mob/zone_sel.dmi icons/obj/Cryogenic2.dmi icons/obj/aibots.dmi icons/obj/ammo.dmi icons/obj/atmos.dmi icons/obj/bureaucracy.dmi icons/obj/card.dmi icons/obj/cigarettes.dmi icons/obj/closet.dmi icons/obj/clothing/glasses.dmi icons/obj/clothing/gloves.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/shoes.dmi icons/obj/clothing/suits.dmi icons/obj/clothing/uniforms.dmi icons/obj/computer.dmi icons/obj/contraband.dmi icons/obj/decals.dmi icons/obj/device.dmi icons/obj/doors/DoorHazard.dmi icons/obj/doors/door_assembly.dmi icons/obj/drinks.dmi icons/obj/engine.dmi icons/obj/food.dmi icons/obj/grenade.dmi icons/obj/gun.dmi icons/obj/harvest.dmi icons/obj/hydroponics.dmi icons/obj/items.dmi icons/obj/janitor.dmi icons/obj/library.dmi icons/obj/lighting.dmi icons/obj/machines/field_generator.dmi icons/obj/machines/gateway.dmi icons/obj/machines/mining_machines.dmi icons/obj/machines/particle_accelerator.dmi icons/obj/meter.dmi icons/obj/mining.dmi icons/obj/objects.dmi icons/obj/paper.dmi icons/obj/pda.dmi icons/obj/pipes/disposal.dmi icons/obj/plants.dmi icons/obj/power.dmi icons/obj/projectiles.dmi icons/obj/robotics.dmi icons/obj/seeds.dmi icons/obj/singularity.dmi icons/obj/stationobjs.dmi icons/obj/stock_parts.dmi icons/obj/storage.dmi icons/obj/structures.dmi icons/obj/surgery.dmi icons/obj/syringe.dmi icons/obj/tank.dmi icons/obj/terminals.dmi icons/obj/toy.dmi icons/obj/vending.dmi icons/obj/watercloset.dmi icons/obj/weapons.dmi icons/obj/wizard.dmi icons/turf/areas.dmi icons/turf/floors.dmi icons/turf/walls.dmi interface/interface.dm interface/skin.dmf maps/Antiqua.dmm maps/RandomZLevels/assistantChamber.dmm maps/RandomZLevels/fileList.txt maps/tgstation.2.0.9.dmm sound/AI/animes.ogg sound/AI/newroundsexy.ogg sound/AI/newroundsexy2.ogg sound/effects/adminhelp.ogg tools/UnstandardnessTestForDM/UnstandardnessTestForDM.sln tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Form1.resx tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Program.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/AssemblyInfo.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Resources.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Resources.resx tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Settings.Designer.cs tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties/Settings.settings tools/UnstandardnessTestForDM/UnstandardnessTestForDM/UnstandardnessTestForDM.csproj tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin/Debug/UnstandardnessTestForDM.vshost.exe.manifest tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86/Debug/UnstandardnessTestForDM.csproj.FileListAbsolute.txt tools/expand_filedir_paths.py tools/readme.txt Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,10 +1,2 @@
|
||||
/mob/dead/observer/Login()
|
||||
..()
|
||||
|
||||
src.client.screen = null
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,5 @@
|
||||
/mob/dead/observer/Logout()
|
||||
..()
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
del(src)
|
||||
@@ -1,41 +1,40 @@
|
||||
/mob/dead/observer/New(mob/body, var/safety = 0)
|
||||
invisibility = 10
|
||||
/mob/dead/observer/New(mob/body)
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = 15
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
verbs += /mob/dead/observer/proc/become_mouse
|
||||
taj_talk_understand = 1
|
||||
stat = DEAD
|
||||
|
||||
if(body)
|
||||
var/turf/location = get_turf(body)//Where is the mob located?
|
||||
if(location)//Found turf.
|
||||
loc = location
|
||||
else//Safety, in case a turf cannot be found.
|
||||
loc = pick(latejoin)
|
||||
if(!istype(body,/mob)) return//This needs to be recoded sometime so it has loc as its first arg
|
||||
real_name = body.name
|
||||
if(!body.original_name)
|
||||
body.original_name = real_name
|
||||
original_name = body.original_name
|
||||
//name = body.original_name //original
|
||||
if(issimpleanimal(body))
|
||||
name = original_name
|
||||
dead_mob_list += src
|
||||
add_to_mob_list(src)
|
||||
var/turf/T
|
||||
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
|
||||
|
||||
gender = body.gender
|
||||
if(body.mind && body.mind.name)
|
||||
name = body.mind.name
|
||||
else
|
||||
name = body.name
|
||||
real_name = body.real_name
|
||||
if(body.real_name)
|
||||
name = body.real_name
|
||||
else
|
||||
if(gender == MALE)
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
else
|
||||
name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
|
||||
if(!name)
|
||||
name = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
|
||||
real_name = name
|
||||
mind = body.mind //we don't transfer the mind but we keep a reference to it.
|
||||
|
||||
if( original_name != real_name )
|
||||
name = name + " (died as [src.real_name])"
|
||||
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
|
||||
loc = T
|
||||
|
||||
if(!safety)
|
||||
corpse = body
|
||||
verbs += /mob/dead/observer/proc/reenter_corpse
|
||||
return
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
return
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
@@ -44,58 +43,29 @@ Transfer_mind is there to check if mob is being deleted/not going to have a body
|
||||
Works together with spawning an observer, noted above.
|
||||
*/
|
||||
|
||||
/mob/proc/ghostize(var/transfer_mind = 0)
|
||||
/mob/proc/ghostize(var/can_reenter_corpse = 1)
|
||||
if(key)
|
||||
if(client)
|
||||
client.screen.len = null//Clear the hud, just to be sure.
|
||||
var/mob/dead/observer/ghost = new(src,transfer_mind)//Transfer safety to observer spawning proc.
|
||||
if(transfer_mind)//When a body is destroyed.
|
||||
if(mind)
|
||||
mind.transfer_to(ghost)
|
||||
else//They may not have a mind and be gibbed/destroyed.
|
||||
ghost.key = key
|
||||
else//Else just modify their key and connect them.
|
||||
ghost.key = key
|
||||
|
||||
verbs -= /mob/proc/ghost
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
|
||||
else if(transfer_mind)//Body getting destroyed but the person is not present inside.
|
||||
for(var/mob/dead/observer/O in world)
|
||||
if(O.corpse == src&&O.key)//If they have the same corpse and are keyed.
|
||||
if(mind)
|
||||
O.mind = mind//Transfer their mind if they have one.
|
||||
break
|
||||
return
|
||||
var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.key = key
|
||||
return ghost
|
||||
|
||||
/*
|
||||
This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues.
|
||||
*/
|
||||
/mob/proc/ghost()
|
||||
set category = "Ghost"
|
||||
/mob/living/verb/ghost()
|
||||
set category = "OOC"
|
||||
set name = "Ghost"
|
||||
set desc = "Relinquish your life and enter the land of the dead."
|
||||
|
||||
/*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."
|
||||
return*/
|
||||
if(key)
|
||||
var/mob/dead/observer/ghost = new(src)
|
||||
ghost.key = key
|
||||
if(timeofdeath)
|
||||
ghost.timeofdeath = timeofdeath
|
||||
verbs -= /mob/proc/ghost
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
/*if(issimpleanimal(src))
|
||||
ghost.name = src.name + " ([src.real_name])"
|
||||
ghost.voice_name = src.name + " ([src.real_name])"*/
|
||||
if(stat == DEAD)
|
||||
ghostize(1)
|
||||
else
|
||||
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
if(response != "Ghost") return //didn't want to ghost after-all
|
||||
ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
return
|
||||
|
||||
/mob/proc/adminghostize()
|
||||
if(client)
|
||||
client.mob = new/mob/dead/observer(src)
|
||||
return
|
||||
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
if(NewLoc)
|
||||
@@ -107,14 +77,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
loc = get_turf(src) //Get out of closets and such as a ghost
|
||||
if((direct & NORTH) && y < world.maxy)
|
||||
y++
|
||||
if((direct & SOUTH) && y > 1)
|
||||
else if((direct & SOUTH) && y > 1)
|
||||
y--
|
||||
if((direct & EAST) && x < world.maxx)
|
||||
x++
|
||||
if((direct & WEST) && x > 1)
|
||||
else if((direct & WEST) && x > 1)
|
||||
x--
|
||||
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z))
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
|
||||
S.HasEntered(src)
|
||||
|
||||
/mob/dead/observer/examine()
|
||||
@@ -128,6 +98,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (client.statpanel == "Status")
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
if(ticker)
|
||||
if(ticker.mode)
|
||||
//world << "DEBUG: ticker not null"
|
||||
@@ -141,94 +112,51 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
/mob/dead/observer/proc/reenter_corpse()
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!corpse)
|
||||
alert("You don't have a corpse!")
|
||||
if(!client) return
|
||||
if(!(mind && mind.current && can_reenter_corpse))
|
||||
src << "<span class='warning'>You have no body.</span>"
|
||||
return
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
if(mind.current.key) //makes sure we don't accidentally kick any clients
|
||||
usr << "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>"
|
||||
return
|
||||
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
|
||||
var/obj/effect/rune/R = locate() in mind.current.loc //whilst corpse is alive, we can only reenter the body if it's on the rune
|
||||
if(!(R && R.word1 == wordhell && R.word2 == wordtravel && R.word3 == wordself)) //astral journeying rune
|
||||
usr << "<span class='warning'>The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.</span>"
|
||||
return
|
||||
mind.current.ajourn=0
|
||||
if(client.holder && client.holder.state == 2) //TODO: should be handled by Login/Logout ~Carn
|
||||
var/rank = client.holder.rank
|
||||
client.clear_admin_verbs()
|
||||
client.holder.state = 1
|
||||
client.update_admins(rank)
|
||||
if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat!=2) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work
|
||||
var/S=0
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(corpse.loc==R.loc && R.word1 == wordhell && R.word2 == wordtravel && R.word3 == wordself)
|
||||
S=1
|
||||
if(!S)
|
||||
usr << "\red The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you."
|
||||
return
|
||||
if(corpse.ajourn)
|
||||
corpse.ajourn=0
|
||||
client.mob = corpse
|
||||
if (corpse.stat==2 || istype(corpse, /mob/living/simple_animal/mouse ))
|
||||
corpse.verbs += /mob/proc/ghost
|
||||
del(src)
|
||||
|
||||
/mob/dead/observer/proc/become_mouse()
|
||||
set category = "Ghost"
|
||||
set name = "Become mouse"
|
||||
|
||||
//locate an empty mouse
|
||||
var/list/eligible_targets = new()
|
||||
for(var/mob/living/simple_animal/mouse/M in world)
|
||||
if(!M.ckey && !M.stat)
|
||||
eligible_targets.Add(M)
|
||||
|
||||
var/mob/living/simple_animal/mouse/target_mouse
|
||||
if(ticker.spawn_vermin)
|
||||
if(eligible_targets.len)
|
||||
//grab a random existing one
|
||||
target_mouse = pick(eligible_targets)
|
||||
else
|
||||
//make a new mouse
|
||||
target_mouse = new(pick(ticker.vermin_spawn_turfs))
|
||||
|
||||
if(target_mouse)
|
||||
//move player into mouse
|
||||
//the mouse ai will deactivate itself
|
||||
client.mob = target_mouse
|
||||
target_mouse.original_name = src.original_name
|
||||
|
||||
//reset admin verbs
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
var/rank = client.holder.rank
|
||||
client.clear_admin_verbs()
|
||||
client.holder.state = 1
|
||||
client.update_admins(rank)
|
||||
|
||||
//update allowed verbs
|
||||
target_mouse.verbs += /mob/proc/ghost
|
||||
target_mouse.verbs -= /mob/verb/observe
|
||||
target_mouse.verbs -= /client/verb/toggle_ghost_ears
|
||||
target_mouse.verbs -= /client/verb/toggle_ghost_sight
|
||||
|
||||
del(src)
|
||||
|
||||
else
|
||||
client << "\red Unable to become a mouse!"
|
||||
mind.current.key = key
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport to a location"
|
||||
if((usr.stat != 2) || !istype(usr, /mob/dead/observer))
|
||||
if(!istype(usr, /mob/dead/observer))
|
||||
usr << "Not when you're not dead!"
|
||||
return
|
||||
usr.verbs -= /mob/dead/observer/proc/dead_tele
|
||||
spawn(30)
|
||||
usr.verbs += /mob/dead/observer/proc/dead_tele
|
||||
var/A
|
||||
A = input("Area to jump to", "BOOYEA", A) in ghostteleportlocs
|
||||
A = input("Area to jump to", "BOOYEA", A) as null|anything in ghostteleportlocs
|
||||
var/area/thearea = ghostteleportlocs[A]
|
||||
if(!thearea) return
|
||||
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
usr.loc = pick(L)
|
||||
|
||||
|
||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
@@ -241,7 +169,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/target = null //Chosen target.
|
||||
|
||||
dest += getmobs() //Fill list, prompt user with list
|
||||
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
|
||||
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in sortList(dest)
|
||||
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
@@ -255,6 +183,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
|
||||
/mob/dead/observer/verb/boo()
|
||||
set category = "Ghost"
|
||||
set name = "Boo!"
|
||||
set desc= "Scare your crew members because of boredom!"
|
||||
|
||||
if(bootime > world.time) return
|
||||
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
|
||||
if(L)
|
||||
L.flicker()
|
||||
bootime = world.time + 600
|
||||
return
|
||||
//Maybe in the future we can add more <i>spooky</i> code here!
|
||||
return
|
||||
|
||||
/mob/dead/observer/verb/toggle_alien_candidate()
|
||||
set name = "Toggle Be Alien Candidate"
|
||||
@@ -286,3 +227,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
src << "\red You are dead! You have no mind to store memory!"
|
||||
|
||||
/mob/dead/observer/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
set category = "Ghost"
|
||||
|
||||
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
@@ -9,9 +9,13 @@
|
||||
|
||||
log_say("Ghost/[src.key] : [message]")
|
||||
|
||||
if (src.client && (src.client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (src.client)
|
||||
if(src.client.muted_deadchat)
|
||||
src << "\red You cannot talk in deadchat (muted by admins)."
|
||||
return
|
||||
|
||||
if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
. = src.say_dead(message)
|
||||
|
||||
@@ -21,20 +25,20 @@
|
||||
if (prob (49))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('ghost.ogg','ghost2.ogg'), 10, 1)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
if(prob(30))
|
||||
playsound(src.loc, pick('ghost.ogg','ghost2.ogg'), 10, 1)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
if (prob(50))
|
||||
return
|
||||
else if (prob (95))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('ghost.ogg','ghost2.ogg'), 10, 1)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
playsound(src.loc, pick('ghost.ogg','ghost2.ogg'), 10, 1)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
@@ -10,12 +10,13 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("gibbed-m", animation)
|
||||
gibs(loc, viruses, dna)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -34,12 +35,13 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("dust-m", animation)
|
||||
new /obj/effect/decal/ash(loc)
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -47,34 +49,7 @@
|
||||
|
||||
/mob/proc/death(gibbed)
|
||||
timeofdeath = world.time
|
||||
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
|
||||
log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | [attack_log[attack_log.len]]" : ""]"
|
||||
if(client)
|
||||
client.onDeath()
|
||||
|
||||
var/cancel = 0
|
||||
for(var/mob/M in world)
|
||||
if(M.client && (M.stat != DEAD))
|
||||
cancel = 1
|
||||
break
|
||||
if(!cancel)
|
||||
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
|
||||
|
||||
spawn(300)
|
||||
for(var/mob/M in world)
|
||||
if(M.client && (M.stat != DEAD))
|
||||
world << "Aborting world restart!"
|
||||
return
|
||||
|
||||
feedback_set_details("end_error","no live players")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(50)
|
||||
|
||||
log_game("Rebooting because of no live players")
|
||||
world.Reboot()
|
||||
return
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list += src
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
|
||||
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.
|
||||
|
||||
//Returns the thing in our active hand
|
||||
/mob/proc/get_active_hand()
|
||||
if(hand) return l_hand
|
||||
else return r_hand
|
||||
|
||||
//Returns the thing in our inactive hand
|
||||
/mob/proc/get_inactive_hand()
|
||||
if(hand) return r_hand
|
||||
else return l_hand
|
||||
|
||||
|
||||
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_l_hand(var/obj/item/W)
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
l_hand = W
|
||||
W.layer = 20 //TODO: move to equipped?
|
||||
// l_hand.screen_loc = ui_lhand
|
||||
W.equipped(src,slot_l_hand)
|
||||
if(client) client.screen |= W
|
||||
update_inv_l_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_r_hand(var/obj/item/W)
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!r_hand)
|
||||
W.loc = src
|
||||
r_hand = W
|
||||
W.layer = 20
|
||||
// r_hand.screen_loc = ui_rhand
|
||||
W.equipped(src,slot_r_hand)
|
||||
if(client) client.screen |= W
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Puts the item into our active hand if possible. returns 1 on success.
|
||||
/mob/proc/put_in_active_hand(var/obj/item/W)
|
||||
if(hand) return put_in_l_hand(W)
|
||||
else return put_in_r_hand(W)
|
||||
|
||||
//Puts the item into our inactive hand if possible. returns 1 on success.
|
||||
/mob/proc/put_in_inactive_hand(var/obj/item/W)
|
||||
if(hand) return put_in_r_hand(W)
|
||||
else return put_in_l_hand(W)
|
||||
|
||||
//Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success.
|
||||
//If both fail it drops it on the floor and returns 0.
|
||||
//This is probably the main one you need to know :)
|
||||
/mob/proc/put_in_hands(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(put_in_active_hand(W)) return 1
|
||||
else if(put_in_inactive_hand(W)) return 1
|
||||
else
|
||||
W.loc = get_turf(src)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped()
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/mob/proc/drop_item_v() //this is dumb.
|
||||
if(stat == CONSCIOUS && isturf(loc))
|
||||
return drop_item()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/drop_from_inventory(var/obj/item/W)
|
||||
if(W)
|
||||
if(client) client.screen -= W
|
||||
u_equip(W)
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = loc
|
||||
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isturf(T))
|
||||
T.Entered(W)
|
||||
|
||||
W.dropped(src)
|
||||
update_icons()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//Drops the item in our left hand
|
||||
/mob/proc/drop_l_hand(var/atom/Target)
|
||||
if(l_hand)
|
||||
if(client) client.screen -= l_hand
|
||||
l_hand.layer = initial(l_hand.layer)
|
||||
|
||||
if(Target) l_hand.loc = Target.loc
|
||||
else l_hand.loc = loc
|
||||
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isturf(T))
|
||||
T.Entered(l_hand)
|
||||
|
||||
l_hand.dropped(src)
|
||||
l_hand = null
|
||||
update_inv_l_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Drops the item in our right hand
|
||||
/mob/proc/drop_r_hand(var/atom/Target)
|
||||
if(r_hand)
|
||||
if(client) client.screen -= r_hand
|
||||
r_hand.layer = initial(r_hand.layer)
|
||||
|
||||
if(Target) r_hand.loc = Target.loc
|
||||
else r_hand.loc = loc
|
||||
|
||||
var/turf/T = get_turf(Target)
|
||||
if(istype(T))
|
||||
T.Entered(r_hand)
|
||||
|
||||
r_hand.dropped(src)
|
||||
r_hand = null
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Drops the item in our active hand.
|
||||
/mob/proc/drop_item(var/atom/Target)
|
||||
if(hand) return drop_l_hand(Target)
|
||||
else return drop_r_hand(Target)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO: phase out this proc
|
||||
/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this?
|
||||
W.loc = null
|
||||
W.layer = initial(W.layer)
|
||||
u_equip(W)
|
||||
update_icons()
|
||||
return
|
||||
|
||||
|
||||
/mob/proc/u_equip(W as obj)
|
||||
if (W == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand(0)
|
||||
else if (W == l_hand)
|
||||
l_hand = null
|
||||
update_inv_l_hand(0)
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed(0)
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else if (W == back)
|
||||
back = null
|
||||
update_inv_back(0)
|
||||
else if (W == wear_mask)
|
||||
wear_mask = null
|
||||
update_inv_wear_mask(0)
|
||||
return
|
||||
|
||||
|
||||
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
||||
/mob/proc/remove_from_mob(var/obj/O)
|
||||
src.u_equip(O)
|
||||
if (src.client)
|
||||
src.client.screen -= O
|
||||
O.layer = initial(O.layer)
|
||||
O.screen_loc = null
|
||||
return 1
|
||||
|
||||
|
||||
//Outdated but still in use apparently. This should at least be a human proc.
|
||||
/mob/proc/get_equipped_items()
|
||||
var/list/items = new/list()
|
||||
|
||||
if(hasvar(src,"back")) if(src:back) items += src:back
|
||||
if(hasvar(src,"belt")) if(src:belt) items += src:belt
|
||||
if(hasvar(src,"ears")) if(src:ears) items += src:ears
|
||||
if(hasvar(src,"glasses")) if(src:glasses) items += src:glasses
|
||||
if(hasvar(src,"gloves")) if(src:gloves) items += src:gloves
|
||||
if(hasvar(src,"head")) if(src:head) items += src:head
|
||||
if(hasvar(src,"shoes")) if(src:shoes) items += src:shoes
|
||||
if(hasvar(src,"wear_id")) if(src:wear_id) items += src:wear_id
|
||||
if(hasvar(src,"wear_mask")) if(src:wear_mask) items += src:wear_mask
|
||||
if(hasvar(src,"wear_suit")) if(src:wear_suit) items += src:wear_suit
|
||||
// if(hasvar(src,"w_radio")) if(src:w_radio) items += src:w_radio commenting this out since headsets go on your ears now PLEASE DON'T BE MAD KEELIN
|
||||
if(hasvar(src,"w_uniform")) if(src:w_uniform) items += src:w_uniform
|
||||
|
||||
//if(hasvar(src,"l_hand")) if(src:l_hand) items += src:l_hand
|
||||
//if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand
|
||||
|
||||
return items
|
||||
@@ -1,13 +1,11 @@
|
||||
//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"
|
||||
icon = 'blob.dmi'
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon_state = "blob_spore_temp"
|
||||
pass_flags = PASSBLOB
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
var/ghost_name = "Unknown"
|
||||
var/creating_blob = 0
|
||||
|
||||
@@ -33,7 +31,7 @@
|
||||
clamp_values()
|
||||
UpdateDamage()
|
||||
if(health < 0)
|
||||
src.gib()
|
||||
src.dust()
|
||||
|
||||
|
||||
proc/clamp_values()
|
||||
@@ -89,23 +87,19 @@
|
||||
usr << "There is no blob here!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(B.blobtype != "Blob")
|
||||
usr << "Unable to use this blob, find another one."
|
||||
if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory))
|
||||
usr << "Unable to use this blob, find a normal one."
|
||||
creating_blob = 0
|
||||
return
|
||||
for(var/obj/effect/blob/blob in orange(5))
|
||||
if(blob.blobtype == "Node")
|
||||
usr << "There is another node nearby, move away from it!"
|
||||
creating_blob = 0
|
||||
return
|
||||
for(var/obj/effect/blob/blob in orange(2))
|
||||
if(blob.blobtype == "Factory")
|
||||
usr << "There is a porus blob nearby, move away from it!"
|
||||
creating_blob = 0
|
||||
B.blobdebug = 2
|
||||
spawn(0)
|
||||
B.Life()
|
||||
src.gib()
|
||||
for(var/obj/effect/blob/node/blob in orange(5))
|
||||
usr << "There is another node nearby, move more than 5 tiles away from it!"
|
||||
creating_blob = 0
|
||||
return
|
||||
for(var/obj/effect/blob/factory/blob in orange(2))
|
||||
usr << "There is a porus blob nearby, move more than 2 tiles away from it!"
|
||||
creating_blob = 0
|
||||
B.change_to("Node")
|
||||
src.dust()
|
||||
return
|
||||
|
||||
|
||||
@@ -121,30 +115,28 @@
|
||||
return
|
||||
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
|
||||
if(!B)
|
||||
usr << "There is no blob here!"
|
||||
usr << "You must be on a blob!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(B.blobtype != "Blob")
|
||||
usr << "Unable to use this blob, find another one."
|
||||
if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory))
|
||||
usr << "Unable to use this blob, find a normal one."
|
||||
creating_blob = 0
|
||||
return
|
||||
for(var/obj/effect/blob/blob in orange(2))//Not right next to nodes/cores
|
||||
if(blob.blobtype == "Node")
|
||||
if(istype(B,/obj/effect/blob/node))
|
||||
usr << "There is a node nearby, move away from it!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(blob.blobtype == "Core")
|
||||
if(istype(B,/obj/effect/blob/core))
|
||||
usr << "There is a core nearby, move away from it!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(blob.blobtype == "Factory")
|
||||
if(istype(B,/obj/effect/blob/factory))
|
||||
usr << "There is another porous blob nearby, move away from it!"
|
||||
creating_blob = 0
|
||||
return
|
||||
B.blobdebug = 3
|
||||
spawn(0)
|
||||
B.Life()
|
||||
src.gib()
|
||||
B.change_to("Factory")
|
||||
src.dust()
|
||||
return
|
||||
|
||||
|
||||
@@ -160,22 +152,22 @@
|
||||
return
|
||||
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
|
||||
if(!B)
|
||||
usr << "There is no blob here!"
|
||||
usr << "You must be on a blob!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(B.blobtype != "Factory")
|
||||
if(!istype(B,/obj/effect/blob/factory))
|
||||
usr << "Unable to use this blob, find another one."
|
||||
creating_blob = 0
|
||||
return
|
||||
B.revert()
|
||||
src.gib()
|
||||
B.change_to("Normal")
|
||||
src.dust()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/blob/verb/spawn_blob()
|
||||
set category = "Blob"
|
||||
set name = "Create new blob"
|
||||
set desc = "Attempts to create a new blob in this tile, note might not work."
|
||||
set desc = "Attempts to create a new blob in this tile."
|
||||
if(creating_blob) return
|
||||
var/turf/T = get_turf(src)
|
||||
creating_blob = 1
|
||||
@@ -187,16 +179,28 @@
|
||||
usr << "There is a blob here!"
|
||||
creating_blob = 0
|
||||
return
|
||||
if(prob(50))
|
||||
new/obj/effect/blob(src.loc)
|
||||
src << "\blue Success."
|
||||
else
|
||||
src << "\red Creation failed."
|
||||
src.gib()
|
||||
new/obj/effect/blob(src.loc)
|
||||
src.dust()
|
||||
return
|
||||
|
||||
|
||||
///mob/proc/Blobize()
|
||||
/client/proc/Blobcount()
|
||||
set category = "Debug"
|
||||
set name = "blobreport"
|
||||
set desc = "blob report."
|
||||
set hidden = 1
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(ticker && ticker.mode)
|
||||
src << "blobs: [blobs.len]"
|
||||
src << "cores: [blob_cores.len]"
|
||||
src << "nodes: [blob_nodes.len]"
|
||||
return
|
||||
|
||||
|
||||
/client/proc/Blobize()//Mostly stolen from the respawn command
|
||||
set category = "Debug"
|
||||
set name = "Ghostblob"
|
||||
@@ -211,14 +215,13 @@
|
||||
var/mob/dead/observer/G_found
|
||||
if(!input)
|
||||
var/list/ghosts = list()
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
ghosts += G
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
ghosts += G
|
||||
if(ghosts.len)
|
||||
G_found = pick(ghosts)
|
||||
|
||||
else
|
||||
for(var/mob/dead/observer/G in world)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client&&ckey(G.key)==ckey(input))
|
||||
G_found = G
|
||||
break
|
||||
@@ -230,10 +233,10 @@
|
||||
if(G_found.client)
|
||||
G_found.client.screen.len = null
|
||||
var/mob/living/blob/B = new/mob/living/blob(locate(0,0,1))//temp area also just in case should do this better but tired
|
||||
for(var/obj/effect/blob/core in world)
|
||||
if(blob_cores.len > 0)
|
||||
var/obj/effect/blob/core/core = pick(blob_cores)
|
||||
if(core)
|
||||
if(core.blobtype == "Core")
|
||||
B.loc = core.loc
|
||||
B.loc = core.loc
|
||||
B.ghost_name = G_found.real_name
|
||||
if (G_found.client)
|
||||
G_found.client.mob = B
|
||||
@@ -246,6 +249,5 @@
|
||||
B << "You have the power to create a new blob node that will help expand the blob."
|
||||
B << "To create this node you will have to be on a normal blob tile and far enough away from any other node."
|
||||
B << "Check your Blob verbs and hit Create Node to build a node."
|
||||
B << "NOTE: Create new blob will only work 50% of the time."
|
||||
spawn(10)
|
||||
del(G_found)
|
||||
|
||||
@@ -13,10 +13,19 @@
|
||||
|
||||
for(var/obj/item/clothing/mask/facehugger/facehugger in world)
|
||||
if(facehugger.stat == CONSCIOUS)
|
||||
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
|
||||
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = facehugger, icon_state = "facehugger_active")
|
||||
activeIndicator.override = 1
|
||||
if(client)
|
||||
client.images += activeIndicator
|
||||
|
||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
||||
return has_fine_manipulation
|
||||
return has_fine_manipulation
|
||||
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
else
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
@@ -8,11 +8,12 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("gibbed-a", animation)
|
||||
xgibs(loc, viruses)
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
@@ -28,11 +29,12 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("dust-a", animation)
|
||||
new /obj/effect/decal/remains/xeno(loc)
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
|
||||
@@ -14,7 +14,7 @@ Doesn't work on other aliens/AI.*/
|
||||
src << "\green Not enough plasma stored."
|
||||
return 0
|
||||
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
|
||||
src << "\green Weeds would not be able to survive here."
|
||||
src << "\green Bad place for a garden!"
|
||||
return 0
|
||||
else return 1
|
||||
|
||||
@@ -64,6 +64,7 @@ Doesn't work on other aliens/AI.*/
|
||||
if(isalien(M))
|
||||
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
|
||||
if (amount)
|
||||
amount = abs(round(amount))
|
||||
if(powerc(amount))
|
||||
if (get_dist(src,M) <= 1)
|
||||
M.adjustToxLoss(amount)
|
||||
@@ -82,131 +83,83 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
var/obj/effect/alien/acid/A = new(src.loc)
|
||||
A.target = src
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]!</B>"), 1)
|
||||
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!</B>"), 1)
|
||||
A.tick()
|
||||
|
||||
// This one is currently broken, however the other one isn't. And they both do the same thing. Weird.
|
||||
/*
|
||||
/mob/living/carbon/alien/humanoid/proc/corrode_target() //Aliens only see items on the list of objects that they can actually spit on./N
|
||||
set name = "Spit Corrosive Acid (200)"
|
||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrossive Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(200))//Check 1.
|
||||
var/list/xeno_target
|
||||
xeno_target = list("Abort Command")
|
||||
for(var/obj/O in view(1))
|
||||
if(!O.unacidable)
|
||||
xeno_target.Add(O)
|
||||
var/obj/A
|
||||
A = input("Corrode which target?", "Targets", A) in xeno_target
|
||||
if(!A == "Abort Command")
|
||||
if(powerc(200))//Check 2.
|
||||
if(A in view(1))//Check 3.
|
||||
adjustToxLoss(-200)
|
||||
A.acid(src)
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/verb/corrode(obj/O as anything in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
||||
set name = "Corrode with Acid (200)"
|
||||
set desc = "Drench an object in acid, destroying it over time."
|
||||
set category = "Alien"
|
||||
|
||||
if(istype(O, /obj))
|
||||
if(powerc(200))
|
||||
if(!O.unacidable)
|
||||
if(powerc(200))
|
||||
if(O in oview(1))
|
||||
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot dissolve this object."
|
||||
else
|
||||
adjustToxLoss(-200)
|
||||
O.acid()
|
||||
else//So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "\green You cannot destroy this object."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipes."
|
||||
set category = "Alien"
|
||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
||||
// return
|
||||
|
||||
if(powerc())
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
break
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
|
||||
if(vent_found)
|
||||
var/list/ventAreas = list() // A list of the areas of all the vents you can go to.
|
||||
var/list/vents = list() // The list of vent objects you can go to.
|
||||
if(vent_found.network && vent_found.network.normal_members.len)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc || temp_vent.loc.z != loc.z)
|
||||
continue
|
||||
if(temp_vent.welded)
|
||||
continue
|
||||
|
||||
vents.Add(temp_vent)
|
||||
|
||||
var/atom/a = get_turf(temp_vent)
|
||||
ventAreas.Add(a.loc)
|
||||
|
||||
|
||||
var/turf/startLoc = loc
|
||||
var/area/destArea = input("Select a destination.", "Duct System") in ventAreas
|
||||
var/destAreaIndex = ventAreas.Find(destArea)
|
||||
|
||||
if(loc==startLoc)
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[destAreaIndex]
|
||||
if(target_vent)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
// var/list/huggers = list()
|
||||
// for(var/obj/effect/alien/facehugger/F in view(3, src))
|
||||
// if(istype(F, /obj/effect/alien/facehugger))
|
||||
// huggers.Add(F)
|
||||
loc = vent_found
|
||||
|
||||
// for(var/obj/effect/alien/facehugger/F in huggers)
|
||||
// F.loc = vent_found
|
||||
var/travel_time = get_dist(loc, target_vent.loc)
|
||||
|
||||
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
|
||||
if(!target_vent.welded)
|
||||
for(var/mob/O in hearers(target_vent, null))
|
||||
O.show_message("You hear something crawling through the ventilation pipes.",2)
|
||||
|
||||
spawn(travel_time)
|
||||
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
|
||||
target_vent = vent_found //travel back. No additional time required.
|
||||
src << "\red The vent you were heading to appears to be welded."
|
||||
loc = target_vent.loc
|
||||
// for(var/obj/effect/alien/facehugger/F in huggers)
|
||||
// F.loc = loc
|
||||
|
||||
else
|
||||
src << "\green You need to remain still while entering a vent."
|
||||
else
|
||||
src << "\green This vent is not connected to anything."
|
||||
O.acid(src)
|
||||
else
|
||||
src << "\green You must be standing on or beside an open air vent to enter it."
|
||||
src << "\green Target is too far away."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
Paralyse(4)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
|
||||
return
|
||||
if(powerc(50))
|
||||
if(isalien(target))
|
||||
src << "\green Your allies are not a valid target."
|
||||
return
|
||||
adjustToxLoss(-50)
|
||||
src << "\green You spit neurotoxin at [target]."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [src] spits neurotoxin at [target]!"
|
||||
//I'm not motivated enough to revise this. Prjectile code in general needs update.
|
||||
var/turf/T = loc
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
|
||||
if(!U || !T)
|
||||
return
|
||||
while(U && !istype(U,/turf))
|
||||
U = U.loc
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(src, get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.process()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
set name = "Secrete Resin (100)"
|
||||
set desc = "Secrete tough malleable resin."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
if(!choice || !powerc(100)) return
|
||||
adjustToxLoss(-100)
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
switch(choice)
|
||||
if("resin door")
|
||||
new /obj/structure/mineral_door/resin(loc)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
return
|
||||
|
||||
@@ -5,17 +5,9 @@
|
||||
if(src.name == "alien drone")
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
|
||||
src.stand_icon = new /icon('alien.dmi', "aliend_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "aliend_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "aliend_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "aliend_running")
|
||||
src.icon = src.stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
add_to_mob_list(src)
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
@@ -30,26 +22,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
|
||||
|
||||
new_xeno.mind_initialize(src, "Queen")
|
||||
new_xeno.key = key
|
||||
new_xeno.UI = UI
|
||||
mind.transfer_to(new_xeno)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/verb/resinwall() // -- TLE
|
||||
set name = "Shape Resin (100)"
|
||||
set desc = "Produce a wall of resin that blocks entry and line of sight"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(100))
|
||||
adjustToxLoss(-100)
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as anything in list("resin wall","resin membrane") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
src << "\green You shape a [choice]."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
|
||||
switch(choice)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
return
|
||||
@@ -2,168 +2,80 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if(src.name == "alien hunter")
|
||||
src.name = text("alien hunter ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
|
||||
src.stand_icon = new /icon('alien.dmi', "alienh_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "alienh_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "alienh_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "alienh_running")
|
||||
src.icon = src.stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
add_to_mob_list(src)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
updatehealth()
|
||||
if (src.nodamage == 0)
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
src.health = 150 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
else
|
||||
src.health = 150
|
||||
src.stat = 0
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(150 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 150)
|
||||
src.healths.icon_state = "health1"
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 100)
|
||||
src.healths.icon_state = "health2"
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
src.healths.icon_state = "health3"
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
src.healths.icon_state = "health4"
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
src.healths.icon_state = "health5"
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
healths.icon_state = "health6"
|
||||
|
||||
|
||||
handle_environment()
|
||||
if(m_intent == "run" || resting)
|
||||
..()
|
||||
else
|
||||
adjustToxLoss(-heal_rate)
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 150)
|
||||
adjustToxLoss(5)
|
||||
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
//if (prob(10) && health) spawn(0) emote("snore") Invalid Emote
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (src.slurring) src.slurring--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
//Hunter verbs
|
||||
|
||||
/*
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/invis()
|
||||
set name = "Invisibility (50)"
|
||||
set desc = "Makes you invisible for 15 seconds"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
alien_invis = 1.0
|
||||
src << "\green You are now invisible."
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
|
||||
spawn(150)
|
||||
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
|
||||
alien_invis = 0.0
|
||||
src << "\green You are no longer invisible."
|
||||
if(alien_invis)
|
||||
update_icons()
|
||||
else
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
alien_invis = 1.0
|
||||
update_icons()
|
||||
src << "\green You are now invisible."
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
|
||||
spawn(250)
|
||||
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
|
||||
alien_invis = 0.0
|
||||
update_icons()
|
||||
src << "\green You are no longer invisible."
|
||||
return
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc())
|
||||
if(stomach_contents.len)
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
Paralyse(10)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
|
||||
return
|
||||
@@ -2,185 +2,33 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if(src.name == "alien sentinel")
|
||||
src.name = text("alien sentinel ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode
|
||||
src.stand_icon = new /icon('alien.dmi', "aliens_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "aliens_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "aliens_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "aliens_running")
|
||||
src.icon = src.stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
if(name == "alien sentinel")
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
add_to_mob_list(src)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
|
||||
updatehealth()
|
||||
if (src.nodamage == 0)
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
src.health = 125 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
else
|
||||
src.health = 125
|
||||
src.stat = 0
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(125 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 125)
|
||||
src.healths.icon_state = "health1"
|
||||
healths.icon_state = "health1"
|
||||
if(75 to 100)
|
||||
src.healths.icon_state = "health2"
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 75)
|
||||
src.healths.icon_state = "health3"
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
src.healths.icon_state = "health4"
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
src.healths.icon_state = "health5"
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 125)
|
||||
adjustToxLoss(10)
|
||||
|
||||
else
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
//if (prob(10) && health) spawn(0) emote("snore") Invalid Emote
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (src.slurring) src.slurring--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
//Sentinel verbs
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/verb/spit(mob/target as mob in oview())
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
if(isalien(target))
|
||||
src << "\green Your allies are not a valid target."
|
||||
return
|
||||
adjustToxLoss(-50)
|
||||
src << "\green You spit neurotoxin at [target]."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [src] spits neurotoxin at [target]!"
|
||||
//I'm not motivated enough to revise this. Prjectile code in general needs update.
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = (istype(target, /atom/movable) ? get_turf(target) : target)
|
||||
|
||||
if(!istype(T, /turf) || !istype(U,/turf))
|
||||
return
|
||||
|
||||
if (U == T)
|
||||
usr.bullet_act(src, src.get_organ_target())
|
||||
return
|
||||
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.fired()
|
||||
return
|
||||
healths.icon_state = "health6"
|
||||
|
||||
@@ -1,34 +1,16 @@
|
||||
/mob/living/carbon/alien/humanoid/death(gibbed)
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(src.healths)
|
||||
src.healths.icon_state = "health6"
|
||||
src.stat = 2
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health6"
|
||||
stat = DEAD
|
||||
|
||||
if (!gibbed)
|
||||
// emote("deathgasp") // Dead -- Skie // Doesn't work due to stat == 2 -- Urist
|
||||
playsound(src.loc, 'hiss6.ogg', 80, 1, 1)
|
||||
if(!gibbed)
|
||||
playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
src.canmove = 0
|
||||
if(src.client)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
if (src.key)
|
||||
spawn(10)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
if (mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
else src << "We seem to have misplaced your mind datum, so we can't add this to your memory, but you died at [tod]"
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/alien/humanoid/emote(var/act)
|
||||
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -6,6 +6,8 @@
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if("sign")
|
||||
@@ -31,6 +33,10 @@
|
||||
if (!muzzled)
|
||||
message = "<B>The [src.name]</B> roars."
|
||||
m_type = 2
|
||||
if("hiss")
|
||||
if(!muzzled)
|
||||
message = "<B>The [src.name]</B> hisses."
|
||||
m_type = 2
|
||||
if("tail")
|
||||
message = "<B>The [src.name]</B> waves its tail."
|
||||
m_type = 1
|
||||
@@ -90,34 +96,16 @@
|
||||
Paralyse(2)
|
||||
message = text("<B>[]</B> collapses!", src)
|
||||
m_type = 2
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if("help")
|
||||
src << "burp, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if (act == "roar")
|
||||
playsound(src.loc, 'hiss5.ogg', 40, 1, 1)
|
||||
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
|
||||
if (act == "deathgasp")
|
||||
playsound(src.loc, 'hiss6.ogg', 80, 1, 1)
|
||||
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -39,62 +34,24 @@
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "help" ? "help_small_active" : "help_small")
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "disarm" ? "disarm_small_active" : "disarm_small")
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "grab" ? "grab_small_active" : "grab_small")
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm_small_active" : "harm_small")
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi_old
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
@@ -102,21 +59,21 @@
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Lower hud bar
|
||||
using.dir = EAST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Corner Button
|
||||
using.dir = NORTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
@@ -125,7 +82,7 @@
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = WEST
|
||||
using.screen_loc = ui_iarrowleft
|
||||
@@ -134,7 +91,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowright"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
@@ -144,9 +101,9 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "drop"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton_old
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -154,67 +111,77 @@
|
||||
|
||||
//equippable shit
|
||||
//suit
|
||||
using = new src.h_type( src )
|
||||
using.name = "o_clothing"
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_alien_oclothing
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_alien_oclothing
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//r hand
|
||||
using = new src.h_type( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.layer = 19
|
||||
src.r_hand_hud_object = inv_box
|
||||
inv_box.slot_id = slot_r_hand
|
||||
src.adding += inv_box
|
||||
|
||||
//l hand
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.dir = EAST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.layer = 19
|
||||
inv_box.slot_id = slot_l_hand
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
//pocket 1
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage1"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "pocket"
|
||||
using.screen_loc = ui_storage1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//pocket 2
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage2"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "pocket"
|
||||
using.screen_loc = ui_storage2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//head
|
||||
using = new src.h_type( src )
|
||||
using.name = "head"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "hair"
|
||||
using.screen_loc = ui_alien_head
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hair"
|
||||
inv_box.screen_loc = ui_alien_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
//end of equippable shit
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
@@ -223,7 +190,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
@@ -232,7 +199,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
@@ -241,7 +208,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
@@ -250,7 +217,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
@@ -258,52 +225,50 @@
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.throw_icon = new /obj/screen(null)
|
||||
mymob.throw_icon.icon = 'screen1_alien.dmi'
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw_old
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = 'screen1_alien.dmi'
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
mymob.oxygen.screen_loc = ui_alien_oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = 'screen1_alien.dmi'
|
||||
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
mymob.toxin.screen_loc = ui_alien_toxin
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire.icon = 'screen1_alien.dmi'
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
mymob.fire.screen_loc = ui_alien_fire
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths.icon = 'screen1_alien.dmi'
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = 'screen1_alien.dmi'
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_old
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = 'screen1_alien.dmi'
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = 'screen1_alien.dmi'
|
||||
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
@@ -311,31 +276,29 @@
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = 'screen1_alien.dmi'
|
||||
mymob.hands.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.hands.icon_state = "hand"
|
||||
mymob.hands.name = "hand"
|
||||
mymob.hands.screen_loc = ui_hand
|
||||
mymob.hands.dir = NORTH
|
||||
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'screen1_alien.dmi'
|
||||
mymob.sleep.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
mymob.sleep.name = "sleep"
|
||||
mymob.sleep.screen_loc = ui_sleep
|
||||
|
||||
mymob.rest = new /obj/screen( null )
|
||||
mymob.rest.icon = 'screen1_alien.dmi'
|
||||
mymob.rest.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
*/
|
||||
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
|
||||
@@ -6,24 +6,8 @@
|
||||
if(name == "alien")
|
||||
name = text("alien ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
spawn (1)
|
||||
if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
|
||||
stand_icon = new /icon('alien.dmi', "alien_s")
|
||||
lying_icon = new /icon('alien.dmi', "alien_l")
|
||||
resting_icon = new /icon('alien.dmi', "alienh_sleep")
|
||||
running_icon = new /icon('alien.dmi', "alienh_running")
|
||||
icon = stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/mind_initialize(mob/G, alien_caste)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Alien"
|
||||
mind.special_role = alien_caste
|
||||
mind.key = G.key
|
||||
|
||||
//This is fine, works the same as a human
|
||||
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
|
||||
spawn( 0 )
|
||||
@@ -88,16 +72,17 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
|
||||
// if (stat == 2 && client)
|
||||
// gib()
|
||||
// return
|
||||
if (stat == 2 && client)
|
||||
gib()
|
||||
return
|
||||
|
||||
// else if (stat == 2 && !client)
|
||||
// xgibs(loc, viruses)
|
||||
// del(src)
|
||||
// return
|
||||
else if (stat == 2 && !client)
|
||||
xgibs(loc, viruses)
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/shielded = 0
|
||||
|
||||
@@ -148,80 +133,6 @@
|
||||
|
||||
return
|
||||
|
||||
//unequip
|
||||
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
|
||||
if (W == wear_suit)
|
||||
wear_suit = null
|
||||
else if (W == head)
|
||||
head = null
|
||||
else if (W == r_store)
|
||||
r_store = null
|
||||
else if (W == l_store)
|
||||
l_store = null
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
else if (W == l_hand)
|
||||
l_hand = null
|
||||
|
||||
/mob/living/carbon/alien/humanoid/db_click(text, t1)
|
||||
var/obj/item/W = equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if ((!emptyHand) && (!istype(W, /obj/item)))
|
||||
return
|
||||
if (emptyHand)
|
||||
usr.next_move = usr.prev_move
|
||||
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
|
||||
switch(text)
|
||||
|
||||
//if emptyhand then wear the suit, no bedsheet clothes for the alien
|
||||
|
||||
if("o_clothing")
|
||||
if (wear_suit)
|
||||
if (emptyHand)
|
||||
wear_suit.DblClick()
|
||||
return
|
||||
/* if (!( istype(W, /obj/item/clothing/suit) ))
|
||||
return
|
||||
u_equip(W)
|
||||
wear_suit = W
|
||||
W.equipped(src, text)
|
||||
*/
|
||||
if("head")
|
||||
if (head)
|
||||
if (emptyHand)
|
||||
head.DblClick()
|
||||
return
|
||||
if (( istype(W, /obj/effect/alien/head) ))
|
||||
u_equip(W)
|
||||
head = W
|
||||
return
|
||||
return
|
||||
/* if (!( istype(W, /obj/item/clothing/head) ))
|
||||
return
|
||||
u_equip(W)
|
||||
head = W
|
||||
W.equipped(src, text)
|
||||
*/
|
||||
if("storage1")
|
||||
if (l_store)
|
||||
if (emptyHand)
|
||||
l_store.DblClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
|
||||
return
|
||||
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 > 3))
|
||||
return
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
else
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
@@ -239,7 +150,7 @@
|
||||
return 0
|
||||
|
||||
if (restrained())
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
@@ -252,7 +163,7 @@
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
@@ -261,7 +172,7 @@
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
@@ -286,21 +197,21 @@
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/t = M.pulling
|
||||
M.pulling = null
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.pulling = t
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window))
|
||||
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
@@ -310,169 +221,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
overlays = null
|
||||
|
||||
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 (zone_sel)
|
||||
zone_sel.overlays = null
|
||||
zone_sel.overlays += damageicon_standing
|
||||
zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting))
|
||||
|
||||
if (lying)
|
||||
if(update_icon)
|
||||
if(!resting)
|
||||
icon = lying_icon
|
||||
else
|
||||
icon = resting_icon
|
||||
|
||||
else if(!lying)
|
||||
if(update_icon)
|
||||
if(m_intent == "run")
|
||||
icon = running_icon
|
||||
else
|
||||
icon = stand_icon
|
||||
|
||||
overlays += damageicon_lying
|
||||
|
||||
if (face_lying)
|
||||
overlays += face_lying
|
||||
else
|
||||
if(update_icon)
|
||||
icon = stand_icon
|
||||
|
||||
overlays += damageicon_standing
|
||||
|
||||
if (face_standing)
|
||||
overlays += face_standing
|
||||
|
||||
// Uniform
|
||||
if (client)
|
||||
client.screen -= hud_used.other
|
||||
client.screen -= hud_used.intents
|
||||
client.screen -= hud_used.mov_int
|
||||
|
||||
// ???
|
||||
if (client && other)
|
||||
client.screen += hud_used.other
|
||||
|
||||
|
||||
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)
|
||||
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" = 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" = B_SUIT_LAYER)
|
||||
else
|
||||
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)
|
||||
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
|
||||
|
||||
// Head
|
||||
if (head)
|
||||
var/t1 = head.item_state
|
||||
if (!t1)
|
||||
t1 = head.icon_state
|
||||
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" = B_HEAD_LAYER)
|
||||
head.screen_loc = ui_alien_head
|
||||
|
||||
if (l_store)
|
||||
l_store.screen_loc = ui_storage1
|
||||
|
||||
if (r_store)
|
||||
r_store.screen_loc = ui_storage2
|
||||
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
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" = 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" = 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(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else if (shielded == 2 || alien_invis)
|
||||
invisibility = 2
|
||||
//New stealth. Hopefully doesn't lag too much. /N
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
else
|
||||
invisibility = 0
|
||||
if(targeted_by && target_locked)
|
||||
overlays += target_locked
|
||||
else if(targeted_by)
|
||||
target_locked = new /obj/effect/target_locked(src)
|
||||
overlays += target_locked
|
||||
else if(!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
last_b_state = stat
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -511,7 +259,7 @@
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
@@ -584,6 +332,8 @@
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
@@ -647,37 +397,22 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
if ("hurt")
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
attack_verb = "slash"
|
||||
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH
|
||||
damage += 14
|
||||
@@ -686,12 +421,10 @@
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
|
||||
Weaken(1,5)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
@@ -700,31 +433,28 @@
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] []!</B>", M, src), 1)
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
|
||||
if ("disarm")
|
||||
if (!lying)
|
||||
if (prob(5))//Very small chance to push an alien down.
|
||||
Weaken(2)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
|
||||
else
|
||||
if (prob(50))
|
||||
drop_item()
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
|
||||
@@ -749,8 +479,7 @@ In all, this is a lot like the monkey code. /N
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if(!sleeping_willingly)
|
||||
sleeping = max(0,sleeping-5)
|
||||
sleeping = max(0,sleeping-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
@@ -761,7 +490,7 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
@@ -800,11 +529,12 @@ In all, this is a lot like the monkey code. /N
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/updatehealth()
|
||||
if (nodamage == 0)
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
health = 100 - getOxyLoss() - getFireLoss() - getBruteLoss()
|
||||
if(nodamage)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = 100
|
||||
stat = 0
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//unequip
|
||||
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
|
||||
if (W == wear_suit)
|
||||
wear_suit = null
|
||||
update_inv_wear_suit(0)
|
||||
else if (W == head)
|
||||
head = null
|
||||
update_inv_head(0)
|
||||
else if (W == r_store)
|
||||
r_store = null
|
||||
update_inv_pockets(0)
|
||||
else if (W == l_store)
|
||||
l_store = null
|
||||
update_inv_pockets(0)
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand(0)
|
||||
else if (W == l_hand)
|
||||
l_hand = null
|
||||
update_inv_l_hand(0)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
|
||||
var/obj/item/W = get_active_hand()
|
||||
if(W)
|
||||
if(!istype(W)) return
|
||||
switch(text)
|
||||
// if("o_clothing")
|
||||
// if("head")
|
||||
if("storage1")
|
||||
if(l_store)
|
||||
return
|
||||
if(W.w_class > 3)
|
||||
return
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
update_inv_pockets()
|
||||
if("storage2")
|
||||
if(r_store)
|
||||
return
|
||||
if(W.w_class > 3)
|
||||
return
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
update_inv_pockets()
|
||||
else
|
||||
switch(text)
|
||||
if("o_clothing")
|
||||
if(wear_suit) wear_suit.attack_alien(src)
|
||||
if("head")
|
||||
if(head) head.attack_alien(src)
|
||||
if("storage1")
|
||||
if(l_store) l_store.attack_alien(src)
|
||||
if("storage2")
|
||||
if(r_store) r_store.attack_alien(src)
|
||||
@@ -12,14 +12,12 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if (src.stat != 2) //still breathing
|
||||
|
||||
|
||||
if (stat != DEAD) //still breathing
|
||||
|
||||
//First, resolve location and get a breath
|
||||
|
||||
@@ -32,558 +30,510 @@
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
src.blinded = null
|
||||
blinded = null
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
//Update mind
|
||||
update_mind()
|
||||
//handle_virus_updates() There is no disease that affects aliens
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
proc
|
||||
clamp_values()
|
||||
|
||||
SetStunned(min(stunned, 20))
|
||||
SetParalysis(min(paralysis, 20))
|
||||
SetWeakened(min(weakened, 20))
|
||||
sleeping = max(min(sleeping, 20), 0)
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustFireLoss(0)
|
||||
proc/handle_disabilities()
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 10))
|
||||
src << "\red You have a seizure!"
|
||||
Paralyse(10)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
|
||||
handle_disabilities()
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if (src.disabilities & 2)
|
||||
if ((prob(1) && src.paralysis < 10 && src.r_epil < 1))
|
||||
src << "\red You have a seizure!"
|
||||
Paralyse(10)
|
||||
if (src.disabilities & 4)
|
||||
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
|
||||
src.drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (src.disabilities & 8)
|
||||
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (src.disabilities & 16)
|
||||
if (prob(10))
|
||||
src.stuttering = max(10, src.stuttering)
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || prob(50))
|
||||
switch(getFireLoss())
|
||||
if(1 to 50)
|
||||
adjustFireLoss(-1)
|
||||
if(51 to 100)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
update_mind()
|
||||
if(!mind && client)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Hunter"
|
||||
mind.key = key
|
||||
if ((HULK in mutations) && health <= 25)
|
||||
mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if(src.getFireLoss())
|
||||
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 ((HULK in src.mutations) && src.health <= 25)
|
||||
src.mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if (src.radiation)
|
||||
if (src.radiation > 100)
|
||||
src.radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
if (src.radiation < 0)
|
||||
src.radiation = 0
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
switch(src.radiation)
|
||||
if(1 to 49)
|
||||
src.radiation--
|
||||
if(prob(25))
|
||||
src.adjustToxLoss(1)
|
||||
src.updatehealth()
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
src.radiation -= 2
|
||||
src.adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
src.radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
src.updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
src.radiation -= 3
|
||||
src.adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
src.updatehealth()
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
|
||||
|
||||
breathe()
|
||||
if(src.reagents)
|
||||
if(src.reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
proc/breathe()
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(src.health < 0)
|
||||
src.losebreath++
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
src.losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = 0
|
||||
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
|
||||
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
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
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = 0
|
||||
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
|
||||
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
handle_breath(breath)
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
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(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
get_breath_from_internal(volume_needed)
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (!contents.Find(src.internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (src.internals)
|
||||
src.internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (src.internals)
|
||||
src.internals.icon_state = "internal0"
|
||||
return null
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled) canmove = 0
|
||||
else canmove = 1
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
return
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(src.nodamage)
|
||||
return
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
//Aliens breathe in vaccuum
|
||||
return 0
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
//Aliens breathe in vaccuum
|
||||
return 0
|
||||
var/toxins_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
var/toxins_used = 0
|
||||
var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
//Partial pressure of the toxins in our breath
|
||||
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
|
||||
|
||||
//Partial pressure of the toxins in our breath
|
||||
var/Toxins_pp = (breath.toxins/breath.total_moles)*breath_pressure
|
||||
if(Toxins_pp) // Detect toxins in air
|
||||
|
||||
if(Toxins_pp) // Detect toxins in air
|
||||
adjustToxLoss(breath.toxins*250)
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
|
||||
adjustToxLoss(breath.toxins*250)
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
toxins_used = breath.toxins
|
||||
|
||||
toxins_used = breath.toxins
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
//Breathe in toxins and out oxygen
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
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)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= maxHealth)
|
||||
adjustToxLoss(plasma_rate)
|
||||
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
//Breathe in toxins and out oxygen
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
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)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 100)
|
||||
adjustToxLoss(15)
|
||||
|
||||
else
|
||||
adjustBruteLoss(-15)
|
||||
adjustFireLoss(-15)
|
||||
adjustBruteLoss(-heal_rate)
|
||||
adjustFireLoss(-heal_rate)
|
||||
adjustOxyLoss(-heal_rate)
|
||||
|
||||
|
||||
|
||||
adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
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)
|
||||
return temp_change
|
||||
proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
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)
|
||||
return temp_change
|
||||
|
||||
get_thermal_protection()
|
||||
var/thermal_protection = 1.0
|
||||
//Handle normal clothing
|
||||
if(head && (head.body_parts_covered & HEAD))
|
||||
thermal_protection += 0.5
|
||||
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO))
|
||||
thermal_protection += 0.5
|
||||
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.flags & SUITSPACE))
|
||||
thermal_protection += 3
|
||||
if(COLD_RESISTANCE in src.mutations)
|
||||
thermal_protection += 5
|
||||
/*
|
||||
proc/get_thermal_protection()
|
||||
var/thermal_protection = 1.0
|
||||
//Handle normal clothing
|
||||
if(head && (head.body_parts_covered & HEAD))
|
||||
thermal_protection += 0.5
|
||||
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO))
|
||||
thermal_protection += 0.5
|
||||
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.flags & SUITSPACE))
|
||||
thermal_protection += 3
|
||||
if(COLD_RESISTANCE in mutations)
|
||||
thermal_protection += 5
|
||||
|
||||
return thermal_protection
|
||||
return thermal_protection
|
||||
|
||||
add_fire_protection(var/temp)
|
||||
var/fire_prot = 0
|
||||
if(head)
|
||||
if(head.protective_temperature > temp)
|
||||
fire_prot += (head.protective_temperature/10)
|
||||
if(wear_mask)
|
||||
if(wear_mask.protective_temperature > temp)
|
||||
fire_prot += (wear_mask.protective_temperature/10)
|
||||
if(wear_suit)
|
||||
if(wear_suit.protective_temperature > temp)
|
||||
fire_prot += (wear_suit.protective_temperature/10)
|
||||
proc/add_fire_protection(var/temp)
|
||||
var/fire_prot = 0
|
||||
if(head)
|
||||
if(head.protective_temperature > temp)
|
||||
fire_prot += (head.protective_temperature/10)
|
||||
if(wear_mask)
|
||||
if(wear_mask.protective_temperature > temp)
|
||||
fire_prot += (wear_mask.protective_temperature/10)
|
||||
if(wear_suit)
|
||||
if(wear_suit.protective_temperature > temp)
|
||||
fire_prot += (wear_suit.protective_temperature/10)
|
||||
|
||||
|
||||
return fire_prot
|
||||
return fire_prot
|
||||
*/
|
||||
|
||||
handle_chemicals_in_body()
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
/* if(src.nutrition > 500 && !(FAT in src.mutations))
|
||||
if(prob(5 + round((src.nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
src.mutations.Add(FAT)
|
||||
// update_body()
|
||||
if (src.nutrition < 100 && (FAT in src.mutations))
|
||||
if(prob(round((50 - src.nutrition) / 100)))
|
||||
if(FAT in mutations)
|
||||
if(nutrition < 100)
|
||||
if(prob(round((50 - nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
src.mutations.Remove(FAT)
|
||||
// update_body()
|
||||
*/
|
||||
if (src.nutrition > 0)
|
||||
src.nutrition -= HUNGER_FACTOR
|
||||
mutations.Remove(FAT)
|
||||
else
|
||||
if(nutrition > 500)
|
||||
if(prob(5 + round((nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(FAT)
|
||||
|
||||
if (src.drowsyness)
|
||||
src.drowsyness--
|
||||
src.eye_blurry = max(2, src.eye_blurry)
|
||||
if (prob(5))
|
||||
src.sleeping += 1
|
||||
src.Paralyse(5)
|
||||
if (nutrition > 0)
|
||||
nutrition -= HUNGER_FACTOR
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
src.updatehealth()
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
|
||||
return //TODO: DEFERRED
|
||||
updatehealth()
|
||||
|
||||
handle_regular_status_updates()
|
||||
return //TODO: DEFERRED
|
||||
|
||||
health = 100 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(src.sleeping)
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
//if (prob(10) && health) emote("snore") //Invalid emote for aliens, but it might be worth making sleep noticeable somehow -Yvarov
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (src.slurring) src.slurring--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || (XRAY in src.mutations))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
else if (src.stat != 2)
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 4
|
||||
src.see_invisible = 2
|
||||
|
||||
if (src.sleep)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
|
||||
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
src.healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
src.healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
src.healths.icon_state = "health4"
|
||||
else
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
|
||||
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
proc/handle_regular_hud_updates()
|
||||
|
||||
src.client.screen -= src.hud_used.blurry
|
||||
src.client.screen -= src.hud_used.druggy
|
||||
src.client.screen -= src.hud_used.vimpaired
|
||||
if (stat == 2 || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if ((src.blind && src.stat != 2))
|
||||
if ((src.blinded))
|
||||
src.blind.layer = 18
|
||||
else
|
||||
src.blind.layer = 0
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (src.disabilities & 1)
|
||||
src.client.screen += src.hud_used.vimpaired
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if (src.eye_blurry)
|
||||
src.client.screen += src.hud_used.blurry
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
if (src.druggy)
|
||||
src.client.screen += src.hud_used.druggy
|
||||
|
||||
if (src.stat != 2)
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
return 1
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
|
||||
handle_virus_updates()
|
||||
if(src.bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && src.stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.adjustBruteLoss(5)
|
||||
src.nutrition += 10
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
@@ -1,106 +1,7 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
update_hud()
|
||||
if(!isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
/*
|
||||
src.throw_icon = new /obj/screen(null)
|
||||
src.oxygen = new /obj/screen( null )
|
||||
src.i_select = new /obj/screen( null )
|
||||
src.m_select = new /obj/screen( null )
|
||||
src.toxin = new /obj/screen( null )
|
||||
src.internals = new /obj/screen( null )
|
||||
src.mach = new /obj/screen( null )
|
||||
src.fire = new /obj/screen( null )
|
||||
src.bodytemp = new /obj/screen( null )
|
||||
src.healths = new /obj/screen( null )
|
||||
src.pullin = new /obj/screen( null )
|
||||
src.blind = new /obj/screen( null )
|
||||
src.flash = new /obj/screen( null )
|
||||
src.hands = new /obj/screen( null )
|
||||
src.sleep = new /obj/screen( null )
|
||||
src.rest = new /obj/screen( null )
|
||||
src.zone_sel = new /obj/screen/zone_sel( null )
|
||||
|
||||
update_clothing()
|
||||
|
||||
src.mach.dir = NORTH
|
||||
|
||||
src.throw_icon.icon_state = "act_throw_off"
|
||||
src.oxygen.icon_state = "oxy0"
|
||||
src.i_select.icon_state = "selector"
|
||||
src.m_select.icon_state = "selector"
|
||||
src.toxin.icon_state = "toxin0"
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
src.internals.icon_state = "internal0"
|
||||
src.mach.icon_state = null
|
||||
src.fire.icon_state = "fire0"
|
||||
src.healths.icon_state = "health0"
|
||||
src.pullin.icon_state = "pull0"
|
||||
src.blind.icon_state = "black"
|
||||
src.hands.icon_state = "hand"
|
||||
src.flash.icon_state = "blank"
|
||||
src.sleep.icon_state = "sleep0"
|
||||
src.rest.icon_state = "rest0"
|
||||
|
||||
src.hands.dir = NORTH
|
||||
|
||||
src.throw_icon.name = "throw"
|
||||
src.oxygen.name = "oxygen"
|
||||
src.i_select.name = "intent"
|
||||
src.m_select.name = "moving"
|
||||
src.toxin.name = "toxin"
|
||||
src.bodytemp.name = "body temperature"
|
||||
src.internals.name = "internal"
|
||||
src.mach.name = "Reset Machine"
|
||||
src.fire.name = "fire"
|
||||
src.healths.name = "health"
|
||||
src.pullin.name = "pull"
|
||||
src.blind.name = " "
|
||||
src.hands.name = "hand"
|
||||
src.flash.name = "flash"
|
||||
src.sleep.name = "sleep"
|
||||
src.rest.name = "rest"
|
||||
|
||||
src.throw_icon.screen_loc = "9,1"
|
||||
src.oxygen.screen_loc = "15,12"
|
||||
src.i_select.screen_loc = "14:-11,15"
|
||||
src.m_select.screen_loc = "14:-11,14"
|
||||
src.toxin.screen_loc = "15,10"
|
||||
src.internals.screen_loc = "15,14"
|
||||
src.mach.screen_loc = "14,1"
|
||||
src.fire.screen_loc = "15,8"
|
||||
src.bodytemp.screen_loc = "15,6"
|
||||
src.healths.screen_loc = "15,5"
|
||||
src.sleep.screen_loc = "15,3"
|
||||
src.rest.screen_loc = "15,2"
|
||||
src.pullin.screen_loc = "15,1"
|
||||
src.hands.screen_loc = "1,3"
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
src.flash.screen_loc = "1,1 to 15,15"
|
||||
|
||||
src.blind.layer = 0
|
||||
src.flash.layer = 17
|
||||
|
||||
src.client.screen.len = null
|
||||
src.client.screen -= list( src.throw_icon, src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.bodytemp, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen += list( src.throw_icon, src.zone_sel, src.oxygen, src.i_select, src.m_select, src.toxin, src.bodytemp, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach )
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen += src.hud_used.adding
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
|
||||
*/
|
||||
@@ -2,34 +2,22 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
//there should only be one queen
|
||||
// if(src.name == "alien")
|
||||
// src.name = text("alien ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
||||
src.stand_icon = new /icon('alien.dmi', "queen_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "queen_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "queen_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "queen_running")
|
||||
src.icon = src.stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
//there should only be one queen
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
|
||||
if(Q == src) continue
|
||||
if(Q.stat == DEAD) continue
|
||||
if(Q.client)
|
||||
name = "alien princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
verbs -= /mob/living/carbon/alien/verb/ventcrawl
|
||||
add_to_mob_list(src)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
|
||||
updatehealth()
|
||||
if (src.nodamage == 0)
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
else
|
||||
src.health = 250
|
||||
src.stat = 0
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
@@ -52,107 +40,12 @@
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 250)
|
||||
adjustToxLoss(20)
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 250 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
//if (prob(10) && health) spawn(0) emote("snore") Invalid Emote
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(health < config.health_threshold_dead || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (src.slurring) src.slurring--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
//Queen verbs
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (200)"
|
||||
set desc = "Plants an egg"
|
||||
set name = "Lay Egg (50)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/egg) in get_turf(src))
|
||||
@@ -160,8 +53,8 @@
|
||||
return
|
||||
|
||||
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-200)
|
||||
adjustToxLoss(-50)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
return
|
||||
return
|
||||
@@ -0,0 +1,129 @@
|
||||
//Xeno Overlays Indexes//////////
|
||||
#define X_HEAD_LAYER 1
|
||||
#define X_SUIT_LAYER 2
|
||||
#define X_L_HAND_LAYER 3
|
||||
#define X_R_HAND_LAYER 4
|
||||
#define X_TOTAL_LAYERS 4
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
var/list/overlays_lying[X_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[X_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
if(lying)
|
||||
if(resting) icon_state = "alien[caste]_sleep"
|
||||
else icon_state = "alien[caste]_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
if(m_intent == "run") icon_state = "alien[caste]_running"
|
||||
else icon_state = "alien[caste]_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
||||
..()
|
||||
if (monkeyizing) return
|
||||
|
||||
update_inv_head(0)
|
||||
update_inv_wear_suit(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_pockets(0)
|
||||
update_hud()
|
||||
update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_hud()
|
||||
//TODO
|
||||
if (client)
|
||||
// if(other) client.screen |= hud_used.other //Not used
|
||||
// else client.screen -= hud_used.other //Not used
|
||||
client.screen |= contents
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_wear_suit(var/update_icons=1)
|
||||
if(wear_suit)
|
||||
var/t_state = wear_suit.item_state
|
||||
if(!t_state) t_state = wear_suit.icon_state
|
||||
var/image/lying = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_suit = "suit"
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor) )
|
||||
t_suit = "armor"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood")
|
||||
|
||||
//TODO
|
||||
wear_suit.screen_loc = ui_alien_oclothing
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
|
||||
overlays_lying[X_SUIT_LAYER] = lying
|
||||
overlays_standing[X_SUIT_LAYER] = standing
|
||||
else
|
||||
overlays_lying[X_SUIT_LAYER] = null
|
||||
overlays_standing[X_SUIT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_head(var/update_icons=1)
|
||||
if (head)
|
||||
var/t_state = head.item_state
|
||||
if(!t_state) t_state = head.icon_state
|
||||
var/image/lying = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
|
||||
if(head.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
head.screen_loc = ui_alien_head
|
||||
overlays_lying[X_HEAD_LAYER] = lying
|
||||
overlays_standing[X_HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_lying[X_HEAD_LAYER] = null
|
||||
overlays_standing[X_HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_pockets(var/update_icons=1)
|
||||
if(l_store) l_store.screen_loc = ui_storage1
|
||||
if(r_store) r_store.screen_loc = ui_storage2
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
r_hand.screen_loc = ui_rhand
|
||||
overlays_standing[X_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
l_hand.screen_loc = ui_lhand
|
||||
overlays_standing[X_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
//Xeno Overlays Indexes//////////
|
||||
#undef X_HEAD_LAYER
|
||||
#undef X_SUIT_LAYER
|
||||
#undef X_L_HAND_LAYER
|
||||
#undef X_R_HAND_LAYER
|
||||
#undef X_TOTAL_LAYERS
|
||||
@@ -1,37 +1,15 @@
|
||||
/mob/living/carbon/alien/larva/death(gibbed)
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(src.healths)
|
||||
src.healths.icon_state = "health6"
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health6"
|
||||
stat = DEAD
|
||||
icon_state = "larva_l"
|
||||
|
||||
/*
|
||||
if(istype(src,/mob/living/carbon/alien/larva/metroid))
|
||||
src.icon_state = "metroid_dead"
|
||||
*/
|
||||
else
|
||||
src.icon_state = "larva_l"
|
||||
src.stat = 2
|
||||
if(!gibbed)
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
if (!gibbed)
|
||||
|
||||
src.canmove = 0
|
||||
if(src.client)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
|
||||
if (src.client)
|
||||
spawn(10)
|
||||
if(src.client && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
if(mind) // Skie - Added check that there's someone controlling the alien
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
mind.store_memory("Time of death: [tod]", 0)
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
living_mob_list -= src
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/alien/larva/emote(var/act)
|
||||
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -6,6 +6,8 @@
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if("sign")
|
||||
@@ -87,30 +89,12 @@
|
||||
Paralyse(2)
|
||||
message = text("<B>[]</B> collapses!", src)
|
||||
m_type = 2
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if("help")
|
||||
src << "burp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper"
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
|
||||
@@ -44,7 +40,7 @@
|
||||
using = new src.h_type( src )
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
@@ -54,9 +50,9 @@
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_acti
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
@@ -64,21 +60,21 @@
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Lower hud bar
|
||||
using.dir = EAST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Corner Button
|
||||
using.dir = NORTHWEST
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
@@ -87,7 +83,7 @@
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = WEST
|
||||
using.screen_loc = ui_iarrowleft
|
||||
@@ -96,7 +92,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowright"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
@@ -105,7 +101,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
@@ -115,7 +111,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
@@ -124,7 +120,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
@@ -133,7 +129,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
@@ -142,7 +138,7 @@
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
@@ -150,47 +146,46 @@
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = 'screen1_alien.dmi'
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
mymob.oxygen.screen_loc = ui_alien_oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = 'screen1_alien.dmi'
|
||||
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
mymob.toxin.screen_loc = ui_alien_toxin
|
||||
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire.icon = 'screen1_alien.dmi'
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
mymob.fire.screen_loc = ui_alien_fire
|
||||
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths.icon = 'screen1_alien.dmi'
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin.icon = 'screen1_alien.dmi'
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_old
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = 'screen1_alien.dmi'
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = 'screen1_alien.dmi'
|
||||
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
@@ -198,13 +193,13 @@
|
||||
|
||||
/*
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'screen1_alien.dmi'
|
||||
mymob.sleep.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
mymob.sleep.name = "sleep"
|
||||
mymob.sleep.screen_loc = ui_sleep
|
||||
|
||||
mymob.rest = new /obj/screen( null )
|
||||
mymob.rest.icon = 'screen1_alien.dmi'
|
||||
mymob.rest.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
@@ -212,7 +207,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
//can't unequip since it can't equip anything
|
||||
/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj)
|
||||
return
|
||||
@@ -4,21 +4,11 @@
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if(name == "alien larva")
|
||||
name = text("alien larva ([rand(1, 1000)])")
|
||||
name = "alien larva ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
spawn (1)
|
||||
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
|
||||
regenerate_icons()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/larva/proc/mind_initialize(mob/G, alien_caste)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Alien"
|
||||
mind.special_role = alien_caste
|
||||
mind.key = G.key
|
||||
|
||||
//This is fine, works the same as a human
|
||||
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
@@ -29,12 +19,10 @@
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
/*
|
||||
if(prob(70))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
*/
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
@@ -77,8 +65,9 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
/*
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
|
||||
if (stat == 2 && client)
|
||||
gib()
|
||||
return
|
||||
@@ -87,7 +76,7 @@
|
||||
gibs(loc, viruses)
|
||||
del(src)
|
||||
return
|
||||
*/
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
@@ -140,12 +129,9 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
//can't unequip since it can't equip anything
|
||||
/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj)
|
||||
return
|
||||
|
||||
//can't equip anything
|
||||
/mob/living/carbon/alien/larva/db_click(text, t1)
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/meteorhit(O as obj)
|
||||
@@ -173,7 +159,7 @@
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
@@ -182,7 +168,7 @@
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
@@ -207,15 +193,15 @@
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/t = M.pulling
|
||||
M.pulling = null
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.pulling = t
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
@@ -225,46 +211,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
|
||||
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 (alien_invis)
|
||||
invisibility = 2
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -296,6 +242,8 @@
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -320,7 +268,7 @@
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
@@ -413,36 +361,22 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
attack_verb = "slash"
|
||||
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
damage += 5
|
||||
@@ -451,14 +385,10 @@
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has [attack_verb]ed []!</B>", M, src), 1)
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
if (damage > 4.9)
|
||||
Weaken(rand(10,15))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
@@ -467,13 +397,10 @@
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] []!</B>", M, src), 1)
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
@@ -490,8 +417,7 @@
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if(!sleeping_willingly)
|
||||
sleeping = max(0,sleeping-5)
|
||||
sleeping = max(0,sleeping-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
@@ -502,7 +428,7 @@
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
@@ -535,16 +461,6 @@
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/updatehealth()
|
||||
if (nodamage == 0)
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
health = 25 - getOxyLoss() - getFireLoss() - getBruteLoss()
|
||||
else
|
||||
health = 25
|
||||
stat = 0
|
||||
|
||||
|
||||
/* Commented out because it's duplicated in life.dm
|
||||
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
|
||||
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.
|
||||
|
||||
@@ -17,18 +17,21 @@
|
||||
|
||||
..()
|
||||
|
||||
if (stat != 2) //still breathing
|
||||
|
||||
if (stat != DEAD) //still breathing
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
spawn(0) breathe()
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
@@ -36,481 +39,402 @@
|
||||
//to find it.
|
||||
blinded = null
|
||||
|
||||
//Mind update
|
||||
update_mind()
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
//handle_virus_updates() There is no disease that affects larva
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
//handle_stomach()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
proc
|
||||
clamp_values()
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
SetStunned(min(stunned, 20))
|
||||
SetParalysis(min(paralysis, 20))
|
||||
SetWeakened(min(weakened, 20))
|
||||
sleeping = max(min(sleeping, 20), 0)
|
||||
//grow!! but not if metroid or dead
|
||||
if(health>-100 && amount_grown < 200)
|
||||
amount_grown++
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if(amount_grown == 200)
|
||||
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
|
||||
src << "\green There are three to choose from:"
|
||||
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
||||
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
||||
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
||||
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Hunter")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/hunter (loc)
|
||||
if("Sentinel")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel (loc)
|
||||
if("Drone")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone (loc)
|
||||
|
||||
new_xeno.mind_initialize(src, alien_caste)
|
||||
new_xeno.key = key
|
||||
|
||||
del(src)
|
||||
return
|
||||
//grow!! but not if metroid or dead
|
||||
if(health>-100)
|
||||
amount_grown++
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
update_mind()
|
||||
if(!mind && client)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Larva"
|
||||
mind.key = key
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
breathe()
|
||||
proc/breathe()
|
||||
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = 0
|
||||
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
|
||||
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
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
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = 0
|
||||
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
|
||||
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
handle_breath(breath)
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
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(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
get_breath_from_internal(volume_needed)
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled) canmove = 0
|
||||
else canmove = 1
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
//Aliens breathe in vaccuum
|
||||
return 0
|
||||
|
||||
var/toxins_used = 0
|
||||
var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the toxins in our breath
|
||||
var/Toxins_pp = (breath.toxins/breath.total_moles)*breath_pressure
|
||||
|
||||
if(Toxins_pp) // Detect toxins in air
|
||||
|
||||
adjustToxLoss(breath.toxins*250)
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
|
||||
toxins_used = breath.toxins
|
||||
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
//Breathe in toxins and out oxygen
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
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)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 25)
|
||||
adjustToxLoss(5)
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
//Aliens breathe in vaccuum
|
||||
return 0
|
||||
|
||||
handle_chemicals_in_body()
|
||||
var/toxins_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
//Partial pressure of the toxins in our breath
|
||||
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
|
||||
|
||||
/* if(nutrition > 500 && !(FAT in src.mutations))
|
||||
if(prob(5 + round((nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(FAT)
|
||||
// update_body()
|
||||
if (nutrition < 100 && (FAT in src.mutations))
|
||||
if(Toxins_pp) // Detect toxins in air
|
||||
|
||||
adjustToxLoss(breath.toxins*250)
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
|
||||
toxins_used = breath.toxins
|
||||
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
//Breathe in toxins and out oxygen
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
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)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 25)
|
||||
adjustToxLoss(5)
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
return
|
||||
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(FAT in mutations)
|
||||
if(nutrition < 100)
|
||||
if(prob(round((50 - nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations.Add(FAT)
|
||||
// update_body()
|
||||
*/
|
||||
if (nutrition > 0)
|
||||
nutrition-= HUNGER_FACTOR
|
||||
else
|
||||
if(nutrition > 500)
|
||||
if(prob(5 + round((nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(FAT)
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
if (nutrition > 0)
|
||||
nutrition-= HUNGER_FACTOR
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
updatehealth()
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
|
||||
return //TODO: DEFERRED
|
||||
updatehealth()
|
||||
|
||||
handle_regular_status_updates()
|
||||
return //TODO: DEFERRED
|
||||
|
||||
health = 25 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
if(sleeping)
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
//if (prob(10) && health) spawn(0) emote("snore") Invalid Emote
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(resting)
|
||||
Weaken(5)
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(health < config.health_threshold_crit)
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (stat != 2) //Alive.
|
||||
|
||||
if (paralysis || stunned || weakened) //Stunned etc.
|
||||
if (stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
stat = 0
|
||||
if (weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
lying = 1
|
||||
stat = 0
|
||||
if (paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
lying = 1
|
||||
stat = 1
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
|
||||
else //Not stunned.
|
||||
lying = 0
|
||||
stat = 0
|
||||
|
||||
else //Dead.
|
||||
lying = 1
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
stat = 2
|
||||
|
||||
if (stuttering) stuttering--
|
||||
if (slurring) slurring--
|
||||
|
||||
if (eye_blind)
|
||||
eye_blind--
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
if (ear_deaf > 0) ear_deaf--
|
||||
if (ear_damage < 25)
|
||||
ear_damage -= 0.05
|
||||
ear_damage = max(ear_damage, 0)
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
density = !( lying )
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if ((disabilities & 128))
|
||||
blinded = 1
|
||||
if ((disabilities & 32))
|
||||
ear_deaf = 1
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if (eye_blurry > 0)
|
||||
eye_blurry--
|
||||
eye_blurry = max(0, eye_blurry)
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if (druggy > 0)
|
||||
druggy--
|
||||
druggy = max(0, druggy)
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
return 1
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 4
|
||||
see_invisible = 2
|
||||
|
||||
if (src.sleep)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
proc/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
return 1
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
handle_random_events()
|
||||
return
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_random_events()
|
||||
return
|
||||
|
||||
proc/handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
@@ -1,12 +1,3 @@
|
||||
/mob/living/carbon/alien/larva/Login()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
|
||||
@@ -1,47 +1,3 @@
|
||||
/mob/living/carbon/alien/larva/verb/ventcrawl() // -- TLE
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Alien"
|
||||
|
||||
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
|
||||
// return
|
||||
if(powerc())
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "\green You need to remain still while entering a vent."
|
||||
else
|
||||
src << "\green This vent is not connected to anything."
|
||||
else
|
||||
src << "\green You must be standing on or beside an air vent to enter it."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/verb/hide()
|
||||
set name = "Hide"
|
||||
@@ -59,4 +15,33 @@
|
||||
src << text("\green You have stopped hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("[] slowly peaks up from the ground...", src)
|
||||
O << text("[] slowly peaks up from the ground...", src)
|
||||
|
||||
/mob/living/carbon/alien/larva/verb/evolve()
|
||||
set name = "Evolve"
|
||||
set desc = "Evolve into a fully grown Alien."
|
||||
set category = "Alien"
|
||||
|
||||
if(amount_grown >= 200) //TODO ~Carn
|
||||
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
|
||||
src << "\green There are three to choose from:"
|
||||
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
||||
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
||||
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
||||
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
||||
|
||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Hunter")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(loc)
|
||||
if("Sentinel")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
|
||||
if("Drone")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
|
||||
new_xeno.UI = UI
|
||||
if(mind) mind.transfer_to(new_xeno)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
src << "\red You are not fully grown."
|
||||
return
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//No special icons processing
|
||||
@@ -0,0 +1,5 @@
|
||||
/mob/living/carbon/alien/verb/ventcrawl() // -- TLE
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Alien"
|
||||
handle_ventcrawl()
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
/mob/living/carbon/alien/say(var/message)
|
||||
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if (length(message) >= 2)
|
||||
if (copytext(message, 1, 3) == ":a")
|
||||
message = copytext(message, 3)
|
||||
@@ -35,7 +38,7 @@
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
for (var/mob/living/S in world)
|
||||
for (var/mob/living/S in player_list)
|
||||
if(!S.stat)
|
||||
if(S.alien_talk_understand)
|
||||
if(S.alien_talk_understand == alien_talk_understand)
|
||||
@@ -69,7 +72,7 @@
|
||||
|
||||
rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1)
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/special/chryssalid
|
||||
name = "Chryssalid"
|
||||
desc = "The crab-like claws of this creature are a powerful weapon in close combat. The high metabolism and strength of this creature give it speed and dexterity. Instead of killing its victim it impregnates it with an egg and injects a neurotoxin which turns it into a mindless drone. A new Chryssalid will burst from the victim shortly after impregnation. Chryssalids are associated with the Snakeman race. "
|
||||
xcom_state = "chryssalid"
|
||||
has_fine_manipulation = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/tank/jetpack/jetpack = new(src)
|
||||
jetpack.on = !(jetpack.on)
|
||||
back = jetpack
|
||||
return
|
||||
|
||||
// bullet_act(flags)
|
||||
// take_overall_damage(15,0)
|
||||
// return
|
||||
|
||||
movement_delay()
|
||||
return -5
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
|
||||
weakened = 0
|
||||
stunned = 0
|
||||
paralysis = 0
|
||||
|
||||
if(health < -100 || src.brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(src.health < 0)
|
||||
|
||||
if(!src.reagents.has_reagent("plasma")) src.oxyloss++
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
src.paralysis = max(src.paralysis, 5)
|
||||
|
||||
if(stat == 2)
|
||||
lying = 1
|
||||
|
||||
src.density = !(src.lying )
|
||||
|
||||
return 1
|
||||
|
||||
updatehealth()
|
||||
src.health = 200 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
|
||||
xcom_attack(mob/living/carbon/human/target as mob)
|
||||
if(!ishuman(target))
|
||||
return
|
||||
if(target.stat != 2 || !target.client)
|
||||
target.take_overall_damage(20,0)
|
||||
target.visible_message(pick(
|
||||
"\red <b>[src] tears at [target]!</b>",
|
||||
"\red <b>[src] stabs [target] with it's claws!</b>",
|
||||
"\red <b>[src] slashes [target] with it's claws!</b>"))
|
||||
else
|
||||
if(target.client)
|
||||
target.client.mob = new/mob/living/carbon/alien/humanoid/special/chryssalid(src.loc)
|
||||
target.gib()
|
||||
..()
|
||||
@@ -1,54 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/special/etheral
|
||||
name = "Etheral"
|
||||
desc = "The apparently weak physical abilities of this creature are sustained by its mental powers. We do not understand how these telekinetic powers work, since they seem to defy the laws of physics as we know them. "
|
||||
xcom_state = "ethereal"
|
||||
has_fine_manipulation = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/tank/jetpack/jetpack = new(src)
|
||||
jetpack.on = !(jetpack.on)
|
||||
back = jetpack
|
||||
|
||||
mutations |= 1
|
||||
|
||||
spawn(2)
|
||||
name = "Etheral"
|
||||
real_name = "Etheral"
|
||||
return
|
||||
|
||||
movement_delay()
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise()
|
||||
set name = "Psionic Demoralisation"
|
||||
set desc = "Confuses and disorients all humanoids in a small radius."
|
||||
set category = "Etheral"
|
||||
|
||||
if(stat)
|
||||
return
|
||||
|
||||
visible_message("<b>[src]</b> appears to emit strange throbbing waves.")
|
||||
|
||||
for(var/mob/living/carbon/M in view(3, src))
|
||||
if(M == src)
|
||||
continue
|
||||
if(M.confused <= 10)
|
||||
M.confused = 10
|
||||
if(M.eye_blurry <= 10)
|
||||
M.eye_blurry = 10
|
||||
M.drop_item()
|
||||
M << "\red <b>SCREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE</b>"
|
||||
M << "You clutch your head in agony as your vision blurs and you succumb to disorientation."
|
||||
|
||||
verbs -= /mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise
|
||||
spawn(300)
|
||||
verbs += /mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise
|
||||
|
||||
return
|
||||
|
||||
/atom/attack_alien(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/humanoid/special/etheral))
|
||||
attack_ai(user)
|
||||
return
|
||||
..()
|
||||
@@ -1,11 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/special/floater
|
||||
name = "Floater"
|
||||
desc = "These aliens are capable or flight through space and shit"
|
||||
xcom_state = "floater"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/tank/jetpack/jetpack = new(src)
|
||||
jetpack.on = !(jetpack.on)
|
||||
back = jetpack
|
||||
return
|
||||
@@ -1,4 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/special/muton
|
||||
name = "Muton"
|
||||
desc = "This humanoid creature is physically powerful and intelligent. They have a particular appetite for consuming raw flesh of any kind, which they need for sustenance like earth based carnivores. "
|
||||
xcom_state = "muton"
|
||||
@@ -1,4 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/special/sectoid
|
||||
name = "Sectoid"
|
||||
desc = "The Sectoid hierarchy ranges from soldiers to leaders with powerful psionic abilities. These psionic powers can be used to demoralise opponents in combat, or even take control of their minds."
|
||||
xcom_state = "sectoid"
|
||||
@@ -137,7 +137,7 @@
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
@@ -203,10 +203,10 @@
|
||||
var/SA_para_min = 0.5
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the O2 in our breath
|
||||
var/O2_pp = (breath.oxygen/breath.total_moles)*breath_pressure
|
||||
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
|
||||
if(O2_pp < safe_oxygen_min) // Too little oxygen
|
||||
if(prob(20))
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = (SA.moles/breath.total_moles)*breath_pressure
|
||||
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/mmi
|
||||
name = "Man-Machine Interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
|
||||
icon = 'assemblies.dmi'
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "mmi_empty"
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
@@ -12,7 +12,7 @@
|
||||
var/construction_time = 75
|
||||
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
|
||||
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
req_access = list(access_robotics)
|
||||
|
||||
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
|
||||
|
||||
@@ -33,16 +33,9 @@
|
||||
O:brainmob = null
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
brainmob.verbs -= /mob/proc/ghost
|
||||
brainmob.stat = 0
|
||||
|
||||
// force re-entering corpse
|
||||
if (!brainmob.client)
|
||||
for(var/mob/dead/observer/ghost in world)
|
||||
if(ghost.corpse == brainmob && ghost.client)
|
||||
ghost.cancel_camera()
|
||||
ghost.reenter_corpse()
|
||||
break
|
||||
dead_mob_list -= brainmob//Update dem lists
|
||||
living_mob_list += brainmob
|
||||
|
||||
user.drop_item()
|
||||
del(O)
|
||||
@@ -51,6 +44,9 @@
|
||||
icon_state = "mmi_full"
|
||||
|
||||
locked = 1
|
||||
|
||||
feedback_inc("cyborg_mmis_filled",1)
|
||||
|
||||
return
|
||||
|
||||
if((istype(O,/obj/item/weapon/card/id)||istype(O,/obj/item/device/pda)) && brainmob)
|
||||
@@ -75,8 +71,8 @@
|
||||
var/obj/item/brain/brain = new(user.loc)
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
living_mob_list -= brainmob//Get outta here
|
||||
brain.brainmob = brainmob//Set the brain to use the brainmob
|
||||
brainmob.verbs += /mob/proc/ghost
|
||||
brainmob = null//Set mmi brainmob var to null
|
||||
|
||||
icon_state = "mmi_empty"
|
||||
@@ -89,7 +85,6 @@
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
brainmob.container = src
|
||||
brainmob.verbs -= /mob/proc/ghost
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
@@ -134,3 +129,16 @@
|
||||
|
||||
radio.listening = radio.listening==1 ? 0 : 1
|
||||
brainmob << "\blue Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast."
|
||||
|
||||
/obj/item/device/mmi/emp_act(severity)
|
||||
if(!brainmob)
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
brainmob.emp_damage += rand(20,30)
|
||||
if(2)
|
||||
brainmob.emp_damage += rand(10,20)
|
||||
if(3)
|
||||
brainmob.emp_damage += rand(0,10)
|
||||
..()
|
||||
@@ -1,8 +1,10 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/brain
|
||||
var/obj/item/container = null
|
||||
var/timeofhostdeath = 0
|
||||
var/emp_damage = 0//Handles a type of MMI damage
|
||||
var/alert = null
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
@@ -11,37 +13,41 @@
|
||||
..()
|
||||
|
||||
Del()
|
||||
if(key)//If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=2)//If not dead.
|
||||
death(1)//Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
ghostize(1)//Ghostize checks for key so nothing else is necessary. (1) tells that it the original body will be destroyed.
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
..()
|
||||
|
||||
say_understands(var/other)
|
||||
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
|
||||
if (istype(other, /mob/living/silicon/ai))
|
||||
return 1
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/decoy))
|
||||
return 1
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/pai))
|
||||
return 1
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/robot))
|
||||
return 1
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human/tajaran))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/brain/Login()
|
||||
..()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (!container || !istype(container, /obj/item/device/mmi))
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
/mob/living/carbon/brain/update_canmove()
|
||||
if(in_contents_of(/obj/mecha)) canmove = 1
|
||||
else canmove = 0
|
||||
return canmove
|
||||
@@ -1,24 +1,43 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
|
||||
for(var/mob/O in viewers(container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
container.icon_state = "mmi_dead"
|
||||
stat = 2
|
||||
|
||||
if(blind)
|
||||
blind.layer = 0
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
stat = DEAD
|
||||
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
store_memory("Time of death: [tod]", 0)
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0) //mind. ?
|
||||
|
||||
if (key)
|
||||
spawn(50)
|
||||
if(key && stat == 2)
|
||||
ghost()
|
||||
return ..(gibbed)
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/brain/gib()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
// flick("gibbed-m", animation)
|
||||
gibs(loc, viruses, dna)
|
||||
|
||||
dead_mob_list -= src
|
||||
if(container && istype(container, /obj/item/device/mmi))
|
||||
del(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/brain))
|
||||
del(loc)//Gets rid of the brain item
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
@@ -0,0 +1,62 @@
|
||||
/mob/living/carbon/brain/emote(var/act,var/m_type=1,var/message = null)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes
|
||||
return
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
switch(act)
|
||||
if ("alarm")
|
||||
src << "You sound an alarm."
|
||||
message = "<B>[src]</B> sounds an alarm."
|
||||
m_type = 2
|
||||
if ("alert")
|
||||
src << "You let out a distressed noise."
|
||||
message = "<B>[src]</B> lets out a distressed noise."
|
||||
m_type = 2
|
||||
if ("notice")
|
||||
src << "You play a loud tone."
|
||||
message = "<B>[src]</B> plays a loud tone."
|
||||
m_type = 2
|
||||
if ("flash")
|
||||
message = "The lights on <B>[src]</B> flash quickly."
|
||||
m_type = 1
|
||||
if ("blink")
|
||||
message = "<B>[src]</B> blinks."
|
||||
m_type = 1
|
||||
if ("whistle")
|
||||
src << "You whistle."
|
||||
message = "<B>[src]</B> whistles."
|
||||
m_type = 2
|
||||
if ("beep")
|
||||
src << "You beep."
|
||||
message = "<B>[src]</B> beeps."
|
||||
m_type = 2
|
||||
if ("boop")
|
||||
src << "You boop."
|
||||
message = "<B>[src]</B> boops."
|
||||
m_type = 2
|
||||
if ("help")
|
||||
src << "alarm,alert,notice,flash,blink,whistle,beep,boop"
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers, and new_players
|
||||
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src.loc, null))
|
||||
O.show_message(message, m_type)
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
|
||||
/obj/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
//ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
blurry = new h_type( src )
|
||||
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -19,9 +19,8 @@
|
||||
druggy.mouse_opacity = 0
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
@@ -1,324 +1,295 @@
|
||||
/mob/living/carbon/brain
|
||||
/mob/living/carbon/brain/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
..()
|
||||
|
||||
Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
..()
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(loc)
|
||||
environment = loc.return_air()
|
||||
//Disease Check
|
||||
//handle_virus_updates() There is no disease that affects brains
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
blinded = null
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
blinded = null
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
|
||||
|
||||
proc
|
||||
|
||||
clamp_values()
|
||||
|
||||
AdjustParalysis(0)
|
||||
AdjustStunned(0)
|
||||
AdjustWeakened(0)
|
||||
adjustBruteLoss(0)
|
||||
adjustFireLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustToxLoss(0)
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
// emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
|
||||
update_canmove()
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
else
|
||||
canmove = 0
|
||||
return
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(loc, /turf/space))
|
||||
environment_heat_capacity = loc:heat_capacity
|
||||
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient
|
||||
|
||||
transfer_coefficient = 1
|
||||
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
|
||||
transfer_coefficient *= wear_mask.heat_transfer_coefficient
|
||||
|
||||
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(nodamage) return
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
|
||||
|
||||
handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(getOxyLoss() > 25) Paralyse(3)
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(5)
|
||||
if (prob(1) && health) spawn(0) emote("snore")
|
||||
|
||||
if(resting)
|
||||
Weaken(5)
|
||||
|
||||
if(stat != 2 && (!container && (health < config.health_threshold_dead || (config.revival_brain_life >= 0 && ((world.time - timeofhostdeath) > config.revival_brain_life )))))
|
||||
death()
|
||||
else if(health < config.health_threshold_crit)
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (stat != 2) //Alive.
|
||||
|
||||
if (paralysis || stunned || weakened) //Stunned etc.
|
||||
if (stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
stat = 0
|
||||
if (weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
lying = 1
|
||||
stat = 0
|
||||
if (paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
lying = 1
|
||||
stat = 1
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
|
||||
else //Not stunned.
|
||||
lying = 0
|
||||
stat = 0
|
||||
|
||||
else //Dead.
|
||||
lying = 1
|
||||
blinded = 1
|
||||
stat = 2
|
||||
|
||||
if (stuttering) stuttering--
|
||||
if (slurring) slurring--
|
||||
|
||||
if (eye_blind)
|
||||
eye_blind--
|
||||
blinded = 1
|
||||
|
||||
if (ear_deaf > 0) ear_deaf--
|
||||
if (ear_damage < 25)
|
||||
ear_damage -= 0.05
|
||||
ear_damage = max(ear_damage, 0)
|
||||
|
||||
// density = !( lying )
|
||||
|
||||
if (disabilities & 128)
|
||||
blinded = 1
|
||||
if (disabilities & 32)
|
||||
ear_deaf = 1
|
||||
|
||||
if (eye_blurry > 0)
|
||||
eye_blurry--
|
||||
eye_blurry = max(0, eye_blurry)
|
||||
|
||||
if (druggy > 0)
|
||||
druggy--
|
||||
druggy = max(0, druggy)
|
||||
|
||||
return 1
|
||||
handle_regular_status_updates()
|
||||
update_canmove()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = 0
|
||||
|
||||
if (src.sleep)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
/mob/living/carbon/brain/
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
if(!container)//If it's not in an MMI
|
||||
src << "\red You feel weak."
|
||||
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
|
||||
src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(!container)
|
||||
src << "\red You feel weak."
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED."
|
||||
updatehealth()
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
if (!src.hud_used)
|
||||
src.hud_used = new/obj/hud(src)
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 409)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
environment_heat_capacity = heat_turf.heat_capacity
|
||||
|
||||
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
|
||||
var/transfer_coefficient = 1
|
||||
|
||||
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
|
||||
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(nodamage) return
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
proc/handle_regular_status_updates() //TODO: comment out the unused bits >_>
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
|
||||
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
|
||||
switch(emp_damage)
|
||||
if(31 to INFINITY)
|
||||
emp_damage = 30//Let's not overdo it
|
||||
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
|
||||
eye_blind = 1
|
||||
blinded = 1
|
||||
ear_deaf = 1
|
||||
silent = 1
|
||||
if(!alert)//Sounds an alarm, but only once per 'level'
|
||||
emote("alarm")
|
||||
src << "\red Major electrical distruption detected: System rebooting."
|
||||
alert = 1
|
||||
if(prob(75))
|
||||
emp_damage -= 1
|
||||
if(20)
|
||||
alert = 0
|
||||
blinded = 0
|
||||
eye_blind = 0
|
||||
ear_deaf = 0
|
||||
silent = 0
|
||||
emp_damage -= 1
|
||||
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
|
||||
eye_blurry = 1
|
||||
ear_damage = 1
|
||||
if(!alert)
|
||||
emote("alert")
|
||||
src << "\red Primary systems are now online."
|
||||
alert = 1
|
||||
if(prob(50))
|
||||
emp_damage -= 1
|
||||
if(10)
|
||||
alert = 0
|
||||
eye_blurry = 0
|
||||
ear_damage = 0
|
||||
emp_damage -= 1
|
||||
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
|
||||
if(!alert)
|
||||
emote("notice")
|
||||
src << "\red System reboot nearly complete."
|
||||
alert = 1
|
||||
if(prob(25))
|
||||
emp_damage -= 1
|
||||
if(1)
|
||||
alert = 0
|
||||
src << "\red All systems restored."
|
||||
emp_damage -= 1
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_virus_updates()
|
||||
if(bodytemperature > 409)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
/*/mob/living/carbon/brain/emp_act(severity)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
emp_damage += rand(20,30)
|
||||
if(2)
|
||||
emp_damage += rand(10,20)
|
||||
if(3)
|
||||
emp_damage += rand(0,10)
|
||||
..()*/
|
||||
@@ -0,0 +1,2 @@
|
||||
/mob/living/carbon/brain/Login()
|
||||
return ..()
|
||||
@@ -1,4 +1,15 @@
|
||||
/mob/living/carbon/brain/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
else ..()
|
||||
else
|
||||
if(prob(emp_damage*4))
|
||||
if(prob(10))//10% chane to drop the message entirely
|
||||
return
|
||||
else
|
||||
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
|
||||
..()
|
||||
else
|
||||
..()
|
||||
@@ -5,34 +5,37 @@
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
/* if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
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))
|
||||
for(var/mob/M in hearers(4, src))
|
||||
if(M.client)
|
||||
M.show_message(text("\red You hear something rumbling inside [src]'s stomach..."), 2)
|
||||
var/obj/item/I = user.equipped()
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if(I && I.force)
|
||||
var/d = rand(round(I.force / 4), I.force)
|
||||
if(ishuman(src))
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/organ = H.get_organ("chest")
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
H.UpdateDamageIcon()
|
||||
if(temp.take_damage(d, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
else
|
||||
src.take_organ_damage(d)
|
||||
for(var/mob/M in viewers(user, null))
|
||||
if(M.client)
|
||||
M.show_message(text("\red <B>[user] attacks [src]'s stomach wall with the [I.name]!"), 2)
|
||||
playsound(user.loc, 'attackblob.ogg', 50, 1)
|
||||
playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
|
||||
if(prob(src.getBruteLoss() - 50))
|
||||
for(var/atom/movable/A in stomach_contents)
|
||||
A.loc = loc
|
||||
stomach_contents.Remove(A)
|
||||
src.gib()
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
@@ -46,19 +49,6 @@
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
@@ -97,18 +87,6 @@
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
@@ -149,7 +127,7 @@
|
||||
shock_damage *= siemens_coeff
|
||||
if (shock_damage<1)
|
||||
return 0
|
||||
src.take_overall_damage(0,shock_damage,"Electrocution")
|
||||
src.take_overall_damage(0,shock_damage)
|
||||
//src.burn_skin(shock_damage)
|
||||
//src.adjustFireLoss(shock_damage) //burn_skin will do this for us
|
||||
//src.updatehealth()
|
||||
@@ -200,15 +178,15 @@
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health > config.health_threshold_crit)
|
||||
if (src.health > 0)
|
||||
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)
|
||||
visible_message("\blue [src] examines [get_visible_gender() == MALE ? "himself" : get_visible_gender() == FEMALE ? "herself" : "themselves"].", \
|
||||
"\blue You check yourself for injuries.", \
|
||||
"You hear a rustle, as someone checks about their person.")
|
||||
var/mob/living/carbon/human/H = src
|
||||
src.visible_message( \
|
||||
text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \
|
||||
"\blue You check yourself for injuries." \
|
||||
)
|
||||
|
||||
for(var/datum/organ/external/org in damaged)
|
||||
for(var/datum/organ/external/org in H.organs)
|
||||
var/status = ""
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
@@ -221,11 +199,9 @@
|
||||
if(brutedamage > 0)
|
||||
status = "bruised"
|
||||
if(brutedamage > 20)
|
||||
status = "blugeoned"
|
||||
status = "bleeding"
|
||||
if(brutedamage > 40)
|
||||
status = "mangled"
|
||||
if(org.status & ORGAN_BLEEDING && brutedamage)
|
||||
status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]"
|
||||
if(brutedamage > 0 && burndamage > 0)
|
||||
status += " and "
|
||||
if(burndamage > 40)
|
||||
@@ -235,106 +211,117 @@
|
||||
status += "blistered"
|
||||
else if(burndamage > 0)
|
||||
status += "numb"
|
||||
if(org.status & ORGAN_DESTROYED)
|
||||
status = "MISSING!"
|
||||
|
||||
if(status == "")
|
||||
status = "OK"
|
||||
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)
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
M.visible_message( \
|
||||
"\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
|
||||
"\blue [M] shakes [src] trying to wake [t_him] up!", \
|
||||
"\blue You shake [src] trying to wake [t_him] up!", \
|
||||
)
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
|
||||
// in a coma from logitis!
|
||||
/mob/living/carbon/Logout()
|
||||
..()
|
||||
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
|
||||
// Stop! ... Hammertime! ~Carn
|
||||
|
||||
if(!src.sleeping && !src.admin_observing) // would be exploited by stoxin'd people otherwise ;)
|
||||
// (also make admins set-observing not sleep)
|
||||
src.sleeping = 1
|
||||
src.sleeping_willingly = 1
|
||||
/mob/living/carbon/proc/getDNA()
|
||||
return dna
|
||||
|
||||
/mob/living/carbon/Login()
|
||||
..()
|
||||
/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
|
||||
dna = newDNA
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
|
||||
|
||||
if(!stat)
|
||||
if(!lying)
|
||||
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents[0]
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
var/turf/T = get_turf(temp_vent)
|
||||
|
||||
if(!T || T.z != loc.z)
|
||||
continue
|
||||
|
||||
var/i = 1
|
||||
var/index = "[T.loc.name]\[[i]\]"
|
||||
while(index in vents)
|
||||
i++
|
||||
index = "[T.loc.name]\[[i]\]"
|
||||
vents[index] = temp_vent
|
||||
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
|
||||
if(!selection) return
|
||||
if(loc==startloc)
|
||||
if(contents.len)
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||
if(target_vent)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent
|
||||
|
||||
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
|
||||
|
||||
spawn(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
for(var/mob/O in hearers(target_vent,null))
|
||||
O.show_message("You hear something squeezing through the ventilation ducts.",2)
|
||||
|
||||
sleep(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
|
||||
target_vent = vent_found //travel back. No additional time required.
|
||||
src << "\red The vent you were heading to appears to be welded."
|
||||
loc = target_vent.loc
|
||||
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
else
|
||||
src << "This vent is not connected to anything."
|
||||
|
||||
else
|
||||
src << "You must be standing on or beside an air vent to enter it."
|
||||
|
||||
else
|
||||
src << "You can't vent crawl while you're stunned!"
|
||||
|
||||
src.admin_observing = 0
|
||||
if(src.sleeping_willingly)
|
||||
src.sleeping = 0
|
||||
src.sleeping_willingly = 0
|
||||
/* // Update the hands-indicator on re-join.
|
||||
if (!( src.hand ))
|
||||
src.hands.dir = NORTH
|
||||
else
|
||||
src.hands.dir = SOUTH
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/GetOrgans()
|
||||
var/list/L = list( )
|
||||
for(var/t in organs)
|
||||
if (istype(organs[text("[]", t)], /datum/organ/external))
|
||||
L += organs[text("[]", t)]
|
||||
return L
|
||||
|
||||
/mob/living/carbon/proc/UpdateDamage()
|
||||
|
||||
if (!(istype(src, /mob/living/carbon/human))) //Added by Strumpetplaya - Invincible Monkey Fix
|
||||
return //Possibly helps with other invincible mobs like Aliens?
|
||||
var/list/L = list( )
|
||||
for(var/t in organs)
|
||||
if (istype(organs[text("[]", t)], /datum/organ/external))
|
||||
L += organs[text("[]", t)]
|
||||
bruteloss = 0
|
||||
fireloss = 0
|
||||
for(var/datum/organ/external/O in L)
|
||||
bruteloss += O.get_damage_brute()
|
||||
fireloss += O.get_damage_fire()
|
||||
src << "You must be conscious to do this!"
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/check_dna()
|
||||
dna.check_integrity(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(O.name == zone)
|
||||
return O
|
||||
return null
|
||||
|
||||
/mob/living/carbon/proc/drip()
|
||||
|
||||
/mob/living/carbon/proc/vomit()
|
||||
// only humanoids and monkeys can vomit
|
||||
if(!istype(src,/mob/living/carbon/human) && !istype(src,/mob/living/carbon/monkey))
|
||||
return
|
||||
|
||||
// Make the human vomit on the floor
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
|
||||
playsound(src.loc, 'splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
nutrition -= 20
|
||||
adjustToxLoss(-3)
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/mob/living/carbon
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("gibbed-h", animation)
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("dust-h", animation)
|
||||
@@ -40,77 +40,49 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(halloss > 0 && (!gibbed))
|
||||
//hallucination = 0
|
||||
if(halloss > 0 && !gibbed)
|
||||
halloss = 0
|
||||
// And the suffocation was a hallucination (lazy)
|
||||
//oxyloss = 0
|
||||
updatehealth()
|
||||
return
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(src.healths)
|
||||
src.healths.icon_state = "health5"
|
||||
src.stat = 2
|
||||
src.dizziness = 0
|
||||
src.jitteriness = 0
|
||||
src.sleeping = 0
|
||||
src.sleeping_willingly = 0
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health5"
|
||||
stat = DEAD
|
||||
dizziness = 0
|
||||
jitteriness = 0
|
||||
|
||||
tension_master.death(src)
|
||||
|
||||
if (!gibbed)
|
||||
if(!gibbed)
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD
|
||||
|
||||
//For ninjas exploding when they die./N
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized )
|
||||
src << browse(null, "window=spideros")//Just in case.
|
||||
var/turf/location = get_turf(src)
|
||||
var/location = loc
|
||||
explosion(location, 1, 2, 3, 4)
|
||||
|
||||
canmove = 0
|
||||
if(src.client)
|
||||
src.blind.layer = 0
|
||||
lying = 1
|
||||
var/h = src.hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
//This is where the suicide assemblies checks would go
|
||||
|
||||
if (client)
|
||||
spawn(10)
|
||||
if(client && src.stat == 2)
|
||||
verbs += /mob/proc/ghost
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
if(mind)
|
||||
mind.store_memory("Time of death: [tod]", 0)
|
||||
// sql_report_death(src)
|
||||
|
||||
//Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
ticker.mode.check_win()
|
||||
//Traitor's dead! Oh no!
|
||||
if (ticker.mode.name == "traitor" && src.mind && src.mind.special_role == "traitor")
|
||||
message_admins("\red Traitor [key_name_admin(src)] has died.")
|
||||
log_game("Traitor [key_name(src)] has died.")
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
sql_report_death(src)
|
||||
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
if(HUSK in src.mutations)
|
||||
return
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(head)
|
||||
head.disfigured = 1
|
||||
name = get_visible_name()
|
||||
if(HUSK in mutations) return
|
||||
|
||||
if(f_style)
|
||||
f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
if(h_style)
|
||||
h_style = "Bald"
|
||||
update_hair(0)
|
||||
|
||||
mutations.Add(HUSK)
|
||||
update_body()
|
||||
status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools
|
||||
update_body(0)
|
||||
update_mutantrace()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/Drain()
|
||||
ChangeToHusk()
|
||||
mutations.Add(NOCLONE)
|
||||
mutations |= NOCLONE
|
||||
return
|
||||
@@ -1,29 +1,20 @@
|
||||
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null)
|
||||
var/param = null
|
||||
|
||||
if(!emote_allowed && usr == src)
|
||||
usr << "You are unable to emote."
|
||||
return
|
||||
|
||||
if (findtext(act, " ", 1, null))
|
||||
var/t1 = findtext(act, " ", 1, null)
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
//var/m_type = 1
|
||||
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/F = organs[named]
|
||||
for (var/obj/item/weapon/implant/I in F.implant)
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
for (var/obj/item/weapon/implant/I in src)
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
|
||||
if(src.stat == 2.0 && (act != "deathgasp"))
|
||||
return
|
||||
if(src.stat != 2.0 && act == "deathgasp" && !src.mind.special_role == "Syndicate")
|
||||
src << "You are not dead. No."
|
||||
return
|
||||
switch(act)
|
||||
if ("airguitar")
|
||||
if (!src.restrained())
|
||||
@@ -56,52 +47,36 @@
|
||||
m_type = 1
|
||||
|
||||
if ("custom")
|
||||
m_type = 0
|
||||
if(copytext(param,1,2) == "v")
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if(copytext(param,1,2) == "h")
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
m_type = 2
|
||||
else
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
if(m_type)
|
||||
param = trim(copytext(param,2))
|
||||
else
|
||||
param = trim(param)
|
||||
var/input
|
||||
if(!param)
|
||||
input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
else
|
||||
input = param
|
||||
if(input)
|
||||
message = "<B>[src]</B> [input]"
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (src.client)
|
||||
if (client.muted_ic)
|
||||
src << "\red You cannot send IC messages (muted by admins)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
if ("salute")
|
||||
if (!src.buckled)
|
||||
@@ -205,20 +180,6 @@
|
||||
message = "<B>[src]</B> makes a weak noise."
|
||||
m_type = 2
|
||||
|
||||
if ("breathe")
|
||||
message = "<B>[src]</B> breathes."
|
||||
m_type = 1
|
||||
holdbreath = 0
|
||||
|
||||
if ("stopbreath")
|
||||
message = "<B>[src]</B> stops breathing..."
|
||||
m_type = 1
|
||||
|
||||
if ("holdbreath")
|
||||
message = "<B>[src]</B> stops breathing..."
|
||||
m_type = 1
|
||||
holdbreath = 1
|
||||
|
||||
if ("deathgasp")
|
||||
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
|
||||
m_type = 1
|
||||
@@ -307,12 +268,12 @@
|
||||
m_type = 2
|
||||
|
||||
if ("mumble")
|
||||
message = "<B>[src]</B> mumbles."
|
||||
message = "<B>[src]</B> mumbles!"
|
||||
m_type = 2
|
||||
|
||||
if ("grumble")
|
||||
if (!muzzled)
|
||||
message = "<B>[src]</B> grumbles."
|
||||
message = "<B>[src]</B> grumbles!"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> makes a noise."
|
||||
@@ -497,18 +458,6 @@
|
||||
message = "<B>[src]</B> makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if ("hungry")
|
||||
if(prob(1))
|
||||
message = "<B>Blue Elf</B> needs food Badly."
|
||||
else
|
||||
message = "<B>[src]'s</B> stomach growls."
|
||||
|
||||
if ("thirsty")
|
||||
if(prob(1))
|
||||
message = "<B>[src]</B> cancels destory station: Drinking."
|
||||
else
|
||||
message = "<B>[src]</B> looks thirsty."
|
||||
|
||||
if ("help")
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
|
||||
|
||||
@@ -525,26 +474,17 @@
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
for(var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if(findtext(message," snores.")) //Because we have so many sleeping people.
|
||||
continue
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players
|
||||
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
if(istype(O,/mob/living/carbon/human))
|
||||
for(var/mob/living/parasite/P in O:parasites)
|
||||
P.show_message(message, m_type)
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src.loc, null))
|
||||
if(istype(O,/mob/living/carbon/human))
|
||||
for(var/mob/living/parasite/P in O:parasites)
|
||||
P.show_message(message, m_type)
|
||||
O.show_message(message, m_type)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in view()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.disabilities & 128) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( usr.sdisabilities & BLIND || usr.blinded || usr.stat==UNCONSCIOUS )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
@@ -13,18 +13,23 @@
|
||||
var/skipmask = 0
|
||||
var/skipears = 0
|
||||
var/skipeyes = 0
|
||||
var/skipface = 0
|
||||
|
||||
//exosuits and helmets obscure our view and stuff.
|
||||
if (src.wear_suit)
|
||||
skipgloves = src.wear_suit.flags_inv & HIDEGLOVES
|
||||
skipsuitstorage = src.wear_suit.flags_inv & HIDESUITSTORAGE
|
||||
skipjumpsuit = src.wear_suit.flags_inv & HIDEJUMPSUIT
|
||||
skipshoes = src.wear_suit.flags_inv & HIDESHOES
|
||||
if(wear_suit)
|
||||
skipgloves = wear_suit.flags_inv & HIDEGLOVES
|
||||
skipsuitstorage = wear_suit.flags_inv & HIDESUITSTORAGE
|
||||
skipjumpsuit = wear_suit.flags_inv & HIDEJUMPSUIT
|
||||
skipshoes = wear_suit.flags_inv & HIDESHOES
|
||||
|
||||
if (src.head)
|
||||
skipmask = src.head.flags_inv & HIDEMASK
|
||||
skipeyes = src.head.flags_inv & HIDEEYES
|
||||
skipears = src.head.flags_inv & HIDEEARS
|
||||
if(head)
|
||||
skipmask = head.flags_inv & HIDEMASK
|
||||
skipeyes = head.flags_inv & HIDEEYES
|
||||
skipears = head.flags_inv & HIDEEARS
|
||||
skipface = head.flags_inv & HIDEFACE
|
||||
|
||||
if(wear_mask)
|
||||
skipface |= wear_mask.flags_inv & HIDEFACE
|
||||
|
||||
// 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.
|
||||
@@ -32,367 +37,224 @@
|
||||
var/t_him = "it"
|
||||
var/t_has = "has"
|
||||
var/t_is = "is"
|
||||
var/t_does = "does"
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is "
|
||||
|
||||
switch(get_visible_gender())
|
||||
if(MALE)
|
||||
t_He = "He"
|
||||
t_his = "his"
|
||||
t_him = "him"
|
||||
if(FEMALE)
|
||||
t_He = "She"
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
if(NEUTER)
|
||||
t_He = "They"
|
||||
t_his = "their"
|
||||
t_him = "them"
|
||||
t_has = "have"
|
||||
t_is = "are"
|
||||
t_does = "do"
|
||||
if( skipjumpsuit && skipface ) //big suits/masks/helmets make it hard to tell their gender
|
||||
t_He = "They"
|
||||
t_his = "their"
|
||||
t_him = "them"
|
||||
t_has = "have"
|
||||
t_is = "are"
|
||||
else
|
||||
if(icon)
|
||||
msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
|
||||
switch(gender)
|
||||
if(MALE)
|
||||
t_He = "He"
|
||||
t_his = "his"
|
||||
t_him = "him"
|
||||
if(FEMALE)
|
||||
t_He = "She"
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
|
||||
if(mutantrace == "lizard")
|
||||
examine_text = "one of those lizard-like Soghuns"
|
||||
if(mutantrace == "skrell")
|
||||
examine_text = "one of those gelatinous Skrells"
|
||||
|
||||
if(icon)
|
||||
msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
|
||||
|
||||
msg += "<EM>\a [src]</EM>[examine_text ? ", [examine_text]":""]!\n"
|
||||
msg += "<EM>[src.name]</EM>!\n"
|
||||
|
||||
//uniform
|
||||
if (src.w_uniform && !skipjumpsuit)
|
||||
if (src.w_uniform.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.w_uniform] [src.w_uniform.gender==PLURAL?"some":"a"] blood-stained [src.w_uniform.name]!</span>\n"
|
||||
if(w_uniform && !skipjumpsuit)
|
||||
if(w_uniform.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[src.w_uniform] \a [src.w_uniform].\n"
|
||||
msg += "[t_He] [t_is] wearing \icon[w_uniform] \a [w_uniform].\n"
|
||||
|
||||
//head
|
||||
if (src.head)
|
||||
if (src.head.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.head] [src.head.gender==PLURAL?"some":"a"] blood-stained [src.head.name] on [t_his] head!</span>\n"
|
||||
if(head)
|
||||
if(head.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[head] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[src.head] \a [src.head] on [t_his] head.\n"
|
||||
msg += "[t_He] [t_is] wearing \icon[head] \a [head] on [t_his] head.\n"
|
||||
|
||||
//suit/armour
|
||||
if (src.wear_suit)
|
||||
if (src.wear_suit.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.wear_suit] [src.wear_suit.gender==PLURAL?"some":"a"] blood-stained [src.wear_suit.name]!</span>\n"
|
||||
if(wear_suit)
|
||||
if(wear_suit.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_suit] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[src.wear_suit] \a [src.wear_suit].\n"
|
||||
msg += "[t_He] [t_is] wearing \icon[wear_suit] \a [wear_suit].\n"
|
||||
|
||||
//suit/armour storage
|
||||
if(src.s_store && !skipsuitstorage)
|
||||
if(src.s_store.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[src.s_store] [src.s_store.gender==PLURAL?"some":"a"] blood-stained [src.s_store.name] on [t_his] [src.wear_suit.name]!</span>\n"
|
||||
if(s_store && !skipsuitstorage)
|
||||
if(s_store.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[s_store] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] carrying \icon[src.s_store] \a [src.s_store] on [t_his] [src.wear_suit.name].\n"
|
||||
msg += "[t_He] [t_is] carrying \icon[s_store] \a [s_store] on [t_his] [wear_suit.name].\n"
|
||||
|
||||
//back
|
||||
if (src.back)
|
||||
if (src.back.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[src.back] [src.back.gender==PLURAL?"some":"a"] blood-stained [src.back] on [t_his] back.</span>\n"
|
||||
if(back)
|
||||
if(back.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[back] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[src.back] \a [src.back] on [t_his] back.\n"
|
||||
msg += "[t_He] [t_has] \icon[back] \a [back] on [t_his] back.\n"
|
||||
|
||||
//left hand
|
||||
if (src.l_hand)
|
||||
if (src.l_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[src.l_hand] [src.l_hand.gender==PLURAL?"some":"a"] blood-stained [src.l_hand.name] in [t_his] left hand!</span>\n"
|
||||
if(l_hand)
|
||||
if(l_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in [t_his] left hand!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding \icon[src.l_hand] \a [src.l_hand] in [t_his] left hand.\n"
|
||||
msg += "[t_He] [t_is] holding \icon[l_hand] \a [l_hand] in [t_his] left hand.\n"
|
||||
|
||||
//right hand
|
||||
if (src.r_hand)
|
||||
if (src.r_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[src.r_hand] [src.r_hand.gender==PLURAL?"some":"a"] blood-stained [src.r_hand.name] in [t_his] right hand!</span>\n"
|
||||
if(r_hand)
|
||||
if(r_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in [t_his] right hand!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding \icon[src.r_hand] \a [src.r_hand] in [t_his] right hand.\n"
|
||||
msg += "[t_He] [t_is] holding \icon[r_hand] \a [r_hand] in [t_his] right hand.\n"
|
||||
|
||||
//gloves
|
||||
if (src.gloves && !skipgloves)
|
||||
if (src.gloves.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[src.gloves] [src.gloves.gender==PLURAL?"some":"a"] blood-stained [src.gloves.name] on [t_his] hands!</span>\n"
|
||||
if(gloves && !skipgloves)
|
||||
if(gloves.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[gloves] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[src.gloves] \a [src.gloves] on [t_his] hands.\n"
|
||||
else if (src.blood_DNA)
|
||||
msg += "[t_He] [t_has] \icon[gloves] \a [gloves] on [t_his] hands.\n"
|
||||
else if(blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] blood-stained hands!</span>\n"
|
||||
|
||||
//handcuffed?
|
||||
if (src.handcuffed)
|
||||
if(istype(src.handcuffed, /obj/item/weapon/handcuffs/cable))
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] restrained with cable!</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] handcuffed!</span>\n"
|
||||
|
||||
//splints
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/datum/organ/external/o = organs["[organ]"]
|
||||
if(o.status & ORGAN_SPLINTED)
|
||||
msg += "<span class='warning'>[t_He] [t_has] a splint on his [o.getDisplayName()]!</span>\n"
|
||||
//handcuffed?
|
||||
if(handcuffed)
|
||||
if(istype(handcuffed, /obj/item/weapon/handcuffs/cable))
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] restrained with cable!</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] handcuffed!</span>\n"
|
||||
|
||||
//belt
|
||||
if (src.belt)
|
||||
if (src.belt.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[src.belt] [src.belt.gender==PLURAL?"some":"a"] blood-stained [src.belt.name] about [t_his] waist!</span>\n"
|
||||
if(belt)
|
||||
if(belt.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[belt] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[src.belt] \a [src.belt] about [t_his] waist.\n"
|
||||
msg += "[t_He] [t_has] \icon[belt] \a [belt] about [t_his] waist.\n"
|
||||
|
||||
//shoes
|
||||
if (src.shoes && !skipshoes)
|
||||
if(src.shoes.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.shoes] [src.shoes.gender==PLURAL?"some":"a"] blood-stained [src.shoes.name] on [t_his] feet!</span>\n"
|
||||
if(shoes && !skipshoes)
|
||||
if(shoes.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[shoes] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[src.shoes] \a [src.shoes] on [t_his] feet.\n"
|
||||
msg += "[t_He] [t_is] wearing \icon[shoes] \a [shoes] on [t_his] feet.\n"
|
||||
|
||||
//mask
|
||||
if (src.wear_mask && !skipmask)
|
||||
if (src.wear_mask.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[src.wear_mask] [src.wear_mask.gender==PLURAL?"some":"a"] blood-stained [src.wear_mask.name] on [t_his] face!</span>\n"
|
||||
if(wear_mask && !skipmask)
|
||||
if(wear_mask.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[src.wear_mask] \a [src.wear_mask] on [t_his] face.\n"
|
||||
msg += "[t_He] [t_has] \icon[wear_mask] \a [wear_mask] on [t_his] face.\n"
|
||||
|
||||
//eyes
|
||||
if (src.glasses && !skipeyes)
|
||||
if (src.glasses.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[src.glasses] [src.glasses.gender==PLURAL?"some":"a"] blood-stained [src.glasses] covering [t_his] eyes!</span>\n"
|
||||
if(glasses && !skipeyes)
|
||||
if(glasses.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[glasses] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[src.glasses] \a [src.glasses] covering [t_his] eyes.\n"
|
||||
msg += "[t_He] [t_has] \icon[glasses] \a [glasses] covering [t_his] eyes.\n"
|
||||
|
||||
if (src.l_ear && !skipears)
|
||||
msg += "[t_He] [t_has] has a \icon[src.l_ear] [src.l_ear.name] on [t_his] left ear.\n"
|
||||
|
||||
if (src.r_ear && !skipears)
|
||||
msg += "[t_He] [t_has] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear.\n"
|
||||
//ears
|
||||
if(ears && !skipears)
|
||||
msg += "[t_He] [t_has] \icon[ears] \a [ears] on [t_his] ears.\n"
|
||||
|
||||
//ID
|
||||
if (src.wear_id)
|
||||
if(wear_id)
|
||||
var/id
|
||||
if(istype(src.wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = src.wear_id
|
||||
if(istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
id = pda.owner
|
||||
else if(istype(src.wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
|
||||
var/obj/item/weapon/card/id/idcard = src.wear_id
|
||||
else if(istype(wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
|
||||
var/obj/item/weapon/card/id/idcard = wear_id
|
||||
id = idcard.registered_name
|
||||
if (id && (id != src.real_name) && (get_dist(src, usr) <= 1) && prob(10))
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id] yet something doesn't seem right...</span>\n"
|
||||
if(id && (id != real_name) && (get_dist(src, usr) <= 1) && prob(10))
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_id] \a [wear_id] yet something doesn't seem right...</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id].\n"
|
||||
msg += "[t_He] [t_is] wearing \icon[wear_id] \a [wear_id].\n"
|
||||
|
||||
//Jitters
|
||||
if (src.is_jittery)
|
||||
if(src.jitteriness >= 300)
|
||||
if(is_jittery)
|
||||
if(jitteriness >= 300)
|
||||
msg += "<span class='warning'><B>[t_He] [t_is] convulsing violently!</B></span>\n"
|
||||
else if(src.jitteriness >= 200)
|
||||
else if(jitteriness >= 200)
|
||||
msg += "<span class='warning'>[t_He] [t_is] extremely jittery.</span>\n"
|
||||
else if(src.jitteriness >= 100)
|
||||
else if(jitteriness >= 100)
|
||||
msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n"
|
||||
|
||||
var/distance = get_dist(usr,src)
|
||||
if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything
|
||||
distance = 1
|
||||
if(suiciding)
|
||||
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
|
||||
|
||||
if (src.stat == 1 || stat == 2)
|
||||
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
|
||||
if((!isbreathing || holdbreath) && distance <= 3)
|
||||
msg += "<span class='warning'>[t_He] [t_does] not appear to be breathing.</span>\n"
|
||||
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
spawn(15)
|
||||
usr << "\blue [t_He] has a pulse!"
|
||||
if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive; there are no signs of life"
|
||||
|
||||
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
|
||||
if(distance <= 1)
|
||||
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
spawn(15)
|
||||
var/foundghost = 0
|
||||
if(src.client)
|
||||
foundghost = 1
|
||||
else
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
if(G.corpse == src)
|
||||
foundghost++
|
||||
break
|
||||
if(!foundghost)
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse and [t_his] soul has departed...</span>"
|
||||
else
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse...</span>"
|
||||
if(!key)
|
||||
var/foundghost = 0
|
||||
if(mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.mind == mind)
|
||||
foundghost = 1
|
||||
break
|
||||
if(!foundghost)
|
||||
msg += " and [t_his] soul has departed"
|
||||
msg += "...</span>\n"
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
else
|
||||
|
||||
if (src.cloneloss)
|
||||
if (src.cloneloss < 30)
|
||||
msg += "[t_He] looks slightly... unfinished?\n"
|
||||
else
|
||||
msg += "<B>[t_He] looks very... unfinished?</B>\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
if (src.nutrition < 100)
|
||||
msg += "[t_He] [t_is] severely malnourished.\n"
|
||||
else if (src.nutrition >= 500)
|
||||
if (usr.nutrition < 100)
|
||||
msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] quite chubby.\n"
|
||||
var/temp = getBruteLoss() //no need to calculate each of these twice
|
||||
if(temp)
|
||||
if(temp < 30)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
|
||||
msg += "</span>"
|
||||
temp = getFireLoss()
|
||||
if(temp)
|
||||
if(temp < 30)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
|
||||
temp = getCloneLoss()
|
||||
if(temp)
|
||||
if(temp < 30)
|
||||
msg += "[t_He] [t_has] minor genetic deformities.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe genetic deformities.</B>\n"
|
||||
|
||||
if (src.getBrainLoss() >= 60 && !stat)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
if(nutrition < 100)
|
||||
msg += "[t_He] [t_is] severely malnourished.\n"
|
||||
else if(nutrition >= 500)
|
||||
if(usr.nutrition < 100)
|
||||
msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] quite chubby.\n"
|
||||
|
||||
if (!src.client && !admin_observing)
|
||||
msg += "[t_He] [t_has] a vacant stare...\n"
|
||||
msg += "</span>"
|
||||
|
||||
if (src.digitalcamo)
|
||||
if(stat == UNCONSCIOUS)
|
||||
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
|
||||
else if(getBrainLoss() >= 60)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if(!key)
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely</span>\n"
|
||||
else if(!client)
|
||||
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
|
||||
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
var/list/is_bleeding = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name], it has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.display_name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.desc in wound_descriptors)
|
||||
wound_descriptors[W.desc] += W.amount
|
||||
continue
|
||||
wound_descriptors[W.desc] = W.amount
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
|
||||
else
|
||||
flavor_text += " a ton of [wound]\s"
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
if(temp.status & ORGAN_BLEEDING)
|
||||
is_bleeding["[named]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
|
||||
var/display_chest = 0
|
||||
var/display_shoes = 0
|
||||
var/display_gloves = 0
|
||||
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
|
||||
msg += wound_flavor_text["head"]
|
||||
else if(is_bleeding["head"])
|
||||
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["chest"]
|
||||
else if(is_bleeding["chest"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left arm"]
|
||||
else if(is_bleeding["left arm"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["left hand"]
|
||||
else if(is_bleeding["left hand"])
|
||||
display_gloves = 1
|
||||
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["right arm"]
|
||||
else if(is_bleeding["right arm"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
display_gloves = 1
|
||||
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["groin"]
|
||||
else if(is_bleeding["groin"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left leg"]
|
||||
else if(is_bleeding["left leg"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
|
||||
msg += wound_flavor_text["left foot"]
|
||||
else if(is_bleeding["left foot"])
|
||||
display_shoes = 1
|
||||
if(wound_flavor_text["right leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["right leg"]
|
||||
else if(is_bleeding["right leg"])
|
||||
display_chest = 1
|
||||
if(wound_flavor_text["right foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
|
||||
msg += wound_flavor_text["right foot"]
|
||||
else if(is_bleeding["right foot"])
|
||||
display_shoes = 1
|
||||
if(display_chest)
|
||||
msg += "<span class='warning'><b>[src] has blood soaking through from under [t_his] clothing!</b></span>\n"
|
||||
if(display_shoes)
|
||||
msg += "<span class='warning'><b>[src] has blood running from [t_his] shoes!</b></span>\n"
|
||||
if(display_gloves)
|
||||
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
|
||||
|
||||
|
||||
// if(w.bleeding)
|
||||
// usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
|
||||
// continue
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
if(usr.stat || H != usr) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
|
||||
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
|
||||
|
||||
var/perpname = "wot"
|
||||
var/criminal = "None"
|
||||
|
||||
@@ -403,46 +265,18 @@
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
perpname = name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
if(E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=\ref[src];secrecord=`'>\[View\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health))
|
||||
var/perpname = "wot"
|
||||
var/medical = "None"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.general)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
medical = R.fields["p_stat"]
|
||||
|
||||
|
||||
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Medical records:</span> <a href='?src=\ref[src];medrecord=`'>\[View\]</a>\n"
|
||||
|
||||
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "\blue *---------*"
|
||||
usr << msg
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
/obj/hud/proc/human_hud(var/ui_style='screen1_old.dmi')
|
||||
|
||||
//ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
/obj/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
src.hotkeybuttons = list( ) //These can be disabled for hotkey usersx
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
@@ -46,6 +39,7 @@
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "act_intent"
|
||||
@@ -57,45 +51,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "help" ? "help_small_active" : "help_small")
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "disarm" ? "disarm_small_active" : "disarm_small")
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "grab" ? "grab_small_active" : "grab_small")
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm_small_active" : "harm_small")
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -151,62 +106,66 @@
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.hotkeybuttons += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "i_clothing"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "center"
|
||||
using.screen_loc = ui_iclothing
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "i_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_w_uniform
|
||||
inv_box.icon_state = "center"
|
||||
inv_box.screen_loc = ui_iclothing
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "o_clothing"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_oclothing
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
/* using = new src.h_type( src )
|
||||
using.name = "headset"
|
||||
using.dir = SOUTHEAST
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_headset
|
||||
using.layer = 19
|
||||
if(istype(mymob,/mob/living/carbon/monkey)) using.overlays += blocked
|
||||
src.other += using*/
|
||||
/* inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "headset"
|
||||
inv_box.dir = SOUTHEAST
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_headset
|
||||
inv_box.layer = 19
|
||||
if(istype(mymob,/mob/living/carbon/monkey)) inv_box.overlays += blocked
|
||||
src.other += inv_box*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.layer = 19
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.dir = EAST
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.layer = 19
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen/inventory( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
@@ -215,7 +174,7 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen/inventory( src )
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = ui_style
|
||||
@@ -224,67 +183,71 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "id"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "id"
|
||||
using.screen_loc = ui_id
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "id"
|
||||
inv_box.dir = NORTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "id"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_wear_id
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_mask
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "mask"
|
||||
inv_box.dir = NORTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "back"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "back"
|
||||
inv_box.dir = NORTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage1"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "pocket"
|
||||
using.screen_loc = ui_storage1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage2"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "pocket"
|
||||
using.screen_loc = ui_storage2
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "suit storage"
|
||||
using.icon = ui_style
|
||||
using.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
|
||||
using.icon_state = "belt"
|
||||
using.screen_loc = ui_sstore1
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "suit storage"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
|
||||
inv_box.icon_state = "belt"
|
||||
inv_box.screen_loc = ui_sstore1
|
||||
inv_box.slot_id = slot_s_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
src.hotkeybuttons += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "other"
|
||||
@@ -318,61 +281,59 @@
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "gloves"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "gloves"
|
||||
using.screen_loc = ui_gloves
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "gloves"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "gloves"
|
||||
inv_box.screen_loc = ui_gloves
|
||||
inv_box.slot_id = slot_gloves
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "eyes"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "glasses"
|
||||
using.screen_loc = ui_glasses
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "eyes"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "glasses"
|
||||
inv_box.screen_loc = ui_glasses
|
||||
inv_box.slot_id = slot_glasses
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_ear"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_lear
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "ears"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "ears"
|
||||
inv_box.screen_loc = ui_ears
|
||||
inv_box.slot_id = slot_ears
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "r_ear"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_rear
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hair"
|
||||
inv_box.screen_loc = ui_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "head"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hair"
|
||||
using.screen_loc = ui_head
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "shoes"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "shoes"
|
||||
inv_box.screen_loc = ui_shoes
|
||||
inv_box.slot_id = slot_shoes
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "shoes"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "shoes"
|
||||
using.screen_loc = ui_shoes
|
||||
using.layer = 19
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "belt"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "belt"
|
||||
using.screen_loc = ui_belt
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "belt"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "belt"
|
||||
inv_box.screen_loc = ui_belt
|
||||
inv_box.slot_id = slot_belt
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
@@ -532,7 +493,7 @@
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
src.hotkeybuttons += mymob.throw_icon
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
@@ -600,16 +561,24 @@
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
src.hotkeybuttons += mymob.pullin
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.mouse_opacity = 0
|
||||
mymob.blind.layer = 0
|
||||
|
||||
mymob.damageoverlay = new /obj/screen( null )
|
||||
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
|
||||
mymob.damageoverlay.name = "dmg"
|
||||
mymob.damageoverlay.screen_loc = "1,1"
|
||||
mymob.damageoverlay.mouse_opacity = 0
|
||||
mymob.damageoverlay.layer = 17
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = ui_style
|
||||
@@ -618,12 +587,6 @@
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.pain = new /obj/screen( null )
|
||||
mymob.pain.icon_state = "blank"
|
||||
mymob.pain.name = "pain"
|
||||
mymob.pain.screen_loc = "1,1 to 15,15"
|
||||
mymob.pain.layer = 17
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = ui_style
|
||||
@@ -734,16 +697,16 @@
|
||||
*/
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other + src.hotkeybuttons
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||
inventory_shown = 0;
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -804,7 +767,7 @@ 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) )
|
||||
if( (x.name == "radar" && x.icon == 'icons/misc/radar.dmi') || (x in radar_blips) )
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
@@ -812,41 +775,39 @@ Radar-related things
|
||||
|
||||
/mob/living/carbon/human/proc/place_radar_closed()
|
||||
var/obj/screen/closedradar = new()
|
||||
closedradar.icon = 'radar.dmi'
|
||||
closedradar.icon = 'icons/misc/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()
|
||||
// this proc lags like hell, why is it even in
|
||||
return
|
||||
|
||||
for(var/obj/screen/x in client.screen)
|
||||
if(x.name == "radar closed" && x.icon == 'radar.dmi')
|
||||
if(x.name == "radar closed" && x.icon == 'icons/misc/radar.dmi')
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
var/obj/screen/cornerA = new()
|
||||
cornerA.icon = 'radar.dmi'
|
||||
cornerA.icon = 'icons/misc/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 = 'icons/misc/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 = 'icons/misc/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 = 'icons/misc/radar.dmi'
|
||||
cornerD.icon_state = "radar(2,2)"
|
||||
cornerD.screen_loc = "WEST+1,NORTH-1"
|
||||
cornerD.name = "radar"
|
||||
@@ -913,7 +874,7 @@ Radar-related things
|
||||
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.icon = 'icons/misc/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)
|
||||
@@ -956,3 +917,40 @@ Radar-related things
|
||||
client.screen += blip
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_action_buttons()
|
||||
var/num = 1
|
||||
if(!src.hud_used) return
|
||||
if(!src.client) return
|
||||
|
||||
if(!hud_used.hud_shown) //Hud toggled to minimal
|
||||
return
|
||||
|
||||
src.client.screen -= src.hud_used.item_action_list
|
||||
hud_used.item_action_list = list()
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
if(I.icon_action_button)
|
||||
var/obj/screen/item_action/A = new(src.hud_used)
|
||||
A.icon = 'icons/mob/screen1_action.dmi'
|
||||
A.icon_state = I.icon_action_button
|
||||
if(I.action_button_name)
|
||||
A.name = I.action_button_name
|
||||
else
|
||||
A.name = "Use [I.name]"
|
||||
A.owner = I
|
||||
hud_used.item_action_list += A
|
||||
switch(num)
|
||||
if(1)
|
||||
A.screen_loc = ui_action_slot1
|
||||
if(2)
|
||||
A.screen_loc = ui_action_slot2
|
||||
if(3)
|
||||
A.screen_loc = ui_action_slot3
|
||||
if(4)
|
||||
A.screen_loc = ui_action_slot4
|
||||
if(5)
|
||||
A.screen_loc = ui_action_slot5
|
||||
break //5 slots available, so no more can be added.
|
||||
num++
|
||||
|
||||
src.client.screen += src.hud_used.item_action_list
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,17 +14,15 @@
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
@@ -34,39 +32,38 @@
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/damage = rand(15, 30)
|
||||
if(!damage)
|
||||
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
visible_message("\red <B>[M] has lunged at [src]!</B>")
|
||||
return 0
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has slashed at [src]!</B>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if (damage >= 25)
|
||||
visible_message("\red <B>[M] has wounded [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
if("disarm")
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 90)
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
Weaken(rand(10,15))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
|
||||
else
|
||||
if (randn <= 99)
|
||||
playsound(loc, 'slash.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
drop_item()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||
|
||||
|
||||
log_admin("ATTACK: [src] ([src.ckey]) stungloved [M] ([M.ckey]).")
|
||||
message_admins("ATTACK: [src] ([src.ckey]) stungloved [M] ([M.ckey]).")
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])</font>")
|
||||
|
||||
|
||||
@@ -38,7 +36,7 @@
|
||||
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
|
||||
return 0
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
@@ -55,17 +53,17 @@
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
|
||||
return
|
||||
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health > config.health_threshold_crit)
|
||||
if(health > 0)
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
// if(M.health < -75) return 0
|
||||
if(M.health < -75) return 0
|
||||
|
||||
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\blue <B>Remove your mask!</B>"
|
||||
return 0
|
||||
@@ -89,17 +87,15 @@
|
||||
if(w_uniform) w_uniform.add_fingerprint(M)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M)
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("\red [M] has grabbed [src] passively!")
|
||||
return 1
|
||||
|
||||
@@ -107,18 +103,16 @@
|
||||
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == "male")
|
||||
if(M.gender == MALE)
|
||||
gendertxt = "his"
|
||||
if(M.gender == "female")
|
||||
if(M.gender == FEMALE)
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Used Electric Hands nanoaug power on [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])</font>")
|
||||
|
||||
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("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them </font>")
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name], shocking them ([src.ckey])</font>")
|
||||
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
@@ -126,37 +120,30 @@
|
||||
|
||||
return
|
||||
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
|
||||
log_admin("ATTACK: [M] ([M.ckey]) punched [src] ([src.ckey]).")
|
||||
message_admins("ATTACK: [M] ([M.ckey]) punched [src] ([src.ckey]).")
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>")
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Slashed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been slashed by [M.name] ([M.ckey])</font>")
|
||||
log_admin("ATTACK: [M] ([M.ckey]) slashed [src] ([src.ckey]).")
|
||||
message_admins("ATTACK: [M] ([M.ckey]) slashed [src] ([src.ckey]).")
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) slashed [src.name] ([src.ckey])</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>")
|
||||
|
||||
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "whip"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
if(M.dna)
|
||||
switch(M.dna.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(istajaran(M))
|
||||
attack_verb = "slash"
|
||||
|
||||
var/damage = rand(0, 5)
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
if(attack_verb == "scratch" || attack_verb == "slash")
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
|
||||
return 0
|
||||
@@ -167,25 +154,25 @@
|
||||
|
||||
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)
|
||||
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if(damage >= 5 && prob(50))
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
apply_effect(2, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [src] ([src.ckey]) disarmed [M] ([M.ckey]).")
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])</font>")
|
||||
|
||||
|
||||
@@ -194,8 +181,8 @@
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/randn = rand(1, 100)
|
||||
if (randn <= 25)
|
||||
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("\red <B>[M] has pushed [src]!</B>")
|
||||
return
|
||||
|
||||
@@ -206,7 +193,7 @@
|
||||
if(pulling)
|
||||
visible_message("\red <b>[M] has broken [src]'s grip on [pulling]!</B>")
|
||||
talked = 1
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
|
||||
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
|
||||
if(istype(l_hand, /obj/item/weapon/grab))
|
||||
@@ -228,11 +215,11 @@
|
||||
if(!talked) //BubbleWrap
|
||||
drop_item()
|
||||
visible_message("\red <B>[M] has disarmed [src]!</B>")
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
|
||||
return
|
||||
|
||||
|
||||
@@ -1,12 +1,142 @@
|
||||
//Instead of setting real_name = "Unknown", use this when necessary.
|
||||
//It will prevent the cloned-as-unknown bug and various other derpy things.
|
||||
/mob/living/carbon/human/proc/disfigure_face()
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(head && !head.disfigured)
|
||||
head.disfigured = 1
|
||||
name = get_visible_name()
|
||||
src << "\red Your face has become disfigured."
|
||||
warn_flavor_changed()
|
||||
//Updates the mob's health from organs and mob damage variables
|
||||
/mob/living/carbon/human/updatehealth()
|
||||
if(nodamage)
|
||||
health = 100
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
for(var/datum/organ/external/O in organs) //hardcoded to streamline things a bit
|
||||
total_brute += O.brute_dam
|
||||
total_burn += O.burn_dam
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
//TODO: fix husking
|
||||
if( ((100 - total_burn) < config.health_threshold_dead) && stat == DEAD) //100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
|
||||
ChangeToHusk()
|
||||
return
|
||||
|
||||
|
||||
//These procs fetch a cumulative total damage from all organs
|
||||
/mob/living/carbon/human/getBruteLoss()
|
||||
var/amount = 0
|
||||
for(var/datum/organ/external/O in organs)
|
||||
amount += O.brute_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/human/getFireLoss()
|
||||
var/amount = 0
|
||||
for(var/datum/organ/external/O in organs)
|
||||
amount += O.burn_dam
|
||||
return amount
|
||||
|
||||
|
||||
/mob/living/carbon/human/adjustBruteLoss(var/amount)
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0)
|
||||
else
|
||||
heal_overall_damage(-amount, 0)
|
||||
|
||||
/mob/living/carbon/human/adjustFireLoss(var/amount)
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount)
|
||||
else
|
||||
heal_overall_damage(0, -amount)
|
||||
|
||||
/mob/living/carbon/human/Stun(amount)
|
||||
if(HULK in mutations) return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/Weaken(amount)
|
||||
if(HULK in mutations) return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/Paralyse(amount)
|
||||
if(HULK in mutations) return
|
||||
..()
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
//Returns a list of damaged organs
|
||||
/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if((brute && O.brute_dam) || (burn && O.burn_dam))
|
||||
parts += O
|
||||
return parts
|
||||
|
||||
//Returns a list of damageable organs
|
||||
/mob/living/carbon/human/proc/get_damageable_organs()
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if(O.brute_dam + O.burn_dam < O.max_damage)
|
||||
parts += O
|
||||
return parts
|
||||
|
||||
//Heals ONE external organ, organ gets randomly selected from damaged ones.
|
||||
//It automatically updates damage overlays if necesary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/human/heal_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
if(!parts.len) return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
if(picked.heal_damage(brute,burn))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
//Damages ONE external organ, organ gets randomly selected from damagable ones.
|
||||
//It automatically updates damage overlays if necesary
|
||||
//It automatically updates health status
|
||||
/mob/living/carbon/human/take_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
if(!parts.len) return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
if(picked.take_damage(brute,burn))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
|
||||
//Heal MANY external organs, in random order
|
||||
/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
|
||||
var/update = 0
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
update |= picked.heal_damage(brute,burn)
|
||||
|
||||
brute -= (brute_was-picked.brute_dam)
|
||||
burn -= (burn_was-picked.burn_dam)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn)
|
||||
if(nodamage) return //godmode
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
var/update = 0
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
update |= picked.take_damage(brute,burn)
|
||||
|
||||
brute -= (picked.brute_dam - brute_was)
|
||||
burn -= (picked.burn_dam - burn_was)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
|
||||
var/datum/organ/external/E = get_organ(zone)
|
||||
@@ -17,45 +147,16 @@
|
||||
return 0
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
// now constructs damage icon for each organ from mask * damage field
|
||||
|
||||
/mob/living/carbon/human/UpdateDamageIcon()
|
||||
// first check whether something actually changed about damage appearance
|
||||
var/damage_appearance = ""
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(O.status & ORGAN_DESTROYED) damage_appearance += "d"
|
||||
else
|
||||
damage_appearance += O.damage_state
|
||||
|
||||
if(damage_appearance == previous_damage_appearance)
|
||||
// nothing to do here
|
||||
return
|
||||
|
||||
previous_damage_appearance = damage_appearance
|
||||
|
||||
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.status & ORGAN_DESTROYED))
|
||||
O.update_icon()
|
||||
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]"
|
||||
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]"
|
||||
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/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if(O.name == zone)
|
||||
return O
|
||||
return null
|
||||
|
||||
|
||||
/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)
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
@@ -68,7 +169,7 @@
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ || organ.status & ORGAN_DESTROYED) return 0
|
||||
if(!organ) return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
@@ -77,13 +178,10 @@
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0, sharp, used_weapon)
|
||||
if(organ.take_damage(damage, 0))
|
||||
UpdateDamageIcon()
|
||||
if(BURN)
|
||||
organ.take_damage(0, damage, sharp, used_weapon)
|
||||
|
||||
if(used_weapon)
|
||||
organ.add_wound(used_weapon, damage)
|
||||
|
||||
UpdateDamageIcon()
|
||||
if(organ.take_damage(0, damage))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -52,8 +52,7 @@ emp_act
|
||||
//If a specific bodypart is targetted, check how that bodypart is protected and return the value.
|
||||
|
||||
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/organ = organs[name]
|
||||
for(var/datum/organ/external/organ in organs)
|
||||
armorval += checkarmor(organ, type)
|
||||
organnum++
|
||||
return (armorval/max(organnum, 1))
|
||||
@@ -62,7 +61,6 @@ emp_act
|
||||
/mob/living/carbon/human/proc/checkarmor(var/datum/organ/external/def_zone, var/type)
|
||||
if(!type) return 0
|
||||
var/protection = 0
|
||||
var/adjuster = 0
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
|
||||
for(var/bp in body_parts)
|
||||
if(!bp) continue
|
||||
@@ -70,8 +68,6 @@ emp_act
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & def_zone.body_part)
|
||||
protection += C.armor[type]
|
||||
adjuster++
|
||||
protection = (adjuster ? protection/(sqrt(adjuster)) : 0)
|
||||
return protection
|
||||
|
||||
|
||||
@@ -91,13 +87,13 @@ emp_act
|
||||
if(I.IsShield() && (prob(35)))
|
||||
visible_message("\red <B>The reactive teleport system flings [src] clear of [attack_text]!</B>")
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(6,src))
|
||||
for(var/turf/T in orange(6))
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-6 || T.x<6) continue
|
||||
if(T.y>world.maxy-6 || T.y<6) continue
|
||||
turfs += T
|
||||
if(!turfs.len)
|
||||
turfs += pick(/turf in orange(6,src))
|
||||
visible_message("\red <B>The reactive teleport system malfunctions!</B>")
|
||||
if(!turfs.len) turfs += pick(/turf in orange(6))
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
src.loc = picked
|
||||
@@ -108,10 +104,6 @@ emp_act
|
||||
for(var/obj/O in src)
|
||||
if(!O) continue
|
||||
O.emp_act(severity)
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/O = organs[named]
|
||||
if(O.status & ORGAN_DESTROYED) continue
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -120,82 +112,80 @@ emp_act
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
|
||||
var/hit_area = affecting.display_name
|
||||
var/hit_area = parse_zone(affecting.name)
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
if(!(affecting.status & ORGAN_DESTROYED))
|
||||
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
|
||||
if(I.attack_verb.len)
|
||||
visible_message("\red <B>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!</B>")
|
||||
else
|
||||
user << "What [affecting]?"
|
||||
return
|
||||
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
|
||||
|
||||
var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].")
|
||||
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
// make heavy weapons do more damage
|
||||
var/power = I.force
|
||||
if(I.w_class >= 4)
|
||||
power *= 2
|
||||
apply_damage(power, I.damtype, affecting, armor, is_cut(I), I.name)
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + is_sharp(I) * 50 + (I.force * 2)))
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
I.add_blood(src) //Make the weapon bloody, not the person.
|
||||
bloody = 1
|
||||
var/turf/location = loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(src)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
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 && 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
|
||||
H.bloody_hands_mob = H
|
||||
// if(user.hand) user.update_inv_l_hand() //updates the attacker's overlay for the (now bloodied) weapon
|
||||
// else user.update_inv_r_hand() //removed because weapons don't have on-mob blood overlays
|
||||
if(prob(33))
|
||||
bloody = 1
|
||||
var/turf/location = loc
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(src)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(get_dist(H, src) > 1) //people with TK won't get smeared with blood
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_blood(src)
|
||||
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.add_blood(src)
|
||||
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
|
||||
if (H.gloves)
|
||||
H.gloves.add_blood(H)
|
||||
H.gloves:transfer_blood = 2
|
||||
H.gloves:bloody_hands_mob = H
|
||||
else
|
||||
H.add_blood(H)
|
||||
H.bloody_hands = 2
|
||||
H.bloody_hands_mob = H
|
||||
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
|
||||
switch(hit_area)
|
||||
if("head")//Harder to score a stun but if you do it lasts a bit longer
|
||||
var/knockout_chance = 0
|
||||
if(power >= 4)
|
||||
knockout_chance += 5
|
||||
if(power >= 10)
|
||||
knockout_chance += 20
|
||||
knockout_chance += power
|
||||
if(health <= 40) knockout_chance += 40
|
||||
if(prob(knockout_chance))
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
visible_message("\red <B>[src] has been knocked unconscious!</B>")
|
||||
if(src != user)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
switch(hit_area)
|
||||
if("head")//Harder to score a stun but if you do it lasts a bit longer
|
||||
if(prob(I.force))
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
visible_message("\red <B>[src] has been knocked unconscious!</B>")
|
||||
if(src != user)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
|
||||
if(bloody)//Apply blood
|
||||
if(wear_mask) wear_mask.add_blood(src)
|
||||
if(head) head.add_blood(src)
|
||||
if(glasses && prob(33)) glasses.add_blood(src)
|
||||
if(bloody)//Apply blood
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
update_inv_wear_mask(0)
|
||||
if(head)
|
||||
head.add_blood(src)
|
||||
update_inv_head(0)
|
||||
if(glasses && prob(33))
|
||||
glasses.add_blood(src)
|
||||
update_inv_glasses(0)
|
||||
|
||||
if("chest")//Easier to score a stun but lasts less time
|
||||
var/knockdown_chance = 0
|
||||
if(power >= 10)
|
||||
knockdown_chance += 10
|
||||
if(I.w_class >= 4)
|
||||
knockdown_chance *= 4
|
||||
knockdown_chance = min(knockdown_chance, 50)
|
||||
if(prob(knockdown_chance))
|
||||
apply_effect(5, WEAKEN, armor)
|
||||
visible_message("\red <B>[src] has been knocked down!</B>")
|
||||
if("chest")//Easier to score a stun but lasts less time
|
||||
if(prob((I.force + 10)))
|
||||
apply_effect(5, WEAKEN, armor)
|
||||
visible_message("\red <B>[src] has been knocked down!</B>")
|
||||
|
||||
if(bloody)
|
||||
if(src.wear_suit) src.wear_suit.add_blood(src)
|
||||
if(src.w_uniform) src.w_uniform.add_blood(src)
|
||||
if(bloody)
|
||||
|
||||
UpdateDamageIcon()
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(src)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(src)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/mob/living/carbon/human
|
||||
|
||||
//Hair colour and style
|
||||
var/r_hair = 0
|
||||
var/g_hair = 0
|
||||
var/b_hair = 0
|
||||
var/h_style = "Bald"
|
||||
|
||||
//Facial hair colour and style
|
||||
var/r_facial = 0
|
||||
var/g_facial = 0
|
||||
var/b_facial = 0
|
||||
var/f_style = "Shaved"
|
||||
|
||||
//Eye colour
|
||||
var/r_eyes = 0
|
||||
var/g_eyes = 0
|
||||
var/b_eyes = 0
|
||||
|
||||
var/s_tone = 0 //Skin tone
|
||||
|
||||
var/age = 30 //Player's age (pure fluff)
|
||||
var/b_type = "A+" //Player's bloodtype (Not currently used, just character fluff)
|
||||
|
||||
var/underwear = 1 //Which underwear the player wants
|
||||
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
|
||||
|
||||
//Equipment slots
|
||||
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/ears = null
|
||||
var/obj/item/weapon/card/id/wear_id = 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
|
||||
|
||||
var/list/organs = list()
|
||||
|
||||
var/miming = null //Toggle for the mime's abilities.
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
@@ -0,0 +1,559 @@
|
||||
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
|
||||
for (var/slot in slots)
|
||||
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
|
||||
return slot
|
||||
if (del_on_fail)
|
||||
del(W)
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
|
||||
var/success
|
||||
|
||||
if (W == wear_suit)
|
||||
if(s_store)
|
||||
u_equip(s_store)
|
||||
if(W)
|
||||
success = 1
|
||||
wear_suit = null
|
||||
update_inv_wear_suit()
|
||||
else if (W == w_uniform)
|
||||
if (r_store)
|
||||
u_equip(r_store)
|
||||
if (l_store)
|
||||
u_equip(l_store)
|
||||
if (wear_id)
|
||||
u_equip(wear_id)
|
||||
if (belt)
|
||||
u_equip(belt)
|
||||
w_uniform = null
|
||||
success = 1
|
||||
update_inv_w_uniform()
|
||||
else if (W == gloves)
|
||||
gloves = null
|
||||
success = 1
|
||||
update_inv_gloves()
|
||||
else if (W == glasses)
|
||||
glasses = null
|
||||
success = 1
|
||||
update_inv_glasses()
|
||||
else if (W == head)
|
||||
head = null
|
||||
if(W.flags & BLOCKHAIR)
|
||||
update_hair(0) //rebuild hair
|
||||
success = 1
|
||||
update_inv_head()
|
||||
else if (W == ears)
|
||||
ears = null
|
||||
success = 1
|
||||
update_inv_ears()
|
||||
else if (W == shoes)
|
||||
shoes = null
|
||||
success = 1
|
||||
update_inv_shoes()
|
||||
else if (W == belt)
|
||||
belt = null
|
||||
success = 1
|
||||
update_inv_belt()
|
||||
else if (W == wear_mask)
|
||||
wear_mask = null
|
||||
success = 1
|
||||
if(W.flags & BLOCKHAIR)
|
||||
update_hair(0) //rebuild hair
|
||||
if(internal)
|
||||
if(internals)
|
||||
internals.icon_state = "internal0"
|
||||
internal = null
|
||||
update_inv_wear_mask()
|
||||
else if (W == wear_id)
|
||||
wear_id = null
|
||||
success = 1
|
||||
update_inv_wear_id()
|
||||
else if (W == r_store)
|
||||
r_store = null
|
||||
success = 1
|
||||
update_inv_pockets()
|
||||
else if (W == l_store)
|
||||
l_store = null
|
||||
success = 1
|
||||
update_inv_pockets()
|
||||
else if (W == s_store)
|
||||
s_store = null
|
||||
success = 1
|
||||
update_inv_s_store()
|
||||
else if (W == back)
|
||||
back = null
|
||||
success = 1
|
||||
update_inv_back()
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
success = 1
|
||||
update_inv_handcuffed()
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
success = 1
|
||||
update_inv_legcuffed()
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
success = 1
|
||||
update_inv_r_hand()
|
||||
else if (W == l_hand)
|
||||
l_hand = null
|
||||
success = 1
|
||||
update_inv_l_hand()
|
||||
else
|
||||
return 0
|
||||
|
||||
if(success)
|
||||
if (W)
|
||||
if (client)
|
||||
client.screen -= W
|
||||
W.loc = loc
|
||||
W.dropped(src)
|
||||
if(W)
|
||||
W.layer = initial(W.layer)
|
||||
|
||||
update_action_buttons()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
|
||||
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
|
||||
if(!slot) return
|
||||
if(!istype(W)) return
|
||||
|
||||
if(W == get_active_hand())
|
||||
u_equip(W)
|
||||
|
||||
W.loc = src
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_back(redraw_mob)
|
||||
if(slot_wear_mask)
|
||||
src.wear_mask = W
|
||||
if(wear_mask.flags & BLOCKHAIR)
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
if(slot_legcuffed)
|
||||
src.legcuffed = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_legcuffed(redraw_mob)
|
||||
if(slot_l_hand)
|
||||
src.l_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_l_hand(redraw_mob)
|
||||
if(slot_r_hand)
|
||||
src.r_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_r_hand(redraw_mob)
|
||||
if(slot_belt)
|
||||
src.belt = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_belt(redraw_mob)
|
||||
if(slot_wear_id)
|
||||
src.wear_id = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_id(redraw_mob)
|
||||
if(slot_ears)
|
||||
src.ears = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_ears(redraw_mob)
|
||||
if(slot_glasses)
|
||||
src.glasses = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_glasses(redraw_mob)
|
||||
if(slot_gloves)
|
||||
src.gloves = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_gloves(redraw_mob)
|
||||
if(slot_head)
|
||||
src.head = W
|
||||
if(head.flags & BLOCKHAIR)
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
if(istype(W,/obj/item/clothing/head/kitty))
|
||||
W.update_icon(src)
|
||||
W.equipped(src, slot)
|
||||
update_inv_head(redraw_mob)
|
||||
if(slot_shoes)
|
||||
src.shoes = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_shoes(redraw_mob)
|
||||
if(slot_wear_suit)
|
||||
src.wear_suit = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_suit(redraw_mob)
|
||||
if(slot_w_uniform)
|
||||
src.w_uniform = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_w_uniform(redraw_mob)
|
||||
if(slot_l_store)
|
||||
src.l_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_pockets(redraw_mob)
|
||||
if(slot_r_store)
|
||||
src.r_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_pockets(redraw_mob)
|
||||
if(slot_s_store)
|
||||
src.s_store = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_s_store(redraw_mob)
|
||||
if(slot_in_backpack)
|
||||
W.loc = src.back
|
||||
else
|
||||
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/effect/equip_e
|
||||
name = "equip e"
|
||||
var/mob/source = null
|
||||
var/s_loc = null //source location
|
||||
var/t_loc = null //target location
|
||||
var/obj/item/item = null
|
||||
var/place = null
|
||||
|
||||
/obj/effect/equip_e/human
|
||||
name = "human"
|
||||
var/mob/living/carbon/human/target = null
|
||||
|
||||
/obj/effect/equip_e/monkey
|
||||
name = "monkey"
|
||||
var/mob/living/carbon/monkey/target = null
|
||||
|
||||
/obj/effect/equip_e/process()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/proc/done()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/New()
|
||||
if (!ticker)
|
||||
del(src)
|
||||
spawn(100)
|
||||
del(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/human/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
if (!item)
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (!( target.wear_mask ))
|
||||
del(src)
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
del(src)
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
del(src)
|
||||
if("suit")
|
||||
if (!( target.wear_suit ))
|
||||
del(src)
|
||||
if("uniform")
|
||||
if (!( target.w_uniform ))
|
||||
del(src)
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
del(src)
|
||||
if("syringe")
|
||||
return
|
||||
if("pill")
|
||||
return
|
||||
if("fuel")
|
||||
return
|
||||
if("drink")
|
||||
return
|
||||
if("dnainjector")
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
del(src)
|
||||
if("id")
|
||||
if ((!( target.wear_id ) || !( target.w_uniform )))
|
||||
del(src)
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
|
||||
del(src)
|
||||
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
|
||||
if ((item && !( L.Find(place) )))
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
del(src)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
|
||||
else
|
||||
var/message=null
|
||||
switch(place)
|
||||
if("syringe")
|
||||
message = "\red <B>[source] is trying to inject [target]!</B>"
|
||||
if("pill")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow [item]!</B>"
|
||||
if("drink")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
|
||||
if("dnainjector")
|
||||
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
|
||||
if("mask")
|
||||
if(target.wear_mask && !target.wear_mask.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [source.wear_mask] from [target]'s head!</B>"
|
||||
if("l_hand")
|
||||
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
|
||||
if("r_hand")
|
||||
message = "\red <B>[source] is trying to take off \a [target.r_hand] from [target]'s right hand!</B>"
|
||||
if("gloves")
|
||||
if(target.gloves && !target.gloves.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
|
||||
if("eyes")
|
||||
if(target.glasses && !target.glasses.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
|
||||
if("ears")
|
||||
if(target.ears && !target.ears.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.ears] from [target]'s ears!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.ears] from [target]'s ears!</B>"
|
||||
if("head")
|
||||
if(target.head && !target.head.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
|
||||
if("shoes")
|
||||
if(target.shoes && !target.shoes.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
|
||||
if("belt")
|
||||
message = "\red <B>[source] is trying to take off the [target.belt] from [target]'s belt!</B>"
|
||||
if("suit")
|
||||
if(target.wear_suit && !target.wear_suit.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
|
||||
if("back")
|
||||
message = "\red <B>[source] is trying to take off \a [target.back] from [target]'s back!</B>"
|
||||
if("handcuff")
|
||||
message = "\red <B>[source] is trying to unhandcuff [target]!</B>"
|
||||
if("legcuff")
|
||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||
if("uniform")
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
if("s_store")
|
||||
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
|
||||
if("pockets")
|
||||
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
|
||||
if(MT.armed)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
if(O == source)
|
||||
O.show_message("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>", 1)
|
||||
else
|
||||
O.show_message("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>", 1)
|
||||
target.u_equip(MT)
|
||||
if (target.client)
|
||||
target.client.screen -= MT
|
||||
MT.loc = source.loc
|
||||
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
|
||||
MT.layer = OBJ_LAYER
|
||||
return
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 3)
|
||||
del(src)
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("id")
|
||||
message = "\red <B>[source] is trying to take off [target.wear_id] from [target]'s uniform!</B>"
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
message = "\red <B>[source] is trying to remove [target]'s internals</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message(message, 1)
|
||||
spawn( HUMAN_STRIP_DELAY )
|
||||
done()
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag.
|
||||
It works in conjuction with the process() above.
|
||||
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
|
||||
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
|
||||
The else statement is for equipping stuff to empty slots.
|
||||
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
|
||||
It can still be worn/put on as normal.
|
||||
*/
|
||||
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
|
||||
if(!source || !target) return //Target or source no longer exist
|
||||
if(source.loc != s_loc) return //source has moved
|
||||
if(target.loc != t_loc) return //target has moved
|
||||
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
|
||||
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
|
||||
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead
|
||||
|
||||
var/slot_to_process
|
||||
var/strip_item //this will tell us which item we will be stripping - if any.
|
||||
|
||||
switch(place) //here we go again...
|
||||
if("mask")
|
||||
slot_to_process = slot_wear_mask
|
||||
if (target.wear_mask)
|
||||
strip_item = target.wear_mask
|
||||
if("gloves")
|
||||
slot_to_process = slot_gloves
|
||||
if (target.gloves)
|
||||
strip_item = target.gloves
|
||||
if("eyes")
|
||||
slot_to_process = slot_glasses
|
||||
if (target.glasses)
|
||||
strip_item = target.glasses
|
||||
if("belt")
|
||||
slot_to_process = slot_belt
|
||||
if (target.belt)
|
||||
strip_item = target.belt
|
||||
if("s_store")
|
||||
slot_to_process = slot_s_store
|
||||
if (target.s_store)
|
||||
strip_item = target.s_store
|
||||
if("head")
|
||||
slot_to_process = slot_head
|
||||
if (target.head)
|
||||
strip_item = target.head
|
||||
if("ears")
|
||||
slot_to_process = slot_ears
|
||||
if (target.ears)
|
||||
strip_item = target.ears
|
||||
if("shoes")
|
||||
slot_to_process = slot_shoes
|
||||
if (target.shoes)
|
||||
strip_item = target.shoes
|
||||
if("l_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
del(src)
|
||||
slot_to_process = slot_l_hand
|
||||
if (target.l_hand)
|
||||
strip_item = target.l_hand
|
||||
if("r_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
del(src)
|
||||
slot_to_process = slot_r_hand
|
||||
if (target.r_hand)
|
||||
strip_item = target.r_hand
|
||||
if("uniform")
|
||||
slot_to_process = slot_w_uniform
|
||||
if (target.w_uniform)
|
||||
strip_item = target.w_uniform
|
||||
if("suit")
|
||||
slot_to_process = slot_wear_suit
|
||||
if (target.wear_suit)
|
||||
strip_item = target.wear_suit
|
||||
if("id")
|
||||
slot_to_process = slot_wear_id
|
||||
if (target.wear_id)
|
||||
strip_item = target.wear_id
|
||||
if("back")
|
||||
slot_to_process = slot_back
|
||||
if (target.back)
|
||||
strip_item = target.back
|
||||
if("handcuff")
|
||||
slot_to_process = slot_handcuffed
|
||||
if (target.handcuffed)
|
||||
strip_item = target.handcuffed
|
||||
if("legcuff")
|
||||
slot_to_process = slot_legcuffed
|
||||
if (target.legcuffed)
|
||||
strip_item = target.legcuffed
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 30)
|
||||
del(src)
|
||||
if ((target.health >= -99.0 && target.health <= 0))
|
||||
target.cpr_time = world.time
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] performs CPR on [target]!", 1)
|
||||
target << "\blue <b>You feel a breath of fresh air enter your lungs. It feels good.</b>"
|
||||
source << "\red Repeat at least every 7 seconds."
|
||||
if("dnainjector")
|
||||
var/obj/item/weapon/dnainjector/S = item
|
||||
if(S)
|
||||
S.add_fingerprint(source)
|
||||
if (!( istype(S, /obj/item/weapon/dnainjector) ))
|
||||
S.inuse = 0
|
||||
del(src)
|
||||
S.inject(target, source)
|
||||
if (S.s_time >= world.time + 30)
|
||||
S.inuse = 0
|
||||
del(src)
|
||||
S.s_time = world.time
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
|
||||
S.inuse = 0
|
||||
if("pockets")
|
||||
slot_to_process = slot_l_store
|
||||
strip_item = target.l_store //We'll do both
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal0"
|
||||
else
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
else if (istype(target.s_store, /obj/item/weapon/tank))
|
||||
target.internal = target.s_store
|
||||
else if (istype(target.belt, /obj/item/weapon/tank))
|
||||
target.internal = target.belt
|
||||
if (target.internal)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
M.show_message("[source] is now running on internals.", 1)
|
||||
target.internal.add_fingerprint(source)
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal1"
|
||||
if(slot_to_process)
|
||||
if(strip_item) //Stripping an item from the mob
|
||||
target.u_equip(strip_item)
|
||||
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
|
||||
if(target.r_store)
|
||||
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
|
||||
else
|
||||
if(item) //Placing an item on the mob
|
||||
if(item.mob_can_equip(target, slot_to_process, 0))
|
||||
source.u_equip(item)
|
||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||
source.update_icons()
|
||||
target.update_icons()
|
||||
|
||||
if(source)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
del(src)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,5 @@
|
||||
/mob/living/carbon/human/Login()
|
||||
..()
|
||||
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
update_hud()
|
||||
ticker.mode.update_all_synd_icons() //This proc only sounds CPU-expensive on paper. It is O(n^2), but the outer for-loop only iterates through syndicates, which are only prsenet in nuke rounds and even when they exist, there's usually 6 of them.
|
||||
return
|
||||
|
||||
@@ -1,30 +1,50 @@
|
||||
/mob/living/carbon/human/say(var/message)
|
||||
/* if(src.mutantrace == "lizard")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = dd_replaceText(message, "s", stutter("ss"))*///Just here for reference. -- Erthilo
|
||||
if(src.mutantrace == "metroid" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
message = ";"
|
||||
else
|
||||
message = ""
|
||||
message += "SKR"
|
||||
var/imax = rand(5,20)
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"
|
||||
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++)
|
||||
if(prob(5 * D.stage))
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = "HONK"
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
if (silent)
|
||||
return
|
||||
|
||||
//Mimes dont speak! Changeling hivemind and emotes are allowed.
|
||||
if(miming)
|
||||
if(length(message) >= 2)
|
||||
if(mind && mind.changeling)
|
||||
if(copytext(message, 1, 2) != "*" && copytext(message, 1, 3) != ":g" && copytext(message, 1, 3) != ":G" && copytext(message, 1, 3) != ":ï")
|
||||
return
|
||||
else
|
||||
return ..(message)
|
||||
|
||||
if(length(message) >= 1) //In case people forget the '*help' command, this will slow them the message and prevent people from saying one letter at a time
|
||||
if (copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if(src.dna)
|
||||
if(src.dna.mutantrace == "lizard")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = dd_replacetext(message, "s", stutter("ss"))
|
||||
|
||||
if(src.dna.mutantrace == "metroid" && prob(5))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
if(copytext(message, 1, 2) == ";")
|
||||
message = ";"
|
||||
else
|
||||
message = ""
|
||||
message += "SKR"
|
||||
var/imax = rand(5,20)
|
||||
for(var/i = 0,i<imax,i++)
|
||||
message += "E"
|
||||
|
||||
if(stat != 2)
|
||||
for(var/datum/disease/pierrot_throat/D in viruses)
|
||||
var/list/temp_message = dd_text2list(message, " ") //List each word in the message
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
|
||||
pick_list += i
|
||||
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++) //Loop for each stage of the disease or until we run out of words
|
||||
if(prob(3 * D.stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = "HONK"
|
||||
pick_list -= H //Make sure that you dont HONK the same word twice
|
||||
message = dd_list2text(temp_message, " ")
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/luchador))
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
@@ -62,37 +82,37 @@
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replaceText(message, "o", "¤")
|
||||
message = dd_replaceText(message, "p", "þ")
|
||||
message = dd_replaceText(message, "l", "£")
|
||||
message = dd_replaceText(message, "s", "§")
|
||||
message = dd_replaceText(message, "u", "µ")
|
||||
message = dd_replaceText(message, "b", "ß")
|
||||
message = dd_replacetext(message, "o", "¤")
|
||||
message = dd_replacetext(message, "p", "þ")
|
||||
message = dd_replacetext(message, "l", "£")
|
||||
message = dd_replacetext(message, "s", "§")
|
||||
message = dd_replacetext(message, "u", "µ")
|
||||
message = dd_replacetext(message, "b", "ß")
|
||||
/*This text is hilarious but also absolutely retarded.
|
||||
message = dd_replaceText(message, "l", "r")
|
||||
message = dd_replaceText(message, "rr", "ru")
|
||||
message = dd_replaceText(message, "v", "b")
|
||||
message = dd_replaceText(message, "f", "hu")
|
||||
message = dd_replaceText(message, "'t", "")
|
||||
message = dd_replaceText(message, "t ", "to ")
|
||||
message = dd_replaceText(message, " I ", " ai ")
|
||||
message = dd_replaceText(message, "th", "z")
|
||||
message = dd_replaceText(message, "ish", "isu")
|
||||
message = dd_replaceText(message, "is", "izu")
|
||||
message = dd_replaceText(message, "ziz", "zis")
|
||||
message = dd_replaceText(message, "se", "su")
|
||||
message = dd_replaceText(message, "br", "bur")
|
||||
message = dd_replaceText(message, "ry", "ri")
|
||||
message = dd_replaceText(message, "you", "yuu")
|
||||
message = dd_replaceText(message, "ck", "cku")
|
||||
message = dd_replaceText(message, "eu", "uu")
|
||||
message = dd_replaceText(message, "ow", "au")
|
||||
message = dd_replaceText(message, "are", "aa")
|
||||
message = dd_replaceText(message, "ay", "ayu")
|
||||
message = dd_replaceText(message, "ea", "ii")
|
||||
message = dd_replaceText(message, "ch", "chi")
|
||||
message = dd_replaceText(message, "than", "sen")
|
||||
message = dd_replaceText(message, ".", "")
|
||||
message = dd_replacetext(message, "l", "r")
|
||||
message = dd_replacetext(message, "rr", "ru")
|
||||
message = dd_replacetext(message, "v", "b")
|
||||
message = dd_replacetext(message, "f", "hu")
|
||||
message = dd_replacetext(message, "'t", "")
|
||||
message = dd_replacetext(message, "t ", "to ")
|
||||
message = dd_replacetext(message, " I ", " ai ")
|
||||
message = dd_replacetext(message, "th", "z")
|
||||
message = dd_replacetext(message, "ish", "isu")
|
||||
message = dd_replacetext(message, "is", "izu")
|
||||
message = dd_replacetext(message, "ziz", "zis")
|
||||
message = dd_replacetext(message, "se", "su")
|
||||
message = dd_replacetext(message, "br", "bur")
|
||||
message = dd_replacetext(message, "ry", "ri")
|
||||
message = dd_replacetext(message, "you", "yuu")
|
||||
message = dd_replacetext(message, "ck", "cku")
|
||||
message = dd_replacetext(message, "eu", "uu")
|
||||
message = dd_replacetext(message, "ow", "au")
|
||||
message = dd_replacetext(message, "are", "aa")
|
||||
message = dd_replacetext(message, "ay", "ayu")
|
||||
message = dd_replacetext(message, "ea", "ii")
|
||||
message = dd_replacetext(message, "ch", "chi")
|
||||
message = dd_replacetext(message, "than", "sen")
|
||||
message = dd_replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
*/
|
||||
..(message)
|
||||
@@ -110,6 +130,4 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human/tajaran))
|
||||
return 1
|
||||
return ..()
|
||||
@@ -0,0 +1,660 @@
|
||||
///////////////////////
|
||||
//UPDATE_ICONS SYSTEM//
|
||||
///////////////////////
|
||||
/*
|
||||
Calling this a system is perhaps a bit trumped up. It is essentially update_clothing dismantled into its
|
||||
core parts. The key difference is that when we generate overlays we do not generate either lying or standing
|
||||
versions. Instead, we generate both and store them in two fixed-length lists, both using the same list-index
|
||||
(The indexes are in update_icons.dm): Each list for humans is (at the time of writing) of length 19.
|
||||
This will hopefully be reduced as the system is refined.
|
||||
|
||||
var/overlays_lying[19] //For the lying down stance
|
||||
var/overlays_standing[19] //For the standing stance
|
||||
|
||||
When we call update_icons, the 'lying' variable is checked and then the appropriate list is assigned to our overlays!
|
||||
That in itself uses a tiny bit more memory (no more than all the ridiculous lists the game has already mind you).
|
||||
|
||||
On the other-hand, it should be very CPU cheap in comparison to the old system.
|
||||
In the old system, we updated all our overlays every life() call, even if we were standing still inside a crate!
|
||||
or dead!. 25ish overlays, all generated from scratch every second for every xeno/human/monkey and then applied.
|
||||
More often than not update_clothing was being called a few times in addition to that! CPU was not the only issue,
|
||||
all those icons had to be sent to every client. So really the cost was extremely cumulative. To the point where
|
||||
update_clothing would frequently appear in the top 10 most CPU intensive procs during profiling.
|
||||
|
||||
Another feature of this new system is that our lists are indexed. This means we can update specific overlays!
|
||||
So we only regenerate icons when we need them to be updated! This is the main saving for this system.
|
||||
|
||||
In practice this means that:
|
||||
everytime you fall over, we just switch between precompiled lists. Which is fast and cheap.
|
||||
Everytime you do something minor like take a pen out of your pocket, we only update the in-hand overlay
|
||||
etc...
|
||||
|
||||
|
||||
There are several things that need to be remembered:
|
||||
|
||||
> Whenever we do something that should cause an overlay to update (which doesn't use standard procs
|
||||
( i.e. you do something like l_hand = /obj/item/something new(src) )
|
||||
You will need to call the relevant update_inv_* proc:
|
||||
update_inv_head()
|
||||
update_inv_wear_suit()
|
||||
update_inv_gloves()
|
||||
update_inv_shoes()
|
||||
update_inv_w_uniform()
|
||||
update_inv_glasse()
|
||||
update_inv_l_hand()
|
||||
update_inv_r_hand()
|
||||
update_inv_belt()
|
||||
update_inv_wear_id()
|
||||
update_inv_ears()
|
||||
update_inv_s_store()
|
||||
update_inv_pockets()
|
||||
update_inv_back()
|
||||
update_inv_handcuffed()
|
||||
update_inv_wear_mask()
|
||||
|
||||
All of these are named after the variable they update from. They are defined at the mob/ level like
|
||||
update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a
|
||||
metroid etc. Instead, it'll just return without doing any work. So no harm in calling it for metroids and such.
|
||||
|
||||
|
||||
> There are also these special cases:
|
||||
update_mutations() //handles updating your appearance for certain mutations. e.g TK head-glows
|
||||
update_mutantrace() //handles updating your appearance after setting the mutantrace var
|
||||
UpdateDamageIcon() //handles damage overlays for brute/burn damage //(will rename this when I geta round to it)
|
||||
update_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc
|
||||
update_hair() //Handles updating your hair overlay (used to be update_face, but mouth and
|
||||
...eyes were merged into update_body)
|
||||
|
||||
> All of these procs update our overlays_lying and overlays_standing, and then call update_icons() by default.
|
||||
If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call
|
||||
it manually:
|
||||
e.g.
|
||||
update_inv_head(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_r_hand() //<---calls update_icons()
|
||||
|
||||
or equivillantly:
|
||||
update_inv_head(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_r_hand(0)
|
||||
update_icons()
|
||||
|
||||
> If you need to update all overlays you can use regenerate_icons(). it works exactly like update_clothing used to.
|
||||
|
||||
> I reimplimented an old unused variable which was in the code called (coincidentally) var/update_icon
|
||||
It can be used as another method of triggering regenerate_icons(). It's basically a flag that when set to non-zero
|
||||
will call regenerate_icons() at the next life() call and then reset itself to 0.
|
||||
The idea behind it is icons are regenerated only once, even if multiple events requested it.
|
||||
|
||||
This system is confusing and is still a WIP. It's primary goal is speeding up the controls of the game whilst
|
||||
reducing processing costs. So please bear with me while I iron out the kinks. It will be worth it, I promise.
|
||||
If I can eventually free var/lying stuff from the life() process altogether, stuns/death/status stuff
|
||||
will become less affected by lag-spikes and will be instantaneous! :3
|
||||
|
||||
If you have any questions/constructive-comments/bugs-to-report/or have a massivly devestated butt...
|
||||
Please contact me on #coderbus IRC. ~Carn x
|
||||
*/
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#define MUTANTRACE_LAYER 1 //TODO: make part of body?
|
||||
#define MUTATIONS_LAYER 2
|
||||
#define DAMAGE_LAYER 3
|
||||
#define UNIFORM_LAYER 4
|
||||
#define ID_LAYER 5
|
||||
#define SHOES_LAYER 6
|
||||
#define GLOVES_LAYER 7
|
||||
#define EARS_LAYER 8
|
||||
#define SUIT_LAYER 9
|
||||
#define GLASSES_LAYER 10
|
||||
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 12
|
||||
#define BACK_LAYER 13
|
||||
#define HAIR_LAYER 14 //TODO: make part of head layer?
|
||||
#define FACEMASK_LAYER 15
|
||||
#define HEAD_LAYER 16
|
||||
#define HANDCUFF_LAYER 17
|
||||
#define LEGCUFF_LAYER 18
|
||||
#define L_HAND_LAYER 19
|
||||
#define R_HAND_LAYER 20
|
||||
#define TOTAL_LAYERS 20
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/list/overlays_lying[TOTAL_LAYERS]
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
|
||||
|
||||
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
|
||||
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
|
||||
//I'll work on removing that stuff by rewriting some of the cloaking stuff at a later date.
|
||||
/mob/living/carbon/human/update_icons()
|
||||
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays = null
|
||||
|
||||
if(lying) //can't be cloaked when lying. (for now)
|
||||
icon = lying_icon
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
var/stealth = 0
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_active)
|
||||
stealth = 1
|
||||
else
|
||||
//cloaking devices. //TODO: get rid of this :<
|
||||
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
|
||||
if(S.active)
|
||||
stealth = 1
|
||||
break
|
||||
if(stealth)
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "body_cloaked"
|
||||
var/image/I = overlays_standing[L_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
I = overlays_standing[R_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
else
|
||||
icon = stand_icon
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
|
||||
//DAMAGE OVERLAYS
|
||||
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
|
||||
/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1)
|
||||
var/image/standing = image("icon" = 'icons/mob/dam_human.dmi', "icon_state" = "blank")
|
||||
var/image/lying = image("icon" = 'icons/mob/dam_human.dmi', "icon_state" = "blank2")
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if(O.brutestate)
|
||||
standing.overlays += "[O.icon_name]_[O.brutestate]0" //we're adding icon_states of the base image as overlays
|
||||
lying.overlays += "[O.icon_name]2_[O.brutestate]0"
|
||||
if(O.burnstate)
|
||||
standing.overlays += "[O.icon_name]_0[O.burnstate]"
|
||||
lying.overlays += "[O.icon_name]2_0[O.burnstate]"
|
||||
|
||||
overlays_standing[DAMAGE_LAYER] = standing
|
||||
overlays_lying[DAMAGE_LAYER] = lying
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//BASE MOB SPRITE
|
||||
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
|
||||
if(stand_icon) del(stand_icon)
|
||||
if(lying_icon) del(lying_icon)
|
||||
if(dna && dna.mutantrace) return
|
||||
var/husk = (HUSK in src.mutations)
|
||||
var/fat = (FAT in src.mutations)
|
||||
var/g = "m"
|
||||
if(gender == FEMALE) g = "f"
|
||||
//Base mob icon
|
||||
if(husk)
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "husk_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "husk_l")
|
||||
else if(fat)
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l")
|
||||
else
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "body_[g]_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l")
|
||||
|
||||
//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
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
//Eyes
|
||||
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
|
||||
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "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)
|
||||
stand_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(eyes_l, ICON_OVERLAY)
|
||||
|
||||
//Mouth
|
||||
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "mouth_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "mouth_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
//Underwear
|
||||
if(underwear < 12 && underwear > 0)
|
||||
if(!fat)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
//HAIR OVERLAY
|
||||
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
|
||||
//Reset our hair
|
||||
overlays_lying[HAIR_LAYER] = null
|
||||
overlays_standing[HAIR_LAYER] = null
|
||||
|
||||
//mutants don't have hair. masks and helmets can obscure our hair too.
|
||||
if( (dna && dna.mutantrace) || (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)) )
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
//base icons
|
||||
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
|
||||
var/icon/face_lying = new /icon('icons/mob/human_face.dmi',"bald_l")
|
||||
|
||||
if(f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
|
||||
if(facial_hair_style)
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
face_standing.Blend(facial_s, ICON_OVERLAY)
|
||||
face_lying.Blend(facial_l, ICON_OVERLAY)
|
||||
|
||||
if(h_style)
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
if(hair_style)
|
||||
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")
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
face_standing.Blend(hair_s, ICON_OVERLAY)
|
||||
face_lying.Blend(hair_l, ICON_OVERLAY)
|
||||
|
||||
overlays_lying[HAIR_LAYER] = image(face_lying)
|
||||
overlays_standing[HAIR_LAYER] = image(face_standing)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_mutations(var/update_icons=1)
|
||||
var/fat
|
||||
if( FAT in mutations )
|
||||
fat = "fat"
|
||||
|
||||
var/image/lying = image("icon" = 'icons/effects/genetics.dmi')
|
||||
var/image/standing = image("icon" = 'icons/effects/genetics.dmi')
|
||||
var/add_image = 0
|
||||
for(var/mut in mutations)
|
||||
switch(mut)
|
||||
if(HULK)
|
||||
lying.underlays += "hulk[fat]_l"
|
||||
standing.underlays += "hulk[fat]_s"
|
||||
add_image = 1
|
||||
if(COLD_RESISTANCE)
|
||||
lying.underlays += "fire[fat]_l"
|
||||
standing.underlays += "fire[fat]_s"
|
||||
add_image = 1
|
||||
if(TK)
|
||||
lying.underlays += "telekinesishead[fat]_l"
|
||||
standing.underlays += "telekinesishead[fat]_s"
|
||||
add_image = 1
|
||||
if(LASER)
|
||||
lying.overlays += "lasereyes_l"
|
||||
standing.overlays += "lasereyes_s"
|
||||
add_image = 1
|
||||
if(add_image)
|
||||
overlays_lying[MUTATIONS_LAYER] = lying
|
||||
overlays_standing[MUTATIONS_LAYER] = standing
|
||||
else
|
||||
overlays_lying[MUTATIONS_LAYER] = null
|
||||
overlays_standing[MUTATIONS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
|
||||
var/fat
|
||||
if( FAT in mutations )
|
||||
fat = "fat"
|
||||
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("lizard","golem","metroid")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_s")
|
||||
if("plant")
|
||||
if(stat == DEAD) //TODO
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = null
|
||||
overlays_standing[MUTANTRACE_LAYER] = null
|
||||
update_body(0)
|
||||
update_hair(0)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/* --------------------------------------- */
|
||||
//For legacy support.
|
||||
/mob/living/carbon/human/regenerate_icons()
|
||||
..()
|
||||
if(monkeyizing) return
|
||||
update_mutations(0)
|
||||
update_mutantrace(0)
|
||||
update_inv_w_uniform(0)
|
||||
update_inv_wear_id(0)
|
||||
update_inv_gloves(0)
|
||||
update_inv_glasses(0)
|
||||
update_inv_ears(0)
|
||||
update_inv_shoes(0)
|
||||
update_inv_s_store(0)
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_head(0)
|
||||
update_inv_belt(0)
|
||||
update_inv_back(0)
|
||||
update_inv_wear_suit(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_inv_legcuffed(0)
|
||||
update_inv_pockets(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
|
||||
/* --------------------------------------- */
|
||||
//vvvvvv UPDATE_INV PROCS vvvvvv
|
||||
|
||||
/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1)
|
||||
if(w_uniform && istype(w_uniform, /obj/item/clothing/under) )
|
||||
w_uniform.screen_loc = ui_iclothing
|
||||
var/t_color = w_uniform.color
|
||||
if(!t_color) t_color = icon_state
|
||||
var/image/lying = image("icon_state" = "[t_color]_l")
|
||||
var/image/standing = image("icon_state" = "[t_color]_s")
|
||||
|
||||
if(FAT in mutations)
|
||||
if(w_uniform.flags&ONESIZEFITSALL)
|
||||
lying.icon = 'icons/mob/uniform_fat.dmi'
|
||||
standing.icon = 'icons/mob/uniform_fat.dmi'
|
||||
else
|
||||
src << "\red You burst out of \the [w_uniform]!"
|
||||
drop_from_inventory(w_uniform)
|
||||
return
|
||||
else
|
||||
lying.icon = 'icons/mob/uniform.dmi'
|
||||
standing.icon = 'icons/mob/uniform.dmi'
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
overlays_lying[UNIFORM_LAYER] = lying
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
overlays_lying[UNIFORM_LAYER] = null
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
||||
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(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
|
||||
if(wear_id)
|
||||
overlays_lying[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id2")
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
else
|
||||
overlays_lying[ID_LAYER] = null
|
||||
overlays_standing[ID_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
|
||||
if(gloves)
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
var/image/lying = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
|
||||
if(gloves.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_lying[GLOVES_LAYER] = lying
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
overlays_lying[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands2")
|
||||
overlays_standing[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
else
|
||||
overlays_lying[GLOVES_LAYER] = null
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
|
||||
if(glasses)
|
||||
overlays_lying[GLASSES_LAYER] = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]2")
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
else
|
||||
overlays_lying[GLASSES_LAYER] = null
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
if(ears)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[ears.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[ears.icon_state]")
|
||||
else
|
||||
overlays_lying[EARS_LAYER] = null
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
|
||||
if(shoes)
|
||||
var/image/lying = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
if(shoes.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
overlays_lying[SHOES_LAYER] = lying
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
overlays_lying[SHOES_LAYER] = null
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
|
||||
if(s_store)
|
||||
var/t_state = s_store.item_state
|
||||
if(!t_state) t_state = s_store.icon_state
|
||||
overlays_lying[SUIT_STORE_LAYER] = image("icon" = 'icons/mob/belt_mirror.dmi', "icon_state" = "[t_state]2")
|
||||
overlays_standing[SUIT_STORE_LAYER] = image("icon" = 'icons/mob/belt_mirror.dmi', "icon_state" = "[t_state]")
|
||||
s_store.screen_loc = ui_sstore1 //TODO
|
||||
else
|
||||
overlays_lying[SUIT_STORE_LAYER] = null
|
||||
overlays_standing[SUIT_STORE_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_head(var/update_icons=1)
|
||||
if(head)
|
||||
head.screen_loc = ui_head //TODO
|
||||
var/image/lying
|
||||
var/image/standing
|
||||
if(istype(head,/obj/item/clothing/head/kitty))
|
||||
lying = image("icon" = head:mob2)
|
||||
standing = image("icon" = head:mob)
|
||||
else
|
||||
lying = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]2")
|
||||
standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]")
|
||||
if(head.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
overlays_lying[HEAD_LAYER] = lying
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_lying[HEAD_LAYER] = null
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_belt(var/update_icons=1)
|
||||
if(belt)
|
||||
belt.screen_loc = ui_belt //TODO
|
||||
var/t_state = belt.item_state
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
overlays_lying[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]2")
|
||||
overlays_standing[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_lying[BELT_LAYER] = null
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
|
||||
if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this
|
||||
wear_suit.screen_loc = ui_oclothing //TODO
|
||||
var/image/lying = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
if(FAT in mutations)
|
||||
if(!wear_suit.flags&ONESIZEFITSALL)
|
||||
src << "\red You burst out of \the [wear_suit]!"
|
||||
var/obj/item/clothing/c = wear_suit
|
||||
wear_suit = null
|
||||
if(client)
|
||||
client.screen -= c
|
||||
c.loc = loc
|
||||
c.dropped(src)
|
||||
c.layer = initial(c.layer)
|
||||
lying = null
|
||||
standing = null
|
||||
|
||||
else
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_state
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
|
||||
t_state = "armor"
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
|
||||
|
||||
overlays_lying[SUIT_LAYER] = lying
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
else
|
||||
overlays_lying[SUIT_LAYER] = null
|
||||
overlays_standing[SUIT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_pockets(var/update_icons=1)
|
||||
if(l_store) l_store.screen_loc = ui_storage1 //TODO
|
||||
if(r_store) r_store.screen_loc = ui_storage2 //TODO
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
var/image/lying = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
overlays_lying[FACEMASK_LAYER] = lying
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
else
|
||||
overlays_lying[FACEMASK_LAYER] = null
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
back.screen_loc = ui_back //TODO
|
||||
overlays_lying[BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
|
||||
else
|
||||
overlays_lying[BACK_LAYER] = null
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
|
||||
if(client)
|
||||
client.screen |= contents
|
||||
if(hud_used)
|
||||
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
|
||||
if(handcuffed)
|
||||
stop_pulling() //TODO: should be handled elsewhere
|
||||
overlays_lying[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[HANDCUFF_LAYER] = null
|
||||
overlays_standing[HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
|
||||
if(legcuffed)
|
||||
overlays_lying[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff2")
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
if(src.m_intent != "walk")
|
||||
src.m_intent = "walk"
|
||||
if(src.hud_used && src.hud_used.move_intent)
|
||||
src.hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
else
|
||||
overlays_lying[LEGCUFF_LAYER] = null
|
||||
overlays_standing[LEGCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#undef MUTANTRACE_LAYER
|
||||
#undef MUTATIONS_LAYER
|
||||
#undef DAMAGE_LAYER
|
||||
#undef UNIFORM_LAYER
|
||||
#undef ID_LAYER
|
||||
#undef SHOES_LAYER
|
||||
#undef GLOVES_LAYER
|
||||
#undef EARS_LAYER
|
||||
#undef SUIT_LAYER
|
||||
#undef GLASSES_LAYER
|
||||
#undef FACEMASK_LAYER
|
||||
#undef BELT_LAYER
|
||||
#undef SUIT_STORE_LAYER
|
||||
#undef BACK_LAYER
|
||||
#undef HAIR_LAYER
|
||||
#undef HEAD_LAYER
|
||||
#undef HANDCUFF_LAYER
|
||||
#undef LEGCUFF_LAYER
|
||||
#undef L_HAND_LAYER
|
||||
#undef R_HAND_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
@@ -1,19 +1,20 @@
|
||||
//Lallander was here
|
||||
/mob/living/carbon/human/whisper(message as text)
|
||||
//Figured it out. If you use say :w (message) it HTML encodes it, THEN passes it to the whisper code, which does so again. Jeez. --SkyMarshal
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
if (!message || silent || miming)
|
||||
return
|
||||
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client && (src.client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (src.client)
|
||||
if (src.client.muted_ic)
|
||||
src << "\red You cannot whisper (muted by admins)."
|
||||
return
|
||||
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
if(!speech_allowed && usr == src)
|
||||
usr << "\red You can't speak."
|
||||
return
|
||||
|
||||
if (src.stat == 2)
|
||||
return src.say_dead(message)
|
||||
@@ -26,7 +27,7 @@
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
// Mute disability
|
||||
if (src.disabilities & 64)
|
||||
if (src.sdisabilities & MUTE)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
@@ -47,30 +48,25 @@
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replaceText(message, "o", "¤")
|
||||
message = dd_replaceText(message, "p", "þ")
|
||||
message = dd_replaceText(message, "l", "£")
|
||||
message = dd_replaceText(message, "s", "§")
|
||||
message = dd_replaceText(message, "u", "µ")
|
||||
message = dd_replaceText(message, "b", "ß")
|
||||
|
||||
message = capitalize(message)
|
||||
message = dd_replacetext(message, "o", "¤")
|
||||
message = dd_replacetext(message, "p", "þ")
|
||||
message = dd_replacetext(message, "l", "£")
|
||||
message = dd_replacetext(message, "s", "§")
|
||||
message = dd_replacetext(message, "u", "µ")
|
||||
message = dd_replacetext(message, "b", "ß")
|
||||
|
||||
if (src.stuttering)
|
||||
message = NewStutter(message,stunned)
|
||||
if (src.slurring)
|
||||
message = slur(message)
|
||||
message = stutter(message)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
var/list/listening = get_mobs_in_view(message_range, src)
|
||||
// listening -= src
|
||||
// listening += src
|
||||
// WAT.
|
||||
var/list/eavesdropping = get_mobs_in_view(message_range, src)
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening -= src
|
||||
listening += src
|
||||
var/list/eavesdropping = hearers(2, src)
|
||||
eavesdropping -= src
|
||||
eavesdropping -= listening
|
||||
var/list/watching = hearers(5, src)
|
||||
@@ -162,10 +158,8 @@
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
if(!M.client)
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if (!(M.client))
|
||||
continue
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1 && !(M in heard_a) && M.client.ghost_ears)
|
||||
if (M.stat > 1 && !(M in heard_a))
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
@@ -1,42 +1,20 @@
|
||||
/mob/living/carbon/metroid/death(gibbed)
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "baby metroid dead"
|
||||
|
||||
if(!gibbed)
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
|
||||
if(client)
|
||||
var/mob/dead/observer/ghost = new(src)
|
||||
ghost.key = key
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
|
||||
explosion(get_turf(src), -1,-1,3,12)
|
||||
sleep(2)
|
||||
del(src)
|
||||
ghostize()
|
||||
explosion(loc, -1,-1,3,12)
|
||||
if(src) del(src)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<b>The [src.name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
|
||||
|
||||
src.stat = 2
|
||||
src.canmove = 0
|
||||
if (src.blind)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
src.icon_state = "baby metroid dead"
|
||||
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
|
||||
ticker.mode.check_win()
|
||||
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return ..(gibbed)
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/metroid/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/metroid/emote(var/act)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -6,6 +6,9 @@
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
@@ -42,25 +45,6 @@
|
||||
if("shriek")
|
||||
message = "<B>The [src.name]</B> makes a high-pitched shriek!"
|
||||
m_type = 1
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.disabilities & 128) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -6,207 +6,40 @@
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if (stat == 2)
|
||||
return
|
||||
|
||||
if(stat == 2)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Disease Check
|
||||
//handle_virus_updates() There is no disease that affects metroids
|
||||
|
||||
handle_nutrition()
|
||||
|
||||
handle_targets()
|
||||
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(src.loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
src.blinded = null
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
|
||||
// Basically just deletes any screen objects :<
|
||||
regular_hud_updates()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
/*
|
||||
if(client)
|
||||
handle_regular_hud_updates() */
|
||||
|
||||
handle_nutrition()
|
||||
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
|
||||
|
||||
// Grabbing
|
||||
|
||||
if(!client && stat != 2)
|
||||
|
||||
if(!canmove) return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
|
||||
if(AIproc && SStun) return
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
switch(nutrition)
|
||||
if(400 to 1100) hungry = 1
|
||||
if(0 to 399)
|
||||
starving = 1
|
||||
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 800) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
|
||||
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(prob(15) && Friends.len > 0)
|
||||
var/friendnum = 0
|
||||
for(var/mob/M in Friends)
|
||||
friendnum++
|
||||
|
||||
if(friendnum > 0)
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
|
||||
for(var/mob/living/carbon/C in view(12,src))
|
||||
if(!istype(C, /mob/living/carbon/metroid)) // does not eat his bros! BROSBROSBROSBROS
|
||||
if(C.stat != 2 && C.health > 0) // chooses only healthy targets
|
||||
var/notarget = 0
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.mutantrace == "metroid")
|
||||
notarget = 1 // don't hurt metroidmen!
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving && Discipline > 0)
|
||||
notarget = 1
|
||||
break
|
||||
|
||||
if(!C.canmove)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,C))
|
||||
if(M.Victim == C)
|
||||
notarget = 1
|
||||
|
||||
if(C in Friends)
|
||||
notarget = 1
|
||||
|
||||
if(tame && istype(C, /mob/living/carbon/human))
|
||||
notarget = 1
|
||||
|
||||
if(!notarget) targets += C
|
||||
|
||||
for(var/mob/living/silicon/C in view(12,src))
|
||||
if(C.stat != 2)
|
||||
var/notarget = 0
|
||||
if(C in Friends)
|
||||
notarget = 1
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving && Discipline > 0)
|
||||
notarget = 1
|
||||
break
|
||||
|
||||
if(tame)
|
||||
notarget = 1
|
||||
|
||||
if(!notarget) targets += C
|
||||
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/monkey/M in targets)
|
||||
Target = M
|
||||
break
|
||||
for(var/mob/living/carbon/alien/larva/L in targets)
|
||||
Target = L
|
||||
break
|
||||
if(prob(5) && !Discipline)
|
||||
for(var/mob/living/carbon/alien/humanoid/H in targets)
|
||||
Target = H
|
||||
break
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
Target = H
|
||||
break
|
||||
|
||||
else
|
||||
Target = targets[1]
|
||||
|
||||
else
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1]
|
||||
|
||||
|
||||
if(!Target)
|
||||
|
||||
if(hungry || starving)
|
||||
if(prob(50) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
else
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -217,12 +50,11 @@
|
||||
var/Tempstun = 0 // temporary temperature stuns
|
||||
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
|
||||
var/SStun = 0 // stun variable
|
||||
var/Obstacle = 1 // determines whether the turf the metroid will head to has an obstacle
|
||||
proc
|
||||
|
||||
AIprocess() // the master AI process
|
||||
|
||||
if(AIproc || stat == 2 || client) return
|
||||
if(AIproc || stat == DEAD || client) return
|
||||
|
||||
var/hungry = 0
|
||||
var/starving = 0
|
||||
@@ -233,19 +65,15 @@
|
||||
starving = 1
|
||||
else
|
||||
switch(nutrition)
|
||||
if(150 to 800) hungry = 1
|
||||
if(150 to 900) hungry = 1
|
||||
if(0 to 149) starving = 1
|
||||
|
||||
AIproc = 1
|
||||
|
||||
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
AIproc = 0
|
||||
return
|
||||
break
|
||||
|
||||
if(!Target || client)
|
||||
AIproc = 0
|
||||
return
|
||||
break
|
||||
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
@@ -253,76 +81,68 @@
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
return
|
||||
if(Target)
|
||||
for(var/mob/living/carbon/metroid/M in view(1,Target))
|
||||
if(M.Victim == Target)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
if(!AIproc)
|
||||
break
|
||||
|
||||
if(!AIproc)
|
||||
return
|
||||
if(Target in view(1,src))
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
Obstacle = 0
|
||||
else Obstacle = 1
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(Target in view(1,src))
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
|
||||
if(istype(Target, /mob/living/silicon))
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
if(Target.client && Target.health >= 20)
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(!Obstacle)
|
||||
Target.attack_metroid(src)
|
||||
return
|
||||
|
||||
if(prob(80) && !Target.lying && Target.client && Target.health >= rand(10,30))
|
||||
|
||||
if(!Atkcool)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(!Obstacle)
|
||||
Target.attack_metroid(src)
|
||||
if(get_obstacle_ok(Target))
|
||||
Target.attack_metroid(src)
|
||||
|
||||
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
if(prob(30))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && !Obstacle)
|
||||
Feedon(Target)
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(Target in view(30, src))
|
||||
if(!Obstacle)
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
return
|
||||
else
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
if(sleeptime < 1) sleeptime = 1
|
||||
if(sleeptime <= 0) sleeptime = 1
|
||||
|
||||
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
|
||||
|
||||
AIproc = 0
|
||||
|
||||
|
||||
update_mind()
|
||||
if(!mind && client)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Metroid"
|
||||
mind.key = key
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustFireLoss(rand(10,20))
|
||||
@@ -330,9 +150,10 @@
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /turf/space))
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
//environment_heat_capacity = loc:heat_capacity
|
||||
loc_temp = 2.7
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
@@ -443,7 +264,7 @@
|
||||
src.blinded = 1
|
||||
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
@@ -473,9 +294,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.disabilities & 128)
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.disabilities & 32)
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
@@ -489,8 +310,6 @@
|
||||
|
||||
handle_nutrition()
|
||||
|
||||
if(stat == 2) return // haha wow
|
||||
|
||||
if(prob(20))
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
|
||||
else nutrition-=rand(2,3)
|
||||
@@ -516,8 +335,8 @@
|
||||
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
M.powerlevel = round(powerlevel / number)
|
||||
// M.nutrition = round(nutrition * 0.9)
|
||||
M.powerlevel = round(powerlevel/number)
|
||||
M.Friends = Friends
|
||||
M.tame = tame
|
||||
M.rabid = rabid
|
||||
@@ -530,6 +349,7 @@
|
||||
if(!client)
|
||||
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
|
||||
A.nutrition = nutrition
|
||||
// A.nutrition += 100
|
||||
A.powerlevel = max(0, powerlevel-1)
|
||||
A.Friends = Friends
|
||||
A.tame = tame
|
||||
@@ -543,4 +363,157 @@
|
||||
D.cure()
|
||||
return
|
||||
|
||||
handle_targets()
|
||||
if(Tempstun)
|
||||
if(!Victim) // not while they're eating!
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
if(attacked > 50) attacked = 50
|
||||
|
||||
if(attacked > 0)
|
||||
if(prob(85))
|
||||
attacked--
|
||||
|
||||
if(Discipline > 0)
|
||||
|
||||
if(Discipline >= 5 && rabid)
|
||||
if(prob(60)) rabid = 0
|
||||
|
||||
if(prob(10))
|
||||
Discipline--
|
||||
|
||||
|
||||
if(!client)
|
||||
|
||||
if(!canmove) return
|
||||
|
||||
// DO AI STUFF HERE
|
||||
|
||||
if(Target)
|
||||
if(attacked <= 0)
|
||||
Target = null
|
||||
|
||||
if(Victim) return // if it's eating someone already, continue eating!
|
||||
|
||||
|
||||
if(prob(5))
|
||||
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
|
||||
|
||||
if(AIproc && SStun) return
|
||||
|
||||
|
||||
var/hungry = 0 // determines if the metroid is hungry
|
||||
var/starving = 0 // determines if the metroid is starving-hungry
|
||||
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
|
||||
switch(nutrition)
|
||||
if(601 to 900)
|
||||
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
|
||||
if(301 to 600) hungry = 1
|
||||
if(0 to 300)
|
||||
starving = 1
|
||||
|
||||
else
|
||||
switch(nutrition) // 1000 max nutrition
|
||||
if(501 to 700)
|
||||
if(prob(25)) hungry = 1
|
||||
if(201 to 500) hungry = 1
|
||||
if(0 to 200) starving = 1
|
||||
|
||||
|
||||
if(starving && !client) // if a metroid is starving, it starts losing its friends
|
||||
if(Friends.len > 0 && prob(1))
|
||||
var/mob/nofriend = pick(Friends)
|
||||
Friends -= nofriend
|
||||
|
||||
if(!Target)
|
||||
var/list/targets = list()
|
||||
|
||||
if(hungry || starving) //Only add to the list if we need to
|
||||
for(var/mob/living/L in view(7,src))
|
||||
|
||||
//Ignore other metroids, dead mobs and simple_animals
|
||||
if(ismetroid(L) || L.stat == DEAD || isanimal(L))
|
||||
continue
|
||||
|
||||
if(issilicon(L))
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(tame) //Tame metroids ignore electronic life
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
|
||||
else if(iscarbon(L))
|
||||
|
||||
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna)
|
||||
if(H.dna.mutantrace == "metroid")
|
||||
continue
|
||||
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
|
||||
if(!starving && Discipline > 0)
|
||||
continue
|
||||
|
||||
if(L in Friends) //No eating friends!
|
||||
continue
|
||||
|
||||
if(tame && ishuman(L)) //Tame metroids dont eat people.
|
||||
continue
|
||||
|
||||
if(!L.canmove) //Only one metroid can latch on at a time.
|
||||
|
||||
var/notarget = 0
|
||||
for(var/mob/living/carbon/metroid/M in view(1,L))
|
||||
if(M.Victim == L)
|
||||
notarget = 1
|
||||
if(notarget)
|
||||
continue
|
||||
|
||||
targets += L //Possible target found!
|
||||
|
||||
|
||||
|
||||
if((hungry || starving) && targets.len > 0)
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(!starving)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!Discipline && prob(5))
|
||||
if(ishuman(C))
|
||||
Target = C
|
||||
break
|
||||
if(isalienadult(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(islarva(C))
|
||||
Target = C
|
||||
break
|
||||
if(ismonkey(C))
|
||||
Target = C
|
||||
break
|
||||
else
|
||||
Target = targets[1]
|
||||
else
|
||||
Target = targets[1] // closest target
|
||||
|
||||
if(targets.len > 0)
|
||||
if(attacked > 0 || rabid)
|
||||
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
|
||||
|
||||
|
||||
if(!Target)
|
||||
if(hungry || starving)
|
||||
if(canmove && isturf(loc) && prob(50))
|
||||
step(src, pick(cardinal))
|
||||
|
||||
else
|
||||
if(canmove && isturf(loc) && prob(33))
|
||||
step(src, pick(cardinal))
|
||||
else
|
||||
if(!AIproc)
|
||||
spawn() AIprocess()
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
/mob/living/carbon/metroid/Login()
|
||||
..()
|
||||
|
||||
rebuild_appearance()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
update_hud()
|
||||
return
|
||||
|
||||
@@ -6,19 +6,15 @@
|
||||
name = text("baby metroid ([rand(1, 1000)])")
|
||||
else
|
||||
name = text("adult metroid ([rand(1,1000)])")
|
||||
|
||||
real_name = name
|
||||
spawn (1)
|
||||
rebuild_appearance()
|
||||
regenerate_icons()
|
||||
src << "\blue Your icons have been generated!"
|
||||
..()
|
||||
|
||||
/mob/living/carbon/metroid/proc/mind_initialize(mob/G)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "Metroid"
|
||||
//mind.special_role = alien_caste
|
||||
mind.key = G.key
|
||||
/mob/living/carbon/metroid/adult/New()
|
||||
verbs.Remove(/mob/living/carbon/metroid/verb/ventcrawl)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/metroid/movement_delay()
|
||||
var/tally = 0
|
||||
@@ -150,14 +146,14 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/metroid/ex_act(severity)
|
||||
/*
|
||||
|
||||
if (stat == 2 && client)
|
||||
return
|
||||
|
||||
else if (stat == 2 && !client)
|
||||
del(src)
|
||||
return
|
||||
*/
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
@@ -206,7 +202,7 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/db_click(text, t1)
|
||||
/mob/living/carbon/metroid/attack_ui(slot)
|
||||
return
|
||||
|
||||
/mob/living/carbon/metroid/meteorhit(O as obj)
|
||||
@@ -234,7 +230,7 @@
|
||||
|
||||
if (pulling && pulling.loc)
|
||||
if(!( isturf(pulling.loc) ))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
else
|
||||
if(Debug)
|
||||
@@ -243,7 +239,7 @@
|
||||
|
||||
/////
|
||||
if(pulling && pulling.anchored)
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
if (!restrained())
|
||||
@@ -268,58 +264,21 @@
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
ok = 0
|
||||
if (ok)
|
||||
var/t = M.pulling
|
||||
M.pulling = null
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.pulling = t
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
s_active.close(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -353,8 +312,12 @@
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
@@ -380,7 +343,7 @@
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
@@ -406,13 +369,13 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] attempts to wrestle \the [name] off!", 1)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] manages to wrestle \the [name] off!", 1)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(prob(90) && !client)
|
||||
Discipline++
|
||||
@@ -434,13 +397,13 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] attempts to wrestle \the [name] off of [Victim]!", 1)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red [M] manages to wrestle \the [name] off of [Victim]!", 1)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(prob(80) && !client)
|
||||
Discipline++
|
||||
@@ -488,18 +451,16 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
@@ -507,9 +468,9 @@
|
||||
else
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == "male")
|
||||
if(M.gender == MALE)
|
||||
gendertxt = "his"
|
||||
if(M.gender == "female")
|
||||
if(M.gender == FEMALE)
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
@@ -517,18 +478,6 @@
|
||||
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
attack_verb = "slash"
|
||||
|
||||
attacked += 10
|
||||
if (prob(90))
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
@@ -545,25 +494,18 @@
|
||||
step_away(src,M,15)
|
||||
|
||||
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has [attack_verb]ed []!</B>", M, src), 1)
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if (M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] []!</B>", M, src), 1)
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -587,7 +529,7 @@
|
||||
|
||||
if ((prob(95) && health > 0))
|
||||
attacked += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
var/damage = rand(15, 30)
|
||||
if (damage >= 25)
|
||||
damage = rand(20, 40)
|
||||
@@ -601,7 +543,7 @@
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
|
||||
@@ -611,23 +553,21 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if ("disarm")
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
attacked += 10
|
||||
|
||||
@@ -700,17 +640,11 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
health = 150
|
||||
stat = 0
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/proc/get_obstacle_ok(atom/A)
|
||||
var/direct = get_dir(src, A)
|
||||
var/obj/item/weapon/dummy/D = locate() in DummyCache //See atom_procs.dm
|
||||
if(!D)
|
||||
D = new /obj/item/weapon/dummy( src.loc )
|
||||
else
|
||||
D.loc = src.loc
|
||||
DummyCache.Remove(D)
|
||||
|
||||
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
|
||||
var/ok = 0
|
||||
|
||||
if ( (direct - 1) & direct)
|
||||
var/turf/Step_1
|
||||
var/turf/Step_2
|
||||
@@ -731,64 +665,56 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
|
||||
Step_1 = get_step(src, SOUTH)
|
||||
Step_2 = get_step(src, WEST)
|
||||
|
||||
else
|
||||
if(Step_1 && Step_2)
|
||||
var/check_1 = 0
|
||||
var/check_2 = 0
|
||||
|
||||
if(step_to(D, Step_1))
|
||||
check_1 = 1
|
||||
for(var/obj/border_obstacle in Step_1)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
check_1 = 0
|
||||
break
|
||||
|
||||
if(check_1 != 0)
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_1 = 0
|
||||
break
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_1 = 0
|
||||
|
||||
D.loc = src.loc
|
||||
if(check_1 != 1 && step_to(D, Step_2))
|
||||
if(step_to(D, Step_2))
|
||||
check_2 = 1
|
||||
|
||||
for(var/obj/border_obstacle in Step_2)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
check_2 = 0
|
||||
break
|
||||
|
||||
if(check_2 != 0)
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_2 = 0
|
||||
break
|
||||
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_2 = 0
|
||||
if(check_1 || check_2)
|
||||
ok = 1
|
||||
else
|
||||
ok = 1
|
||||
if(loc == src.loc)
|
||||
ok = 1
|
||||
else
|
||||
ok = 1
|
||||
|
||||
//Now, check objects to block exit that are on the border
|
||||
for(var/obj/border_obstacle in src.loc)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
ok = 0
|
||||
break
|
||||
//Now, check objects to block exit that are on the border
|
||||
for(var/obj/border_obstacle in src.loc)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
ok = 0
|
||||
|
||||
if(ok != 0)
|
||||
//Next, check objects to block entry that are on the border
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (A != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
ok = 0
|
||||
|
||||
D.loc = null
|
||||
DummyCache.Add(D)
|
||||
del(D)
|
||||
if (!( ok ))
|
||||
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -76,6 +76,7 @@
|
||||
if(Victim.health <= 0)
|
||||
Victim.adjustToxLoss(rand(2,4))
|
||||
|
||||
// Heal yourself
|
||||
adjustToxLoss(-10)
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
@@ -136,7 +137,8 @@
|
||||
if(Victim && !rabid && !attacked)
|
||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
||||
if(prob(50))
|
||||
Friends |= Victim.LAssailant
|
||||
if(!(Victim.LAssailant in Friends))
|
||||
Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
|
||||
|
||||
if(M.client && istype(src, /mob/living/carbon/human))
|
||||
if(prob(85))
|
||||
@@ -170,13 +172,12 @@
|
||||
return
|
||||
if(!istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
var/mob/living/carbon/metroid/adult/new_metroid = new /mob/living/carbon/metroid/adult (loc)
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
var/mob/living/carbon/metroid/adult/new_metroid = new /mob/living/carbon/metroid/adult(loc)
|
||||
new_metroid.nutrition = nutrition
|
||||
new_metroid.powerlevel = max(0, powerlevel-1)
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid << "<B>You are now an adult Metroid.</B>"
|
||||
del(src)
|
||||
else
|
||||
@@ -194,31 +195,28 @@
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
if(amount_grown >= 10)
|
||||
switch(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced metroid.") in list("Yes","No"))
|
||||
if("Yes")
|
||||
if(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced metroid.") in list("Yes","No")=="Yes")
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
if(stat)
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
var/list/babies = list()
|
||||
var/number = pick(14;2,3,4)
|
||||
var/new_nutrition = round(nutrition * 0.9)
|
||||
var/new_powerlevel = round(powerlevel / number)
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = new_nutrition
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1) step_away(M,src)
|
||||
babies += M
|
||||
|
||||
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
|
||||
var/list/babies = list()
|
||||
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
|
||||
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
M.powerlevel = round(powerlevel / number)
|
||||
if(i != 1) step_away(M,src)
|
||||
babies += M
|
||||
var/mob/living/carbon/metroid/new_metroid = pick(babies)
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid.key = key
|
||||
|
||||
|
||||
var/mob/living/carbon/metroid/new_metroid = pick(babies)
|
||||
|
||||
new_metroid.mind_initialize(src)
|
||||
new_metroid.key = key
|
||||
|
||||
new_metroid.a_intent = "hurt"
|
||||
new_metroid << "<B>You are now a baby Metroid.</B>"
|
||||
del(src)
|
||||
new_metroid << "<B>You are now a Metroid. Skree!</B>"
|
||||
del(src)
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
@@ -230,56 +228,5 @@
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Metroid"
|
||||
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
src << "<i>I am much too big to fit in this small vent...</i>"
|
||||
return
|
||||
|
||||
if(!stat)
|
||||
|
||||
if(Victim)
|
||||
src << "<i>Not while I am a feeding...</i>"
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red <i>That vent is welded...</i>"
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "<i>I must remain still while entering a vent...</i>"
|
||||
else
|
||||
src << "<i>This vent is not connected to anything...</i>"
|
||||
else
|
||||
src << "<i>I must be standing on or beside an air vent to enter it...</i>"
|
||||
else
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
if(Victim) return
|
||||
handle_ventcrawl()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/mob/living/carbon/metroid/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/metroid/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//no special icon processing
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("gibbed-m", animation)
|
||||
@@ -28,11 +28,11 @@
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("dust-m", animation)
|
||||
new /obj/effect/decal/ash(loc)
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
@@ -40,33 +40,17 @@
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/death(gibbed)
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
if(stat == DEAD) return
|
||||
if(healths) healths.icon_state = "health5"
|
||||
stat = DEAD
|
||||
|
||||
if (src.healths)
|
||||
src.healths.icon_state = "health5"
|
||||
if(!gibbed)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<b>The [src.name]</b> lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist
|
||||
O.show_message("<b>The [name]</b> lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist
|
||||
|
||||
src.stat = 2
|
||||
src.canmove = 0
|
||||
if (src.blind)
|
||||
src.blind.layer = 0
|
||||
src.lying = 1
|
||||
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
|
||||
ticker.mode.check_win()
|
||||
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return ..(gibbed)
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/monkey/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/monkey/emote(var/act)
|
||||
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -6,6 +6,8 @@
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
var/m_type = 1
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if("sign")
|
||||
@@ -90,30 +92,13 @@
|
||||
if("deathgasp")
|
||||
message = "<b>The [src.name]</b> lets out a faint chimper as it collapses and stops moving..."
|
||||
m_type = 1
|
||||
if ("me")
|
||||
if(silent)
|
||||
return
|
||||
if (src.client && (client.muted || client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if("help")
|
||||
src << "choke, collapse, dance, deathgasp, drool, gasp, shiver, gnarl, jump, paw, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
if(src.client)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.disabilities & 128) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
@@ -22,109 +22,22 @@
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive, with no signs of life.</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>"
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>It is missing its [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>It has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>It has a robot [temp.display_name], it has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.display_name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.desc in wound_descriptors)
|
||||
wound_descriptors[W.desc] += W.amount
|
||||
continue
|
||||
wound_descriptors[W.desc] = W.amount
|
||||
var/list/flavor_text = list()
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
for(var/wound in wound_descriptors)
|
||||
switch(wound_descriptors[wound])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
else
|
||||
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It has several [wound]s"
|
||||
else
|
||||
flavor_text += " several [wound]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>It has a bunch of [wound]s"
|
||||
else
|
||||
flavor_text += " a ton of [wound]\s"
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on its [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 30)
|
||||
msg += "It has minor bruising.\n"
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
if(wound_flavor_text["head"])
|
||||
msg += wound_flavor_text["head"]
|
||||
if(wound_flavor_text["chest"])
|
||||
msg += wound_flavor_text["chest"]
|
||||
if(wound_flavor_text["left arm"])
|
||||
msg += wound_flavor_text["left arm"]
|
||||
if(wound_flavor_text["left hand"])
|
||||
msg += wound_flavor_text["left hand"]
|
||||
if(wound_flavor_text["right arm"])
|
||||
msg += wound_flavor_text["right arm"]
|
||||
if(wound_flavor_text["right hand"])
|
||||
msg += wound_flavor_text["right hand"]
|
||||
if(wound_flavor_text["groin"])
|
||||
msg += wound_flavor_text["groin"]
|
||||
if(wound_flavor_text["left leg"])
|
||||
msg += wound_flavor_text["left leg"]
|
||||
if(wound_flavor_text["left foot"])
|
||||
msg += wound_flavor_text["left foot"]
|
||||
if(wound_flavor_text["right leg"])
|
||||
msg += wound_flavor_text["right leg"]
|
||||
if(wound_flavor_text["right foot"])
|
||||
msg += wound_flavor_text["right foot"]
|
||||
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It isn't responding to anything around it; it seems to be asleep.\n"
|
||||
msg += "</span>"
|
||||
msg += "<B>It has severe bruising!</B>\n"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 30)
|
||||
msg += "It has minor burns.\n"
|
||||
else
|
||||
msg += "<B>It has severe burns!</B>\n"
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It isn't responding to anything around it; it seems to be asleep.\n"
|
||||
msg += "</span>"
|
||||
|
||||
if (src.digitalcamo)
|
||||
msg += "It is repulsively uncanny!\n"
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
/obj/hud/proc/monkey_hud(var/ui_style='screen1_old.dmi')
|
||||
/obj/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
//ui_style='screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
//var/icon/blocked = icon(ui_style,"blocked")
|
||||
|
||||
@@ -47,6 +42,7 @@
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "act_intent"
|
||||
@@ -58,45 +54,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "help" ? "help_small_active" : "help_small")
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "disarm" ? "disarm_small_active" : "disarm_small")
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "grab" ? "grab_small_active" : "grab_small")
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm_small_active" : "harm_small")
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
@@ -151,7 +108,7 @@
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_dropbutton
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
/*
|
||||
@@ -184,29 +141,31 @@
|
||||
if(istype(mymob,/mob/living/carbon/monkey)) using.overlays += blocked
|
||||
src.other += using*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "r_hand"
|
||||
using.dir = WEST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_rhand
|
||||
using.layer = 19
|
||||
src.r_hand_hud_object = using
|
||||
src.adding += using
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.layer = 19
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "l_hand"
|
||||
using.dir = EAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "hand_inactive"
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.dir = EAST
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
using.screen_loc = ui_lhand
|
||||
using.layer = 19
|
||||
src.l_hand_hud_object = using
|
||||
src.adding += using
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.layer = 19
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "hand"
|
||||
@@ -237,23 +196,25 @@
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mask"
|
||||
using.dir = NORTH
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_monkey_mask
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "mask"
|
||||
inv_box.dir = NORTH
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "back"
|
||||
using.dir = NORTHEAST
|
||||
using.icon = ui_style
|
||||
using.icon_state = "equip"
|
||||
using.screen_loc = ui_back
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box.name = "back"
|
||||
inv_box.dir = NORTHEAST
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "storage1"
|
||||
@@ -307,19 +268,10 @@
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "left ear"
|
||||
using.name = "ears"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_lear
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.other += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "right ear"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "ears"
|
||||
using.screen_loc = ui_rear
|
||||
using.screen_loc = ui_ears
|
||||
using.layer = 19
|
||||
using.overlays += blocked
|
||||
src.other += using
|
||||
@@ -442,7 +394,7 @@
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_throw
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen.icon = ui_style
|
||||
@@ -502,15 +454,14 @@
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind.icon = ui_style
|
||||
mymob.blind.icon_state = "blackanimate"
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1 to 15,15"
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
mymob.blind.mouse_opacity = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash.icon = ui_style
|
||||
@@ -628,15 +579,14 @@
|
||||
*/
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
/obj/effect/equip_e/monkey/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
if (!( item ))
|
||||
switch(place)
|
||||
if("head")
|
||||
if (!( target.wear_mask ))
|
||||
del(src)
|
||||
return
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
del(src)
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
del(src)
|
||||
return
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (item)
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
|
||||
if(!(L.Find(place)))
|
||||
del(src)
|
||||
return
|
||||
for(var/mob/O in viewers(target, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
|
||||
else
|
||||
var/message = null
|
||||
switch(place)
|
||||
if("mask")
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
|
||||
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
|
||||
if("l_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
|
||||
if("r_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
|
||||
if("back")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
|
||||
if("handcuff")
|
||||
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
|
||||
else
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message(message, 1)
|
||||
spawn( 30 )
|
||||
done()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/monkey/done()
|
||||
if(!source || !target) return
|
||||
if(source.loc != s_loc) return
|
||||
if(target.loc != t_loc) return
|
||||
if(LinkBlocked(s_loc,t_loc)) return
|
||||
if(item && source.get_active_hand() != item) return
|
||||
if ((source.restrained() || source.stat)) return
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (target.wear_mask)
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
|
||||
return
|
||||
var/obj/item/W = target.wear_mask
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/clothing/mask))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.wear_mask = item
|
||||
item.loc = target
|
||||
if("l_hand")
|
||||
if (target.l_hand)
|
||||
var/obj/item/W = target.l_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.l_hand = item
|
||||
item.loc = target
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.r_hand = item
|
||||
item.loc = target
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK ))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.back = item
|
||||
item.loc = target
|
||||
if("handcuff")
|
||||
if (target.handcuffed)
|
||||
var/obj/item/W = target.handcuffed
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/weapon/handcuffs))
|
||||
source.drop_item()
|
||||
target.handcuffed = item
|
||||
item.loc = target
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
else
|
||||
if (target.internal)
|
||||
target.internal = null
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
target.internal.add_fingerprint(source)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("[] is now running on internals.", target), 1)
|
||||
else
|
||||
source.regenerate_icons()
|
||||
target.regenerate_icons()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
|
||||
/mob/living/carbon/monkey/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
|
||||
if(!slot) return
|
||||
if(!istype(W)) return
|
||||
|
||||
if(W == get_active_hand())
|
||||
u_equip(W)
|
||||
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_back(redraw_mob)
|
||||
if(slot_wear_mask)
|
||||
src.wear_mask = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
if(slot_legcuffed)
|
||||
src.legcuffed = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_legcuffed(redraw_mob)
|
||||
if(slot_l_hand)
|
||||
src.l_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_l_hand(redraw_mob)
|
||||
if(slot_r_hand)
|
||||
src.r_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_r_hand(redraw_mob)
|
||||
if(slot_in_backpack)
|
||||
W.loc = src.back
|
||||
else
|
||||
usr << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,54 +1,4 @@
|
||||
/mob/living/carbon/monkey/Login()
|
||||
..()
|
||||
|
||||
rebuild_appearance()
|
||||
/*
|
||||
if (!( src.primary ))
|
||||
var/t1 = rand(1000, 1500)
|
||||
dna_ident += t1
|
||||
if (dna_ident > 65536.0)
|
||||
dna_ident = rand(1, 1500)
|
||||
src.primary = new /datum/dna( null )
|
||||
src.primary.uni_identity = text("[]", dna_ident)
|
||||
while(length(src.primary.uni_identity) < 4)
|
||||
src.primary.uni_identity = text("0[]", src.primary.uni_identity)
|
||||
var/t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = (src.gender == "male" ? text("[]", rand(1, 124)) : text("[]", rand(127, 250)))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
src.primary.spec_identity = "2B6696D2B127E5A4"
|
||||
src.primary.struc_enzymes = "CDEAF5B90AADBC6BA8033DB0A7FD613FA"
|
||||
src.primary.unique_enzymes = "C8FFFE7EC09D80AEDEDB9A5A0B4085B61"
|
||||
src.primary.n_chromo = 16
|
||||
*/
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.name == "monkey")
|
||||
src.name = text("monkey ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
return
|
||||
update_hud()
|
||||
return
|
||||
|
||||
@@ -2,76 +2,27 @@
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
if(name == "monkey")
|
||||
name = text("monkey ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
|
||||
if (!(dna))
|
||||
if(gender == NEUTER)
|
||||
gender = pick(MALE, FEMALE)
|
||||
dna = new /datum/dna( null )
|
||||
dna.real_name = real_name
|
||||
dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
dna.unique_enzymes = md5(name)
|
||||
//////////blah
|
||||
var/gendervar
|
||||
if (gender == "male")
|
||||
if (gender == MALE)
|
||||
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
|
||||
else
|
||||
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
|
||||
dna.uni_identity += gendervar
|
||||
dna.uni_identity += "12C"
|
||||
dna.uni_identity += "4E2"
|
||||
dna.b_type = "A+"
|
||||
dna.original_name = real_name
|
||||
|
||||
new /datum/organ/external/chest(src)
|
||||
new /datum/organ/external/groin(src)
|
||||
new /datum/organ/external/head(src)
|
||||
new /datum/organ/external/l_arm(src)
|
||||
new /datum/organ/external/r_arm(src)
|
||||
new /datum/organ/external/r_leg(src)
|
||||
new /datum/organ/external/l_leg(src)
|
||||
new /datum/organ/external/l_hand(src)
|
||||
new /datum/organ/external/l_foot(src)
|
||||
new /datum/organ/external/r_hand(src)
|
||||
new /datum/organ/external/r_foot(src)
|
||||
var/datum/organ/external/part = organs["chest"]
|
||||
part.children = list(organs["r_leg"],organs["l_leg"],organs["r_arm"],organs["l_arm"],organs["groin"],organs["head"])
|
||||
part = organs["head"]
|
||||
part.parent = organs["chest"]
|
||||
part = organs["groin"]
|
||||
part.parent = organs["chest"]
|
||||
part = organs["r_leg"]
|
||||
part.children = list(organs["r_foot"])
|
||||
part.parent = organs["chest"]
|
||||
part = organs["l_leg"]
|
||||
part.children = list(organs["l_foot"])
|
||||
part.parent = organs["chest"]
|
||||
part = organs["r_arm"]
|
||||
part.children = list(organs["r_hand"])
|
||||
part.parent = organs["chest"]
|
||||
part = organs["l_arm"]
|
||||
part.children = list(organs["l_hand"])
|
||||
part.parent = organs["chest"]
|
||||
part = organs["r_foot"]
|
||||
part.parent = organs["r_leg"]
|
||||
part = organs["l_foot"]
|
||||
part.parent = organs["l_leg"]
|
||||
part = organs["r_hand"]
|
||||
part.parent = organs["r_arm"]
|
||||
part = organs["l_hand"]
|
||||
part.parent = organs["l_arm"]
|
||||
|
||||
spawn (1)
|
||||
if(!stand_icon)
|
||||
stand_icon = new /icon('monkey.dmi', "monkey1")
|
||||
if(!lying_icon)
|
||||
lying_icon = new /icon('monkey.dmi', "monkey0")
|
||||
icon = stand_icon
|
||||
rebuild_appearance()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -97,13 +48,11 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
/*
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(istype(tmob, /mob/living/carbon/human) && (HULK in tmob.mutations))
|
||||
if(prob(70))
|
||||
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
*/
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
@@ -137,7 +86,7 @@
|
||||
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
|
||||
O.source = usr
|
||||
O.target = src
|
||||
O.item = usr.equipped()
|
||||
O.item = usr.get_active_hand()
|
||||
O.s_loc = usr.loc
|
||||
O.t_loc = loc
|
||||
O.place = href_list["item"]
|
||||
@@ -187,7 +136,7 @@
|
||||
else
|
||||
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
|
||||
if ((prob(75) && health > 0))
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
|
||||
var/damage = rand(1, 5)
|
||||
@@ -196,7 +145,6 @@
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
contract_disease(D,1,0)
|
||||
react_to_attack(M)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
||||
@@ -234,29 +182,13 @@
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (M.a_intent == "hurt")
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(M.type == /mob/living/carbon/human/tajaran)
|
||||
attack_verb = "slash"
|
||||
|
||||
if ((prob(75) && health > 0))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
|
||||
O.show_message(text("\red <B>[] has punched [name]!</B>", M), 1)
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
var/damage = rand(5, 10)
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
if (prob(40))
|
||||
damage = rand(10, 15)
|
||||
if (paralysis < 5)
|
||||
@@ -268,16 +200,11 @@
|
||||
return
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
|
||||
else
|
||||
if (M.a_intent == "grab")
|
||||
if (M == src)
|
||||
@@ -285,38 +212,32 @@
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if(prob(1)) react_to_attack(M)
|
||||
else
|
||||
if (!( paralysis ))
|
||||
if (prob(25))
|
||||
Paralyse(2)
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
else
|
||||
drop_item()
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
react_to_attack(M)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
@@ -336,7 +257,7 @@
|
||||
|
||||
if ("hurt")
|
||||
if ((prob(95) && health > 0))
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
var/damage = rand(15, 30)
|
||||
if (damage >= 25)
|
||||
damage = rand(20, 40)
|
||||
@@ -351,9 +272,8 @@
|
||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
|
||||
@@ -363,23 +283,21 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
else
|
||||
M.r_hand = G
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if ("disarm")
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
if(prob(95))
|
||||
Weaken(rand(10,15))
|
||||
@@ -392,7 +310,6 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
adjustBruteLoss(damage)
|
||||
react_to_attack(M)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -400,8 +317,12 @@
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
@@ -464,7 +385,6 @@
|
||||
|
||||
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
|
||||
return
|
||||
|
||||
@@ -475,157 +395,34 @@
|
||||
stat(null, text("Move Mode: []", m_intent))
|
||||
if(client && mind)
|
||||
if (client.statpanel == "Status")
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
stat("Chemical Storage", changeling.chem_charges)
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", mind.changeling.chem_charges)
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/var/icon/stand_icon = null
|
||||
/mob/living/carbon/monkey/var/icon/lying_icon = null
|
||||
/mob/living/carbon/monkey/update_clothing()
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
if(!stand_icon || !lying_icon)
|
||||
update_body()
|
||||
|
||||
if(update_icon) // Skie
|
||||
..()
|
||||
overlays = null
|
||||
|
||||
if (lying)
|
||||
icon = lying_icon
|
||||
|
||||
else
|
||||
icon = stand_icon
|
||||
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
if (wear_mask)
|
||||
if (istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/t1 = wear_mask.icon_state
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
|
||||
if (r_hand)
|
||||
if(update_icon)
|
||||
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = layer)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
|
||||
if (l_hand)
|
||||
if(update_icon)
|
||||
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = layer)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
|
||||
if (back)
|
||||
var/t1 = back.icon_state //apparently tables make me upset and cause my dreams to shatter
|
||||
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
back.screen_loc = ui_monkey_back
|
||||
|
||||
if (handcuffed && update_icon)
|
||||
pulling = null
|
||||
if (!( lying ))
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = layer)
|
||||
else
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = layer)
|
||||
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
client.screen -= hud_used.m_ints
|
||||
client.screen -= hud_used.mov_int
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.m_ints
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//What
|
||||
|
||||
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,",") //ICONS, FUCKING SHIT//the fuck
|
||||
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
if(targeted_by && target_locked)
|
||||
overlays += target_locked
|
||||
else if(targeted_by)
|
||||
target_locked = new /obj/effect/target_locked(src)
|
||||
overlays += target_locked
|
||||
else if(!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn( 0 )
|
||||
show_inv(M)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/proc/update_body()
|
||||
|
||||
stand_icon = new /icon('monkey.dmi', "torso_s")
|
||||
lying_icon = new /icon('monkey.dmi', "torso_l")
|
||||
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "chest_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(!(head.status & ORGAN_DESTROYED))
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "head_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "head_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/part = organs[name]
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !(part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp = new /icon('monkey.dmi', "[part.icon_name]_s")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('monkey.dmi', "[part.icon_name]_l")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "groin_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "groin_l"), ICON_OVERLAY)
|
||||
|
||||
/mob/living/carbon/monkey/Move()
|
||||
if ((!( buckled ) || buckled.loc != loc))
|
||||
buckled = null
|
||||
if (buckled)
|
||||
return
|
||||
if (restrained())
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
var/t7 = 1
|
||||
if (restrained())
|
||||
for(var/mob/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
return 0
|
||||
if ((t7 && pulling && get_dist(src, pulling) <= 1))
|
||||
t7 = null
|
||||
if (t7 && (pulling && get_dist(src, pulling) <= 1))
|
||||
if (pulling.anchored)
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
var/T = loc
|
||||
. = ..()
|
||||
if (!( isturf(pulling.loc) ))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
return
|
||||
if (!( restrained() ))
|
||||
if (!buckled)
|
||||
var/diag = get_dir(src, pulling)
|
||||
if ((diag - 1) & diag)
|
||||
else
|
||||
@@ -633,20 +430,20 @@
|
||||
if ((ismob(pulling) && (get_dist(src, pulling) > 1 || diag)))
|
||||
if (istype(pulling, type))
|
||||
var/mob/M = pulling
|
||||
var/mob/t = M.pulling
|
||||
M.pulling = null
|
||||
var/atom/movable/t = M.pulling
|
||||
M.stop_pulling()
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.pulling = t
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window))
|
||||
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
else
|
||||
pulling = null
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( contents.Find(s_active) )))
|
||||
s_active.close(src)
|
||||
@@ -655,15 +452,6 @@
|
||||
M.UpdateFeed(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
var/chealth = health
|
||||
var/rval = ..()
|
||||
if(chealth > health)
|
||||
// we were damaged!
|
||||
react_to_attack(user)
|
||||
|
||||
return rval
|
||||
|
||||
/mob/living/carbon/monkey/verb/removeinternal()
|
||||
set name = "Remove Internals"
|
||||
set category = "IC"
|
||||
@@ -678,15 +466,16 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
/* if (stat == 2 && client)
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
if (stat == 2 && client)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (stat == 2 && !client)
|
||||
gibs(loc, viruses)
|
||||
del(src)
|
||||
return*/
|
||||
return
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (stat != 2)
|
||||
@@ -712,372 +501,17 @@
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if (prob(50))
|
||||
Paralyse(10)
|
||||
|
||||
|
||||
/obj/effect/equip_e/monkey/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
if (!( item ))
|
||||
switch(place)
|
||||
if("head")
|
||||
if (!( target.wear_mask ))
|
||||
del(src)
|
||||
return
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
del(src)
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
del(src)
|
||||
return
|
||||
if("splints")
|
||||
var/count = 0
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/datum/organ/external/o = target.organs["[organ]"]
|
||||
if(o.status & ORGAN_SPLINTED)
|
||||
count = 1
|
||||
break
|
||||
if(count == 0)
|
||||
del(src)
|
||||
return
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (item)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
|
||||
else
|
||||
var/message = null
|
||||
switch(place)
|
||||
if("mask")
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
|
||||
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
|
||||
if("l_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
|
||||
if("r_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
|
||||
if("back")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
|
||||
if("handcuff")
|
||||
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
|
||||
if("splints")
|
||||
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
|
||||
else
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message(message, 1)
|
||||
spawn( 30 )
|
||||
done()
|
||||
if (stat == DEAD && client)
|
||||
gib()
|
||||
return
|
||||
if (stat == DEAD && !client)
|
||||
gibs(loc, viruses)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/monkey/done()
|
||||
if(!source || !target) return
|
||||
if(source.loc != s_loc) return
|
||||
if(target.loc != t_loc) return
|
||||
if(LinkBlocked(s_loc,t_loc)) return
|
||||
if(item && source.equipped() != item) return
|
||||
if ((source.restrained() || source.stat)) return
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (target.wear_mask)
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
|
||||
return
|
||||
var/obj/item/W = target.wear_mask
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/clothing/mask))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.wear_mask = item
|
||||
item.loc = target
|
||||
if("l_hand")
|
||||
if (target.l_hand)
|
||||
var/obj/item/W = target.l_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.l_hand = item
|
||||
item.loc = target
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.r_hand = item
|
||||
item.loc = target
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if ((istype(item, /obj/item) && item.flags & 1))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.back = item
|
||||
item.loc = target
|
||||
if("handcuff")
|
||||
if (target.handcuffed)
|
||||
var/obj/item/W = target.handcuffed
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/weapon/handcuffs))
|
||||
source.drop_item()
|
||||
target.handcuffed = item
|
||||
item.loc = target
|
||||
if("splints")
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/datum/organ/external/o = target.organs["[organ]"]
|
||||
if (o.status & ORGAN_SPLINTED)
|
||||
var/obj/item/W = new /obj/item/stack/medical/splint/single()
|
||||
o.status &= ~ORGAN_SPLINTED
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
else
|
||||
if (target.internal)
|
||||
target.internal = null
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
target.internal.add_fingerprint(source)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("[] is now running on internals.", target), 1)
|
||||
else
|
||||
source.update_clothing()
|
||||
target.update_clothing()
|
||||
del(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
if(!ticker) return 0
|
||||
if(!ticker.mode.name == "monkey") return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
if(blocked >= 2) return 0
|
||||
|
||||
var/datum/organ/external/organ = null
|
||||
if(isorgan(def_zone))
|
||||
organ = def_zone
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ || organ.status & ORGAN_DESTROYED) return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0, sharp, used_weapon)
|
||||
if(BURN)
|
||||
organ.take_damage(0, damage, sharp, used_weapon)
|
||||
|
||||
if(used_weapon)
|
||||
organ.add_wound(used_weapon, damage)
|
||||
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
/*/mob/living/carbon/monkey/UpdateDamageIcon()
|
||||
del(body_standing)
|
||||
body_standing = list()
|
||||
del(body_lying)
|
||||
body_lying = list()
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.destroyed)
|
||||
O.update_icon()
|
||||
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
|
||||
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*/
|
||||
|
||||
/mob/living/carbon/monkey/proc/HealDamage(zone, brute, burn)
|
||||
var/datum/organ/external/E = get_organ(zone)
|
||||
if(istype(E, /datum/organ/external))
|
||||
if (E.heal_damage(brute, burn))
|
||||
UpdateDamageIcon()
|
||||
else
|
||||
return 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/proc/get_damaged_organs(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/organ = organs[name]
|
||||
if((brute && organ.brute_dam) || (burn && organ.burn_dam))
|
||||
parts += organ
|
||||
return parts
|
||||
|
||||
/mob/living/carbon/monkey/proc/get_damageable_organs()
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/organ = organs[name]
|
||||
if(organ.brute_dam + organ.burn_dam < organ.max_damage)
|
||||
parts += organ
|
||||
return parts
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/carbon/monkey/heal_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
if(!parts.len)
|
||||
return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
picked.heal_damage(brute,burn)
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/carbon/monkey/take_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
if(!parts.len)
|
||||
return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
picked.take_damage(brute,burn)
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/carbon/monkey/heal_overall_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
picked.heal_damage(brute,burn)
|
||||
|
||||
brute -= (brute_was-picked.brute_dam)
|
||||
burn -= (burn_was-picked.burn_dam)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/monkey/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
picked.take_damage(brute,burn, 0, used_weapon)
|
||||
|
||||
brute -= (picked.brute_dam-brute_was)
|
||||
burn -= (picked.burn_dam-burn_was)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
/mob/living/carbon/monkey/getBruteLoss()
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!(O.status & ORGAN_ROBOT)) amount+= O.brute_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/monkey/adjustBruteLoss(var/amount, var/used_weapon = null)
|
||||
if(amount > 0)
|
||||
take_overall_damage(amount, 0, used_weapon)
|
||||
else
|
||||
heal_overall_damage(-amount, 0)
|
||||
|
||||
/mob/living/carbon/monkey/getFireLoss()
|
||||
var/amount = 0.0
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!(O.status & ORGAN_ROBOT)) amount+= O.burn_dam
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/monkey/adjustFireLoss(var/amount,var/used_weapon = null)
|
||||
if(amount > 0)
|
||||
take_overall_damage(0, amount, used_weapon)
|
||||
else
|
||||
heal_overall_damage(0, -amount)
|
||||
@@ -2,51 +2,4 @@
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Monkey"
|
||||
|
||||
if(stat == CONSCIOUS)
|
||||
if(!lying)
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
if(contents.len)
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
else
|
||||
src << "This vent is not connected to anything."
|
||||
else
|
||||
src << "You must be standing on or beside an air vent to enter it."
|
||||
else
|
||||
src << "You can't vent crawl while you're stunned!"
|
||||
else
|
||||
src << "You must be conscious to do this!"
|
||||
return
|
||||
handle_ventcrawl()
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
/mob/living/carbon/monkey/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/monkey/say_quote(var/text)
|
||||
return "[src.say_message], \"[text]\"";
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//Monkey Overlays Indexes////////
|
||||
#define M_MASK_LAYER 1
|
||||
#define M_BACK_LAYER 2
|
||||
#define M_HANDCUFF_LAYER 3
|
||||
#define M_L_HAND_LAYER 4
|
||||
#define M_R_HAND_LAYER 5
|
||||
#define M_TOTAL_LAYERS 5
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
var/list/overlays_lying[M_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[M_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/monkey/regenerate_icons()
|
||||
..()
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_back(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/update_icons()
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays = null
|
||||
if(lying)
|
||||
icon_state = "monkey0"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
icon_state = "monkey1"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
////////
|
||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
overlays_lying[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]2")
|
||||
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
else
|
||||
overlays_lying[M_MASK_LAYER] = null
|
||||
overlays_standing[M_MASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
else
|
||||
overlays_standing[M_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
else
|
||||
overlays_standing[M_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
overlays_lying[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
|
||||
back.screen_loc = ui_monkey_back
|
||||
else
|
||||
overlays_lying[M_BACK_LAYER] = null
|
||||
overlays_standing[M_BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
|
||||
if(handcuffed)
|
||||
stop_pulling()
|
||||
overlays_lying[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[M_HANDCUFF_LAYER] = null
|
||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_hud()
|
||||
if (client)
|
||||
client.screen |= contents
|
||||
|
||||
//Monkey Overlays Indexes////////
|
||||
#undef M_MASK_LAYER
|
||||
#undef M_BACK_LAYER
|
||||
#undef M_HANDCUFF_LAYER
|
||||
#undef M_L_HAND_LAYER
|
||||
#undef M_R_HAND_LAYER
|
||||
#undef M_TOTAL_LAYERS
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
apply_damage(a,b,c)
|
||||
args
|
||||
@@ -7,14 +8,14 @@
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
|
||||
if(!damage || (blocked >= 2)) return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage/(blocked+1), used_weapon)
|
||||
adjustBruteLoss(damage/(blocked+1))
|
||||
if(BURN)
|
||||
if(COLD_RESISTANCE in mutations) damage = 0
|
||||
adjustFireLoss(damage/(blocked+1), used_weapon)
|
||||
adjustFireLoss(damage/(blocked+1))
|
||||
if(TOX)
|
||||
adjustToxLoss(damage/(blocked+1))
|
||||
if(OXY)
|
||||
@@ -41,42 +42,34 @@
|
||||
|
||||
|
||||
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
if(!effect || (blocked)) return 0
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
|
||||
Stun(effect/(blocked+1))
|
||||
if(WEAKEN)
|
||||
Weaken(effect/(blocked+1))
|
||||
if(PARALYZE)
|
||||
Paralyse(effect/(blocked+1))
|
||||
if(IRRADIATE)
|
||||
radiation += max((((effect - (effect*(getarmor(null, "rad")/15))))/(blocked+1)),0)//Rads auto check armor
|
||||
radiation += max((((effect - (effect*(getarmor(null, "rad")/100))))/(blocked+1)),0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
if(canstun) // stun is usually associated with stutter
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(SLUR)
|
||||
slurring = max(slurring, (effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect/(blocked+1)))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/slur = 0, var/eyeblur = 0, var/drowsy = 0, var/blocked = 0)
|
||||
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/blocked = 0)
|
||||
if(blocked >= 2) return 0
|
||||
if(stun) apply_effect(stun, STUN, blocked)
|
||||
if(weaken) apply_effect(weaken, WEAKEN, blocked)
|
||||
if(paralyze) apply_effect(paralyze, PARALYZE, blocked)
|
||||
if(irradiate) apply_effect(irradiate, IRRADIATE, blocked)
|
||||
if(stutter) apply_effect(stutter, STUTTER, blocked)
|
||||
if(slur) apply_effect(slur, SLUR, blocked)
|
||||
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/proc/react_to_attack(mob/M)
|
||||
return
|
||||
return 1
|
||||
+177
-157
@@ -1,3 +1,19 @@
|
||||
/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.
|
||||
|
||||
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))
|
||||
@@ -7,26 +23,32 @@
|
||||
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(!src.nodamage)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
|
||||
else
|
||||
if(nodamage)
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
else
|
||||
src.health = src.maxHealth - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() - src.halloss
|
||||
|
||||
|
||||
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
|
||||
//affects them once clothing is factored in. ~Errorage
|
||||
/mob/living/proc/calculate_affecting_pressure(var/pressure)
|
||||
return 0
|
||||
|
||||
|
||||
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
|
||||
/mob/living/proc/burn_skin(burn_amount, used_weapon = null)
|
||||
/mob/living/proc/burn_skin(burn_amount)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(MSHOCK in src.mutations)
|
||||
return 0
|
||||
//world << "DEBUG: burn_skin(), mutations=[mutations]"
|
||||
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)
|
||||
for(var/name in H.organs)
|
||||
apply_damage(divided_damage, BURN, name, 0, 0, "Skin Burns")
|
||||
H.UpdateDamageIcon()
|
||||
var/extradam = 0 //added to when organ is at max dam
|
||||
for(var/datum/organ/external/affecting in H.organs)
|
||||
if(!affecting) continue
|
||||
if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
@@ -59,76 +81,139 @@
|
||||
// world << "[src] ~ [src.bodytemperature] ~ [temperature]"
|
||||
return temperature
|
||||
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
|
||||
// Stop! ... Hammertime! ~Carn
|
||||
// I touched them without asking... I'm soooo edgy ~Erro (added nodamage checks)
|
||||
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setOxyLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
oxyloss = amount
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setToxLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
toxloss = amount
|
||||
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setCloneLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
cloneloss = amount
|
||||
|
||||
/mob/living/proc/getBrainLoss()
|
||||
return brainloss
|
||||
|
||||
/mob/living/proc/adjustBrainLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
brainloss = min(max(brainloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setBrainLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
brainloss = amount
|
||||
|
||||
/mob/living/proc/getHalLoss()
|
||||
return halloss
|
||||
|
||||
/mob/living/proc/adjustHalLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
halloss = min(max(halloss + amount, 0),(maxHealth*2))
|
||||
|
||||
/mob/living/proc/setHalLoss(var/amount)
|
||||
if(src.nodamage) return 0 //godmode
|
||||
halloss = amount
|
||||
|
||||
/mob/living/proc/getMaxHealth()
|
||||
return maxHealth
|
||||
|
||||
/mob/living/proc/setMaxHealth(var/newMaxHealth)
|
||||
maxHealth = newMaxHealth
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
|
||||
/mob/proc/get_contents()
|
||||
|
||||
/mob/living/get_contents()
|
||||
|
||||
//Recursive function to find everything a mob is holding.
|
||||
/mob/living/get_contents(var/obj/item/weapon/storage/Storage = null)
|
||||
var/list/L = list()
|
||||
L += src.contents
|
||||
for(var/obj/item/weapon/storage/S in L)
|
||||
L |= S.return_inv()
|
||||
for(var/obj/item/weapon/gift/G in L)
|
||||
L |= G.gift
|
||||
if (istype(G.gift, /obj/item/weapon/storage))
|
||||
L |= G.gift:return_inv()
|
||||
for(var/obj/item/weapon/evidencebag/E in L)
|
||||
L |= E:contents
|
||||
for(var/obj/item/smallDelivery/S in L)
|
||||
L |= S.wrapped
|
||||
return L
|
||||
|
||||
if(Storage) //If it called itself
|
||||
L += Storage.return_inv()
|
||||
|
||||
//Leave this commented out, it will cause storage items to exponentially add duplicate to the list
|
||||
//for(var/obj/item/weapon/storage/S in Storage.return_inv()) //Check for storage items
|
||||
// L += get_contents(S)
|
||||
|
||||
for(var/obj/item/weapon/gift/G in Storage.return_inv()) //Check for gift-wrapped items
|
||||
L += G.gift
|
||||
if(istype(G.gift, /obj/item/weapon/storage))
|
||||
L += get_contents(G.gift)
|
||||
|
||||
for(var/obj/item/smallDelivery/D in Storage.return_inv()) //Check for package wrapped items
|
||||
L += D.wrapped
|
||||
if(istype(D.wrapped, /obj/item/weapon/storage)) //this should never happen
|
||||
L += get_contents(D.wrapped)
|
||||
return L
|
||||
|
||||
else
|
||||
|
||||
L += src.contents
|
||||
for(var/obj/item/weapon/storage/S in src.contents) //Check for storage items
|
||||
L += get_contents(S)
|
||||
|
||||
for(var/obj/item/weapon/gift/G in src.contents) //Check for gift-wrapped items
|
||||
L += G.gift
|
||||
if(istype(G.gift, /obj/item/weapon/storage))
|
||||
L += get_contents(G.gift)
|
||||
|
||||
for(var/obj/item/smallDelivery/D in src.contents) //Check for package wrapped items
|
||||
L += D.wrapped
|
||||
if(istype(D.wrapped, /obj/item/weapon/storage)) //this should never happen
|
||||
L += get_contents(D.wrapped)
|
||||
return L
|
||||
|
||||
/mob/living/proc/check_contents_for(A)
|
||||
var/list/L = list()
|
||||
L += src.contents
|
||||
for(var/obj/item/weapon/storage/S in L)
|
||||
L |= S.return_inv()
|
||||
for(var/obj/item/weapon/gift/G in L)
|
||||
L |= G.gift
|
||||
if (istype(G.gift, /obj/item/weapon/storage))
|
||||
L |= G.gift:return_inv()
|
||||
for(var/obj/item/weapon/evidencebag/E in L)
|
||||
L |= E:contents
|
||||
for(var/obj/item/smallDelivery/S in L)
|
||||
L |= S.wrapped
|
||||
if(hasorgans(src))
|
||||
for(var/named in src:organs)
|
||||
var/datum/organ/external/O = src:organs[named]
|
||||
for(var/obj/item/weapon/implant/I in O.implant)
|
||||
L |= I
|
||||
if(istype(I, /obj/item/weapon/implant/compressed))
|
||||
L |= I:scanned
|
||||
var/list/L = src.get_contents()
|
||||
|
||||
for(var/obj/B in L)
|
||||
if(B.type == A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/proc/check_contents_for_reagent(A)
|
||||
var/list/L = list()
|
||||
L += src.contents
|
||||
for(var/obj/item/weapon/storage/S in L)
|
||||
L |= S.return_inv()
|
||||
for(var/obj/item/weapon/gift/G in L)
|
||||
L |= G.gift
|
||||
if (istype(G.gift, /obj/item/weapon/storage))
|
||||
L |= G.gift:return_inv()
|
||||
for(var/obj/item/weapon/evidencebag/E in L)
|
||||
L |= E:contents
|
||||
for(var/obj/item/smallDelivery/S in L)
|
||||
L |= S.wrapped
|
||||
if(hasorgans(src))
|
||||
for(var/named in src:organs)
|
||||
var/datum/organ/external/O = src:organs[named]
|
||||
for(var/obj/item/weapon/implant/I in O.implant)
|
||||
L |= I
|
||||
if(istype(I, /obj/item/weapon/implant/compressed))
|
||||
L |= I:scanned
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/B in L)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
if(R.type == A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
|
||||
return 0 //only carbon liveforms have this proc
|
||||
@@ -173,92 +258,39 @@
|
||||
src.updatehealth()
|
||||
|
||||
/mob/living/proc/revive()
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
for(var/A in H.organs)
|
||||
var/datum/organ/external/affecting = null
|
||||
if(!H.organs[A]) continue
|
||||
affecting = H.organs[A]
|
||||
if(!istype(affecting, /datum/organ/external)) continue
|
||||
affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health
|
||||
affecting.status &= ~ORGAN_BROKEN
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
affecting.status &= ~ORGAN_DESTROYED
|
||||
affecting.wounds.Cut()
|
||||
H.UpdateDamageIcon()
|
||||
H.update_body()
|
||||
//src.fireloss = 0
|
||||
src.setToxLoss(0)
|
||||
//src.bruteloss = 0
|
||||
src.setOxyLoss(0)
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
src.radiation = 0
|
||||
src.nutrition = 400
|
||||
src.bodytemperature = initial(src.bodytemperature)
|
||||
//src.health = 100
|
||||
if(ishuman(src))
|
||||
src.heal_overall_damage(1000, 1000)
|
||||
//M.updatehealth()
|
||||
src.buckled = initial(src.buckled)
|
||||
src.handcuffed = initial(src.handcuffed)
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
e.brute_dam = 0.0
|
||||
e.burn_dam = 0.0
|
||||
e.status &= ~ORGAN_BANDAGED
|
||||
e.max_damage = initial(e.max_damage)
|
||||
e.status &= ~ORGAN_BLEEDING
|
||||
e.open = 0
|
||||
e.status &= ~ORGAN_BROKEN
|
||||
e.status &= ~ORGAN_SPLINTED
|
||||
e.status &= ~ORGAN_DESTROYED
|
||||
e.perma_injury = 0
|
||||
e.update_icon()
|
||||
e.wounds.Cut()
|
||||
del(H.vessel)
|
||||
H.vessel = new/datum/reagents(560)
|
||||
H.vessel.my_atom = H
|
||||
H.vessel.add_reagent("blood",560)
|
||||
spawn(1)
|
||||
H.fixblood()
|
||||
H.pale = 0
|
||||
H.update_body()
|
||||
H.update_face()
|
||||
H.UpdateDamageIcon()
|
||||
if (src.stat > 1)
|
||||
src.stat=0
|
||||
..()
|
||||
src.heal_overall_damage(1000, 1000)
|
||||
src.buckled = initial(src.buckled)
|
||||
src.handcuffed = initial(src.handcuffed)
|
||||
if(src.stat > 1)
|
||||
src.stat = CONSCIOUS
|
||||
radiation = 0
|
||||
nutrition = 400
|
||||
bodytemperature = 310
|
||||
sdisabilities = 0
|
||||
disabilities = 0
|
||||
blinded = 0
|
||||
eye_blind = 0
|
||||
eye_blurry = 0
|
||||
ear_deaf = 0
|
||||
ear_damage = 0
|
||||
heal_overall_damage(1000, 1000)
|
||||
buckled = initial(src.buckled)
|
||||
handcuffed = initial(src.handcuffed)
|
||||
if(stat == 2)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
regenerate_icons()
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/proc/UpdateDamageIcon()
|
||||
return
|
||||
|
||||
/*CARN: Deprecated. Please use update_canmove()
|
||||
/mob/living/proc/check_if_buckled()
|
||||
if (buckled)
|
||||
if(buckled == /obj/structure/stool/bed || istype(buckled, /obj/machinery/conveyor))
|
||||
lying = 1
|
||||
if(lying)
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
density = 1
|
||||
else
|
||||
density = !lying
|
||||
//Bullshit ERP horseshit causing runtimes. Eat a dick.
|
||||
/*
|
||||
*/
|
||||
|
||||
/mob/living/proc/Examine_OOC()
|
||||
set name = "Examine Meta-Info (OOC)"
|
||||
set category = "OOC"
|
||||
@@ -276,16 +308,4 @@
|
||||
else
|
||||
usr << "OOC Metadata is not supported by this server!"
|
||||
|
||||
return*/
|
||||
|
||||
/mob/living/attack_animal(mob/M)
|
||||
attack_paw(M) // treat it like a normal non-human attack
|
||||
|
||||
/mob/living/verb/change_flavor_text()
|
||||
set name = "Change Flavor Text"
|
||||
set category = "OOC"
|
||||
|
||||
src.update_flavor_text()
|
||||
|
||||
|
||||
/mob/living/var/life_tick = 0
|
||||
return
|
||||
@@ -40,22 +40,15 @@
|
||||
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
|
||||
if(C && C.active)
|
||||
C.attack_self(src)//Should shut it off
|
||||
update_icons()
|
||||
src << "\blue Your [C.name] was disrupted!"
|
||||
Stun(2)
|
||||
|
||||
flash_weak_pain()
|
||||
|
||||
if(istype(equipped(),/obj/item/device/assembly/signaler))
|
||||
var/obj/item/device/assembly/signaler/signaler = equipped()
|
||||
if(signaler.deadman && prob(80))
|
||||
src.visible_message("\red [src] triggers their deadman's switch!")
|
||||
signaler.signal()
|
||||
|
||||
var/absorb = run_armor_check(def_zone, P.flag)
|
||||
if(absorb >= 2)
|
||||
P.on_hit(src,2)
|
||||
return 2
|
||||
if(!P.nodamage)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, sharp = 1, used_weapon = P.name)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
@@ -0,0 +1,24 @@
|
||||
/mob/living
|
||||
|
||||
//Health and life related vars
|
||||
var/maxHealth = 100 //Maximum health that should be possible.
|
||||
var/health = 100 //A mob's health
|
||||
|
||||
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
|
||||
var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
|
||||
var/oxyloss = 0.0 //Oxygen depravation damage (no air in lungs)
|
||||
var/toxloss = 0.0 //Toxic damage caused by being poisoned or radiated
|
||||
var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt.
|
||||
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. Metroids also deal cloneloss damage to victims
|
||||
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
||||
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
|
||||
|
||||
|
||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
|
||||
|
||||
|
||||
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
|
||||
|
||||
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
|
||||
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
|
||||
@@ -1,12 +1,57 @@
|
||||
/mob/living/Login()
|
||||
..()
|
||||
//Mind updates
|
||||
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
|
||||
mind.active = 1 //indicates that the mind is currently synced with a client
|
||||
|
||||
//Round specific stuff like hud updates
|
||||
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((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)
|
||||
if(mind in ticker.mode:cult)
|
||||
ticker.mode.update_cult_icons_added(src.mind)
|
||||
if("nuclear emergency")
|
||||
if(mind in ticker.mode:syndicates)
|
||||
ticker.mode.update_all_synd_icons()
|
||||
|
||||
//This stuff needs to be merged from cloning.dm but I'm not in the mood to be shouted at for breaking all the things :< ~Carn
|
||||
/* clones
|
||||
switch(ticker.mode.name)
|
||||
if("revolution")
|
||||
if(src.occupant.mind in ticker.mode:revolutionaries)
|
||||
ticker.mode:update_all_rev_icons() //So the icon actually appears
|
||||
if(src.occupant.mind in ticker.mode:head_revolutionaries)
|
||||
ticker.mode:update_all_rev_icons()
|
||||
if("nuclear emergency")
|
||||
if (src.occupant.mind in ticker.mode:syndicates)
|
||||
ticker.mode:update_all_synd_icons()
|
||||
if("cult")
|
||||
if (src.occupant.mind in ticker.mode:cult)
|
||||
ticker.mode:add_cultist(src.occupant.mind)
|
||||
ticker.mode:update_all_cult_icons() //So the icon actually appears
|
||||
*/
|
||||
|
||||
/* Plantpeople
|
||||
switch(ticker.mode.name)
|
||||
if ("revolution")
|
||||
if (podman.mind in ticker.mode:revolutionaries)
|
||||
ticker.mode:add_revolutionary(podman.mind)
|
||||
ticker.mode:update_all_rev_icons() //So the icon actually appears
|
||||
if (podman.mind in ticker.mode:head_revolutionaries)
|
||||
ticker.mode:update_all_rev_icons()
|
||||
if ("nuclear emergency")
|
||||
if (podman.mind in ticker.mode:syndicates)
|
||||
ticker.mode:update_all_synd_icons()
|
||||
if ("cult")
|
||||
if (podman.mind in ticker.mode:cult)
|
||||
ticker.mode:add_cultist(podman.mind)
|
||||
ticker.mode:update_all_cult_icons() //So the icon actually appears
|
||||
if ("changeling")
|
||||
if (podman.mind in ticker.mode:changelings)
|
||||
podman.make_changeling()
|
||||
*/
|
||||
@@ -0,0 +1,4 @@
|
||||
/mob/living/Logout()
|
||||
..()
|
||||
if(!key && mind) //key and mind have become seperated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
+74
-234
@@ -1,7 +1,7 @@
|
||||
|
||||
var/list/department_radio_keys = list(
|
||||
":r" = "right ear",
|
||||
":l" = "left ear",
|
||||
":r" = "right hand",
|
||||
":l" = "left hand",
|
||||
":i" = "intercom",
|
||||
":h" = "department",
|
||||
":c" = "Command",
|
||||
@@ -17,8 +17,8 @@ var/list/department_radio_keys = list(
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
":R" = "right ear",
|
||||
":L" = "left ear",
|
||||
":R" = "right hand",
|
||||
":L" = "left hand",
|
||||
":I" = "intercom",
|
||||
":H" = "department",
|
||||
":C" = "Command",
|
||||
@@ -62,12 +62,8 @@ var/list/department_radio_keys = list(
|
||||
if (!ishuman(src))
|
||||
return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
if(istype(H.l_ear,/obj/item/device/radio/headset))
|
||||
dongle = H.l_ear
|
||||
else
|
||||
dongle = H.r_ear
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
@@ -75,46 +71,33 @@ var/list/department_radio_keys = list(
|
||||
if (isalien(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
if(istype(H.l_ear,/obj/item/device/radio/headset))
|
||||
dongle = H.l_ear
|
||||
else
|
||||
dongle = H.r_ear
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_hive) return 1
|
||||
|
||||
/mob/living/say(var/message)
|
||||
var/message_old = message
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!speech_allowed && usr == src)
|
||||
usr << "\red You can't speak."
|
||||
return
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if (length(message) >= 1)
|
||||
if (miming && copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if (src.client && (client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
if (src.client)
|
||||
if(client.muted_ic)
|
||||
src << "\red You cannot speak in IC (muted by admins)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
// stat == 2 is handled above, so this stops transmission of uncontious messages
|
||||
if (stat)
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (disabilities & 64)
|
||||
if (sdisabilities & MUTE)
|
||||
return
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
@@ -125,10 +108,9 @@ var/list/department_radio_keys = list(
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human))
|
||||
if (istype(src, /mob/living/carbon/human) && name != real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.get_face_name() != real_name)
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
@@ -151,37 +133,14 @@ var/list/department_radio_keys = list(
|
||||
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
|
||||
if (message_mode)
|
||||
message = trim(copytext(message, 3))
|
||||
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot)) && (message_mode=="department" || (message_mode in radiochannels) || message_mode == "right ear" || message_mode == "left ear"))
|
||||
if (!(ishuman(src) || isanimal(src) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
|
||||
message_mode = null //only humans can use headsets
|
||||
// Check removed so parrots can use headsets!
|
||||
// And borgs -Sieve
|
||||
|
||||
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"
|
||||
|
||||
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
|
||||
message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
|
||||
|
||||
message = capitalize(message) //capitalize the first letter of what they actually say
|
||||
|
||||
// :downs:
|
||||
if (getBrainLoss() >= 60)
|
||||
message = dd_replacetext(message, " am ", " ")
|
||||
@@ -197,12 +156,10 @@ var/list/department_radio_keys = list(
|
||||
message = uppertext(message)
|
||||
message += "[stutter(pick("!", "!!", "!!!"))]"
|
||||
if(!stuttering && prob(15))
|
||||
message = NewStutter(message,stunned)
|
||||
message = stutter(message)
|
||||
|
||||
if (stuttering)
|
||||
message = NewStutter(message,stunned)
|
||||
if (slurring)
|
||||
message = slur(message)
|
||||
message = stutter(message)
|
||||
|
||||
/* //qw do not have beesease atm.
|
||||
if(virus)
|
||||
@@ -217,40 +174,34 @@ var/list/department_radio_keys = list(
|
||||
|
||||
switch (message_mode)
|
||||
if ("headset")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message)
|
||||
used_radios += src:ears
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
|
||||
if ("secure headset")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, 1)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, 1)
|
||||
used_radios += src:r_ear
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, 1)
|
||||
used_radios += src:ears
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("right ear")
|
||||
if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
if ("right hand")
|
||||
if (r_hand)
|
||||
r_hand.talk_into(src, message)
|
||||
used_radios += src:r_hand
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left ear")
|
||||
if (src:l_ear)
|
||||
src:l_ear.talk_into(src, message)
|
||||
used_radios += src:l_ear
|
||||
if ("left hand")
|
||||
if (l_hand)
|
||||
l_hand.talk_into(src, message)
|
||||
used_radios += src:l_hand
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
@@ -265,7 +216,7 @@ var/list/department_radio_keys = list(
|
||||
|
||||
//I see no reason to restrict such way of whispering
|
||||
if ("whisper")
|
||||
whisper(trim(copytext(message_old, 3)))
|
||||
whisper(message)
|
||||
return
|
||||
|
||||
if ("binary")
|
||||
@@ -281,36 +232,38 @@ var/list/department_radio_keys = list(
|
||||
return
|
||||
|
||||
if ("department")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("pAI")
|
||||
if (src:radio)
|
||||
src:radio.talk_into(src, message)
|
||||
used_radios += src:radio
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if("changeling")
|
||||
if(src.changeling)
|
||||
for(var/mob/aChangeling in world)
|
||||
if(aChangeling.changeling || istype(aChangeling, /mob/dead/observer))
|
||||
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
|
||||
if(mind && mind.changeling)
|
||||
for(var/mob/Changeling in mob_list)
|
||||
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
|
||||
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
||||
return
|
||||
////SPECIAL HEADSETS START
|
||||
else
|
||||
//world << "SPECIAL HEADSETS"
|
||||
if (message_mode in radiochannels)
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
if(isrobot(src))//Seperates robots to prevent runtimes from the ear stuff
|
||||
var/mob/living/silicon/robot/R = src
|
||||
if(R.radio)//Sanityyyy
|
||||
R.radio.talk_into(src, message, message_mode)
|
||||
used_radios += R.radio
|
||||
else
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
message_range = 1
|
||||
italics = 1
|
||||
/////SPECIAL HEADSETS END
|
||||
@@ -318,7 +271,7 @@ var/list/department_radio_keys = list(
|
||||
var/list/listening
|
||||
|
||||
listening = get_mobs_in_view(message_range, src)
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
@@ -330,27 +283,11 @@ var/list/department_radio_keys = list(
|
||||
var/list/V = view(message_range, T)
|
||||
var/list/W = V
|
||||
|
||||
var/list/eavesdroppers = get_mobs_in_view(7, src)
|
||||
for(var/mob/M in listening)
|
||||
eavesdroppers.Remove(M)
|
||||
for(var/mob/M in eavesdroppers)
|
||||
if(M.stat || !M.client || istype(M, /mob/living/silicon/pai) || M == src)
|
||||
eavesdroppers.Remove(M)
|
||||
|
||||
for (var/obj/O in ((W | contents)-used_radios))
|
||||
W |= O
|
||||
|
||||
for (var/mob/M in W)
|
||||
W |= M.contents
|
||||
if(hasorgans(M))
|
||||
var/mob/living/carbon/G = M
|
||||
for(var/name in G:organs)
|
||||
var/datum/organ/external/F = G:organs[name]
|
||||
for(var/obj/item/weapon/implant/I in F.implant)
|
||||
W |= I
|
||||
|
||||
for (var/obj/item/device/pda/M in W)
|
||||
W |= M.contents
|
||||
|
||||
for (var/obj/O in W) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
||||
spawn (0)
|
||||
@@ -375,100 +312,32 @@ var/list/department_radio_keys = list(
|
||||
var/list/heard_a = list() // understood us
|
||||
var/list/heard_b = list() // didn't understand us
|
||||
|
||||
for (var/mob/M in listening)
|
||||
//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
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('talk.dmi',src,"h[speech_bubble_test]")
|
||||
for (var/M in listening)
|
||||
if(hascall(M,"say_understands"))
|
||||
if (M:say_understands(src))
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell)
|
||||
var/message_a = say_quote(message)
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[H.get_visible_name()]</span> <span class='message'>[message_a]</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
var/mob/living/carbon/human/H = src
|
||||
rendered = "<span class='game say'><span class='name'>[H.get_face_name()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
//talking crystals
|
||||
|
||||
for(var/obj/item/weapon/talkingcrystal/O in view(3,src))
|
||||
O.catchMessage(message,src)
|
||||
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
//spawn(30) del(speech_bubble)
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
// If this client has bubbles disabled, obscure the bubble
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
*/
|
||||
/*
|
||||
// find the suffix, if bot, human or monkey
|
||||
var/punctuation = ""
|
||||
if(presay == "bot" || presay == "")
|
||||
var/ending = copytext(text, length(text))
|
||||
if (ending == "?")
|
||||
punctuation = "question"
|
||||
else if (ending == "!")
|
||||
punctuation = "exclamation"
|
||||
else
|
||||
punctuation = ""
|
||||
|
||||
// flick the bubble
|
||||
flick("[presay]say[punctuation]", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
spawn()
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
for (var/M in heard_a)
|
||||
if(hascall(M,"show_message"))
|
||||
M:show_message(rendered, 2)
|
||||
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
@@ -477,7 +346,7 @@ var/list/department_radio_keys = list(
|
||||
message_b = voice_message
|
||||
else
|
||||
message_b = stars(message)
|
||||
message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell)
|
||||
message_b = say_quote(message_b)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
@@ -485,38 +354,18 @@ var/list/department_radio_keys = list(
|
||||
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
|
||||
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
for (var/M in heard_b)
|
||||
if(hascall(M,"show_message"))
|
||||
M:show_message(rendered, 2)
|
||||
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
var/image/I = image('icons/effects/speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
|
||||
*/ /*
|
||||
|
||||
flick("[presay]say", B)
|
||||
|
||||
@@ -530,16 +379,7 @@ var/list/department_radio_keys = list(
|
||||
del(B)
|
||||
*/
|
||||
|
||||
if (length(eavesdroppers))
|
||||
|
||||
for (var/mob/M in eavesdroppers)
|
||||
M << "\blue [src] speaks into their radio..."
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
|
||||
|
||||
|
||||
/obj/effect/speech_bubble
|
||||
var/mob/parent
|
||||
@@ -1,41 +1,23 @@
|
||||
#define AI_CAMERA_LUMINOSITY 6
|
||||
|
||||
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
|
||||
var/list/possibleNames = ai_names
|
||||
|
||||
var/pickedName = null
|
||||
while(!pickedName)
|
||||
pickedName = pick(ai_names)
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
for (var/mob/living/silicon/ai/A in mob_list)
|
||||
if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop
|
||||
possibleNames -= pickedName
|
||||
pickedName = null
|
||||
|
||||
networks = list("SS13",
|
||||
"Medbay",
|
||||
"Research",
|
||||
"Engineering",
|
||||
"Command",
|
||||
"Singularity",
|
||||
"Tcomsat",
|
||||
"Solars",
|
||||
"Security",
|
||||
"Cargo",
|
||||
"Bomb Testing",
|
||||
"Research",
|
||||
"Medbay",
|
||||
"Atmospherics",
|
||||
"Mess Hall",
|
||||
"Arrivals",
|
||||
"Singularity",
|
||||
"Arrivals",
|
||||
"Mine")
|
||||
|
||||
real_name = pickedName
|
||||
name = real_name
|
||||
original_name = real_name
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
loc = loc
|
||||
holo_icon = getHologramIcon(icon('AI.dmi',"holo1"))
|
||||
|
||||
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
|
||||
|
||||
proc_holder_list = new()
|
||||
|
||||
@@ -43,12 +25,20 @@
|
||||
if (istype(L, /datum/ai_laws))
|
||||
laws = L
|
||||
else
|
||||
laws = new /datum/ai_laws/nanotrasen
|
||||
laws = new /datum/ai_laws/asimov
|
||||
|
||||
verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
|
||||
if (istype(loc, /turf)) //If you add a verb here, make sure to add it to transform_procs.dm too.
|
||||
verbs += AI_VERB_LIST
|
||||
aiPDA = new/obj/item/device/pda/ai(src)
|
||||
aiPDA.owner = name
|
||||
aiPDA.ownjob = "AI"
|
||||
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
|
||||
|
||||
if (istype(loc, /turf))
|
||||
verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light)
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
@@ -60,57 +50,19 @@
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
|
||||
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
src << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
|
||||
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply double-click it."
|
||||
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
|
||||
src << "Remember to <b>adjust your camera network</b> if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects.<br>"
|
||||
|
||||
src << "To use something, simply click on it."
|
||||
src << "Use say :b to speak to your cyborgs through binary."
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
|
||||
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
|
||||
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
|
||||
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
|
||||
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
|
||||
|
||||
job = "AI"
|
||||
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
|
||||
if(src.mind)
|
||||
ticker.mode.remove_revolutionary(src.mind)
|
||||
|
||||
if(client)
|
||||
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
|
||||
|
||||
add_to_mob_list(src)
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user.visible_message("\blue [user] starts to unbolt [src] from the plating...")
|
||||
if(!do_after(user,40))
|
||||
user.visible_message("\blue [user] decides not to unbolt [src]")
|
||||
return
|
||||
user.visible_message("\blue [user] finishes unfastening [src]")
|
||||
anchored = 0
|
||||
return
|
||||
else
|
||||
user.visible_message("\blue [user] starts to bolt [src] to the plating...")
|
||||
if(!do_after(user,40))
|
||||
user.visible_message("\blue [user] decides not to bolt [src]")
|
||||
return
|
||||
user.visible_message("\blue [user] finishes fastening down [src]")
|
||||
anchored = 1
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
set category = "AI Commands"
|
||||
@@ -119,46 +71,23 @@
|
||||
return
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = ""
|
||||
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"
|
||||
var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Clown", "Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static")
|
||||
if(icontype == "Clown")
|
||||
icon_state = "ai-clown2"
|
||||
else if(icontype == "Monochrome")
|
||||
icon_state = "ai-mono"
|
||||
else if(icontype == "Rainbow")
|
||||
icon_state = "ai-clown"
|
||||
else if(icontype == "Blue")
|
||||
icon_state = "ai"
|
||||
else if(icontype == "Inverted")
|
||||
icon_state = "ai-u"
|
||||
else if(icontype == "Firewall")
|
||||
icon_state = "ai-magma"
|
||||
else if(icontype == "Green")
|
||||
icon_state = "ai-wierd"
|
||||
else if(icontype == "Text")
|
||||
icon_state = "ai-text"
|
||||
else if(icontype == "Smiley")
|
||||
icon_state = "ai-smiley"
|
||||
else if(icontype == "Angry")
|
||||
icon_state = "ai-angryface"
|
||||
else if(icontype == "Dorf")
|
||||
icon_state = "ai-dorf"
|
||||
else if(icontype == "Bliss")
|
||||
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")
|
||||
icon_state = "ai-static"
|
||||
else//(icontype == "Matrix")
|
||||
icon_state = "ai-matrix"
|
||||
|
||||
//else
|
||||
//usr <<"You can only change your display once!"
|
||||
//return
|
||||
@@ -223,12 +152,14 @@
|
||||
/mob/living/silicon/ai/proc/ai_roster()
|
||||
set category = "AI Commands"
|
||||
set name = "Show Crew Manifest"
|
||||
|
||||
var/dat = "<html><head><title>Crew Roster</title></head><body><b>Crew Roster:</b><br><br>"
|
||||
|
||||
var/list/L = list()
|
||||
for (var/datum/data/record/t in data_core.general)
|
||||
dat += "[t.fields["name"]] - [t.fields["rank"]]<br>"
|
||||
|
||||
var/R = t.fields["name"] + " - " + t.fields["rank"]
|
||||
L += R
|
||||
for(var/R in sortList(L))
|
||||
dat += "[R]<br>"
|
||||
dat += "</body></html>"
|
||||
|
||||
src << browse(dat, "window=airoster")
|
||||
@@ -268,7 +199,8 @@
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/ex_act(severity)
|
||||
flick("flash", flash)
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -339,12 +271,12 @@
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"])
|
||||
if(A && target)
|
||||
|
||||
A:cameraFollow = target
|
||||
A.cameraFollow = target
|
||||
A << text("Now tracking [] on camera.", target.name)
|
||||
if (usr.machine == null)
|
||||
usr.machine = usr
|
||||
|
||||
while (usr:cameraFollow == target)
|
||||
while (src.cameraFollow == target)
|
||||
usr << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(40)
|
||||
continue
|
||||
@@ -388,7 +320,7 @@
|
||||
else //harm
|
||||
var/damage = rand(10, 20)
|
||||
if (prob(90))
|
||||
playsound(loc, 'slash.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
@@ -397,7 +329,7 @@
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
|
||||
@@ -417,66 +349,37 @@
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
if(current)
|
||||
current.sd_SetLuminosity(0)
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
current = A
|
||||
..()
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
A.sd_SetLuminosity(camera_light_on * AI_CAMERA_LUMINOSITY)
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
|
||||
src.cameraFollow = null
|
||||
if (!C || stat == 2 || !C.status || C.network != network)
|
||||
machine = null
|
||||
reset_view(null)
|
||||
return 0
|
||||
if (stat == 2 || !C.status || !(C.network in src.networks) ) return 0
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
if(client.eye == eyeobj)
|
||||
eyeobj.loc = C.loc
|
||||
cameranet.visibility(eyeobj)
|
||||
else
|
||||
machine = src
|
||||
src:current = C
|
||||
reset_view(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/proc/triggerUnmarkedAlarm(var/class, area/A, var/O)
|
||||
if(stat == 2) // stat = 2 = dead AI
|
||||
return 1
|
||||
var/obj/machinery/camera/C = null
|
||||
var/list/CL = null
|
||||
var/alarmtext = ""
|
||||
if(class == "AirlockHacking") // In case more unmarked alerts would be added eventually;
|
||||
alarmtext = "--- Unauthorized remote access detected"
|
||||
if (O && istype(O, /list))
|
||||
CL = O
|
||||
if (CL.len == 1)
|
||||
C = CL[1]
|
||||
else if (O && istype(O, /obj/machinery/camera))
|
||||
C = O
|
||||
if (A)
|
||||
alarmtext += " in " + A.name
|
||||
if (O)
|
||||
if (C && C.status)
|
||||
alarmtext += text("! (<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>)", src, C, C.c_tag)
|
||||
else if (CL && CL.len)
|
||||
var/foo = 0
|
||||
var/dat2 = ""
|
||||
for (var/obj/machinery/camera/I in CL)
|
||||
dat2 += text("[]<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>", (!foo) ? "" : " | ", src, I, I.c_tag)
|
||||
foo = 1
|
||||
alarmtext += text("! ([])", dat2)
|
||||
else
|
||||
alarmtext += "! (No Camera)"
|
||||
else
|
||||
alarmtext += "! (No Camera)"
|
||||
else
|
||||
alarmtext += "!"
|
||||
src << alarmtext
|
||||
machine = src
|
||||
reset_view(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
|
||||
@@ -501,12 +404,12 @@
|
||||
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
|
||||
if (O)
|
||||
if (C && C.status)
|
||||
src << text("--- [] alarm detected in []! (<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>)", class, A.name, src, C, C.c_tag)
|
||||
src << "--- [class] alarm detected in [A.name]! (<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>)"
|
||||
else if (CL && CL.len)
|
||||
var/foo = 0
|
||||
var/dat2 = ""
|
||||
for (var/obj/machinery/camera/I in CL)
|
||||
dat2 += text("[]<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>", (!foo) ? "" : " | ", src, I, I.c_tag)
|
||||
dat2 += text("[]<A HREF=?src=\ref[];switchcamera=\ref[]>[]</A>", (!foo) ? "" : " | ", src, I, I.c_tag) //I'm not fixing this shit...
|
||||
foo = 1
|
||||
src << text ("--- [] alarm detected in []! ([])", class, A.name, dat2)
|
||||
else
|
||||
@@ -538,24 +441,24 @@
|
||||
set name = "Cancel Camera View"
|
||||
reset_view(null)
|
||||
machine = null
|
||||
src:cameraFollow = null
|
||||
src.cameraFollow = null
|
||||
|
||||
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
|
||||
//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
/mob/living/silicon/ai/proc/ai_network_change()
|
||||
set category = "AI Commands"
|
||||
set name = "Jump to Camera Network"
|
||||
set name = "Change Camera Network"
|
||||
reset_view(null)
|
||||
machine = null
|
||||
src:cameraFollow = null
|
||||
src.cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't change your camera network because you are dead!"
|
||||
return
|
||||
|
||||
for (var/obj/machinery/camera/C in world)
|
||||
for (var/obj/machinery/camera/C in Cameras)
|
||||
if(!C.status)
|
||||
continue
|
||||
if(C.network == "AI Satellite")
|
||||
@@ -565,23 +468,14 @@
|
||||
if (mind == M)
|
||||
cameralist[C.network] = C.network
|
||||
else
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "Prison" )
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
|
||||
cameralist[C.network] = C.network
|
||||
|
||||
var/newnet = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
|
||||
cameralist = new/list
|
||||
for(var/obj/machinery/camera/C in world)
|
||||
if(C.network == newnet)
|
||||
cameralist.Add(C)
|
||||
|
||||
if(length(cameralist))
|
||||
switchCamera( pick(cameralist) )
|
||||
|
||||
src << "\blue Jumped to [newnet] camera network."
|
||||
network = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
if(isnull(network))
|
||||
network = initial(network) // If nothing is selected, default to SS13 (or the initial network)
|
||||
src << "\blue Switched to [network] camera network."
|
||||
//End of code by Mord_Sith
|
||||
//cael - with the multiple onstation networks all linked together, changing networks is legacy functionality
|
||||
//so i recycled it to instantly jump to any network
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/choose_modules()
|
||||
@@ -623,9 +517,9 @@
|
||||
del(holo_icon)
|
||||
switch(input)
|
||||
if("default")
|
||||
holo_icon = getHologramIcon(icon('AI.dmi',"holo1"))
|
||||
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
|
||||
if("floating face")
|
||||
holo_icon = getHologramIcon(icon('AI.dmi',"holo2"))
|
||||
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/corereturn()
|
||||
@@ -636,4 +530,19 @@
|
||||
if(!istype(apc))
|
||||
src << "\blue You are already in your Main Core."
|
||||
return
|
||||
apc.malfvacate()
|
||||
apc.malfvacate()
|
||||
|
||||
//Toggles the luminosity and applies it by re-entereing the camera.
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light()
|
||||
set name = "Toggle camera light"
|
||||
set desc = "Toggles the light on the camera the AI is looking through."
|
||||
set category = "AI Commands"
|
||||
|
||||
if(!current)
|
||||
usr << "\red You are not looking through a camera right now."
|
||||
return
|
||||
camera_light_on = !camera_light_on
|
||||
reset_view(current)
|
||||
|
||||
|
||||
#undef AI_CAMERA_LUMINOSITY
|
||||
@@ -1,28 +1,33 @@
|
||||
/mob/living/silicon/ai/death(gibbed)
|
||||
stat = 2
|
||||
canmove = 0
|
||||
if(blind)
|
||||
blind.layer = 0
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "ai-crash"
|
||||
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/callshuttle = 0
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(commconsole.z == 2)
|
||||
continue
|
||||
if(istype(commconsole.loc,/turf))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if(commboard.z == 2)
|
||||
continue
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in world)
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
|
||||
if(shuttlecaller.z == 2)
|
||||
continue
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
break
|
||||
callshuttle++
|
||||
@@ -35,11 +40,11 @@
|
||||
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
|
||||
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
|
||||
world << sound('shuttlecalled.ogg')
|
||||
world << sound('sound/AI/shuttlecalled.ogg')
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(get_turf(src), 3, 6, 12, 15)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
@@ -47,11 +52,7 @@
|
||||
if (istype(loc, /obj/item/device/aicard))
|
||||
loc.icon_state = "aicard-404"
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
if (key)
|
||||
spawn(50)
|
||||
if(key && stat == 2)
|
||||
verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.disabilities & 128) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -18,53 +18,35 @@
|
||||
|
||||
/mob/living/silicon/ai/proc/laws_sanity_check()
|
||||
if (!src.laws)
|
||||
src.laws = new /datum/ai_laws/nanotrasen
|
||||
|
||||
/mob/living/silicon/ai/proc/notify_linked_cyborgs()
|
||||
for (var/mob/living/silicon/robot/A in world)
|
||||
if(A.stat == 2)
|
||||
continue
|
||||
if(!islinked(A, src))
|
||||
continue
|
||||
|
||||
A << "These are your laws now:"
|
||||
A.show_laws()
|
||||
src.laws = new /datum/ai_laws/asimov
|
||||
|
||||
/mob/living/silicon/ai/proc/set_zeroth_law(var/law)
|
||||
src.laws_sanity_check()
|
||||
src.laws.set_zeroth_law(law)
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/add_inherent_law(var/law)
|
||||
src.laws_sanity_check()
|
||||
src.laws.add_inherent_law(law)
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/clear_inherent_laws()
|
||||
src.laws_sanity_check()
|
||||
src.laws.clear_inherent_laws()
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/add_ion_law(var/law)
|
||||
src.laws_sanity_check()
|
||||
src.laws.add_ion_law(law)
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/clear_ion_laws()
|
||||
src.laws_sanity_check()
|
||||
src.laws.clear_ion_laws()
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/add_supplied_law(var/number, var/law)
|
||||
src.laws_sanity_check()
|
||||
src.laws.add_supplied_law(number, law)
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
/mob/living/silicon/ai/proc/clear_supplied_laws()
|
||||
src.laws_sanity_check()
|
||||
src.laws.clear_supplied_laws()
|
||||
src.notify_linked_cyborgs()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
//Being dead doesn't mean your temperature never changes
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
// if (isturf(T)) //let cryo/sleeper handle adjusting body temp in their respective alter_health procs
|
||||
// src.bodytemperature = adjustBodyTemp(src.bodytemperature, (shuttlefloor ? shuttlefloor.temp : T.temp), 1.0) //TODO: DEFERRED
|
||||
|
||||
if (src.stat!=0)
|
||||
src:cameraFollow = null
|
||||
src:current = null
|
||||
src:machine = null
|
||||
src.cameraFollow = null
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
src.update_mind()
|
||||
if(aiPDA && aiPDA.name != name)
|
||||
aiPDA.owner = name
|
||||
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
|
||||
|
||||
/*if (istype(T, /turf))
|
||||
var/ficheck = src.firecheck(T)
|
||||
if (ficheck)
|
||||
src.adjustFireLoss(ficheck * 10)
|
||||
src.updatehealth()
|
||||
if (src.fire)
|
||||
src.fire.icon_state = "fire1"
|
||||
else if (src.fire)
|
||||
src.fire.icon_state = "fire0"
|
||||
*/ //TODO: DEFERRED
|
||||
if (src.malfhack)
|
||||
if (src.malfhack.aidisabled)
|
||||
src << "\red ERROR: APC access disabled, hack attempt canceled."
|
||||
@@ -39,8 +28,6 @@
|
||||
if (src.health <= config.health_threshold_dead)
|
||||
death()
|
||||
return
|
||||
// else if (src.health < config.health_threshold_crit && !istype(src.loc, /obj/machinery/computer/aifixer)) //Removing this for now, as it's bloody annoying. We'll see how it works -- Urist
|
||||
// src.oxyloss++
|
||||
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
@@ -62,23 +49,24 @@
|
||||
//stage = 5
|
||||
blind = 1
|
||||
|
||||
if (!blind)
|
||||
if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P
|
||||
//I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t
|
||||
//stage = 4.5
|
||||
if (src.blind.layer!=0)
|
||||
src.blind.layer = 0
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/area/home = get_area(src)
|
||||
if(home && home.powered(EQUIP))
|
||||
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
|
||||
if(home.powered(EQUIP))
|
||||
home.use_power(1000, EQUIP)
|
||||
|
||||
if (src:aiRestorePowerRoutine==2)
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
@@ -88,6 +76,7 @@
|
||||
else if (src:aiRestorePowerRoutine==3)
|
||||
src << "Alert cancelled. Power has been restored."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
spawn(1)
|
||||
while (src.getOxyLoss()>0 && stat!=2)
|
||||
sleep(50)
|
||||
@@ -103,9 +92,9 @@
|
||||
src.sight = src.sight&~SEE_MOBS
|
||||
src.sight = src.sight&~SEE_OBJS
|
||||
src.see_in_dark = 0
|
||||
src.see_invisible = 0
|
||||
src.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item) && !istype(get_area(src), /area/shuttle))
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
|
||||
@@ -128,6 +117,7 @@
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0
|
||||
return
|
||||
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
|
||||
sleep(20)
|
||||
@@ -147,97 +137,42 @@
|
||||
theAPC = something
|
||||
break
|
||||
*/
|
||||
for (var/obj/machinery/power/apc/APC in loc)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "Unable to locate APC!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.master.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
|
||||
for (PRP=1, PRP<=4, PRP++)
|
||||
var/area/AIarea = get_area(src)
|
||||
for(var/area/A in AIarea.master.related)
|
||||
for (var/obj/machinery/power/apc/APC in A)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (!theAPC)
|
||||
switch(PRP)
|
||||
if (1) src << "Unable to locate APC!"
|
||||
else src << "Lost connection with the APC!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
src << "APC located. Optimizing route to APC to avoid needless power waste."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
/*
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
*/
|
||||
for (var/obj/machinery/power/apc/APC in loc)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.master.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Best route identified. Hacking offline APC power port."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
/*
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
*/
|
||||
for (var/obj/machinery/power/apc/APC in loc)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.master.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Power port upload access confirmed. Loading control program into APC power port software."
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
/*
|
||||
for (var/something in loc)
|
||||
if (istype(something, /obj/machinery/power/apc))
|
||||
if (!(something:stat & BROKEN))
|
||||
theAPC = something
|
||||
break
|
||||
*/
|
||||
for (var/obj/machinery/power/apc/APC in loc)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
break
|
||||
if (theAPC==null)
|
||||
src << "APC connection lost!"
|
||||
src:aiRestorePowerRoutine = 2
|
||||
return
|
||||
if (loc.master.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
return
|
||||
src << "Transfer complete. Forcing APC to execute program."
|
||||
sleep(50)
|
||||
src << "Receiving control information from APC."
|
||||
sleep(2)
|
||||
//bring up APC dialog
|
||||
theAPC.attack_ai(src)
|
||||
src:aiRestorePowerRoutine = 3
|
||||
src << "Your laws have been reset:"
|
||||
src.show_laws()
|
||||
if (loc.master.power_equip)
|
||||
if (!istype(T, /turf/space))
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
src.blind.layer = 0 //This, too, is a fix to issue 603
|
||||
return
|
||||
switch(PRP)
|
||||
if (1) src << "APC located. Optimizing route to APC to avoid needless power waste."
|
||||
if (2) src << "Best route identified. Hacking offline APC power port."
|
||||
if (3) src << "Power port upload access confirmed. Loading control program into APC power port software."
|
||||
if (4)
|
||||
src << "Transfer complete. Forcing APC to execute program."
|
||||
sleep(50)
|
||||
src << "Receiving control information from APC."
|
||||
sleep(2)
|
||||
//bring up APC dialog
|
||||
theAPC.attack_ai(src)
|
||||
src:aiRestorePowerRoutine = 3
|
||||
src << "Your laws have been reset:"
|
||||
src.show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if (src.nodamage == 0)
|
||||
@@ -248,10 +183,3 @@
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
|
||||
/mob/living/silicon/ai/proc/update_mind()
|
||||
if(!mind && client)
|
||||
mind = new
|
||||
mind.current = src
|
||||
mind.assigned_role = "AI"
|
||||
mind.key = key
|
||||
@@ -1,32 +1,25 @@
|
||||
/mob/living/silicon/ai/Login()
|
||||
/mob/living/silicon/ai/Login() //ThisIsDumb(TM) TODO: tidy this up ¬_¬ ~Carn
|
||||
..()
|
||||
for(var/obj/effect/rune/rune in world)
|
||||
var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]")
|
||||
var/image/blood = image(loc = rune)
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
..()
|
||||
rebuild_appearance()
|
||||
for(var/S in src.client.screen)
|
||||
del(S)
|
||||
src.flash = new /obj/screen( null )
|
||||
src.flash.icon_state = "blank"
|
||||
src.flash.name = "flash"
|
||||
src.flash.screen_loc = "1,1 to 15,15"
|
||||
src.flash.layer = 17
|
||||
src.blind = new /obj/screen( null )
|
||||
src.blind.icon_state = "black"
|
||||
src.blind.name = " "
|
||||
src.blind.screen_loc = "1,1 to 15,15"
|
||||
src.blind.layer = 0
|
||||
src.client.screen += list( src.blind, src.flash )
|
||||
if(!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
else
|
||||
regenerate_icons()
|
||||
flash = new /obj/screen( null )
|
||||
flash.icon_state = "blank"
|
||||
flash.name = "flash"
|
||||
flash.screen_loc = "1,1 to 15,15"
|
||||
flash.layer = 17
|
||||
blind = new /obj/screen( null )
|
||||
blind.icon_state = "black"
|
||||
blind.name = " "
|
||||
blind.screen_loc = "1,1 to 15,15"
|
||||
blind.layer = 0
|
||||
client.screen += list( blind, flash )
|
||||
|
||||
if(stat != DEAD)
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn(0)
|
||||
if(O)
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
if(O)
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
return
|
||||
@@ -1,12 +1,9 @@
|
||||
/mob/living/silicon/ai/Logout()
|
||||
..()
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
O.mode = 0
|
||||
if(!isturf(src.loc))
|
||||
if (src.client)
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(!isturf(loc))
|
||||
if (client)
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
@@ -1,5 +1,5 @@
|
||||
#define SHARED_TYPES_WEIGHT 5
|
||||
#define CAMERA_PROXIMITY_PREFERENCE 0.2
|
||||
/var/const/SHARED_TYPES_WEIGHT = 5
|
||||
/var/const/CAMERA_PROXIMITY_PREFERENCE = 0.2
|
||||
// the smaller this is, the more a straight line will be preferred over a closer camera when changing cameras
|
||||
// if you set this to 0 the game will crash. don't do that.
|
||||
// if you set it to be negative the algorithm will do completely nonsensical things (like choosing the camera that's
|
||||
@@ -20,7 +20,7 @@
|
||||
return//Whatever the case, return since you can't move anyway.
|
||||
|
||||
if(user.client)//To make AI holograms work. They will relay directions as long as they are centered on the object.
|
||||
var/obj/machinery/hologram/holopad/T = user.current//Client eye centers on an object.
|
||||
var/obj/machinery/hologram/holopad/T = user.client.eye//Client eye centers on an object.
|
||||
if(istype(T)&&T.hologram&&T.master==user)//If there is a hologram and its master is the user.
|
||||
T.hologram.loc = get_step(T.hologram, direct)
|
||||
T.hologram.dir = direct
|
||||
@@ -42,18 +42,15 @@
|
||||
var/area/A = get_area(old)
|
||||
var/list/old_types = dd_text2list("[A.type]", "/")
|
||||
|
||||
for(var/obj/machinery/camera/current in world)
|
||||
if( !(current.network in user.networks) ) continue
|
||||
if(!current.status) continue // ignore disabled cameras
|
||||
for(var/obj/machinery/camera/current in Cameras)
|
||||
if(user.network != current.network) continue
|
||||
if(!current.status) continue // ignore disabled cameras
|
||||
|
||||
//make sure it's the right direction
|
||||
if(dx && (current.x * dx <= old.x * dx))
|
||||
continue
|
||||
if(dy && (current.y * dy <= old.y * dy))
|
||||
continue
|
||||
//only let the player move to cameras on the same zlevel
|
||||
if(current.z != old.z)
|
||||
continue
|
||||
|
||||
var/shared_types = 0 //how many levels deep the old camera and the closest camera's areas share
|
||||
//for instance, /area/A and /area/B would have shared_types = 2 (because of how dd_text2list works)
|
||||
@@ -84,4 +81,4 @@
|
||||
|
||||
if(!closest)
|
||||
return
|
||||
user.switchCamera(closest)
|
||||
user.switchCamera(closest)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user