Merge remote-tracking branch 'origin/master' into bay_examine

# Conflicts:
#	code/game/objects/structures/displaycase.dm
This commit is contained in:
Tigercat2000
2015-09-15 14:08:36 -07:00
208 changed files with 2587 additions and 3346 deletions

View File

@@ -26,7 +26,7 @@
/obj/item/weapon/gun/projectile/automatic/pistol = 8,
/obj/item/weapon/gun/projectile/shotgun/combat = 5,
/obj/item/weapon/gun/projectile/revolver/mateba,
/obj/item/weapon/gun/projectile/automatic/deagle
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
)
/obj/effect/spawner/lootdrop/maintenance

View File

@@ -6,6 +6,14 @@
var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/blood_overlay_color = null
var/item_state = null
var/lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
var/righthand_file = 'icons/mob/inhands/items_righthand.dmi'
//Dimensions of the lefthand_file and righthand_file vars
//eg: 32x32 sprite, 64x64 sprite, etc.
var/inhand_x_dimension = 32
var/inhand_y_dimension = 32
var/r_speed = 1.0
var/health = null
var/hitsound = null

View File

@@ -11,7 +11,6 @@
icon_state = "camera_bug"
w_class = 1.0
item_state = "camera_bug"
icon_override = 'icons/mob/in-hand/tools.dmi'
throw_speed = 4
throw_range = 20

View File

@@ -3,7 +3,6 @@
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
icon_state = "flash"
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
icon_override = 'icons/mob/in-hand/tools.dmi'
throwforce = 0
w_class = 1
throw_speed = 3

View File

@@ -95,7 +95,6 @@
desc = "A robust flashlight used by security."
icon_state = "seclite"
item_state = "seclite"
icon_override = 'icons/mob/in-hand/tools.dmi'
force = 9 // Not as good as a stun baton.
brightness_on = 5 // A little better than the standard flashlight.
hitsound = 'sound/weapons/genhit1.ogg'

View File

@@ -6,7 +6,6 @@
icon = 'icons/obj/musician.dmi'
icon_state = "guitar"
item_state = "guitar"
icon_override = 'icons/mob/in-hand/tools.dmi'
force = 10
var/datum/song/handheld/song
hitsound = 'sound/effects/guitarsmash.ogg'

View File

@@ -113,7 +113,6 @@ REAGENT SCANNER
name = "Health Analyzer"
icon_state = "health"
item_state = "healthanalyzer"
icon_override = 'icons/mob/in-hand/tools.dmi'
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
flags = CONDUCT
slot_flags = SLOT_BELT

View File

@@ -76,7 +76,6 @@ effective or pretty fucking useless.
name = "Health Analyzer"
icon_state = "health2"
item_state = "healthanalyzer"
icon_override = 'icons/mob/in-hand/tools.dmi'
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
flags = CONDUCT
slot_flags = SLOT_BELT

View File

@@ -3,7 +3,6 @@
desc = "Used by obese officers to save their breath for running."
icon_state = "voice0"
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 1.0
flags = CONDUCT

View File

@@ -131,6 +131,8 @@
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "gun"
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 3.0
@@ -204,6 +206,8 @@
icon = 'icons/obj/gun.dmi'
icon_state = "crossbow"
item_state = "crossbow"
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
w_class = 2.0
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
@@ -1096,7 +1100,6 @@ obj/item/toy/cards/deck/syndicate/black
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
icon_override = 'icons/mob/in-hand/changeling.dmi'
attack_verb = list("pricked", "absorbed", "gored")
w_class = 2
@@ -1109,7 +1112,6 @@ obj/item/toy/cards/deck/syndicate/black
icon = 'icons/obj/device.dmi'
icon_state = "flash"
item_state = "flashtool"
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 1
/obj/item/toy/flash/attack(mob/living/M, mob/user)

View File

@@ -41,7 +41,6 @@
icon = 'icons/obj/chronos.dmi'
icon_state = "chronogun"
item_state = "chronogun"
icon_override = 'icons/mob/in-hand/guns.dmi'
w_class = 3.0
projectile_type = "/obj/item/projectile/energy/chrono_beam"
fire_sound = 'sound/weapons/Laser.ogg'

