Fixes issue 641.

Fixes issue 339.
Does not fix issue 506, but I have spruced up the text a bit.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4335 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-08-07 17:20:22 +00:00
parent a5ff8f581b
commit 46db0d2c3e
3 changed files with 31 additions and 27 deletions
+25 -21
View File
@@ -64,7 +64,7 @@
/* SmartFridge. Much todo
*/
/obj/machinery/smartfridge
name = "SmartFridge"
name = "\improper SmartFridge"
icon = 'icons/obj/vending.dmi'
icon_state = "smartfridge"
layer = 2.9
@@ -100,39 +100,43 @@
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(!src.ispowered)
user << "\red The [src] is unpowered and useless."
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
return
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/))
if (contents.len>=max_n_of_items)
user << "\red This [src] is full of ingredients, you cannot put more."
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
/*todo: plantbag*/
else
user.before_take_item(O)
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
else
item_quants[O.name]=1
user.visible_message( \
"\blue [user] has added \the [O] to \the [src].", \
"\blue You add \the [O] to \the [src].")
else if (istype(O, /obj/item/weapon/plantbag))
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
O.contents -= G
G.loc = src
if(item_quants[G.name])
item_quants[G.name]++
item_quants[O.name] = 1
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", \
"<span class='notice'>You add \the [O] to \the [src].")
else if(istype(O, /obj/item/weapon/plantbag))
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
item_quants[G.name]=1
user.visible_message( \
"\blue [user] loads \the [src] with \the [O].", \
"\blue You load \the [src] with \the [O].")
O.contents -= G
G.loc = src
if(item_quants[G.name])
item_quants[G.name]++
else
item_quants[G.name] = 1
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [O].</span>", \
"<span class='notice'>You load \the [src] with \the [O].</span>")
else
user << "\red The [src] smartly refuses [O]."
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
return 1
src.updateUsrDialog()
updateUsrDialog()
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
return src.attack_hand(user)
@@ -104,7 +104,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
user << "The [src] is malfunctioning."
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
for(var/obj/machinery/teleport/hub/R in world)
@@ -116,8 +116,8 @@ Frequency:
L["[com.id] (Inactive)"] = com.locked
var/list/turfs = list( )
for(var/turf/T in orange(10))
if(T.x>world.maxx-4 || T.x<4) continue //putting them at the edge is dumb
if(T.y>world.maxy-4 || T.y<4) continue
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8) continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
@@ -128,11 +128,11 @@ Frequency:
for(var/obj/effect/portal/PO in world)
if(PO.creator == src) count++
if(count >= 3)
user.show_message("\red The hand teleporter is recharging!")
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/T = L[t1]
for(var/mob/O in hearers(user, null))
O.show_message("\blue Locked In", 2)
O.show_message("<span class='notice'>Locked In.</span>", 2)
var/obj/effect/portal/P = new /obj/effect/portal( get_turf(src) )
P.target = T
P.creator = src