mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-26 05:26:24 +01:00
Merge remote-tracking branch 'upstream/dev' into attack-cleanup2
Conflicts: code/modules/mob/living/simple_animal/friendly/spiderbot.dm code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/obj
|
||||
var/can_buckle = 0
|
||||
var/buckle_movable = 0
|
||||
var/buckle_dir = 0
|
||||
var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
|
||||
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/mob/living/buckled_mob = null
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
M.buckled = src
|
||||
M.facing_dir = null
|
||||
M.set_dir(dir)
|
||||
M.set_dir(buckle_dir ? buckle_dir : dir)
|
||||
M.update_canmove()
|
||||
buckled_mob = M
|
||||
post_buckle_mob(M)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
close_sound = 'sound/items/zip.ogg'
|
||||
var/item_path = /obj/item/bodybag
|
||||
density = 0
|
||||
storage_capacity = (default_mob_size * 2) - 1
|
||||
storage_capacity = (MOB_MEDIUM * 2) - 1
|
||||
var/contains_body = 0
|
||||
|
||||
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"quarter-turf" = list("path" = /obj/effect/floor_decal/corner, "precise" = 1, "coloured" = 1),
|
||||
"hazard stripes" = list("path" = /obj/effect/floor_decal/industrial/warning),
|
||||
"corner, hazard" = list("path" = /obj/effect/floor_decal/industrial/warning/corner),
|
||||
"hatched marking" = list("path" = /obj/effect/floor_decal/industrial/hatch),
|
||||
"hatched marking" = list("path" = /obj/effect/floor_decal/industrial/hatch, "coloured" = 1),
|
||||
"dotted outline" = list("path" = /obj/effect/floor_decal/industrial/outline, "coloured" = 1),
|
||||
"loading sign" = list("path" = /obj/effect/floor_decal/industrial/loading),
|
||||
"1" = list("path" = /obj/effect/floor_decal/sign),
|
||||
@@ -40,35 +40,35 @@
|
||||
"precise" = 0
|
||||
)
|
||||
var/list/paint_colours = list(
|
||||
"white" = COLOR_WHITE,
|
||||
"light gray" = COLOR_SILVER,
|
||||
"dark gray" = COLOR_GRAY,
|
||||
"blue-grey" = "#6A97B0",
|
||||
"pale blue-grey" = "#8BBBD5",
|
||||
"green-grey" = "#8DAF6A",
|
||||
"pale green-gray" = "#AED18B",
|
||||
"red-gray" = "#AA5F61",
|
||||
"pale red-gray" = "#CC9090",
|
||||
"purple-gray" = "#A2819E",
|
||||
"pale purple-gray" = "#BDA2BA",
|
||||
"black" = COLOR_BLACK,
|
||||
"red" = COLOR_RED,
|
||||
"dark red" = COLOR_MAROON,
|
||||
"yellow" = COLOR_YELLOW,
|
||||
"dark yellow" = COLOR_OLIVE,
|
||||
"green" = COLOR_LIME,
|
||||
"dark green" = COLOR_GREEN,
|
||||
"cyan" = COLOR_CYAN,
|
||||
"teal" = COLOR_TEAL,
|
||||
"blue" = COLOR_BLUE,
|
||||
"dark blue" = COLOR_NAVY,
|
||||
"magenta" = COLOR_PINK,
|
||||
"purple" = COLOR_PURPLE,
|
||||
"orange" = COLOR_ORANGE,
|
||||
"dark orange" = "#B95A00",
|
||||
"dark brown" = "#917448",
|
||||
"brown" = "#B19664",
|
||||
"pale brown" = "#CEB689"
|
||||
"white" = COLOR_WHITE,
|
||||
"light gray" = COLOR_SILVER,
|
||||
"dark gray" = COLOR_GRAY,
|
||||
"blue-gray" = COLOR_BLUE_GRAY,
|
||||
"pale blue-gray" = COLOR_PALE_BLUE_GRAY,
|
||||
"green-gray" = COLOR_GREEN_GRAY,
|
||||
"pale green-gray" = COLOR_PALE_GREEN_GRAY,
|
||||
"red-gray" = COLOR_RED_GRAY,
|
||||
"pale red-gray" = COLOR_PALE_RED_GRAY,
|
||||
"purple-gray" = COLOR_PURPLE_GRAY,
|
||||
"pale purple-gray" = COLOR_PALE_PURPLE_GRAY,
|
||||
"black" = COLOR_BLACK,
|
||||
"red" = COLOR_RED,
|
||||
"dark red" = COLOR_MAROON,
|
||||
"yellow" = COLOR_YELLOW,
|
||||
"dark yellow" = COLOR_OLIVE,
|
||||
"green" = COLOR_LIME,
|
||||
"dark green" = COLOR_GREEN,
|
||||
"cyan" = COLOR_CYAN,
|
||||
"teal" = COLOR_TEAL,
|
||||
"blue" = COLOR_BLUE,
|
||||
"dark blue" = COLOR_NAVY,
|
||||
"magenta" = COLOR_PINK,
|
||||
"purple" = COLOR_PURPLE,
|
||||
"orange" = COLOR_ORANGE,
|
||||
"dark orange" = COLOR_DARK_ORANGE,
|
||||
"dark brown" = COLOR_DARK_BROWN,
|
||||
"brown" = COLOR_BROWN,
|
||||
"pale brown" = COLOR_BEIGE
|
||||
)
|
||||
|
||||
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
qdel(keyslot2)
|
||||
keyslot1 = null
|
||||
keyslot2 = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/list_channels(var/mob/user)
|
||||
return list_secure_channels()
|
||||
|
||||
@@ -125,6 +125,8 @@
|
||||
/obj/item/device/radio/intercom/locked/ai_private
|
||||
name = "\improper AI intercom"
|
||||
frequency = AI_FREQ
|
||||
broadcasting = 1
|
||||
listening = 1
|
||||
|
||||
/obj/item/device/radio/intercom/locked/confessional
|
||||
name = "confessional intercom"
|
||||
|
||||
@@ -32,7 +32,6 @@ var/global/list/default_medbay_channels = list(
|
||||
var/frequency = PUB_FREQ //common chat
|
||||
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
var/canhear_range = 3 // the range which mobs can hear this radio from
|
||||
var/obj/item/device/radio/patch_link = null
|
||||
var/datum/wires/radio/wires = null
|
||||
var/b_stat = 0
|
||||
var/broadcasting = 0
|
||||
@@ -71,7 +70,7 @@ var/global/list/default_medbay_channels = list(
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
/obj/item/stack/tile/floor_red
|
||||
name = "red floor tile"
|
||||
singular_name = "red floor tile"
|
||||
icon_state = "tile_red"
|
||||
color = COLOR_RED_GRAY
|
||||
icon_state = "tile_white"
|
||||
|
||||
/obj/item/stack/tile/floor_steel
|
||||
name = "steel floor tile"
|
||||
@@ -102,7 +103,8 @@
|
||||
/obj/item/stack/tile/floor_yellow
|
||||
name = "yellow floor tile"
|
||||
singular_name = "yellow floor tile"
|
||||
icon_state = "tile_yellow"
|
||||
color = COLOR_BROWN
|
||||
icon_state = "tile_white"
|
||||
|
||||
/obj/item/stack/tile/floor_dark
|
||||
name = "dark floor tile"
|
||||
|
||||
@@ -2,6 +2,7 @@ var/global/list/syndicate_ids = list()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
icon_state = "syndicate"
|
||||
assignment = "Agent"
|
||||
origin_tech = list(TECH_ILLEGAL = 3)
|
||||
var/electronic_warfare = 1
|
||||
@@ -33,7 +34,7 @@ var/global/list/syndicate_ids = list()
|
||||
var/obj/item/weapon/card/id/I = O
|
||||
src.access |= I.access
|
||||
if(player_is_antag(user))
|
||||
user << "<span class='notice'>The microscanner activate as you pass it over the ID, copying its access.</span>"
|
||||
user << "<span class='notice'>The microscanner activates as you pass it over the ID, copying its access.</span>"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!registered_user)
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
||||
if(istype(M,/mob/living))
|
||||
M.radiation += rand(5,20)
|
||||
var/mob/living/L = M
|
||||
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
|
||||
|
||||
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
|
||||
if (buf.types & DNA2_BUF_UI)
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
wires = new(src)
|
||||
image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/plastique/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/weapon/grenade/anti_photon
|
||||
desc = "An experimental device for temporarily removing light in a limited area."
|
||||
name = "pgoton disruption grenade"
|
||||
name = "photon disruption grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "emp"
|
||||
item_state = "emp"
|
||||
|
||||
@@ -8,27 +8,32 @@
|
||||
slot_flags = SLOT_BELT
|
||||
var/datum/effect/effect/system/smoke_spread/bad/smoke
|
||||
|
||||
New()
|
||||
..()
|
||||
src.smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread/bad)
|
||||
src.smoke.attach(src)
|
||||
/obj/item/weapon/grenade/smokebomb/New()
|
||||
..()
|
||||
src.smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread/bad)
|
||||
src.smoke.attach(src)
|
||||
|
||||
prime()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
src.smoke.set_up(10, 0, usr.loc)
|
||||
spawn(0)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
/obj/item/weapon/grenade/smokebomb/Destroy()
|
||||
qdel(smoke)
|
||||
smoke = null
|
||||
return ..()
|
||||
|
||||
for(var/obj/effect/blob/B in view(8,src))
|
||||
var/damage = round(30/(get_dist(B,src)+1))
|
||||
B.health -= damage
|
||||
B.update_icon()
|
||||
sleep(80)
|
||||
qdel(src)
|
||||
return
|
||||
/obj/item/weapon/grenade/smokebomb/prime()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
src.smoke.set_up(10, 0, usr.loc)
|
||||
spawn(0)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
src.smoke.start()
|
||||
|
||||
for(var/obj/effect/blob/B in view(8,src))
|
||||
var/damage = round(30/(get_dist(B,src)+1))
|
||||
B.health -= damage
|
||||
B.update_icon()
|
||||
sleep(80)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.is_small)
|
||||
if(issmall(H))
|
||||
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
|
||||
return
|
||||
else
|
||||
@@ -175,7 +175,7 @@
|
||||
else if(istype(A,/obj/effect/plant))
|
||||
var/obj/effect/plant/P = A
|
||||
P.die_off()
|
||||
|
||||
|
||||
//spears, bay edition
|
||||
/obj/item/weapon/material/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
attack_dir = get_dir(get_turf(user), get_turf(attacker))
|
||||
else if(damage_source)
|
||||
attack_dir = get_dir(get_turf(user), get_turf(damage_source))
|
||||
|
||||
|
||||
if(!(attack_dir && (attack_dir & bad_arc)))
|
||||
return 1
|
||||
return 0
|
||||
@@ -21,12 +21,12 @@
|
||||
//parry only melee attacks
|
||||
if(istype(damage_source, /obj/item/projectile) || (attacker && get_dist(user, attacker) > 1) || user.incapacitated())
|
||||
return 0
|
||||
|
||||
|
||||
//block as long as they are not directly behind us
|
||||
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
|
||||
if(!check_shield_arc(user, bad_arc, damage_source, attacker))
|
||||
return 0
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/shield
|
||||
@@ -109,13 +109,13 @@
|
||||
if(!active)
|
||||
return 0 //turn it on first!
|
||||
. = ..()
|
||||
|
||||
|
||||
if(.)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread)
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
|
||||
if(istype(damage_source, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
@@ -130,14 +130,14 @@
|
||||
active = !active
|
||||
if (active)
|
||||
force = 10
|
||||
icon_state = "eshield[active]"
|
||||
update_icon()
|
||||
w_class = 4
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
user << "<span class='notice'>\The [src] is now active.</span>"
|
||||
|
||||
else
|
||||
force = 3
|
||||
icon_state = "eshield[active]"
|
||||
update_icon()
|
||||
w_class = 1
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
user << "<span class='notice'>\The [src] can now be concealed.</span>"
|
||||
@@ -150,6 +150,12 @@
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/shield/energy/update_icon()
|
||||
icon_state = "eshield[active]"
|
||||
if(active)
|
||||
set_light(1.5, 1.5, "#006AFF")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/item/weapon/cloaking_device
|
||||
name = "cloaking device"
|
||||
|
||||
@@ -8,6 +8,18 @@
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/belt.dmi')
|
||||
|
||||
var/show_above_suit = 0
|
||||
|
||||
/obj/item/weapon/storage/belt/verb/toggle_layer()
|
||||
set name = "Switch Belt Layer"
|
||||
set category = "Object"
|
||||
|
||||
if(show_above_suit == -1)
|
||||
usr << "<span class='notice'>\The [src] cannot be worn above your suit!</span>"
|
||||
return
|
||||
show_above_suit = !show_above_suit
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/update_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
desc = "A box containing 5 experimental photon disruption grenades."
|
||||
icon_state = "flashbang"
|
||||
|
||||
/obj/item/weapon/storage/box/anti_photon/New()
|
||||
/obj/item/weapon/storage/box/anti_photons/New()
|
||||
..()
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
new /obj/item/weapon/grenade/anti_photon(src)
|
||||
|
||||
@@ -177,6 +177,16 @@
|
||||
icon_state = "Dpacket"
|
||||
item_state = "Dpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/killthroat
|
||||
name = "\improper AcmeCo packet"
|
||||
desc = "A packet of six AcmeCo cigarettes. For those who somehow want to obtain the record for the most amount of cancerous tumors."
|
||||
icon_state = "Bpacket"
|
||||
item_state = "Bpacket" //Doesn't have an inhand state, but neither does dromedary, so, ya know..
|
||||
|
||||
New()
|
||||
..()
|
||||
fill_cigarre_package(src,list("fuel" = 15))
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigar
|
||||
name = "cigar case"
|
||||
desc = "A case for holding your cigars when you are not smoking them."
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
name = master_item.name
|
||||
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/internal/Destroy()
|
||||
master_item = null
|
||||
..()
|
||||
|
||||
@@ -151,11 +151,6 @@
|
||||
throw_range = 4
|
||||
w_class = 4.0
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
else
|
||||
icon_state = "[initial(name)]"
|
||||
|
||||
if(icon_state == "[initial(name)]_active")
|
||||
set_light(1.5, 1, "#FF6A00")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/item/weapon/melee/baton/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/examine(mob/user)
|
||||
if(!..(user, 0))
|
||||
return
|
||||
/obj/item/weapon/tank/jetpack/Destroy()
|
||||
qdel(ion_trail)
|
||||
..()
|
||||
|
||||
if(air_contents.gas["oxygen"] < 10)
|
||||
user << text("<span class='danger'>The meter on \the [src] indicates you are almost out of air!</span>")
|
||||
/obj/item/weapon/tank/jetpack/examine(mob/user)
|
||||
. = ..()
|
||||
if(air_contents.total_moles < 5)
|
||||
user << "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>"
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
|
||||
@@ -102,21 +104,9 @@
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/New()
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
|
||||
if(!..(0))
|
||||
return
|
||||
|
||||
if(air_contents.gas["carbon_dioxide"] < 10)
|
||||
user << text("<span class='danger'>The meter on \the [src] indicates you are almost out of carbon dioxide!</span>")
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig
|
||||
name = "jetpack"
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
@@ -44,39 +44,24 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/examine(mob/user)
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if (!in_range(src, user))
|
||||
if (icon == src) user << "<span class='notice'>It's \a \icon[icon][src]! If you want any more information you'll need to get closer.</span>"
|
||||
return
|
||||
|
||||
var/celsius_temperature = src.air_contents.temperature-T0C
|
||||
var/descriptive
|
||||
var/status
|
||||
|
||||
if (celsius_temperature < 20)
|
||||
descriptive = "cold"
|
||||
status = "warning"
|
||||
else if (celsius_temperature < 40)
|
||||
descriptive = "room temperature"
|
||||
status = "notice"
|
||||
else if (celsius_temperature < 80)
|
||||
descriptive = "lukewarm"
|
||||
status = "warning"
|
||||
else if (celsius_temperature < 100)
|
||||
descriptive = "warm"
|
||||
status = "warning"
|
||||
else if (celsius_temperature < 300)
|
||||
descriptive = "hot"
|
||||
status = "danger"
|
||||
else
|
||||
descriptive = "furiously hot"
|
||||
status = "danger"
|
||||
|
||||
user << "<span class='[status]'>\The \icon[icon][src] feels [descriptive]</span>"
|
||||
|
||||
return
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
var/celsius_temperature = air_contents.temperature - T0C
|
||||
var/descriptive
|
||||
switch(celsius_temperature)
|
||||
if(300 to INFINITY)
|
||||
descriptive = "furiously hot"
|
||||
if(100 to 300)
|
||||
descriptive = "hot"
|
||||
if(80 to 100)
|
||||
descriptive = "warm"
|
||||
if(40 to 80)
|
||||
descriptive = "lukewarm"
|
||||
if(20 to 40)
|
||||
descriptive = "room temperature"
|
||||
else
|
||||
descriptive = "cold"
|
||||
user << "<span class='notice'>\The [src] feels [descriptive].</span>"
|
||||
|
||||
/obj/item/weapon/tank/blob_act()
|
||||
if(prob(50))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/breakout = 0 //if someone is currently breaking out. mutex
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
var/storage_capacity = 2 * MOB_MEDIUM //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
//then open it in a populated area to crash clients.
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
@@ -20,14 +20,12 @@
|
||||
var/store_items = 1
|
||||
var/store_mobs = 1
|
||||
|
||||
var/const/default_mob_size = 15
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
var/obj/item/I
|
||||
for(I in src.loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
var/content_size = 0
|
||||
for(I in src.contents)
|
||||
@@ -71,13 +69,13 @@
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
AD.loc = src.loc
|
||||
AD.forceMove(src.loc)
|
||||
|
||||
for(var/obj/I in src)
|
||||
I.loc = src.loc
|
||||
I.forceMove(src.loc)
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
M.forceMove(src.loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
@@ -125,7 +123,7 @@
|
||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||
if((stored_units + added_units) > storage_capacity)
|
||||
break
|
||||
AD.loc = src
|
||||
AD.forceMove(src)
|
||||
added_units++
|
||||
return added_units
|
||||
|
||||
@@ -136,7 +134,7 @@
|
||||
if(stored_units + added_units + item_size > storage_capacity)
|
||||
continue
|
||||
if(!I.anchored)
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
added_units += item_size
|
||||
return added_units
|
||||
|
||||
@@ -145,14 +143,13 @@
|
||||
for(var/mob/living/M in src.loc)
|
||||
if(M.buckled || M.pinned.len)
|
||||
continue
|
||||
var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
|
||||
if(stored_units + added_units + current_mob_size > storage_capacity)
|
||||
if(stored_units + added_units + M.mob_size > storage_capacity)
|
||||
break
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
added_units += current_mob_size
|
||||
M.forceMove(src)
|
||||
added_units += M.mob_size
|
||||
return added_units
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
@@ -166,19 +163,19 @@
|
||||
switch(severity)
|
||||
if(1)
|
||||
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity++)
|
||||
qdel(src)
|
||||
|
||||
@@ -186,7 +183,7 @@
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
@@ -203,7 +200,7 @@
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -233,7 +230,7 @@
|
||||
return
|
||||
usr.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.loc = loc
|
||||
fireaxe.forceMove(loc)
|
||||
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if (W) W.loc = src.loc
|
||||
if (W) W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/card/id))
|
||||
if(src.broken)
|
||||
user << "<span class='warning'>It appears to be broken.</span>"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.loc = get_turf(src)
|
||||
O.forceMove(get_turf(src))
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
var/obj/structure/bed/B = O
|
||||
if(B.buckled_mob)
|
||||
continue
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
@@ -75,7 +75,7 @@
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
W.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -91,7 +91,7 @@
|
||||
if(rigged)
|
||||
user << "<span class='notice'>You attach [W] to [src].</span>"
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(rigged)
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
|
||||
if(locked == newlocked) return
|
||||
|
||||
|
||||
locked = newlocked
|
||||
if(user)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
@@ -437,12 +437,12 @@
|
||||
continue
|
||||
if(!S.anchored)
|
||||
found = 1
|
||||
S.loc = src
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
if(!M.anchored)
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
break
|
||||
return
|
||||
|
||||
@@ -465,12 +465,12 @@
|
||||
continue
|
||||
if(!S.anchored)
|
||||
found = 1
|
||||
S.loc = src
|
||||
S.forceMove(src)
|
||||
break
|
||||
if(!found)
|
||||
for(var/obj/machinery/M in src.loc)
|
||||
if(!M.anchored)
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!H.species.is_small)
|
||||
if(!issmall(H))
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
icon_state = "spikebloody"
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
var/id = null
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
|
||||
/obj/structure/ladder/New()
|
||||
spawn(8)
|
||||
for(var/obj/structure/ladder/L in world)
|
||||
if(L.id == id)
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
continue
|
||||
if(L.height == (height + 1))
|
||||
up = L
|
||||
continue
|
||||
|
||||
if(up && down) //if both our connections are filled
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
else if(up)
|
||||
icon_state = "ladder10"
|
||||
|
||||
else if(down)
|
||||
icon_state = "ladder01"
|
||||
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user as mob)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
if("Down")
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
else if(up)
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
|
||||
else if(down)
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -15,6 +15,7 @@
|
||||
pressure_resistance = 15
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_dir = SOUTH
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
@@ -131,14 +132,18 @@
|
||||
remove_padding()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
|
||||
var/obj/item/weapon/grab/G = W
|
||||
var/mob/living/affecting = G.affecting
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [affecting] into \the [src]!</span>")
|
||||
if(do_after(user, 20))
|
||||
W:affecting.loc = loc
|
||||
if(buckle_mob(W:affecting))
|
||||
W:affecting.visible_message(\
|
||||
"<span class='danger'>[W:affecting.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
affecting.loc = loc
|
||||
spawn(0)
|
||||
if(buckle_mob(affecting))
|
||||
affecting.visible_message(\
|
||||
"<span class='danger'>[affecting.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
qdel(W)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "chair_preview"
|
||||
color = "#666666"
|
||||
base_icon = "chair"
|
||||
buckle_dir = 0
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
set_dir(direction)
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
pulling.loc = T
|
||||
pulling.forceMove(T)
|
||||
else
|
||||
spawn(0)
|
||||
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
|
||||
@@ -107,7 +107,7 @@
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
|
||||
Reference in New Issue
Block a user