View File

@@ -6,7 +6,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "defibunit"
item_state = "defibunit"
icon_override = 'icons/mob/in-hand/tools.dmi'
slot_flags = SLOT_BACK
force = 5
throwforce = 6
@@ -249,7 +248,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles"
item_state = "defibpaddles"
icon_override = 'icons/mob/in-hand/tools.dmi'
force = 0
throwforce = 6
w_class = 4

View File

@@ -8,7 +8,6 @@ var/turf/T
icon = 'icons/obj/grenade.dmi'
icon_state = "banana"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
var/deliveryamt = 8
var/spawner_type = /obj/item/weapon/bananapeel

View File

@@ -7,7 +7,6 @@
desc = "A do it yourself grenade casing!"
icon_state = "chemg"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
var/bomb_state = "chembomb"
var/payload_name = null // used for spawned grenades
w_class = 2

View File

@@ -3,7 +3,6 @@
desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas."
icon_state = "banana"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 2.0
force = 2.0
var/stage = 0

View File

@@ -2,7 +2,6 @@
name = "classic emp grenade"
icon_state = "emp"
item_state = "emp"
icon_override = 'icons/mob/in-hand/tools.dmi'
origin_tech = "materials=2;magnets=3"
prime()

View File

@@ -2,7 +2,6 @@
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
origin_tech = "materials=2;combat=1"
var/banglet = 0

View File

@@ -21,7 +21,6 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "improvised_grenade"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
throw_speed = 3
throw_range = 7
flags = CONDUCT
@@ -72,7 +71,6 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "improvised_grenade"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
throw_speed = 3
throw_range = 7
flags = CONDUCT

View File

@@ -5,7 +5,6 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
throw_speed = 4
throw_range = 20
flags = CONDUCT

View File

@@ -5,7 +5,6 @@
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
slot_flags = SLOT_BELT
var/datum/effect/effect/system/bad_smoke_spread/smoke

View File

@@ -4,7 +4,6 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
origin_tech = "materials=3;magnets=4"
var/banglet = 0
var/spawner_type = null // must be an object path

View File

@@ -4,7 +4,6 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
icon_override = 'icons/mob/in-hand/tools.dmi'
origin_tech = "materials=3;magnets=4;syndicate=4"
/obj/item/weapon/grenade/syndieminibomb/prime()

View File

@@ -110,7 +110,6 @@
desc = "An entangling bolas. Throw at your foes to trip them and prevent them from running."
gender = NEUTER
icon = 'icons/obj/weapons.dmi'
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "bolas"
siemens_coefficient = 1
slot_flags = SLOT_BELT

View File

@@ -36,7 +36,6 @@
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
icon_override = 'icons/mob/in-hand/swords.dmi'
force = 3.0
throwforce = 5.0
throw_speed = 1

View File

@@ -155,3 +155,9 @@
/obj/item/weapon/stock_parts/cell/emproof/corrupt()
return
/obj/item/weapon/stock_parts/cell/temperaturegun
name = "temperature gun cell"
desc = "A specially designed power cell for heating and cooling projectiles"
icon_state = "icell"
maxcharge = 900

View File

@@ -88,7 +88,6 @@
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
icon = 'icons/obj/weapons.dmi'
icon_state = "teleriot0"
icon_override = 'icons/mob/in-hand/tools.dmi'
slot_flags = null
force = 3
throwforce = 3

View File

@@ -1,7 +1,6 @@
/obj/item/weapon/picket_sign
icon_state = "picket"
item_state = "picket"
icon_override = 'icons/mob/in-hand/tools.dmi'
name = "blank picket sign"
desc = "It's blank"
force = 5

View File

@@ -17,7 +17,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "broom"
item_state = "broom0"
icon_override = 'icons/mob/in-hand/staff.dmi'
/obj/item/weapon/twohanded/staff/broom/attack_self(mob/user as mob)
..()
@@ -58,7 +57,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "horsebroom"
item_state = "horsebroom0"
icon_override = 'icons/mob/in-hand/staff.dmi'
/obj/item/weapon/twohanded/staff/broom/horsebroom/attack_self(mob/user as mob)
..()

