Merge remote-tracking branch 'upstream/dev' into TheSummoning

Conflicts:
	code/game/machinery/cryopod.dm
	code/game/objects/items/weapons/clown_items.dm
This commit is contained in:
PsiOmega
2015-04-24 17:13:37 +02:00
105 changed files with 6547 additions and 4590 deletions
+25 -10
View File
@@ -617,16 +617,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
ownrank = id.rank
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
var/turf/T = loc
if(ismob(T))
T = T.loc
cartridge.loc = T
mode = 0
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
verb_remove_cartridge()
//MENU FUNCTIONS===================================
@@ -1120,6 +1111,30 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
usr << "<span class='notice'>You cannot do this while restrained.</span>"
/obj/item/device/pda/verb/verb_remove_cartridge()
set category = "Object"
set name = "Remove cartridge"
set src in usr
if(issilicon(usr))
return
if (can_use(usr) && !isnull(cartridge))
var/turf/T = get_turf(src)
cartridge.loc = T
if (ismob(loc))
var/mob/M = loc
M.put_in_hands(cartridge)
else
cartridge.loc = get_turf(src)
mode = 0
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
usr << "<span class='notice'>You remove \the [cartridge] from the [name].</span>"
else
usr << "<span class='notice'>You cannot do this while restrained.</span>"
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
if(choice == 1)
@@ -97,6 +97,10 @@
mode = "white"
mode_nice = "white"
return
if(design == "dark")
mode = "dark"
mode_nice = "dark"
return
if(design == "showroom" || design == "hydro" || design == "freezer")
mode = "[design]floor"
mode_nice = design
@@ -135,9 +139,9 @@
mode_nice = design
mode = "whitebluegreencorners"
tile_dir_mode = 2
else if(design == "delivery" || design == "bot")
else if(design == "delivery" || design == "bot" || design == "white-delivery" || design == "white-bot")
mode_nice = design
mode = design
mode = replacetext(design, "-", "")
tile_dir_mode = 0
else if(design == "loadingarea")
mode_nice = design
+108
View File
@@ -0,0 +1,108 @@
/obj/item/glass_jar
name = "glass jar"
desc = "A small empty jar."
icon = 'icons/obj/items.dmi'
icon_state = "jar"
w_class = 2
matter = list("glass" = 200)
flags = NOBLUDGEON
var/list/accept_mobs = list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse)
var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling
/obj/item/glass_jar/New()
..()
update_icon()
/obj/item/glass_jar/afterattack(var/atom/A, var/mob/user, var/proximity)
if(!proximity || contains)
return
if(istype(A, /mob))
var/accept = 0
for(var/D in accept_mobs)
if(istype(A, D))
accept = 1
if(!accept)
user << "[A] doesn't fit into \the [src]."
return
var/mob/L = A
user.visible_message("<span class='notice'>[user] scoops [L] into \the [src].</span>", "<span class='notice'>You scoop [L] into \the [src].</span>")
L.loc = src
contains = 2
update_icon()
return
else if(istype(A, /obj/effect/spider/spiderling))
var/obj/effect/spider/spiderling/S = A
user.visible_message("<span class='notice'>[user] scoops [S] into \the [src].</span>", "<span class='notice'>You scoop [S] into \the [src].</span>")
S.loc = src
processing_objects.Remove(S) // No growing inside jars
contains = 3
update_icon()
return
/obj/item/glass_jar/attack_self(var/mob/user)
switch(contains)
if(1)
for(var/obj/O in src)
O.loc = user.loc
user << "<span class='notice'>You take money out of \the [src].</span>"
contains = 0
update_icon()
return
if(2)
for(var/mob/M in src)
M.loc = user.loc
user.visible_message("<span class='notice'>[user] releases [M] from \the [src].</span>", "<span class='notice'>You release [M] from \the [src].</span>")
contains = 0
update_icon()
return
if(3)
for(var/obj/effect/spider/spiderling/S in src)
S.loc = user.loc
user.visible_message("<span class='notice'>[user] releases [S] from \the [src].</span>", "<span class='notice'>You release [S] from \the [src].</span>")
processing_objects.Add(S) // They can grow after being let out though
contains = 0
update_icon()
return
/obj/item/glass_jar/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/weapon/spacecash))
if(contains == 0)
contains = 1
if(contains != 1)
return
var/obj/item/weapon/spacecash/S = W
user.visible_message("<span class='notice'>[user] puts [S.worth] [S.worth > 1 ? "thalers" : "thaler"] into \the [src].</span>")
user.drop_from_inventory(S)
S.loc = src
update_icon()
/obj/item/glass_jar/update_icon() // Also updates name and desc
underlays.Cut()
overlays.Cut()
switch(contains)
if(0)
name = initial(name)
desc = initial(desc)
if(1)
name = "tip jar"
desc = "A small jar with money inside."
for(var/obj/item/weapon/spacecash/S in src)
var/image/money = image(S.icon, S.icon_state)
money.pixel_x = rand(-2, 3)
money.pixel_y = rand(-6, 6)
money.transform *= 0.6
underlays += money
if(2)
for(var/mob/M in src)
var/image/victim = image(M.icon, M.icon_state)
victim.pixel_y = 6
underlays += victim
name = "glass jar with [M]"
desc = "A small jar with [M] inside."
if(3)
for(var/obj/effect/spider/spiderling/S in src)
var/image/victim = image(S.icon, S.icon_state)
underlays += victim
name = "glass jar with [S]"
desc = "A small jar with [S] inside."
return
+1 -1
View File
@@ -440,7 +440,7 @@
/obj/item/toy/waterflower
name = "water flower"
desc = "A seemingly innocent sunflower...with a twist."
//icon = 'icons/obj/harvest.dmi'
icon = 'icons/obj/device.dmi'
icon_state = "sunflower"
item_state = "sunflower"
var/empty = 0
@@ -29,6 +29,10 @@
else if(istype(target,/obj/effect/decal/cleanable))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
qdel(target)
else if(istype(target,/turf))
user << "<span class='notice'>You scrub \the [target.name] clean.</span>"
var/turf/T = target
T.clean()
else
user << "<span class='notice'>You clean \the [target.name].</span>"
target.clean_blood()
+17 -3
View File
@@ -4,6 +4,7 @@
var/climbable
var/breakable
var/parts
var/list/climbers = list()
/obj/structure/Destroy()
if(opacity)
@@ -21,6 +22,12 @@
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
attack_generic(user,1,"slices")
if(climbers.len && !(user in climbers))
user.visible_message("<span class='warning'>[user.name] shakes \the [src].</span>", \
"<span class='notice'>You shake \the [src].</span>")
structure_shaken()
return ..()
/obj/structure/blob_act()
@@ -74,7 +81,7 @@
return ..()
/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable)
if (!can_touch(user) || !climbable || (user in climbers))
return 0
if (!user.Adjacent(src))
@@ -104,25 +111,32 @@
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
climbers |= user
if(!do_after(user,50))
climbers -= user
return
if (!can_climb(user))
climbers -= user
return
usr.forceMove(get_turf(src))
if (get_turf(user) == get_turf(src))
usr.visible_message("<span class='warning'>[user] climbs onto \the [src]!</span>")
climbers -= user
/obj/structure/proc/structure_shaken()
for(var/mob/living/M in climbers)
M.Weaken(1)
M << "<span class='danger'>You topple as you are shaken off \the [src]!</span>"
climbers.Cut(1,2)
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
M.Weaken(5)
M.Weaken(3)
M << "<span class='danger'>You topple as \the [src] moves under you!</span>"
if(prob(25))
+16 -4
View File
@@ -1,14 +1,17 @@
#define SHOWER_OPEN_LAYER MOB_LAYER + 0.1
#define SHOWER_CLOSED_LAYER OBJ_LAYER + 0.4
/obj/structure/curtain
name = "curtain"
icon = 'icons/obj/curtain.dmi'
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_OPEN_LAYER
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_CLOSED_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
@@ -27,10 +30,10 @@
opacity = !opacity
if(opacity)
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_CLOSED_LAYER
else
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/black
name = "black curtain"
@@ -45,3 +48,12 @@
name = "shower curtain"
color = "#ACD1E9"
alpha = 200
/obj/structure/curtain/open/shower/engineering
color = "#FFA500"
/obj/structure/curtain/open/shower/security
color = "#AA0000"
#undef SHOWER_OPEN_LAYER
#undef SHOWER_CLOSED_LAYER