Massively improved trashbags. PICK UP EVERYTHING! Fixed issue 209.

Slightly improved mops, and got rid of the "X attacks the blood with the mop!" message.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2557 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2011-11-26 15:58:50 +00:00
parent 1de1be054d
commit 2190408f0f
8 changed files with 63 additions and 126 deletions

View File

@@ -47,10 +47,11 @@
if(istype(I, /obj/item/weapon/trashbag))
user << "\blue You empty the bag."
for (var/obj/item/trash/O in I.contents)
for(var/obj/item/O in I.contents)
I.contents -= O
O.loc = src
I.update_icon()
update()
return
var/obj/item/weapon/grab/G = I

View File

@@ -937,7 +937,7 @@
icon = 'shards.dmi'
icon_state = "large"
desc = "Could probably be used as ... a throwing weapon?"
w_class = 3.0
w_class = 1.0
force = 5.0
throwforce = 15.0
item_state = "shard-glass"

View File

@@ -2,7 +2,7 @@
/obj/item/trash
icon = 'trash.dmi'
w_class = 1.0
desc = "It's \a trash"
desc = "This is rubbish."
raisins
name = "4no raisins"
icon_state= "4no_raisins"
@@ -50,35 +50,16 @@
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return
/obj/item/trash/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/trash/O in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += O;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
/obj/item/weapon/trashbag
icon = 'trash.dmi'
icon_state = "trashbag0"
item_state = "trashbag"
name = "Trash bag"
desc = "A heavy-duty, no fun allowed trash bag."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 25; //the number of trash it can carry.
flags = FPRINT | TABLEPASS | ONBELT
w_class = 1
w_class = 2.0
/obj/item/weapon/trashbag/update_icon()
if(contents.len == 0)
@@ -89,11 +70,38 @@
icon_state = "trashbag2"
else icon_state = "trashbag3"
/obj/item/weapon/trashbag/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob)
..()
if (istype(W, /obj/item/trash))
var/obj/item/trash/O = W
src.contents += O;
if (contents.len < capacity)
if (istype(W, /obj/item))
if (W.w_class <= 2)
var/obj/item/O = W
src.contents += O
else
user << "\blue The bag is full!"
/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
if(istype(target, /obj/item))
var/obj/item/W = target
if(W.w_class <= 2)
if(mode == 1)
if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete
user << "\blue You pick up all the trash."
for(var/obj/item/O in get_turf(W))
if(contents.len < capacity)
if(O.w_class <= 2)
contents += O;
else
user << "\blue The bag is full!"
break
else
user << "\blue The bag is full!"
else
if(contents.len < capacity)
contents += W;
else
user << "\blue The bag is full!"
update_icon()
return
/obj/item/weapon/trashbag/verb/toggle_mode()
@@ -104,5 +112,5 @@
switch (mode)
if(1)
usr << "The bag now picks up all trash in a tile at once."
if(0)
usr << "The bag now picks up one trash at a time."
else
usr << "The bag now picks up one piece of trash at a time."

View File

@@ -129,23 +129,6 @@ ZIPPO
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
light("\red [user] lights their [name] with their [W]. How poor can you get?")
else if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/clothing/mask/cigarette/C in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += C;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
@@ -291,27 +274,6 @@ ZIPPO
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/weapon/cigpacket/CP in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += CP;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
/////////
//ZIPPO//

View File

@@ -178,6 +178,21 @@ MOP
reagents = R
R.my_atom = src
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
src.reagents.reaction(A,1,10)
A.clean_blood()
for(var/obj/effect/rune/R in A)
del(R)
for(var/obj/effect/decal/cleanable/R in A)
del(R)
for(var/obj/effect/overlay/R in A)
del(R)
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/mop))
return
..()
/obj/item/weapon/mop/afterattack(atom/A, mob/user as mob)
if (src.reagents.total_volume < 1 || mopcount >= 5)
user << "\blue Your mop is dry!"
@@ -185,25 +200,17 @@ MOP
if (istype(A, /turf/simulated))
for(var/mob/O in viewers(user, null))
O.show_message(text("\red <B>[] begins to clean []</B>", user, A), 1)
O.show_message("\red <B>[user] begins to clean \the [A]</B>", 1)
sleep(40)
clean(A)
user << "\blue You have finished mopping!"
src.reagents.reaction(A,1,10)
A.clean_blood()
for(var/obj/effect/rune/R in A)
del(R)
for(var/obj/effect/decal/cleanable/crayon/R in A)
del(R)
mopcount++
else if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/decal/cleanable/xenoblood) || istype(A, /obj/effect/rune) || istype(A,/obj/effect/decal/cleanable/crayon) || istype(A,/obj/effect/decal/cleanable/vomit) )
else if (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
for(var/mob/O in viewers(user, null))
O.show_message(text("\red <B>[user] begins to clean [A]</B>"), 1)
sleep(20)
if(A)
O.show_message("\red <B>[user] begins to clean \the [get_turf(A)]</B>", 1)
sleep(40)
clean(get_turf(A))
user << "\blue You have finished mopping!"
var/turf/U = A.loc
src.reagents.reaction(U)
if(A) del(A)
mopcount++
if(mopcount >= 5) //Okay this stuff is an ugly hack and i feel bad about it.

View File

@@ -3,6 +3,7 @@
desc = "Talk through this."
icon_state = "intercom"
anchored = 1
w_class = 4.0
var/number = 0
var/anyai = 1
var/mob/living/silicon/ai/ai = list()

View File

@@ -1339,27 +1339,6 @@
if (gulp_size < 5) gulp_size = 5
else gulp_size = max(round(reagents.total_volume / 5), 5)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/weapon/reagent_containers/food/drinks/D in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += D;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
attack_self(mob/user as mob)
return

View File

@@ -21,27 +21,6 @@
dir = pick(cardinal)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/ammo_casing/AC in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += AC;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
//Boxes of ammo
/obj/item/ammo_magazine