View File

@@ -5,7 +5,6 @@
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
icon_state = "RPED"
item_state = "RPED"
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 5
can_hold = list("/obj/item/weapon/stock_parts")
storage_slots = 50

View File

@@ -12,6 +12,7 @@
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = 3
max_combined_w_class = 21
storage_slots = 21
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
@@ -73,7 +74,6 @@
icon_state = "giftbag0"
item_state = "giftbag"
w_class = 4.0
storage_slots = 20
max_w_class = 3
max_combined_w_class = 400 // can store a ton of shit!
@@ -197,7 +197,6 @@
desc = "A very slim satchel that can easily fit into tight spaces."
icon_state = "satchel-flat"
w_class = 3 //Can fit in backpacks itself.
storage_slots = 5
max_combined_w_class = 15
level = 1
cant_hold = list(/obj/item/weapon/storage/backpack/satchel_flat) //muh recursive backpacks
@@ -224,11 +223,9 @@
/obj/item/weapon/storage/backpack/duffel
name = "duffelbag"
desc = "A large grey duffelbag designed to hold more items than a regular bag."
icon_override = 'icons/mob/in-hand/duffelbag.dmi'
icon_state = "duffel"
item_state = "duffel"
storage_slots = 9 // Duffelbags can hold more items.
max_combined_w_class = 27
max_combined_w_class = 30
slowdown = 1
/obj/item/weapon/storage/backpack/duffel/syndie
@@ -272,7 +269,6 @@
desc = "A suspicious looking dufflebag for holding surgery tools."
icon_state = "duffel-syndimed"
item_state = "duffle-syndimed"
storage_slots = 12
/obj/item/weapon/storage/backpack/duffel/syndie/surgery/New()
..()

View File

@@ -12,7 +12,6 @@
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
icon_override = 'icons/mob/in-hand/medkits.dmi'
throw_speed = 2
throw_range = 8
var/empty = 0

View File

@@ -235,7 +235,7 @@
return 0 //Means the item is already in the storage item
if(contents.len >= storage_slots)
if(!stop_messages)
usr << "<span class='notice'>[src] is full, make some space.</span>"
usr << "<span class='warning'>[W] won't fit in [src], make some space!</span>"
return 0 //Storage item is full
if(can_hold.len)

View File

@@ -200,7 +200,6 @@
desc = "A high-tech nitrogen tank designed specifically for Vox."
icon_state = "emergency_vox"
item_state = "emergency_vox"
icon_override = 'icons/mob/in-hand/tools.dmi'
volume = 25

View File

@@ -108,7 +108,6 @@
icon = 'icons/obj/watertank.dmi'
icon_state = "mister"
item_state = "mister"
icon_override = 'icons/mob/in-hand/tools.dmi'
w_class = 4.0
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
@@ -210,7 +209,6 @@
icon = 'icons/obj/watertank.dmi'
icon_state = "atmos_nozzle"
item_state = "nozzleatmos"
icon_override = 'icons/mob/in-hand/tools.dmi'
safety = 0
max_water = 200
power = 8

View File

@@ -199,7 +199,6 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/dualsaber
var/hacked = 0
var/blade_color
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "dualsaber0"
name = "double-bladed energy sword"
desc = "Handle with care."
@@ -365,7 +364,6 @@ obj/item/weapon/twohanded/
///CHAINSAW///
/obj/item/weapon/twohanded/chainsaw
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "chainsaw0"
name = "Chainsaw"
desc = "Perfect for felling trees or fellow spacemen."
@@ -423,8 +421,6 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/singularityhammer
name = "singularity hammer"
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
@@ -498,7 +494,6 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/mjollnir
name = "Mjollnir"
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
@@ -546,9 +541,7 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/knighthammer
name = "singuloth knight's hammer"
desc = "A hammer made of sturdy metal with a golden skull adorned with wings on either side of the head. <br>This weapon causes devastating damage to those it hits due to a power field sustained by a mini-singularity inside of the hammer."
icon_override = 'icons/mob/in-hand/swords.dmi'
icon_state = "adrhammer0"
icon_state = "knighthammer0"
flags = CONDUCT
slot_flags = SLOT_BACK
no_embed = 1
@@ -579,7 +572,7 @@ obj/item/weapon/twohanded/
return
/obj/item/weapon/twohanded/knighthammer/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "adrhammer[wielded]"
icon_state = "knighthammer[wielded]"
return

