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

@@ -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()