Pretty much all new click code

This commit is contained in:
ZomgPonies
2013-10-12 14:44:36 -04:00
parent 1d9537bbdc
commit 5daf979b72
158 changed files with 9471 additions and 11578 deletions
+31 -24
View File
@@ -30,6 +30,24 @@
#include "code\__HELPERS\time.dm"
#include "code\__HELPERS\type2type.dm"
#include "code\__HELPERS\unsorted.dm"
#include "code\_onclick\adjacent.dm"
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
#include "code\_onclick\cyborg.dm"
#include "code\_onclick\drag_drop.dm"
#include "code\_onclick\item_attack.dm"
#include "code\_onclick\observer.dm"
#include "code\_onclick\other_mobs.dm"
#include "code\_onclick\telekinesis.dm"
#include "code\_onclick\hud\_defines.dm"
#include "code\_onclick\hud\alien.dm"
#include "code\_onclick\hud\alien_larva.dm"
#include "code\_onclick\hud\hud.dm"
#include "code\_onclick\hud\human.dm"
#include "code\_onclick\hud\monkey.dm"
#include "code\_onclick\hud\other_mobs.dm"
#include "code\_onclick\hud\robot.dm"
#include "code\_onclick\hud\screen_objects.dm"
#include "code\ATMOSPHERICS\atmospherics.dm"
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
#include "code\ATMOSPHERICS\datum_pipeline.dm"
@@ -161,7 +179,6 @@
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
#include "code\game\communications.dm"
#include "code\game\hud.dm"
#include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm"
@@ -185,7 +202,6 @@
#include "code\game\gamemodes\blob\blob.dm"
#include "code\game\gamemodes\blob\blob_finish.dm"
#include "code\game\gamemodes\blob\blob_report.dm"
#include "code\game\gamemodes\blob\hud.dm"
#include "code\game\gamemodes\blob\overmind.dm"
#include "code\game\gamemodes\blob\powers.dm"
#include "code\game\gamemodes\blob\theblob.dm"
@@ -457,7 +473,6 @@
#include "code\game\objects\items\crayons.dm"
#include "code\game\objects\items\latexballoon.dm"
#include "code\game\objects\items\shooting_range.dm"
#include "code\game\objects\items\tk_grab.dm"
#include "code\game\objects\items\toys.dm"
#include "code\game\objects\items\trash.dm"
#include "code\game\objects\items\devices\aicard.dm"
@@ -576,6 +591,7 @@
#include "code\game\objects\storage\coat.dm"
#include "code\game\objects\structures\barsign.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\coathanger.dm"
#include "code\game\objects\structures\displaycase.dm"
#include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\electricchair.dm"
@@ -729,6 +745,7 @@
#include "code\modules\clothing\gloves\boxing.dm"
#include "code\modules\clothing\gloves\color.dm"
#include "code\modules\clothing\gloves\miscellaneous.dm"
#include "code\modules\clothing\gloves\ninja.dm"
#include "code\modules\clothing\gloves\stungloves.dm"
#include "code\modules\clothing\head\collectable.dm"
#include "code\modules\clothing\head\hardhat.dm"
@@ -857,12 +874,10 @@
#include "code\modules\mob\mob_movement.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
#include "code\modules\mob\say.dm"
#include "code\modules\mob\screen.dm"
#include "code\modules\mob\transform_procs.dm"
#include "code\modules\mob\update_icons.dm"
#include "code\modules\mob\camera\camera.dm"
#include "code\modules\mob\dead\death.dm"
#include "code\modules\mob\dead\observer\hud.dm"
#include "code\modules\mob\dead\observer\logout.dm"
#include "code\modules\mob\dead\observer\observer.dm"
#include "code\modules\mob\dead\observer\say.dm"
@@ -887,7 +902,6 @@
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\death.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\emote.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\hud.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\life.dm"
@@ -899,7 +913,6 @@
#include "code\modules\mob\living\carbon\alien\humanoid\caste\sentinel.dm"
#include "code\modules\mob\living\carbon\alien\larva\death.dm"
#include "code\modules\mob\living\carbon\alien\larva\emote.dm"
#include "code\modules\mob\living\carbon\alien\larva\hud.dm"
#include "code\modules\mob\living\carbon\alien\larva\inventory.dm"
#include "code\modules\mob\living\carbon\alien\larva\larva.dm"
#include "code\modules\mob\living\carbon\alien\larva\life.dm"
@@ -911,7 +924,6 @@
#include "code\modules\mob\living\carbon\brain\brain_item.dm"
#include "code\modules\mob\living\carbon\brain\death.dm"
#include "code\modules\mob\living\carbon\brain\emote.dm"
#include "code\modules\mob\living\carbon\brain\hud.dm"
#include "code\modules\mob\living\carbon\brain\life.dm"
#include "code\modules\mob\living\carbon\brain\MMI.dm"
#include "code\modules\mob\living\carbon\brain\posibrain.dm"
@@ -919,7 +931,6 @@
#include "code\modules\mob\living\carbon\human\death.dm"
#include "code\modules\mob\living\carbon\human\emote.dm"
#include "code\modules\mob\living\carbon\human\examine.dm"
#include "code\modules\mob\living\carbon\human\hud.dm"
#include "code\modules\mob\living\carbon\human\human.dm"
#include "code\modules\mob\living\carbon\human\human_attackalien.dm"
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
@@ -947,7 +958,6 @@
#include "code\modules\mob\living\carbon\monkey\diona.dm"
#include "code\modules\mob\living\carbon\monkey\emote.dm"
#include "code\modules\mob\living\carbon\monkey\examine.dm"
#include "code\modules\mob\living\carbon\monkey\hud.dm"
#include "code\modules\mob\living\carbon\monkey\inventory.dm"
#include "code\modules\mob\living\carbon\monkey\life.dm"
#include "code\modules\mob\living\carbon\monkey\login.dm"
@@ -961,7 +971,6 @@
#include "code\modules\mob\living\silicon\ai\ai.dm"
#include "code\modules\mob\living\silicon\ai\death.dm"
#include "code\modules\mob\living\silicon\ai\examine.dm"
#include "code\modules\mob\living\silicon\ai\hud.dm"
#include "code\modules\mob\living\silicon\ai\laws.dm"
#include "code\modules\mob\living\silicon\ai\life.dm"
#include "code\modules\mob\living\silicon\ai\login.dm"
@@ -988,7 +997,6 @@
#include "code\modules\mob\living\silicon\robot\death.dm"
#include "code\modules\mob\living\silicon\robot\emote.dm"
#include "code\modules\mob\living\silicon\robot\examine.dm"
#include "code\modules\mob\living\silicon\robot\hud.dm"
#include "code\modules\mob\living\silicon\robot\inventory.dm"
#include "code\modules\mob\living\silicon\robot\laws.dm"
#include "code\modules\mob\living\silicon\robot\life.dm"
@@ -1035,7 +1043,6 @@
#include "code\modules\mob\living\simple_animal\hostile\retaliate\clown.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\drone.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\retaliate.dm"
#include "code\modules\mob\new_player\hud.dm"
#include "code\modules\mob\new_player\login.dm"
#include "code\modules\mob\new_player\logout.dm"
#include "code\modules\mob\new_player\new_player.dm"
@@ -1336,17 +1343,17 @@
#include "code\WorkInProgress\ZomgPonies\clothing\civilian.dm"
#include "code\WorkInProgress\ZomgPonies\mobs\pony.dm"
#include "code\WorkInProgress\ZomgPonies\mobs\metroid\powers.dm"
#include "code\ZAS - vgstation\Airflow.dm"
#include "code\ZAS - vgstation\Connection.dm"
#include "code\ZAS - vgstation\Debug.dm"
#include "code\ZAS - vgstation\FEA_gas_mixture.dm"
#include "code\ZAS - vgstation\FEA_system.dm"
#include "code\ZAS - vgstation\Fire.dm"
#include "code\ZAS - vgstation\Functions.dm"
#include "code\ZAS - vgstation\NewSettings.dm"
#include "code\ZAS - vgstation\Plasma.dm"
#include "code\ZAS - vgstation\ZAS_Turfs.dm"
#include "code\ZAS - vgstation\ZAS_Zones.dm"
#include "code\ZAS\Airflow.dm"
#include "code\ZAS\Connection.dm"
#include "code\ZAS\Debug.dm"
#include "code\ZAS\FEA_gas_mixture.dm"
#include "code\ZAS\FEA_system.dm"
#include "code\ZAS\Fire.dm"
#include "code\ZAS\Functions.dm"
#include "code\ZAS\NewSettings.dm"
#include "code\ZAS\Plasma.dm"
#include "code\ZAS\ZAS_Turfs.dm"
#include "code\ZAS\ZAS_Zones.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\tgstation-redux-WIP.dmm"
+6 -6
View File
@@ -1,11 +1,11 @@
// BEGIN_INTERNALS
/*
MAP_ICON_TYPE: 0
WINDOW: code\game\objects\items\contraband.dm;code\game\objects\items\weapons\extinguisher.dm
LAST_COMPILE_VERSION: 500.1210
DIR: code code\__HELPERS code\ATMOSPHERICS\components code\ATMOSPHERICS\components\unary code\datums\diseases code\datums\diseases\advance code\datums\diseases\advance\symptoms code\defines\obj code\game code\game\gamemodes\changeling code\game\gamemodes\vox code\game\gamemodes\vox\heist code\game\gamemodes\vox\trade code\game\jobs code\game\jobs\job code\game\machinery\computer code\game\mecha\combat code\game\mecha\equipment code\game\mecha\equipment\tools code\game\mecha\equipment\weapons code\game\objects code\game\objects\effects\decals code\game\objects\effects\decals\Cleanable code\game\objects\effects\spawners code\game\objects\items code\game\objects\items\stacks\sheets code\game\objects\items\weapons code\game\objects\items\weapons\implants code\game\objects\items\weapons\melee code\game\objects\items\weapons\storage code\game\objects\storage code\game\objects\structures\stool_bed_chair_nest code\game\turfs\simulated code\modules code\modules\admin\verbs code\modules\clothing\gloves code\modules\clothing\head code\modules\clothing\shoes code\modules\clothing\spacesuits code\modules\clothing\suits code\modules\clothing\under code\modules\customitems code\modules\events code\modules\mob\dead\observer code\modules\mob\living code\modules\mob\living\carbon code\modules\mob\living\carbon\alien code\modules\mob\living\carbon\alien\humanoid code\modules\mob\living\carbon\alien\larva code\modules\mob\living\carbon\alien\special code\modules\mob\living\carbon\brain code\modules\mob\living\carbon\human code\modules\mob\living\carbon\monkey code\modules\mob\living\silicon code\modules\mob\living\silicon\robot code\modules\mob\living\simple_animal code\modules\mob\new_player code\modules\projectiles\ammunition code\modules\projectiles\guns code\modules\projectiles\guns\projectile code\modules\projectiles\projectile code\modules\reagents\reagent_containers code\modules\reagents\reagent_containers\food code\modules\reagents\reagent_containers\food\snacks code\modules\store code\WorkInProgress code\WorkInProgress\Mini code\WorkInProgress\ZomgPonies icons\effects maps
FILE: code\game\objects\items\weapons\extinguisher.dm
LAST_COMPILE_TIME: 1380905897
AUTO_FILE_DIR: ON
WINDOW: code\modules\surgery\surgery.dm;code\modules\projectiles\projectile.dm;code\modules\projectiles\projectile\beams.dm;code\modules\research\designs.dm;code\game\machinery\doors\firedoor.dm;code\modules\client\preferences.dm;code\ZAS\Airflow.dm;code\world.dm;code\datums\diseases\appendicitis.dm;code\datums\diseases\beesease.dm;code\datums\diseases\brainrot.dm;code\datums\diseases\jungle_fever.dm;code\datums\diseases\magnitis.dm;code\modules\virus2\effect.dm;code\datums\diseases\pierrot_throat.dm;code\datums\diseases\wizarditis.dm
LAST_COMPILE_VERSION: 500.1213
DIR: code code\_onclick code\_onclick\hud code\datums code\datums\diseases code\datums\diseases\advance code\datums\diseases\advance\symptoms code\game code\game\gamemodes code\game\gamemodes\blob code\game\gamemodes\events code\game\machinery code\game\machinery\doors code\game\objects code\game\objects\structures code\modules code\modules\client code\modules\projectiles code\modules\projectiles\projectile code\modules\research code\modules\virus2 code\ZAS
FILE: code\datums\diseases\wizarditis.dm
LAST_COMPILE_TIME: 1381550821
AUTO_FILE_DIR: OFF
*/
// END_INTERNALS
@@ -23,6 +23,7 @@
//3: Do not pass either
var/welded = 0 // Added for aliens -- TLE
var/canSpawnMice = 1 // Set to 0 to prevent spawning of mice.
var/frequency = 1439
var/datum/radio_frequency/radio_connection
+54 -39
View File
@@ -2,6 +2,8 @@
// ========================
/datum/medical_effect/var/name = "None"
/datum/medical_effect/var/strength = 0
/datum/medical_effect/var/start = 0
/datum/medical_effect/proc/manifest(mob/living/carbon/human/H)
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
@@ -11,9 +13,11 @@
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
/mob/proc/add_side_effect(name, strength = 0)
/mob/living/carbon/human/add_side_effect(name, strength = 0)
for(var/datum/medical_effect/M in src.side_effects) if(M.name == name)
M.strength = max(M.strength, 10)
return
for(var/datum/medical_effect/M in src.side_effects)
if(M.name == name)
M.strength = max(M.strength, 10)
M.start = life_tick
return
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
@@ -21,32 +25,33 @@
var/datum/medical_effect/M = new T
if(M.name == name)
M.strength = strength
M.start = life_tick
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
if(src.reagents.has_reagent("cryoxadone") || src.reagents.get_reagent_amount("bicaridine") >= 15 || src.reagents.get_reagent_amount("tricordrazine") >= 15)
src.add_side_effect("Headache")
if(src.reagents.get_reagent_amount("kelotane") >= 30 || src.reagents.get_reagent_amount("dermaline") >= 15)
src.add_side_effect("Bad Stomach")
if(src.reagents.get_reagent_amount("tramadol") >= 16 || src.reagents.get_reagent_amount("anti_toxin") >= 30)
src.add_side_effect("Cramps")
if(src.reagents.get_reagent_amount("space_drugs") >= 10)
src.add_side_effect("Itch")
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
for(var/T in L)
var/datum/medical_effect/M = new T
if (M.manifest(src))
src.add_side_effect(M.name)
// One full cycle(in terms of strength) every 10 minutes
var/strength_percent = sin(life_tick / 2)
for (var/datum/medical_effect/M in side_effects)
if (!M) continue
var/strength_percent = sin((life_tick - M.start) / 2)
log_debug ("[src], tick [life_tick] : Processing [M], Current phase: [strength_percent]")
// Only do anything if the effect is currently strong enough
if(strength_percent >= 0.4)
for (var/datum/medical_effect/M in side_effects)
if (M.cure(src) || M.strength > 60)
// Only do anything if the effect is currently strong enough
if(strength_percent >= 0.4)
log_debug ("[src], tick [life_tick] : Active phase ; strength [M.strength]")
if (M.cure(src) || M.strength > 50)
log_debug ("[src], tick [life_tick] : [M] cured or reached end of lifecycle")
side_effects -= M
del(M)
else
if(life_tick % 45 == 0)
log_debug ("[src], tick [life_tick] : Activating [M] ")
M.on_life(src, strength_percent*M.strength)
// Effect slowly growing stronger
M.strength+=0.08
@@ -54,20 +59,22 @@
// HEADACHE
// ========
/datum/medical_effect/headache/name = "Headache"
/datum/medical_effect/headache/manifest(mob/living/carbon/human/H)
if(H.reagents.has_reagent("alkysine") || H.reagents.has_reagent("tramadol"))
return 0
if(H.reagents.has_reagent("cryoxadone") >= 10 || H.reagents.get_reagent_amount("bicaridine") >= 15 || H.reagents.get_reagent_amount("tricordrazine") >= 15)
return 1
return 0
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a light pain in your head.",0)
if(11 to 30)
H.custom_pain("You feel a throbbing pain in your head!",1)
if(31 to 50)
if(31 to INFINITY)
H.custom_pain("You feel an excrutiating pain in your head!",1)
H.adjustBrainLoss(1)
if(51 to INFINITY)
H.custom_pain("It feels like your head is about to split open!",1)
H.adjustBrainLoss(3)
var/datum/organ/external/O = H.organs_by_name["head"]
O.take_damage(0, 1, 0, "Headache")
/datum/medical_effect/headache/cure(mob/living/carbon/human/H)
if(H.reagents.has_reagent("alkysine") || H.reagents.has_reagent("tramadol"))
@@ -78,18 +85,23 @@
// BAD STOMACH
// ===========
/datum/medical_effect/bad_stomach/name = "Bad Stomach"
/datum/medical_effect/bad_stomach/manifest(mob/living/carbon/human/H)
if(H.reagents.has_reagent("anti_toxin"))
return 0
if(H.reagents.get_reagent_amount("kelotane") >= 30 || H.reagents.get_reagent_amount("dermaline") >= 15)
return 1
return 0
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a bit light around the stomach.",0)
if(11 to 30)
H.custom_pain("Your stomach hurts.",0)
if(31 to 50)
if(31 to INFINITY)
H.custom_pain("You feel sick.",1)
H.adjustToxLoss(1)
if(51 to INFINITY)
H.custom_pain("You can't hold it in any longer!",1)
H.vomit()
/datum/medical_effect/bad_stomach/cure(mob/living/carbon/human/H)
if(H.reagents.has_reagent("anti_toxin"))
@@ -101,20 +113,22 @@
// CRAMPS
// ======
/datum/medical_effect/cramps/name = "Cramps"
/datum/medical_effect/cramps/manifest(mob/living/carbon/human/H)
if(H.reagents.has_reagent("inaprovaline"))
return 0
if( H.reagents.get_reagent_amount("anti_toxin") >= 30 || H.reagents.get_reagent_amount("tramadol") >= 15)
return 1
return 0
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("The muscles in your body hurt a little.",0)
if(11 to 30)
H.custom_pain("The muscles in your body cramp up painfully.",0)
if(31 to 50)
if(31 to INFINITY)
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
H.custom_pain("There's pain all over your body.",1)
H.adjustToxLoss(1)
if(51 to INFINITY)
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
H.custom_pain("It feels as though your muscles are being ripped apart!",1)
H.apply_damage(1, used_weapon = "Cramps")
/datum/medical_effect/cramps/cure(mob/living/carbon/human/H)
if(H.reagents.has_reagent("inaprovaline"))
@@ -125,21 +139,22 @@
// ITCH
// ====
/datum/medical_effect/itch/name = "Itch"
/datum/medical_effect/itch/manifest(mob/living/carbon/human/H)
if(H.reagents.has_reagent("inaprovaline"))
return 0
if(H.reagents.get_reagent_amount("space_drugs") >= 10)
return 1
return 0
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a slight itch.",0)
if(11 to 30)
H.custom_pain("You want to scratch your itch badly.",0)
if(31 to 50)
if(31 to INFINITY)
H.emote("me",1,"shivers slightly.")
H.custom_pain("This itch makes it really hard to concentrate.",1)
H.adjustToxLoss(1)
if(51 to INFINITY)
H.emote("me",1,"shivers.")
H.custom_pain("The itch starts hurting and oozing blood.",1)
H.apply_damage(1, BURN, used_weapon = "Itch")
H.drip(1)
/datum/medical_effect/itch/cure(mob/living/carbon/human/H)
if(H.reagents.has_reagent("inaprovaline"))
@@ -9,27 +9,27 @@ proc/assign_sec_to_department(var/mob/living/carbon/human/H)
switch(department)
if("supply")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_l_ear)
access = list(access_mailsorting, access_mining)
destination = /area/security/checkpoint/supply
if("engineering")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/engine(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_l_ear)
access = list(access_construction, access_engine)
destination = /area/security/checkpoint/engineering
if("medical")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/med(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_l_ear)
access = list(access_medical)
destination = /area/security/checkpoint/medical
if("science")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/science(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_l_ear)
access = list(access_research)
destination = /area/security/checkpoint/science
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
if(destination)
+5 -5
View File
@@ -14,7 +14,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/administrator(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
@@ -43,7 +43,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/advisor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
@@ -72,7 +72,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
@@ -109,7 +109,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/supervisor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
@@ -138,7 +138,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+8 -7
View File
@@ -57,7 +57,7 @@
dir = NORTHWEST
if(NORTHWEST)
dir = NORTH
return
return 1
/obj/effect/bmode/buildhelp
icon = 'icons/misc/buildmode.dmi'
@@ -95,7 +95,7 @@
usr << "\blue Left Mouse Button on turf/obj/mob = Select"
usr << "\blue Right Mouse Button on turf/obj/mob = Throw"
usr << "\blue ***********************************************************"
return
return 1
/obj/effect/bmode/buildquit
icon_state = "buildquit"
@@ -103,6 +103,7 @@
Click()
togglebuildmode(master.cl.mob)
return 1
/obj/effect/bmode/buildholder
density = 0
@@ -142,7 +143,7 @@
else if(pa.Find("right"))
switch(master.cl.buildmode)
if(1)
return
return 1
if(2)
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
var/list/removed_paths = list("/obj/effect/bhole")
@@ -156,9 +157,9 @@
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return
return 1
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return
if(!thetype) return 1
switch(thetype)
if("text")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
@@ -170,9 +171,9 @@
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
return 1
/proc/build_click(var/mob/user, buildmode, location, control, params, var/obj/object)
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
var/obj/effect/bmode/buildholder/holder = null
for(var/obj/effect/bmode/buildholder/H)
if(H.cl == user.client)
+1 -1
View File
@@ -212,7 +212,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
/mob/living/carbon/human/proc/equip_response_team(leader_selected = 0)
// Headset
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear)
// Uniform
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
-41
View File
@@ -281,47 +281,6 @@ proc/isInSight(var/atom/A, var/atom/B)
return M
return null
//i think this is used soley by verb/give(), cael
proc/check_can_reach(atom/user, atom/target)
if(!in_range(user,target))
return 0
return CanReachThrough(get_turf(user), get_turf(target), target)
//dummy caching, used to speed up reach checks
var/list/DummyCache = list()
/proc/CanReachThrough(turf/srcturf, turf/targetturf, atom/target)
var/obj/item/weapon/dummy/D = locate() in DummyCache
if(!D)
D = new /obj/item/weapon/dummy( srcturf )
else
DummyCache.Remove(D)
D.loc = srcturf
if(targetturf.density && targetturf != get_turf(target))
return 0
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in srcturf)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, targetturf))
D.loc = null
DummyCache.Add(D)
return 0
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in targetturf)
if((border_obstacle.flags & ON_BORDER) && (target != border_obstacle))
if(!border_obstacle.CanPass(D, srcturf, 1, 0))
D.loc = null
DummyCache.Add(D)
return 0
D.loc = null
DummyCache.Add(D)
return 1
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
/proc/get_active_candidates(var/buffer = 1)
+21
View File
@@ -290,6 +290,27 @@ proc/listclearnulls(list/list)
return (result + R.Copy(Ri, 0))
//Mergesort: any value in a list, preserves key=value structure
/proc/sortAssoc(var/list/L)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return mergeAssoc(sortAssoc(L.Copy(0,middle)), sortAssoc(L.Copy(middle))) //second parameter null = to end of list
/proc/mergeAssoc(var/list/L, var/list/R)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
if(sorttext(L[Li], R[Ri]) < 1)
result += R&R[Ri++]
else
result += L&L[Li++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
//Converts a bitfield to a list of numbers (or words if a wordlist is provided)
/proc/bitfield2list(bitfield = 0, list/wordlist)
var/list/r = list()
+4 -2
View File
@@ -716,7 +716,8 @@ datum/mind
var/mob/living/carbon/human/H = current
del(H.belt)
del(H.back)
del(H.ears)
del(H.l_ear)
del(H.r_ear)
del(H.gloves)
del(H.head)
del(H.shoes)
@@ -996,7 +997,8 @@ datum/mind
var/mob/living/carbon/human/H = current
del(H.belt)
del(H.back)
del(H.ears)
del(H.l_ear)
del(H.r_ear)
del(H.gloves)
del(H.head)
del(H.shoes)
+3 -6
View File
@@ -118,12 +118,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
charge_counter = charge_max
/obj/effect/proc_holder/spell/Click()
..()
if(!cast_check())
return
choose_targets()
if(cast_check())
choose_targets()
return 1
/obj/effect/proc_holder/spell/proc/choose_targets(mob/user = usr) //depends on subtype - /targeted or /aoe_turf
return
+1 -1
View File
@@ -262,7 +262,7 @@
throwforce = 0.0
throw_speed = 1
throw_range = 20
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
flags = FPRINT | TABLEPASS | CONDUCT
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
user.drop_item()
src.throw_at(target, throw_range, throw_speed)
+3 -3
View File
@@ -1293,7 +1293,7 @@
name = "weed-spray"
icon_state = "weedspray"
item_state = "spray"
flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
@@ -1312,7 +1312,7 @@
name = "pest-spray"
icon_state = "pestspray"
item_state = "spray"
flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
@@ -1331,7 +1331,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
force = 5.0
throwforce = 7.0
w_class = 2.0
+3 -15
View File
@@ -189,19 +189,6 @@
item_state = "card-id"
w_class = 1.0
//TODO: Figure out wtf this is and possibly remove it -Nodrak
/obj/item/weapon/dummy
name = "dummy"
invisibility = 101.0
anchored = 1.0
flags = TABLEPASS
/obj/item/weapon/dummy/ex_act()
return
/obj/item/weapon/dummy/blob_act()
return
/*
/obj/item/weapon/game_kit
@@ -630,7 +617,8 @@
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob)
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/spacevine))
for(var/obj/effect/spacevine/B in orange(A,1))
if(prob(80))
@@ -664,7 +652,7 @@
icon = 'icons/obj/assemblies.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = FPRINT | TABLEPASS | USEDELAY
flags = FPRINT | TABLEPASS | NOBLUDGEON
w_class = 2.0
origin_tech = "syndicate=2"
var/timer = 10
-991
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -150,7 +150,7 @@
//done throwing, either because it hit something or it finished moving
src.throwing = 0
if(isobj(src)) src:throw_impact(get_turf(src),speed)
if(isobj(src)) src.throw_impact(get_turf(src),speed)
//Overlays
@@ -86,7 +86,7 @@
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
if(!G.killing)
if(!G.state == GRAB_KILL)
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
return
+1 -1
View File
@@ -534,7 +534,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
del(gloves)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
if(gender==FEMALE)
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
else
+1 -1
View File
@@ -205,7 +205,7 @@
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(synd_mob)
R.set_frequency(radio_freq)
synd_mob.equip_to_slot_or_del(R, slot_ears)
synd_mob.equip_to_slot_or_del(R, slot_l_ear)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
+5 -5
View File
@@ -140,14 +140,14 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/device/pda/engineering(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
@@ -162,7 +162,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
@@ -185,7 +185,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
@@ -206,7 +206,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
//M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
+1 -1
View File
@@ -162,7 +162,7 @@
del(wizard_mob.r_store)
del(wizard_mob.l_store)
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_ears)
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_l_ear)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(wizard_mob), slot_w_uniform)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(wizard_mob), slot_shoes)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit)
-293
View File
@@ -1,293 +0,0 @@
//Upper left action buttons, displayed when you pick up an item that has this enabled.
#define ui_action_slot1 "1:6,14:26"
#define ui_action_slot2 "2:8,14:26"
#define ui_action_slot3 "3:10,14:26"
#define ui_action_slot4 "4:12,14:26"
#define ui_action_slot5 "5:14,14:26"
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//Lower center, persistant menu
#define ui_sstore1 "3:10,1:5"
#define ui_id "4:12,1:5"
#define ui_belt "5:14,1:5"
#define ui_back "6:14,1:5"
#define ui_rhand "7:16,1:5"
#define ui_lhand "8:16,1:5"
#define ui_equip "7:16,2:5"
#define ui_swaphand1 "7:16,2:5"
#define ui_swaphand2 "8:16,2:5"
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:16,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
#define ui_dropbutton "11:22,1:5"
#define ui_drop_throw "14:28,2:7"
#define ui_pull_resist "13:26,2:7"
#define ui_acti "13:26,1:5"
#define ui_movi "12:24,1:5"
#define ui_zonesel "14:28,1:5"
#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_borg_pull "12:24,2:7"
#define ui_borg_module "13:26,2:7"
#define ui_borg_panel "14:28,2:7"
//Gun buttons
#define ui_gun1 "13:26,3:7"
#define ui_gun2 "14:28, 4:7"
#define ui_gun3 "13:26,4:7"
#define ui_gun_select "14:28,3:7"
//Upper-middle right (damage indicators)
#define ui_toxin "14:28,13:27"
#define ui_fire "14:28,12:25"
#define ui_oxygen "14:28,11:23"
#define ui_pressure "14:28,10:21"
#define ui_alien_toxin "14:28,13:25"
#define ui_alien_fire "14:28,12:25"
#define ui_alien_oxygen "14:28,11:25"
//Middle right (status indicators)
#define ui_nutrition "14:28,5:11"
#define ui_temp "14:28,6:13"
#define ui_health "14:28,7:15"
#define ui_internal "14:28,8:17"
//borgs
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
//Pop-up inventory
#define ui_shoes "2:8,1:5"
#define ui_iclothing "1:6,2:7"
#define ui_oclothing "2:8,2:7"
#define ui_gloves "3:10,2:7"
#define ui_glasses "1:6,3:9"
#define ui_mask "2:8,3:9"
#define ui_ears "3:10,3:9"
#define ui_head "2:8,4:11"
//Intent small buttons
#define ui_help_small "12:8,1:1"
#define ui_disarm_small "12:15,1:18"
#define ui_grab_small "12:32,1:18"
#define ui_harm_small "12:39,1:1"
//#define ui_swapbutton "6:-16,1:5" //Unused
//#define ui_headset "SOUTH,8"
#define ui_hand "6:14,1:5"
#define ui_hstore1 "5,5"
//#define ui_resist "EAST+1,SOUTH-1"
#define ui_sleep "EAST+1, NORTH-13"
#define ui_rest "EAST+1, NORTH-14"
#define ui_iarrowleft "SOUTH-1,11"
#define ui_iarrowright "SOUTH-1,13"
var/datum/global_hud/global_hud = new()
/datum/global_hud
var/obj/screen/druggy
var/obj/screen/blurry
var/list/vimpaired
var/list/darkMask
New()
//420erryday psychedellic colours screen overlay for when you are high
druggy = new /obj/screen()
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
blurry = new /obj/screen()
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
var/obj/screen/O
var/i
//that nasty looking dither you get when you're short-sighted
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "1,1 to 5,15"
O = vimpaired[2]
O.screen_loc = "5,1 to 10,5"
O = vimpaired[3]
O.screen_loc = "6,11 to 10,15"
O = vimpaired[4]
O.screen_loc = "11,1 to 15,15"
//welding mask overlay black/dither
darkMask = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = darkMask[1]
O.screen_loc = "3,3 to 5,13"
O = darkMask[2]
O.screen_loc = "5,3 to 10,5"
O = darkMask[3]
O.screen_loc = "6,11 to 10,13"
O = darkMask[4]
O.screen_loc = "11,3 to 13,13"
O = darkMask[5]
O.screen_loc = "1,1 to 15,2"
O = darkMask[6]
O.screen_loc = "1,3 to 2,15"
O = darkMask[7]
O.screen_loc = "14,3 to 15,15"
O = darkMask[8]
O.screen_loc = "3,14 to 13,15"
for(i=1,i<=4,i++)
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
for(i=5,i<=8,i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
O.mouse_opacity = 0
/datum/hud/var/obj/screen/grab_intent
/datum/hud/var/obj/screen/hurt_intent
/datum/hud/var/obj/screen/disarm_intent
/datum/hud/var/obj/screen/help_intent
/datum/hud
var/mob/mymob
var/hud_shown = 1 //Used for the HUD toggle (F12)
var/inventory_shown = 1 //the inventory
var/show_intent_icons = 0
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/r_hand_hud_object
var/obj/screen/l_hand_hud_object
var/obj/screen/action_intent
var/obj/screen/move_intent
var/list/adding
var/list/other
var/list/obj/screen/hotkeybuttons
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
datum/hud/New(mob/owner)
mymob = owner
instantiate()
..()
return
/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(inventory_shown && hud_shown)
if(H.shoes) H.shoes.screen_loc = ui_shoes
if(H.gloves) H.gloves.screen_loc = ui_gloves
if(H.ears) H.ears.screen_loc = ui_ears
if(H.glasses) H.glasses.screen_loc = ui_glasses
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
if(H.head) H.head.screen_loc = ui_head
else
if(H.shoes) H.shoes.screen_loc = null
if(H.gloves) H.gloves.screen_loc = null
if(H.ears) H.ears.screen_loc = null
if(H.glasses) H.glasses.screen_loc = null
if(H.w_uniform) H.w_uniform.screen_loc = null
if(H.wear_suit) H.wear_suit.screen_loc = null
if(H.wear_mask) H.wear_mask.screen_loc = null
if(H.head) H.head.screen_loc = null
/datum/hud/proc/persistant_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(hud_shown)
if(H.s_store) H.s_store.screen_loc = ui_sstore1
if(H.wear_id) H.wear_id.screen_loc = ui_id
if(H.belt) H.belt.screen_loc = ui_belt
if(H.back) H.back.screen_loc = ui_back
if(H.l_store) H.l_store.screen_loc = ui_storage1
if(H.r_store) H.r_store.screen_loc = ui_storage2
else
if(H.s_store) H.s_store.screen_loc = null
if(H.wear_id) H.wear_id.screen_loc = null
if(H.belt) H.belt.screen_loc = null
if(H.back) H.back.screen_loc = null
if(H.l_store) H.l_store.screen_loc = null
if(H.r_store) H.r_store.screen_loc = null
/datum/hud/proc/instantiate()
if(!ismob(mymob)) return 0
if(!mymob.client) return 0
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
if(ishuman(mymob))
human_hud(ui_style) // Pass the player the UI style chosen in preferences
else if(ismonkey(mymob))
monkey_hud(ui_style)
else if(isbrain(mymob))
brain_hud(ui_style)
else if(islarva(mymob))
larva_hud()
else if(isalien(mymob))
alien_hud()
else if(isAI(mymob))
ai_hud()
else if(isrobot(mymob))
robot_hud()
// else if(ishivebot(mymob))
// hivebot_hud()
// else if(ishivemainframe(mymob))
// hive_mainframe_hud()
else if(isobserver(mymob))
ghost_hud()
else if(isovermind(mymob))
blob_hud()
return
+4 -4
View File
@@ -14,7 +14,7 @@
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
@@ -73,7 +73,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -116,7 +116,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -159,7 +159,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
+4 -4
View File
@@ -116,7 +116,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
@@ -146,7 +146,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
@@ -174,7 +174,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
@@ -353,7 +353,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
+3 -3
View File
@@ -22,7 +22,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
@@ -57,7 +57,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
@@ -91,7 +91,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
+7 -7
View File
@@ -19,7 +19,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
@@ -53,7 +53,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
@@ -115,7 +115,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
@@ -143,7 +143,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
@@ -171,7 +171,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
@@ -204,7 +204,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
@@ -234,7 +234,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
+4 -4
View File
@@ -26,7 +26,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
@@ -61,7 +61,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
@@ -94,7 +94,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
@@ -127,7 +127,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
+4 -4
View File
@@ -25,7 +25,7 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
@@ -64,7 +64,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
@@ -103,7 +103,7 @@
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -149,7 +149,7 @@
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
+1 -1
View File
@@ -443,7 +443,7 @@ var/global/datum/controller/occupations/job_master
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
spawnId(H, rank, alt_title)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
//Gives glasses to the vision impaired
if(H.disabilities & DISABILITY_FLAG_NEARSIGHTED)
-5
View File
@@ -45,11 +45,6 @@
if(prob(75))
del(src)
/obj/machinery/optable/hand_p(mob/user as mob)
return src.attack_paw(user)
return
/obj/machinery/optable/attack_paw(mob/user as mob)
if ((HULK in usr.mutations))
usr << text("\blue You destroy the operating table.")
@@ -564,7 +564,7 @@
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item) && mover.throwing)
var/obj/item/I = mover
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
if(istype(I, /obj/item/projectile))
return
if(prob(50))
I.loc = src.loc
-8
View File
@@ -179,14 +179,6 @@
A.transfer_ai("INACTIVE","AICARD",src,user)
return
attack_hand(var/mob/user as mob)
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:s_control)
user:wear_suit:transfer_ai("INACTIVE","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
/*
This is a good place for AI-related object verbs so I'm sticking it here.
-8
View File
@@ -60,14 +60,6 @@
if(..())
return
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:s_control)
user:wear_suit.transfer_ai("AIFIXER","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
user.set_machine(src)
var/dat = "<h3>AI System Integrity Restorer</h3><br><br>"
+8 -2
View File
@@ -4,6 +4,10 @@
icon_state = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/merch"
/obj/item/weapon/circuitboard/merch
name = "\improper Merchandise Computer Circuitboard"
build_path = /obj/machinery/computer/merch
/obj/machinery/computer/merch/New()
..()
@@ -21,8 +25,10 @@
if(stat & (BROKEN|NOPOWER))
return
var/balance=user.mind.initial_account.money
var/balance=0
if(user.mind)
if(user.mind.initial_account)
balance = user.mind.initial_account.money
var/dat = {"
<html>
<head>
+20 -14
View File
@@ -1,3 +1,8 @@
#define CHARS_PER_LINE 5
#define FONT_SIZE "5pt"
#define FONT_COLOR "#09f"
#define FONT_STYLE "Arial Black"
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -23,6 +28,8 @@
var/list/obj/machinery/targets = list()
var/timetoset = 0 // Used to set releasetime upon starting the timer
maptext_height = 26
maptext_width = 32
/obj/machinery/door_timer/New()
..()
@@ -271,13 +278,14 @@
set_picture("ai_bsod")
return
if(src.timing)
var/disp1 = uppertext(id)
var/disp1 = id
var/timeleft = timeleft()
var/disp2 = "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
spawn( 5 )
update_display(disp1, disp2)
if(length(disp2) > CHARS_PER_LINE)
disp2 = "Error"
update_display(disp1, disp2)
else
update_display("SET","TIME")
if(maptext) maptext = ""
return
@@ -291,16 +299,9 @@
//Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display
// Stolen from status_display
/obj/machinery/door_timer/proc/update_display(var/line1, var/line2)
if(line2 == null) // single line display
overlays.Cut()
overlays += texticon(line1, 23, -13)
else // dual line display
overlays.Cut()
overlays += texticon(line1, 23, -9)
overlays += texticon(line2, 23, -17)
// return an icon of a time text string (tn)
// valid characters are 0-9 and :
// px, py are pixel offsets
var/new_text = {"<div style="font-size:[FONT_SIZE];color:[FONT_COLOR];font:'[FONT_STYLE]';text-align:center;" valign="top">[line1]<br>[line2]</div>"}
if(maptext != new_text)
maptext = new_text
//Actual string input to icon display for loop, with 5 pixel x offsets for each letter.
@@ -360,3 +361,8 @@
id = "Cell 6"
dir = 4
pixel_x = 32
#undef FONT_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
#undef CHARS_PER_LINE
+6
View File
@@ -121,12 +121,18 @@
/obj/machinery/door/attack_hand(mob/user as mob)
return src.attackby(user, user)
/obj/machinery/door/attack_tk(mob/user as mob)
if(requiresID() && !allowed(null))
return
..()
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(!Adjacent(user))
user = null
if(!src.requiresID())
user = null
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
+93 -151
View File
@@ -1,3 +1,9 @@
#define CHARS_PER_LINE 5
#define FONT_SIZE "5pt"
#define FONT_COLOR "#09f"
#define FONT_STYLE "Arial Black"
#define SCROLL_SPEED 2
// Status display
// (formerly Countdown timer display)
@@ -25,15 +31,14 @@
var/index1 // display index for scrolling messages or 0 if non-scrolling
var/index2
var/lastdisplayline1 = "" // the cached last displays
var/lastdisplayline2 = ""
var/frequency = 1435 // radio frequency
var/supply_display = 0 // true if a supply shuttle display
var/repeat_update = 0 // true if we are going to update again this ptick
var/friendc = 0 // track if Friend Computer mode
maptext_height = 26
maptext_width = 32
// new display
// register for radio system
New()
@@ -47,9 +52,8 @@
process()
if(stat & NOPOWER)
overlays.Cut()
remove_display()
return
update()
emp_act(severity)
@@ -62,173 +66,114 @@
// set what is displayed
proc/update()
if(friendc && mode!=4) //Makes all status displays except supply shuttle timer display the eye -- Urist
set_picture("ai_friend")
return
if(mode==0)
overlays.Cut()
return
if(mode==3) // alert picture, no change
return
if(mode==1) // shuttle timer
if(emergency_shuttle.online)
var/displayloc
if(emergency_shuttle.location == 1)
displayloc = "ETD "
switch(mode)
if(0) //blank
remove_display()
if(1) //emergency shuttle timer
if(emergency_shuttle.online)
var/line1
var/line2 = get_shuttle_timer()
if(emergency_shuttle.location == 1)
line1 = "-ETD-"
else
line1 = "-ETA-"
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
else
displayloc = "ETA "
remove_display()
if(2) //custom messages
var/line1
var/line2
var/displaytime = get_shuttle_timer()
if(lentext(displaytime) > 5)
displaytime = "**~**"
update_display(displayloc, displaytime)
return
else
overlays.Cut()
return
if(mode==4) // supply shuttle timer
var/disp1
var/disp2
if(supply_shuttle.moving)
disp1 = "SPPLY"
disp2 = get_supply_shuttle_timer()
if(lentext(disp1) > 5)
disp1 = "**~**"
else
if(supply_shuttle.at_station)
disp1 = "SPPLY"
disp2 = "STATN"
if(!index1)
line1 = message1
else
disp1 = "SPPLY"
disp2 = "AWAY"
line1 = copytext(message1+"|"+message1, index1, index1+CHARS_PER_LINE)
var/message1_len = length(message1)
index1 += SCROLL_SPEED
if(index1 > message1_len)
index1 -= message1_len
update_display(disp1, disp2)
if(!index2)
line2 = message2
else
line2 = copytext(message2+"|"+message2, index2, index2+CHARS_PER_LINE)
var/message2_len = length(message2)
index2 += SCROLL_SPEED
if(index2 > message2_len)
index2 -= message2_len
update_display(line1, line2)
if(4) // supply shuttle timer
var/line1 = "SUPPLY"
var/line2
if(supply_shuttle.moving)
line2 = get_supply_shuttle_timer()
if(lentext(line2) > CHARS_PER_LINE)
line2 = "Error"
else
if(supply_shuttle.at_station)
line2 = "Docked"
else
line1 = ""
update_display(line1, line2)
examine()
set src in view()
. = ..()
switch(mode)
if(1,2,4)
usr << "The display says:<br>\t<xmp>[message1]</xmp><br>\t<xmp>[message2]</xmp>"
if(mode==2)
var/line1
var/line2
if(!index1)
line1 = message1
else
line1 = copytext(message1+message1, index1, index1+5)
if(index1++ > (lentext(message1)))
index1 = 1
if(!index2)
line2 = message2
else
line2 = copytext(message2+message2, index2, index2+5)
if(index2++ > (lentext(message2)))
index2 = 1
update_display(line1, line2)
// the following allows 2 updates per process, giving faster scrolling
if((index1 || index2) && repeat_update) // if either line is scrolling
// and we haven't forced an update yet
spawn(5)
repeat_update = 0
update() // set to update again in 5 ticks
repeat_update = 1
proc/set_message(var/m1, var/m2)
proc/set_message(m1, m2)
if(m1)
index1 = (lentext(m1) > 5)
message1 = uppertext(m1)
index1 = (length(m1) > CHARS_PER_LINE)
message1 = m1
else
message1 = ""
index1 = 0
if(m2)
index2 = (lentext(m2) > 5)
message2 = uppertext(m2)
index2 = (length(m2) > CHARS_PER_LINE)
message2 = m2
else
message2 = null
message2 = ""
index2 = 0
repeat_update = 1
proc/set_picture(var/state)
proc/set_picture(state)
picture_state = state
overlays.Cut()
remove_display()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
proc/update_display(var/line1, var/line2)
if(line1 == lastdisplayline1 && line2 == lastdisplayline2)
return // no change, no need to update
lastdisplayline1 = line1
lastdisplayline2 = line2
if(line2 == null) // single line display
overlays.Cut()
overlays += texticon(line1, 23, -13)
else // dual line display
overlays.Cut()
overlays += texticon(line1, 23, -9)
overlays += texticon(line2, 23, -17)
// return shuttle timer as text
proc/update_display(line1, line2)
var/new_text = {"<div style="font-size:[FONT_SIZE];color:[FONT_COLOR];font:'[FONT_STYLE]';text-align:center;" valign="top">[line1]<br>[line2]</div>"}
if(maptext != new_text)
maptext = new_text
proc/get_shuttle_timer()
var/timeleft = emergency_shuttle.timeleft()
if(timeleft)
return "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
// note ~ translates into a blinking :
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
proc/get_supply_shuttle_timer()
if(supply_shuttle.moving)
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
return "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
// note ~ translates into a blinking :
if(timeleft < 0)
return "Late"
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return ""
// return an icon of a time text string (tn)
// valid characters are 0-9 and :
// px, py are pixel offsets
proc/texticon(var/tn, var/px = 0, var/py = 0)
var/image/I = image('icons/obj/status_display.dmi', "blank")
var/len = lentext(tn)
for(var/d = 1 to len)
var/char = copytext(tn, len-d+1, len-d+2)
if(char == " ")
continue
var/image/ID = image('icons/obj/status_display.dmi', icon_state=char)
ID.pixel_x = -(d-1)*5 + px
ID.pixel_y = py
I.overlays += ID
return I
proc/remove_display()
if(overlays.len)
overlays.Cut()
if(maptext)
maptext = ""
receive_signal(datum/signal/signal)
@@ -318,16 +263,6 @@
set_picture("ai_facepalm")
if("Friend Computer")
set_picture("ai_friend")
if("Tribunal")
set_picture("tribunal")
if("Beer mug")
set_picture("ai_beer")
if("Dwarf")
set_picture("ai_dwarf")
if("Fishtank")
set_picture("ai_fishtank")
if("Plump Helmet")
set_picture("ai_plump")
return
@@ -338,5 +273,12 @@
proc/set_picture(var/state)
picture_state = state
overlays.Cut()
if(overlays.len)
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
#undef CHARS_PER_LINE
#undef FOND_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
#undef SCROLL_SPEED
+1 -1
View File
@@ -122,7 +122,7 @@
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
continue
M << "<font color='red' size='7'>HONK</font>"
M.sleeping = 0
-5
View File
@@ -418,11 +418,6 @@
/obj/mecha/attack_hand(mob/user as mob)
src.log_message("Attack by hand/paw. Attacker - [user].",1)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit)
return
if ((HULK in user.mutations) && !prob(src.deflect_chance))
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
+17 -162
View File
@@ -132,8 +132,7 @@
else
if(isliving(src.loc))
return
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
user.next_move = max(user.next_move+2,world.time + 2)
src.pickup(user)
add_fingerprint(user)
user.put_in_active_hand(src)
@@ -167,8 +166,7 @@
if(istype(src.loc, /mob/living))
return
src.pickup(user)
user.lastDblClick = world.time + 2
user.next_move = world.time + 2
user.next_move = max(user.next_move+2,world.time + 2)
user.put_in_active_hand(src)
return
@@ -206,156 +204,6 @@
return
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (!istype(M)) // not sure if this is the right thing...
return
if (can_operate(M)) //Checks if mob is lying down on table for surgery
if (do_surgery(M,user,src))
return
var/messagesource = M
if (istype(M,/mob/living/carbon/brain))
messagesource = M:container
if (src.hitsound)
playsound(src.loc, hitsound, 50, 1, -1)
/////////////////////////
user.lastattacked = M
M.lastattacker = user
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") //BS12 EDIT ALG
//spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////
var/power = src.force
if(HULK in user.mutations)
power *= 2
if(!istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/slime))
var/mob/living/carbon/slime/slime = M
if(prob(25))
user << "\red [src] passes right through [M]!"
return
if(power > 0)
slime.attacked += 10
if(slime.Discipline && prob(50)) // wow, buddy, why am I getting attacked??
slime.Discipline = 0
if(power >= 3)
if(istype(slime, /mob/living/carbon/slime/adult))
if(prob(5 + round(power/2)))
if(slime.Victim)
if(prob(80) && !slime.client)
slime.Discipline++
slime.Victim = null
slime.anchored = 0
spawn()
if(slime)
slime.SStun = 1
sleep(rand(5,20))
if(slime)
slime.SStun = 0
spawn(0)
if(slime)
slime.canmove = 0
step_away(slime, user)
if(prob(25 + power))
sleep(2)
if(slime && user)
step_away(slime, user)
slime.canmove = 1
else
if(prob(10 + power*2))
if(slime)
if(slime.Victim)
if(prob(80) && !slime.client)
slime.Discipline++
if(slime.Discipline == 1)
slime.attacked = 0
spawn()
if(slime)
slime.SStun = 1
sleep(rand(5,20))
if(slime)
slime.SStun = 0
slime.Victim = null
slime.anchored = 0
spawn(0)
if(slime && user)
step_away(slime, user)
slime.canmove = 0
if(prob(25 + power*4))
sleep(2)
if(slime && user)
step_away(slime, user)
slime.canmove = 1
var/showname = "."
if(user)
showname = " by [user]."
if(!(user in viewers(M, null)))
showname = "."
for(var/mob/O in viewers(messagesource, null))
if(src.attack_verb.len)
O.show_message("\red <B>[M] has been [pick(src.attack_verb)] with [src][showname] </B>", 1)
else
O.show_message("\red <B>[M] has been attacked with [src][showname] </B>", 1)
if(!showname && user)
if(user.client)
user << "\red <B>You attack [M] with [src]. </B>"
if(istype(M, /mob/living/carbon/human))
M:attacked_by(src, user, def_zone)
else
switch(src.damtype)
if("brute")
if(istype(src, /mob/living/carbon/slime))
M.adjustBrainLoss(power)
else
M.take_organ_damage(power)
if (prob(33)) // Added blood for whacking non-humans too
var/turf/simulated/location = M.loc
if (istype(location))
location.add_blood_floor(M)
if("fire")
if (!(COLD_RESISTANCE in M.mutations))
M.take_organ_damage(0, power)
M << "Aargh it burns!"
M.updatehealth()
src.add_fingerprint(user)
return 1
/obj/item/proc/attack_self()
return
/obj/item/proc/afterattack()
return
/obj/item/proc/talk_into(mob/M as mob, text)
return
@@ -470,11 +318,21 @@
if( !(slot_flags & SLOT_HEAD) )
return 0
return 1
if(slot_ears)
if(H.ears)
if(slot_l_ear)
if(H.l_ear)
return 0
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
return 0
return 1
if(slot_r_ear)
if(H.r_ear)
return 0
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
return 0
return 1
if(slot_w_uniform)
if(H.w_uniform)
@@ -590,6 +448,8 @@
if(!(usr)) //BS12 EDIT
return
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr))
return
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "\red You can't pick things up!"
return
@@ -609,12 +469,7 @@
usr << "\red You can't pick that up!"
return
//All checks are done, time to pick it up!
if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr)
if(istype(usr, /mob/living/carbon/alien))
src.attack_alien(usr)
if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr)
usr.UnarmedAttack(src)
return
+2 -1
View File
@@ -65,7 +65,8 @@
shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color
return
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob)
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(istype(target,/turf/simulated/floor))
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter")
switch(drawtype)
+2 -1
View File
@@ -1020,7 +1020,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
user.show_message("\blue No radiation detected.")
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
switch(scanmode)
if(3)
@@ -1,7 +1,7 @@
/obj/item/device/chameleon
name = "chameleon-projector"
icon_state = "shield0"
flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
item_state = "electronic"
throwforce = 5.0
@@ -19,7 +19,8 @@
attack_self()
toggle()
afterattack(atom/target, mob/user , flag)
afterattack(atom/target, mob/user, proximity)
if(!proximity) return
if(istype(target,/obj/item))
playsound(src, 'sound/weapons/flash.ogg', 100, 1, 1)
user << "\blue Scanned [target]."
@@ -23,7 +23,7 @@
/obj/item/device/radio/headset/receive_range(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.ears == src)
if(H.l_ear == src || H.r_ear == src)
return ..(freq, level)
return -1
-128
View File
@@ -1,128 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/tk_grab
name = "Telekinetic Grab"
desc = "Magic"
icon = 'icons/obj/magic.dmi'//Needs sprites
icon_state = "2"
flags = USEDELAY
//item_state = null
w_class = 10.0
layer = 20
var/last_throw = 0
var/obj/focus = null
var/mob/living/host = null
dropped(mob/user as mob)
del(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
del(src)
return
/*
attack_self(mob/user as mob)
if(!istype(focus,/obj/item)) return
if(!check_path()) return//No clear path
user.put_in_hands(focus)
add_fingerprint(user)
user.update_inv_l_hand(0)
user.update_inv_r_hand()
spawn(0)
del(src)
return
*/
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host)
del(src)
return
if(!(TK in host.mutations))
del(src)
return
if(isobj(target))
if(!target.loc || !isturf(target.loc))
del(src)
return
if(!focus)
focus_object(target, user)
return
var/focusturf = get_turf(focus)
if(get_dist(focusturf, target) <= 1 && !istype(target, /turf))
target.attackby(focus, user, user:get_organ_target())
else if(get_dist(focusturf, target) <= 16)
apply_focus_overlay()
focus.throw_at(target, 10, 1)
last_throw = world.time
return
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored)
target.attack_hand(user) // you can use shit now!
return//No throwing anchored things
if(!isturf(target.loc))
return
focus = target
update_icon()
apply_focus_overlay()
return
proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
O.delete()
return
update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/
+4 -3
View File
@@ -37,7 +37,8 @@
/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
A.reagents.trans_to(src, 10)
user << "\blue You fill the balloon with the contents of [A]."
@@ -122,7 +123,7 @@
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 3.0
g_amt = 10
@@ -200,7 +201,7 @@
icon = 'icons/obj/gun.dmi'
icon_state = "crossbow"
item_state = "crossbow"
flags = FPRINT | TABLEPASS | USEDELAY
flags = FPRINT | TABLEPASS
w_class = 2.0
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
+2 -1
View File
@@ -78,7 +78,8 @@ RCD
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
afterattack(atom/A, mob/user)
afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(disabled && !isrobot(user))
return 0
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
+2 -1
View File
@@ -61,7 +61,8 @@ RSF
return
// Change mode
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob)
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
+2 -1
View File
@@ -199,7 +199,8 @@
access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
origin_tech = "syndicate=3"
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob)
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity)
if(!proximity) return
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = O
src.access |= I.access
@@ -114,8 +114,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity) return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
@@ -35,7 +35,8 @@
M.Stun(3)
M.Weaken(2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
@@ -5,7 +5,7 @@
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
flags = FPRINT | TABLEPASS | CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
@@ -24,7 +24,7 @@
icon_state = "miniFE0"
item_state = "miniFE"
hitsound = null //it is much lighter, after all.
flags = FPRINT | USEDELAY | TABLEPASS
flags = FPRINT | TABLEPASS
throwforce = 2
w_class = 2.0
force = 3.0
@@ -4,7 +4,7 @@
icon = 'icons/obj/flamethrower.dmi'
icon_state = "flamethrowerbase"
item_state = "flamethrower_0"
flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY // USEDELAY flag needed in order to use afterattack() for things that are not in reach. I.E: Shooting flames.
flags = FPRINT | TABLEPASS| CONDUCT
force = 3.0
throwforce = 10.0
throw_speed = 1
@@ -60,7 +60,8 @@
item_state = "flamethrower_0"
return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
var/turf/target_turf = get_turf(target)
@@ -38,7 +38,7 @@
if(iscarbon(M))
eye_safety = M.eyecheck()
if(ishuman(M))
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
if(istype(M:l_ear, /obj/item/clothing/ears/earmuffs) || istype(M:r_ear, /obj/item/clothing/ears/earmuffs))
ear_safety += 2
if(HULK in M.mutations)
ear_safety += 1
@@ -5,7 +5,7 @@
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
flags = FPRINT | TABLEPASS | USEDELAY
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/datum/effect/effect/system/bad_smoke_spread/smoke
@@ -145,7 +145,8 @@
else
user.take_organ_damage(0,force)
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if(force > 0)
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
@@ -191,7 +192,8 @@
M.Weaken(force/15)
M.drop_item()
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if (force > 0)
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
+2 -1
View File
@@ -34,7 +34,8 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
..()
/obj/item/weapon/mop/afterattack(atom/A, mob/user as mob)
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1 || mopcount >= 5)
user << "<span class='notice'>Your mop is dry!</span>"
return
+4 -2
View File
@@ -17,7 +17,8 @@ var/global/list/cached_icons = list()
flags = FPRINT | OPENCONTAINER
var/paint_type = ""
afterattack(turf/simulated/target, mob/user , flag)
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
for(var/mob/O in viewers(user))
O.show_message("\red \The [target] has been splashed with something by [user]!", 1)
@@ -139,7 +140,8 @@ var/global/list/cached_icons = list()
return
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob)
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
if(!proximity) return
if(!istype(target) || istype(target, /turf/space))
return
var/ind = "[initial(target.icon)][color]"
@@ -42,7 +42,7 @@
user << "\red The Bluespace interfaces of the two devices conflict and malfunction."
del(W)
return
/* //BoH+BoH=Singularity, commented out.
//BoH+BoH=Singularity, commented out.
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
@@ -53,7 +53,7 @@
log_game("[key_name(user)] detonated a bag of holding")
del(src)
return
*/
..()
proc/failcheck(mob/user as mob)
@@ -88,7 +88,8 @@
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob)
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
/* if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the bible."
if(user.mind && (user.mind.assigned_role == "Chaplain"))
@@ -26,6 +26,14 @@
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
var/mob/M = usr
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
orient2hud(M) // dunno why it wasn't before
if(M.s_active)
M.s_active.close(M)
show_to(M)
return
if (!( istype(over_object, /obj/screen) ))
return ..()
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
@@ -300,17 +308,17 @@
if(isrobot(user))
user << "\blue You're a robot. No."
return //Robots can't interact with storage items.
return 1//Robots can't interact with storage items.
if(!can_be_inserted(W))
return
return 1
if(istype(W, /obj/item/weapon/tray))
var/obj/item/weapon/tray/T = W
if(T.calc_carry() > 0)
if(prob(85))
user << "\red The tray won't fit in [src]."
return
return 1
else
W.loc = user.loc
if ((user.client && user.s_active != src))
@@ -319,19 +327,11 @@
user << "\red God damnit!"
handle_item_insertion(W)
return
return 1
/obj/item/weapon/storage/dropped(mob/user as mob)
return
/obj/item/weapon/storage/MouseDrop(over_object, src_location, over_location)
..()
orient2hud(usr)
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/weapon/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
+2 -1
View File
@@ -244,7 +244,8 @@
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/afterattack(atom/O as obj|mob, mob/user as mob)
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
O.reagents.trans_to(src, max_fuel)
user << "\blue Welder refueled"
+2 -1
View File
@@ -119,7 +119,8 @@
icon_state = "fireaxe[wielded]"
return
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window)) //should just make a window.Break() proc but couldn't bother with it
+22 -1
View File
@@ -165,4 +165,25 @@ LINEN BINS
hidden = null
add_fingerprint(user)
add_fingerprint(user)
/obj/structure/bedsheetbin/attack_tk(mob/user as mob)
if(amount >= 1)
amount--
var/obj/item/weapon/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
sheets.Remove(B)
else
B = new /obj/item/weapon/bedsheet(loc)
B.loc = loc
user << "<span class='notice'>You telekinetically remove [B] from [src].</span>"
update_icon()
if(hidden)
hidden.loc = loc
hidden = null
@@ -181,6 +181,8 @@
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
@@ -194,8 +196,6 @@
if(isrobot(user))
return
usr.drop_item()
if(W)
W.loc = src.loc
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/weldingtool))
@@ -255,6 +255,12 @@
src.add_fingerprint(user)
src.toggle(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user as mob)
src.add_fingerprint(user)
if(!src.toggle())
usr << "<span class='notice'>It won't budge!</span>"
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
set category = "Object"
@@ -137,6 +137,15 @@
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
attack_tk(mob/user as mob)
if(localopened && fireaxe)
fireaxe.loc = loc
user << "\blue You telekinetically remove the fire axe."
fireaxe = null
update_icon()
return
attack_hand(user)
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
set name = "Open/Close"
set category = "Object"
@@ -37,6 +37,15 @@
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(has_extinguisher)
has_extinguisher.loc = loc
user << "<span class='notice'>You telekinetically remove [has_extinguisher] from [src].</span>"
has_extinguisher = null
opened = 1
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
attack_hand(user)
+4 -14
View File
@@ -134,13 +134,8 @@
density = 1
layer = 2.0
var/obj/structure/morgue/connected = null
anchored = 1.0
/obj/structure/m_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover, /obj/item/weapon/dummy))
return 1
else
return ..()
anchored = 1
throwpass = 1
/obj/structure/m_tray/attack_paw(mob/user as mob)
return src.attack_hand(user)
@@ -353,13 +348,8 @@
density = 1
layer = 2.0
var/obj/structure/crematorium/connected = null
anchored = 1.0
/obj/structure/c_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover, /obj/item/weapon/dummy))
return 1
else
return ..()
anchored = 1
throwpass = 1
/obj/structure/c_tray/attack_paw(mob/user as mob)
return src.attack_hand(user)
@@ -30,6 +30,13 @@
SK.master = E
del(src)
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
if(buckled_mob)
..()
else
rotate()
return
/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
if(src.dir == NORTH)
src.layer = FLY_LAYER
+188 -20
View File
@@ -20,6 +20,14 @@
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
var/parts = /obj/item/weapon/table_parts
var/flipped = 0
var/health = 100
/obj/structure/table/proc/update_adjacent()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
T.update_icon()
/obj/structure/table/New()
..()
@@ -27,16 +35,10 @@
if(T != src)
del(T)
update_icon()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
T.update_icon()
update_adjacent()
/obj/structure/table/Del()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
T.update_icon()
update_adjacent()
..()
/obj/structure/table/proc/destroy()
@@ -46,6 +48,28 @@
/obj/structure/table/update_icon()
if(flipped)
var/type = 0
var/tabledirs = 0
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
if (T && T.flipped)
type++
tabledirs |= direction
var/base = "table"
if (istype(src, /obj/structure/table/woodentable))
base = "wood"
if (istype(src, /obj/structure/table/reinforced))
base = "rtable"
icon_state = "[base]flip[type]"
if (type==1)
if (tabledirs & turn(dir,90))
icon_state = icon_state+"-"
if (tabledirs & turn(dir,-90))
icon_state = icon_state+"+"
return 1
spawn(2) //So it properly updates when deleting
var/dir_sum = 0
for(var/direction in list(1,2,4,8,5,6,9,10))
@@ -77,7 +101,8 @@
skip_sum = 1
continue
if(!skip_sum) //means there is a window between the two tiles in this direction
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
if(T && !T.flipped)
if(direction <5)
dir_sum += direction
else
@@ -235,11 +260,6 @@
if(prob(75))
destroy()
/obj/structure/table/hand_p(mob/user as mob)
return src.attack_paw(user)
/obj/structure/table/attack_paw(mob/user)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
@@ -263,18 +283,60 @@
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
destroy()
/obj/structure/table/attack_tk() // no telehulk sorry
return
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
if (flipped)
if (get_dir(loc, target) == dir)
return !density
else
return 1
return 0
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
var/turf/cover = flipped ? get_turf(src) : get_step(loc, get_dir(from, loc))
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
return 1
if (get_turf(P.original) == cover)
var/chance = 20
if (ismob(P.original))
var/mob/M = P.original
if (M.lying)
chance += 20 //Lying down lets you catch less bullets
if(flipped)
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
chance += 20
else
return 1 //But only from one side
if(prob(chance))
health -= P.damage/2
if (health > 0)
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
return 0
else
visible_message("<span class='warning'>[src] breaks down!</span>")
destroy()
return 1
return 1
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSTABLE))
return 1
if (flipped)
if (get_dir(loc, target) == dir)
return !density
else
return 1
return 1
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
if(isrobot(user))
@@ -285,7 +347,7 @@
return
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if (istype(G.affecting, /mob/living))
@@ -329,6 +391,103 @@
user.drop_item(src)
return
/obj/structure/table/proc/straight_table_check(var/direction)
var/turf/left = get_step(src,turn(direction,90))
var/turf/right = get_step(src,turn(direction,-90))
var/turf/next = get_step(src,direction)
if(locate(/obj/structure/table,left) || locate(/obj/structure/table,right))
return 0
var/obj/structure/table/T = locate(/obj/structure/table, next)
if (istype(T,/obj/structure/table/reinforced/))
var/obj/structure/table/reinforced/R = T
if (R.status == 2)
return 0
if (!T)
return 1
else
return T.straight_table_check(direction)
/obj/structure/table/verb/do_flip()
set name = "Flip table"
set desc = "Flips a non-reinforced table"
set category = "Object"
set src in oview(1)
if (issilicon(usr))
usr << "<span class='notice'>You need hands for this.</span>"
return
if(!flip(get_cardinal_dir(usr,src)))
usr << "<span class='notice'>It won't budge.</span>"
else
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
return
/obj/structure/table/proc/do_put()
set name = "Put table back"
set desc = "Puts flipped table back"
set category = "Object"
set src in oview(1)
if (!unflip())
usr << "<span class='notice'>It won't budge.</span>"
return
/obj/structure/table/proc/flip(var/direction)
if (flipped)
return 0
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
return 0
verbs -=/obj/structure/table/verb/do_flip
verbs +=/obj/structure/table/proc/do_put
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
for (var/atom/movable/A in get_turf(src))
if (!A.anchored)
spawn(0)
A.throw_at(pick(targets),1,1)
dir = direction
if(dir != NORTH)
layer = 5
flipped = 1
flags |= ON_BORDER
for(var/D in list(turn(direction, 90), turn(direction, -90)))
if(locate(/obj/structure/table,get_step(src,D)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.flip(direction)
update_icon()
update_adjacent()
return 1
/obj/structure/table/proc/unflip()
if (!flipped)
return 0
var/can_flip = 1
for (var/mob/A in oview(src,0))//src.loc)
if (istype(A))
can_flip = 0
if (!can_flip)
return 0
verbs -=/obj/structure/table/proc/do_put
verbs +=/obj/structure/table/verb/do_flip
layer = initial(layer)
flipped = 0
flags &= ~ON_BORDER
for(var/D in list(turn(dir, 90), turn(dir, -90)))
if(locate(/obj/structure/table,get_step(src,D)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.unflip()
update_icon()
update_adjacent()
return 1
/*
* Wooden tables
@@ -338,7 +497,7 @@
desc = "Do not apply fire to this. Rumour says it burns easily."
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 50
/*
* Reinforced tables
*/
@@ -346,9 +505,15 @@
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
icon_state = "reinf_table"
health = 200
var/status = 2
parts = /obj/item/weapon/table_parts/reinforced
/obj/structure/table/reinforced/flip(var/direction)
if (status == 2)
return 0
else
return ..()
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
@@ -478,3 +643,6 @@
new /obj/item/weapon/rack_parts(loc)
density = 0
del(src)
/obj/structure/rack/attack_tk() // no telehulk sorry
return
@@ -77,7 +77,7 @@
/obj/structure/dispenser/Topic(href, href_list)
if(usr.stat || usr.restrained())
return
if(get_dist(src, usr) <= 1)
if(Adjacent(usr))
usr.set_machine(src)
if(href_list["oxygen"])
if(oxygentanks > 0)
+11 -5
View File
@@ -263,8 +263,11 @@
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
if(H.ears && washears)
if(H.ears.clean_blood())
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
@@ -323,23 +326,26 @@
anchored = 1
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/M as mob)
if(isrobot(M) || isAI(M))
return
if(!Adjacent(M))
return
if(busy)
M << "\red Someone's already washing here."
return
var/turf/location = M.loc
if(!isturf(location)) return
usr << "\blue You start washing your hands."
busy = 1
sleep(40)
busy = 0
if(M.loc != location) return //Person has moved away from the sink
if(!Adjacent(M)) return //Person has moved away from the sink
M.clean_blood()
if(ishuman(M))
+3
View File
@@ -96,6 +96,9 @@
if(reinf) new /obj/item/stack/rods(loc)
del(src)
/obj/structure/window/attack_tk(mob/user as mob)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
if(HULK in user.mutations)
+2 -2
View File
@@ -280,13 +280,13 @@ proc/trigger_armed_response_team(var/force = 0)
/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0)
//Special radio setup
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear)
//Replaced with new ERT uniform
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear)
equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(src), slot_back)
/*
-11
View File
@@ -30,17 +30,6 @@
return
return
/turf/DblClick()
if(istype(usr, /mob/living/silicon/ai))
return move_camera_by_click()
if(usr.stat || usr.restrained() || usr.lying)
return ..()
return ..()
/turf/Click()
if(!isAI(usr))
..()
/turf/ex_act(severity)
return 0
+3 -2
View File
@@ -1,9 +1,10 @@
/atom/movable/verb/pull()
set name = "Pull"
set category = "IC"
set category = "Object"
set src in oview(1)
usr.start_pulling(src)
if(Adjacent(usr))
usr.start_pulling(src)
return
/atom/verb/point()
+2 -4
View File
@@ -8,16 +8,14 @@
item_state = ""
w_class = 1
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob)
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
if(!proximity) return
if(!in_range(I, user))
return
if(!istype(I) || I.anchored == 1)
return ..()
if(istype(I, /obj/item/weapon/storage))
return ..()
if(istype(I, /obj/item/weapon/evidencebag))
user << "<span class='notice'>You find putting an evidence bag in another evidence bag to be slightly absurd.</span>"
return
@@ -37,7 +37,8 @@
else
..()
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob)
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!")
if(do_after(user,30))
+3 -4
View File
@@ -9,7 +9,7 @@
var/list/stored = list()
w_class = 3.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
@@ -64,9 +64,8 @@
user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]"
return
afterattack(atom/A as obj|turf|area, mob/user as mob)
if(!in_range(A,user))
return
afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
if(loc != user)
return
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.
-9
View File
@@ -592,15 +592,6 @@ var/list/admin_verbs_mod = list(
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
set name = "Toggle NewClickProc"
set category = "Debug"
if(!holder) return
using_new_click_proc = !using_new_click_proc
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
feedback_add_details("admin_verb","TNCP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"
+3 -3
View File
@@ -1409,7 +1409,7 @@
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
if(!istype(H.ears, /obj/item/device/radio/headset))
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
return
@@ -1426,7 +1426,7 @@
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
if(!istype(H.ears, /obj/item/device/radio/headset))
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
return
@@ -1442,7 +1442,7 @@
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
if(!istype(H.ears, /obj/item/device/radio/headset))
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
return
+12 -12
View File
@@ -667,7 +667,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chaplain_hood(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
@@ -689,7 +689,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
@@ -706,7 +706,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(M), slot_l_store)
@@ -747,7 +747,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
@@ -772,7 +772,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
@@ -797,7 +797,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
@@ -821,7 +821,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
@@ -840,7 +840,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
@@ -861,7 +861,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
@@ -873,7 +873,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
@@ -885,7 +885,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
@@ -896,7 +896,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+5 -5
View File
@@ -77,15 +77,15 @@
largest_move_time = M.next_move - world.time
else
largest_move_time = 1
if(M.lastDblClick >= largest_click_time)
if(M.next_click >= largest_click_time)
largest_click_mob = M
if(M.lastDblClick > world.time)
largest_click_time = M.lastDblClick - world.time
if(M.next_click > world.time)
largest_click_time = M.next_click - world.time
else
largest_click_time = 0
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] next_click = [M.next_click] world.time = [world.time]")
M.next_move = 1
M.lastDblClick = 0
M.next_click = 0
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
message_admins("world.time = [world.time]", 1)
+1 -1
View File
@@ -101,7 +101,7 @@ var/global/sent_honksquad = 0
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
R.set_frequency(1442)
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(src), slot_back)
equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(src), slot_in_backpack)
if(src.gender == FEMALE)
+1 -1
View File
@@ -31,7 +31,7 @@
del(I)
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
+1 -1
View File
@@ -125,7 +125,7 @@ var/global/sent_strike_team = 0
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
R.set_frequency(1441)
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
if (leader_selected == 0)
equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
else
@@ -131,7 +131,7 @@ var/global/sent_syndicate_strike_team = 0
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
if (!syndicate_leader_selected)
+1 -1
View File
@@ -4,7 +4,7 @@ var/global/vox_tick = 1
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_robes(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(src), slot_shoes) // REPLACE THESE WITH CODED VOX ALTERNATIVES.
+1 -1
View File
@@ -42,7 +42,7 @@
if(src.corpsegloves)
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
if(src.corpseradio)
M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
M.equip_to_slot_or_del(new src.corpseradio(M), slot_l_ear)
if(src.corpseglasses)
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
if(src.corpsemask)
+51
View File
@@ -35,6 +35,54 @@
throwforce = 2
slot_flags = SLOT_EARS
/obj/item/clothing/ears/attack_hand(mob/user as mob)
if (!user) return
if (src.loc != user || !istype(user,/mob/living/carbon/human))
..()
return
var/mob/living/carbon/human/H = user
if(H.l_ear != src && H.r_ear != src)
..()
return
if(!canremove)
return
var/obj/item/clothing/ears/O
if(slot_flags & SLOT_TWOEARS )
O = (H.l_ear == src ? H.r_ear : H.l_ear)
user.u_equip(O)
if(!istype(src,/obj/item/clothing/ears/offear))
del(O)
O = src
else
O = src
user.u_equip(src)
if (O)
user.put_in_hands(O)
O.add_fingerprint(user)
if(istype(src,/obj/item/clothing/ears/offear))
del(src)
/obj/item/clothing/ears/offear
name = "Other ear"
w_class = 5.0
icon = 'icons/mob/screen1_Midnight.dmi'
icon_state = "block"
slot_flags = SLOT_EARS | SLOT_TWOEARS
New(var/obj/O)
name = O.name
desc = O.desc
icon = O.icon
icon_state = O.icon_state
dir = O.dir
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
@@ -94,6 +142,9 @@ BLIND // can't see anything
cell.reliability -= 10 / severity
..()
// Called just before an attack_hand(), in mob/UnarmedAttack()
/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
return 0 // return 1 to cancel attack_hand()
//Head
/obj/item/clothing/head
@@ -1,14 +1,3 @@
/obj/item/clothing/gloves/space_ninja
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
name = "ninja gloves"
icon_state = "s-ninja"
item_state = "s-ninja"
siemens_coefficient = 0.2
var/draining = 0
var/candrain = 0
var/mindrain = 200
var/maxdrain = 400
/obj/item/clothing/gloves/captain
desc = "Regal blue gloves, with a nice gold trim. Swanky."
name = "captain's gloves"
+1 -1
View File
@@ -362,7 +362,7 @@ ________________________________________________________________________________
del(gloves)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
equip_to_slot_or_del(R, slot_ears)
equip_to_slot_or_del(R, slot_l_ear)
if(gender==FEMALE)
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
else
-3
View File
@@ -1,3 +0,0 @@
/datum/hud/proc/ghost_hud()
return
+10 -4
View File
@@ -89,6 +89,7 @@
if(W)
if(client) client.screen -= W
u_equip(W)
if(!W) return 1 // self destroying objects (tk, grabs)
W.layer = initial(W.layer)
W.loc = loc
@@ -194,7 +195,8 @@
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,"l_ear")) if(src:l_ear) items += src:l_ear
if(hasvar(src,"r_ear")) if(src:r_ear) items += src:r_ear
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
@@ -255,9 +257,13 @@
if(!src.wear_id && src.w_uniform)
src.wear_id = W
equipped = 1
if(slot_ears)
if(!src.ears)
src.ears = W
if(slot_l_ear)
if(!src.l_ear)
src.l_ear = W
equipped = 1
if(slot_r_ear)
if(!src.r_ear)
src.r_ear = W
equipped = 1
if(slot_glasses)
if(!src.glasses)
@@ -133,24 +133,6 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
@@ -305,9 +287,9 @@
return
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
@@ -139,29 +139,6 @@
updatehealth()
return
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
@@ -1,10 +0,0 @@
/datum/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
+96 -111
View File
@@ -135,10 +135,10 @@
if(istext(selhand))
selhand = lowertext(selhand)
if(selhand == "right" || selhand == "r")
selhand = 0
if(selhand == "left" || selhand == "l")
selhand = 1
if(selhand == "right" || selhand == "r")
selhand = 0
if(selhand == "left" || selhand == "l")
selhand = 1
if(selhand != src.hand)
swap_hand()
@@ -221,95 +221,95 @@
// ++++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
if(temp_vent.welded)
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(!do_after(src, 45))
return
if(!src||!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
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
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
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
if(stat)
src << "You must be conscious to do this!"
return
return
if(lying)
src << "You can't vent crawl while you're stunned!"
return
if(vent_found) // one was passed in, probably from vent/AltClick()
if(vent_found.welded)
src << "That vent is welded shut."
return
if(!vent_found.Adjacent(src))
return // don't even acknowledge that
else
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
if(v.Adjacent(src))
vent_found = v
if(!vent_found)
src << "You'll need a non-welded vent to crawl into!"
return
if(!vent_found.network || !vent_found.network.normal_members.len)
src << "This vent is not connected to anything."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.welded)
continue
if(temp_vent in 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
if(!vents.len)
src << "\red There are no available vents to travel to, they could be welded."
return
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
if(!selection) return
if(!vent_found.Adjacent(src))
src << "Never mind, you left."
return
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
if(isslime(src))
var/mob/living/carbon/slime/S = src
if(S.Victim)
src << "\red You'll have to let [S.Victim] go or finish eating \him first."
return
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
if(!target_vent)
return
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
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
/mob/living/carbon/clean_blood()
@@ -331,24 +331,6 @@
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
var/obj/item/W = get_active_hand()
if( !W )//Not holding anything
if( client && (TK in mutations) )
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.remoteview_target)
H << "\red Your mind is too busy remote viewing."
return
var/obj/item/tk_grab/O = new(src)
put_in_active_hand(O)
O.host = src
return
if( istype(W,/obj/item/tk_grab) )
if(hand) del(l_hand)
else del(r_hand)
return
if (src.in_throw_mode)
throw_mode_off()
else
@@ -362,7 +344,10 @@
src.in_throw_mode = 1
src.throw_icon.icon_state = "act_throw_on"
/mob/living/carbon/proc/throw_item(atom/target)
/mob/proc/throw_item(atom/target)
return
/mob/living/carbon/throw_item(atom/target)
src.throw_mode_off()
if(usr.stat || !target)
return
+19 -54
View File
@@ -1,18 +1,18 @@
mob/living/carbon/verb/give()
/mob/living/carbon/verb/give()
set category = "IC"
set name = "Give"
set src in view(1)
if(src.stat == 2 || usr.stat == 2|| src.client == null)
if(src.stat == 2 || usr.stat == 2 || src.client == null)
return
if(src == usr)
usr << "I feel stupider, suddenly."
usr << "\red I feel stupider, suddenly."
return
var/obj/item/I
if(!usr.hand && usr.r_hand == null)
usr << "You don't have anything in your right hand to give to [src.name]"
usr << "\red You don't have anything in your right hand to give to [src.name]"
return
if(usr.hand && usr.l_hand == null)
usr << "You don't have anything in your left hand to give to [src.name]"
usr << "\red You don't have anything in your left hand to give to [src.name]"
return
if(usr.hand)
I = usr.l_hand
@@ -20,64 +20,29 @@ mob/living/carbon/verb/give()
I = usr.r_hand
if(!I)
return
if(src.r_hand == null)
if(src.r_hand == null || src.l_hand == null)
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
src << "[usr.name] moved too far away."
if(!Adjacent(usr))
usr << "\red You need to stay in reaching distance while giving an object."
src << "\red [usr.name] moved too far away."
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
usr << "You need to keep the item in your active hand."
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
usr << "\red You need to keep the item in your active hand."
src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
return
if(src.r_hand != null && src.l_hand != null)
src << "\red Your hands are full."
usr << "\red Their hands are full."
return
if(src.r_hand != null)
if(src.l_hand == null)
usr.drop_item()
src.l_hand = I
else
src << "Your hands are full."
usr << "Their hands are full."
return
else
usr.drop_item()
src.r_hand = I
I.loc = src
I.layer = 20
I.add_fingerprint(src)
src.update_inv_l_hand()
src.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else if(src.l_hand == null)
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!check_can_reach(usr,src))
usr << "You need to keep in reaching distance."
src << "[usr.name] moved too far away."
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
usr << "You need to keep the item in your active hand."
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
return
if(src.l_hand != null)
if(src.r_hand == null)
usr.drop_item()
src.r_hand = I
else
src << "Your hands are full."
usr << "Their hands are full."
return
else
usr.drop_item()
src.l_hand = I
src.l_hand = I
I.loc = src
I.layer = 20
I.add_fingerprint(src)
@@ -85,8 +50,8 @@ mob/living/carbon/verb/give()
src.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
if("No")
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
else
usr << "[src.name]'s hands are full."
usr << "\red [src.name]'s hands are full."

Some files were not shown because too many files have changed in this diff Show More