View File

@@ -45,6 +45,12 @@ LINEN BINS
icon_state = "sheetpurple"
_color = "purple"
/obj/item/weapon/bedsheet/patriot
name = "patriotic bedsheet"
desc = "You've never felt more free than when sleeping on this."
icon_state = "sheetUSA"
_color = "sheetUSA"
/obj/item/weapon/bedsheet/rainbow
name = "rainbow bedsheet"
desc = "A multi_colored blanket. It's actually several different sheets cut up and sewn together."

View File

@@ -44,11 +44,11 @@
new /obj/item/weapon/storage/box/teargas(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/backpack/duffel/syndie/med(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)

View File

@@ -1,55 +1,88 @@
#define DISPLAYCASE_FRAME_CIRCUIT 0
#define DISPLAYCASE_FRAME_SCREWDRIVER 1
// List and hook used to set up the captain's print on their display case
var/global/list/captain_display_cases = list()
/hook/captain_spawned/proc/displaycase(mob/living/carbon/human/captain)
if(!captain_display_cases.len)
return 1
var/fingerprint = captain.get_full_print()
for(var/obj/structure/displaycase/D in captain_display_cases)
if(istype(D))
D.ue = fingerprint
return 1
/obj/structure/displaycase_frame
name = "display case frame"
icon = 'icons/obj/stock_parts.dmi'
icon_state="box_glass"
icon_state = "box_glass"
var/obj/item/weapon/airlock_electronics/circuit = null
var/state=0
var/obj/item/device/assembly/prox_sensor/sensor = null
var/state = DISPLAYCASE_FRAME_CIRCUIT
/obj/structure/displaycase_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
var/pstate=state
var/turf/T=get_turf(src)
var/pstate = state
var/turf/T = get_turf(src)
switch(state)
if(0)
if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked")
if(DISPLAYCASE_FRAME_CIRCUIT)
if(istype(W, /obj/item/weapon/airlock_electronics) && W.icon_state != "door_electronics_smoked")
user.drop_item()
circuit = W
circuit.loc = src
circuit.forceMove(src)
state++
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You add the airlock electronics to the frame.</span>"
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(W, /obj/item/weapon/crowbar))
new /obj/machinery/constructable_frame/machine_frame(T)
new /obj/item/stack/sheet/glass(T)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(T)
G.amount = 5
qdel(src)
user << "<span class='notice'>You pry the glass out of the frame.</span>"
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
return
if(1)
if(DISPLAYCASE_FRAME_SCREWDRIVER)
if(isscrewdriver(W))
var/obj/structure/displaycase/C=new(T)
var/obj/structure/displaycase/C = new(T)
if(circuit.one_access)
C.req_access = null
C.req_one_access = circuit.conf_access
else
C.req_access = circuit.conf_access
C.req_one_access = null
if(isprox(sensor))
C.burglar_alarm = 1
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
qdel(src)
return
if(istype(W, /obj/item/weapon/crowbar))
circuit.loc=T
circuit=null
circuit.forceMove(T)
circuit = null
if(isprox(sensor))
sensor.forceMove(T)
sensor = null
state--
user << "<span class='notice'>You pry the electronics out of the frame.</span>"
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
if(pstate!=state)
pstate=state
if(isprox(W) && !isprox(sensor))
user.drop_item()
sensor = W
sensor.forceMove(src)
user << "<span class='notice'>You add the proximity sensor to the frame.</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(pstate != state)
pstate = state
update_icon()
/obj/structure/displaycase_frame/update_icon()
switch(state)
if(1)
icon_state="box_glass_circuit"
icon_state = "box_glass_circuit"
else
icon_state="box_glass"
icon_state = "box_glass"
/obj/structure/displaycase
name = "display case"
@@ -58,42 +91,52 @@
desc = "A display case for prized possessions. It taunts you to kick it."
density = 1
anchored = 1
unacidable = 1//Dissolving the case would also delete the contents.
unacidable = 1 //Dissolving the case would also delete the contents.
var/health = 30
var/obj/item/occupant = null
var/destroyed = 0
var/locked = 0
var/burglar_alarm = 0
var/ue = null
var/image/occupant_overlay = null
var/obj/item/weapon/airlock_electronics/circuit
/obj/structure/displaycase/captains_laser
name = "captain's display case"
desc = "A display case for the captain's antique laser gun. It taunts you to kick it."
desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system."
burglar_alarm = 1
/obj/structure/displaycase/captains_laser/New()
captain_display_cases += src
req_access = list(access_captain)
locked = 1
spawn(5)
occupant = new /obj/item/weapon/gun/energy/laser/captain(src)
update_icon()
/obj/structure/proc/getPrint(mob/user as mob)
return md5(user:dna:uni_identity)
/obj/structure/displaycase/Destroy()
dump()
qdel(circuit)
circuit = null
return ..()
/obj/structure/displaycase/captain_laser/Destroy()
captain_display_cases -= src
return ..()
/obj/structure/displaycase/examine(mob/user)
..(user)
user << "\blue Peering through the glass, you see that it contains:"
user << "<span class='notice'>Peering through the glass, you see that it contains:</span>"
if(occupant)
user << "\icon[occupant] \blue \A [occupant]"
user << "\icon[occupant] <span class='notice'>\A [occupant].</span>"
else
user << "Nothing."
/obj/structure/displaycase/proc/dump()
if(occupant)
occupant.loc=get_turf(src)
occupant=null
occupant_overlay=null
occupant.forceMove(get_turf(src))
occupant = null
occupant_overlay = null
/obj/structure/displaycase/ex_act(severity)
switch(severity)
@@ -111,7 +154,6 @@
src.health -= 5
src.healthcheck()
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
@@ -127,16 +169,27 @@
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
health = 0
if (!( src.destroyed ))
src.density = 0
src.destroyed = 1
PoolOrNew(/obj/item/weapon/shard, loc)
playsound(get_turf(src), "shatter", 70, 1)
update_icon()
burglar_alarm()
else
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
return
/obj/structure/displaycase/proc/burglar_alarm()
if(burglar_alarm)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
visible_message("<span class='danger'>The burglar alarm goes off!</span>")
return 1
return 0
/obj/structure/displaycase/update_icon()
if(src.destroyed)
src.icon_state = "glassbox2b"
@@ -147,102 +200,110 @@
var/icon/occupant_icon=getFlatIcon(occupant)
occupant_icon.Scale(16,16)
occupant_overlay = image(occupant_icon)
occupant_overlay.pixel_x=8
occupant_overlay.pixel_y=8
occupant_overlay.pixel_x = 8
occupant_overlay.pixel_y = 8
if(locked)
occupant_overlay.alpha=128//ChangeOpacity(0.5)
//underlays += occupant_overlay
occupant_overlay.alpha = 128
overlays += occupant_overlay
return
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card))
var/obj/item/weapon/card/id/I=W
var/obj/item/weapon/card/id/I = W
if(!check_access(I))
user << "\red Access denied."
user << "<span class='warning'>Access denied.</span>"
return
locked = !locked
if(!locked)
user << "\icon[src] \blue \The [src] clicks as locks release, and it slowly opens for you."
user << "\icon[src] <span class='notice'>\The [src] clicks as locks release, and it slowly opens for you.</span>"
else
user << "\icon[src] \blue You close \the [src] and swipe your card, locking it."
user << "\icon[src] <span class='notice'>You close \the [src] and swipe your card, locking it.</span>"
update_icon()
return
if(istype(W,/obj/item/weapon/crowbar) && (!locked || destroyed))
user.visible_message("[user.name] pries \the [src] apart.", \
"You pry \the [src] apart.", \
"You hear something pop.")
var/turf/T=get_turf(src)
var/turf/T = get_turf(src)
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
dump()
var/obj/item/weapon/airlock_electronics/C = circuit
if(!C)
C=new (src)
C.one_access=!(req_access && req_access.len>0)
C = new (src)
C.one_access = !(req_access && req_access.len>0)
if(!C.one_access)
C.conf_access=req_access
C.conf_access = req_access
else
C.conf_access=req_one_access
C.conf_access = req_one_access
if(!destroyed)
var/obj/structure/displaycase_frame/F=new(T)
F.state=1
F.circuit=C
F.circuit.loc=F
var/obj/structure/displaycase_frame/F = new(T)
F.state = DISPLAYCASE_FRAME_SCREWDRIVER
F.circuit = C
F.circuit.forceMove(F)
if(burglar_alarm)
new /obj/item/device/assembly/prox_sensor(T)
F.update_icon()
else
C.loc=T
circuit=null
C.forceMove(T)
circuit = null
new /obj/machinery/constructable_frame/machine_frame(T)
qdel(src)
return
if(user.a_intent == I_HARM)
src.health -= W.force
src.healthcheck()
..()
if(locked && !destroyed)
src.health -= W.force
src.healthcheck()
..()
else if(!locked)
dump()
user << "<span class='danger'>You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>"
update_icon()
else
if(locked)
user << "\red It's locked, you can't put anything into it."
user << "<span class='warning'>It's locked, you can't put anything into it.</span>"
return
if(!occupant)
user << "\blue You insert \the [W] into \the [src], and it floats as the hoverfield activates."
user << "<span class='notice'>You insert \the [W] into \the [src], and it floats as the hoverfield activates.</span>"
user.drop_item()
W.loc=src
W.forceMove(src)
occupant=W
update_icon()
/obj/structure/displaycase/attack_hand(mob/user as mob)
if (destroyed)
if (destroyed || (!locked && user.a_intent == I_HARM))
if(occupant)
dump()
user << "\red You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field permanently."
user << "<span class='danger'>You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>"
src.add_fingerprint(user)
update_icon()
else
if(user.a_intent == I_HARM)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("\red [user.name] kicks \the [src]!", \
"\red You kick \the [src]!", \
user.visible_message("<span class='danger'>[user.name] kicks \the [src]!</span>", \
"<span class='danger'>You kick \the [src]!</span>", \
"You hear glass crack.")
src.health -= 2
healthcheck()
else if(!locked)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/print = H.get_full_print()
if(!ue)
user << "\blue Your press your thumb against the fingerprint scanner, registering your identity with the case."
ue = getPrint(user)
user << "<span class='notice'>Your press your thumb against the fingerprint scanner, registering your identity with the case.</span>"
ue = print
return
if(ue!=getPrint(user))
user << "\red Access denied."
if(ue != print)
user << "<span class='warning'>Access denied.</span>"
return
if(occupant)
user << "\blue Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case."
user << "<span class='notice'>Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case.</span>"
dump()
update_icon()
else
src << "\icon[src] \red \The [src] is empty!"
src << "\icon[src] <span class='warning'>\The [src] is empty!</span>"
else
user.visible_message("[user.name] gently runs his hands over \the [src] in appreciation of its contents.", \
"You gently run your hands over \the [src] in appreciation of its contents.", \

View File

@@ -63,7 +63,7 @@
handle_rotation()
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.
@@ -95,7 +95,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
forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
handle_rotation()
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)

View File

@@ -848,6 +848,7 @@
anchored = 1.0
throwpass = 1 //You can throw objects over this, despite it's density.
var/parts = /obj/item/weapon/rack_parts
var/health = 5
/obj/structure/rack/proc/destroy()
new parts(loc)
@@ -914,6 +915,14 @@
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
destroy()
else
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='danger'>You kick [src].</span>")
health -= rand(1,2)
healthcheck()
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
@@ -933,3 +942,7 @@
/obj/structure/rack/attack_tk() // no telehulk sorry
return
/obj/structure/rack/proc/healthcheck()
if(health <= 0)
destroy()