Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into fixes3

Conflicts:
	_maps/map_files/cyberiad/cyberiad.dmm
This commit is contained in:
Markolie
2015-09-28 03:05:04 +02:00
23 changed files with 263 additions and 784 deletions
+161 -221
View File
@@ -1,54 +1,98 @@
/obj/structure/stool/bed/chair/cart/
//old style PIMP-CART
/obj/structure/stool/bed/chair/janicart
name = "janicart"
desc = "A brave janitor cyborg gave its life to produce such an amazing combination of speed and utility."
icon = 'icons/obj/vehicles.dmi'
anchored = 1
icon_state = "pussywagon"
anchored = 0
density = 1
var/empstun = 0
var/health = 100
var/destroyed = 0
var/move_delay = 1
var/keytype = /obj/item/key
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
var/obj/item/weapon/storage/bag/trash/mybag = null
var/callme = "pimpin' ride" //how do people refer to it?
var/move_delay = 0
var/floorbuffer = 0
var/keytype = /obj/item/key/janitor
/obj/structure/stool/bed/chair/cart/process()
if(empstun > 0)
empstun--
if(empstun < 0)
empstun = 0
/obj/structure/stool/bed/chair/cart/New()
processing_objects |= src
/obj/structure/stool/bed/chair/janicart/New()
handle_rotation()
/obj/structure/stool/bed/chair/cart/examine(mob/user)
if(..(user, 1))
switch(health)
if(75 to 99)
usr << "\blue It appears slightly dented."
if(40 to 74)
usr << "\red It appears heavily dented."
if(1 to 39)
usr << "\red It appears severely dented."
if((INFINITY * -1) to 0)
usr << "It appears completely unsalvageable"
/obj/structure/stool/bed/chair/janicart/Move(a, b, flag)
..()
if(floorbuffer)
var/turf/tile = loc
if(isturf(tile))
tile.clean_blood()
if (istype(tile, /turf/simulated/floor))
var/turf/simulated/floor/F = tile
F.dirt = 0
for(var/A in tile)
if(istype(A, /obj/effect))
if(is_cleanable(A))
qdel(A)
/obj/structure/stool/bed/chair/cart/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0))
if(destroyed)
user << "\red The [src.name] is destroyed beyond repair."
add_fingerprint(user)
user.visible_message("\blue [user] has fixed some of the dents on [src].", "\blue You fix some of the dents on \the [src]")
health += 20
HealthCheck()
else
user << "Need more welding fuel!"
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
..()
if(floorbuffer)
user << "It has been upgraded with a floor buffer."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user, params)
if(istype(I, keytype))
user << "Hold [I] in one of your hands while you drive this [callme]."
else if(istype(I, /obj/item/weapon/storage/bag/trash))
if(keytype == /obj/item/key/janitor)
if(!user.drop_item())
return
user << "<span class='notice'>You hook the trashbag onto the [callme].</span>"
I.loc = src
mybag = I
else if(istype(I, /obj/item/janiupgrade))
if(keytype == /obj/item/key/janitor)
floorbuffer = 1
qdel(I)
user << "<span class='notice'>You upgrade the [callme] with the floor buffer.</span>"
update_icon()
/obj/structure/stool/bed/chair/janicart/update_icon()
overlays.Cut()
if(mybag)
overlays += "cart_garbage"
if(floorbuffer)
overlays += "cart_buffer"
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
if(mybag)
mybag.loc = get_turf(user)
user.put_in_hands(mybag)
mybag = null
update_icon()
else
..()
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
return
if(istype(W, /obj/item/key))
user << "Hold [W] in one of your hands while you drive this [name]."
step(src, direction)
update_mob()
handle_rotation()
if(istype(src.loc, /turf/simulated))
var/turf/simulated/T = src.loc
if(T.wet == 2) //Lube! Fall off!
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
buckled_mob.Stun(7)
buckled_mob.Weaken(7)
unbuckle_mob()
step(src, dir)
move_delay = 1
spawn(2)
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
/obj/structure/stool/bed/chair/cart/user_buckle_mob(mob/living/M, mob/user)
/obj/structure/stool/bed/chair/janicart/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
return
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
@@ -59,19 +103,14 @@
..()
update_mob()
/obj/structure/stool/bed/chair/cart/post_buckle_mob(mob/living/M)
update_mob()
return ..()
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
..()
/obj/structure/stool/bed/chair/cart/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
M.pixel_y = 0
return M
/obj/structure/stool/bed/chair/cart/handle_rotation()
if(dir == SOUTH)
/obj/structure/stool/bed/chair/janicart/handle_rotation()
if((dir == SOUTH) || (dir == WEST) || (dir == EAST))
layer = FLY_LAYER
else
layer = OBJ_LAYER
@@ -83,7 +122,8 @@
update_mob()
/obj/structure/stool/bed/chair/cart/proc/update_mob()
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
switch(dir)
@@ -91,190 +131,85 @@
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 7
if(WEST)
buckled_mob.pixel_x = 13
buckled_mob.pixel_x = 12
buckled_mob.pixel_y = 7
if(NORTH)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 4
if(EAST)
buckled_mob.pixel_x = -13
buckled_mob.pixel_x = -12
buckled_mob.pixel_y = 7
/obj/structure/stool/bed/chair/cart/emp_act(severity)
switch(severity)
if(1)
src.empstun = (rand(5,10))
if(2)
src.empstun = (rand(1,5))
src.visible_message("\red The [src.name]'s motor short circuits!")
spark_system.attach(src)
spark_system.set_up(5, 0, src)
spark_system.start()
/obj/structure/stool/bed/chair/cart/bullet_act(var/obj/item/projectile/Proj)
var/hitrider = 0
if(istype(Proj, /obj/item/projectile/ion))
Proj.on_hit(src, 2)
return
/obj/structure/stool/bed/chair/janicart/bullet_act(obj/item/projectile/Proj)
if(buckled_mob)
if(prob(75))
hitrider = 1
var/act = buckled_mob.bullet_act(Proj)
if(act >= 0)
visible_message("<span class='warning'>[buckled_mob.name] is hit by [Proj]!")
if(istype(Proj, /obj/item/projectile/energy))
unbuckle_mob()
return
if(istype(Proj, /obj/item/projectile/energy/electrode))
if(prob(25))
unbuckle_mob()
visible_message("<span class='warning'>The [src.name] absorbs the [Proj]")
if(!istype(buckled_mob, /mob/living/carbon/human))
return buckled_mob.bullet_act(Proj)
else
var/mob/living/carbon/human/H = buckled_mob
return H.electrocute_act(0, src, 1, 0)
if(!hitrider)
visible_message("<span class='warning'>[Proj] hits the [name]!</span>")
if(!Proj.nodamage && Proj.damage_type == BRUTE || Proj.damage_type == BURN)
health -= Proj.damage
HealthCheck()
/obj/structure/stool/bed/chair/cart/proc/HealthCheck()
if(health > 100) health = 100
if(health <= 0 && !destroyed)
destroyed = 1
density = 0
if(buckled_mob)
unbuckle_mob()
visible_message("<span class='warning'>The [name] explodes!</span>")
explosion(src.loc,-1,0,2,7,10)
icon_state = "pussywagon_destroyed"
/obj/structure/stool/bed/chair/cart/ex_act(severity)
switch (severity)
if(1.0)
health -= 100
if(2.0)
health -= 75
if(3.0)
health -= 45
HealthCheck()
/////////////////////////////////////////////////////////////////////////
/obj/structure/stool/bed/chair/cart/janicart
name = "janicart"
icon_state = "pussywagon"
flags = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/weapon/storage/bag/trash/mybag = null
/obj/structure/stool/bed/chair/cart/janicart/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
/obj/structure/stool/bed/chair/cart/janicart/examine(mob/user)
if(!..(user, 1))
return
user << "\icon[src] This [name] contains [reagents.total_volume] unit\s of [reagents]!"
if(mybag)
user << "\A [mybag] is hanging on the [name]."
/obj/structure/stool/bed/chair/cart/janicart/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/mop))
if(reagents.total_volume >= 2)
reagents.trans_to(W, 2)
user << "<span class='notice'>You wet the mop in the pimpin' ride.</span>"
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
if(reagents.total_volume < 1)
user << "<span class='notice'>This pimpin' ride is out of water!</span>"
else if(istype(W, /obj/item/weapon/storage/bag/trash))
user << "<span class='notice'>You hook the trashbag onto the pimpin' ride.</span>"
user.drop_item()
W.loc = src
mybag = W
/obj/structure/stool/bed/chair/cart/janicart/attack_hand(mob/user)
if(mybag)
mybag.loc = get_turf(user)
user.put_in_hands(mybag)
mybag = null
else
..()
/obj/structure/stool/bed/chair/cart/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis || destroyed)
unbuckle_mob()
return
if(empstun > 0)
if(user)
user << "\red \the [src] is unresponsive."
return
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
return
step(src, direction)
update_mob()
handle_rotation()
move_delay = 1
spawn(2)
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this pimpin' ride.</span>"
////////////////////////////////////////////////////////////////////////////////////////////////
/obj/structure/stool/bed/chair/cart/ambulance
name = "ambulance"
icon = 'icons/obj/vehicles.dmi'
icon_state = "docwagon"
anchored = 0
density = 1
/var/brightness = 4
/var/strobe = 0
/obj/structure/stool/bed/chair/cart/ambulance/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis || destroyed)
unbuckle_mob()
return
if(empstun > 0)
if(user)
user << "\red \the [src] is unresponsive."
return
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
return
step(src, direction)
update_mob()
handle_rotation()
move_delay = 1
spawn(2)
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this ambulance.</span>"
buckled_mob.bullet_act(Proj)
/obj/item/key
name = "key"
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
desc = "A small grey key."
icon = 'icons/obj/vehicles.dmi'
icon_state = "keys"
icon_state = "key"
w_class = 1
/obj/item/key/janitor
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
icon_state = "keyjanitor"
/obj/item/key/security
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
icon_state = "keysec"
/obj/item/key/ambulance
name = "ambulance key"
desc = "A keyring with a small steel key, and tag with a red cross on it."
icon_state = "keydoc"
/obj/item/key/snowmobile
name = "snowmobile key"
desc = "A keyring with a small steel key, and tag with a red cross on it; clearly it's not implying you're going to the hospital for this..."
icon_state = "keydoc" //get a better icon, sometime.
/obj/item/janiupgrade
name = "floor buffer upgrade"
desc = "An upgrade for mobile janicarts."
icon = 'icons/obj/vehicles.dmi'
icon_state = "upgrade"
/obj/structure/stool/bed/chair/janicart/secway
name = "secway"
desc = "A brave security cyborg gave its life to help you look like a complete tool."
icon = 'icons/obj/vehicles.dmi'
icon_state = "secway"
callme = "secway"
keytype = /obj/item/key/security
/obj/structure/stool/bed/chair/janicart/secway/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
buckled_mob.pixel_y = 4
/obj/structure/stool/bed/chair/janicart/ambulance
name = "ambulance"
desc = "For getting to patients in a hurry--or running them over."
icon = 'icons/obj/vehicles.dmi'
icon_state = "docwagon"
callme = "ambulance"
keytype = /obj/item/key/ambulance
/obj/structure/stool/bed/chair/janicart/secway/snowmobile
name = "red snowmobile"
desc = "Wheeeeeeeeeeee."
icon = 'icons/obj/vehicles.dmi'
icon_state = "snowmobile"
callme = "snowmobile"
/obj/structure/stool/bed/chair/janicart/secway/snowmobile/blue
name = "blue snowmobile"
icon_state = "bluesnowmobile"
////////////////////////////////////////////////////////////////////////////////////////////////
//TG style Janicart
/obj/structure/janitorialcart
@@ -297,8 +232,13 @@
/obj/structure/janitorialcart/New()
create_reagents(100)
janitorial_equipment += src
/obj/structure/janitorialcart/Destroy()
janitorial_equipment -= src
return ..()
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
if(reagents.total_volume < 1)
user << "[src] is out of water!</span>"
@@ -11,11 +11,16 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
janitorial_equipment += src
/obj/structure/mopbucket/full/New()
..()
reagents.add_reagent("water", 100)
/obj/structure/mopbucket/Destroy()
janitorial_equipment -= src
return ..()
/obj/structure/mopbucket/examine(mob/user)
if(..(user, 1))
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
-163
View File
@@ -1,163 +0,0 @@
/obj/structure/stool/bed/chair/segway
name = "security segway"
desc = "Gives the illusion of authority."
icon = 'icons/obj/vehicles.dmi'
icon_state = "sec_seg_idle"
anchored = 1
density = 1
var/health = 100
var/delay = 3 //Move delay to simulate a speed
var/allowMove = 1
var/datum/global_iterator/space_move //Handling space movement (i.e. drift forever)
/obj/structure/stool/bed/chair/segway/New()
handle_rotation()
space_move = new /datum/global_iterator/space_movement(null,0)
return
/obj/structure/stool/bed/chair/segway/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
return
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
if(A.density)
if(A != src && A != M)
return
M.loc = loc //we move the mob on the janicart's turf before checking if we can buckle.
..()
/obj/structure/stool/bed/chair/segway/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
icon_state = "sec_seg_idle"
if(istype(user.l_hand, /obj/item/sec_seg_key) || istype(user.r_hand, /obj/item/sec_seg_key))
if(!allowMove)
return
if(src.space_move.active())
return
allowMove = 0
icon_state = "sec_seg_move"
step(src, direction)
update_mob()
handle_rotation()
if(istype(src.loc, /turf/space))
src.space_move.start(list(src,direction))
if(istype(src.loc, /turf/simulated))
var/turf/simulated/T = src.loc
if(T.wet == 2) //Lube! Fall off!
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
buckled_mob.Stun(8)
buckled_mob.Weaken(5)
unbuckle_mob()
step(src, dir)
sleep(delay)
allowMove = 1
else
user << "<span class='notice'>Requires key in hand to drive.</span>"
/obj/structure/stool/bed/chair/segway/Move()
. = ..()
/obj/structure/stool/bed/chair/segway/Bump(var/atom/obstacle)
if(istype(obstacle, /mob))
step(obstacle, src.dir)
else
obstacle.Bumped(src)
return
/obj/structure/stool/bed/chair/segway/post_buckle_mob(mob/living/M)
update_mob()
add_fingerprint(M)
M.pixel_x = 0
M.pixel_y = 5
return ..()
/obj/structure/stool/bed/chair/segway/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
M.pixel_y = 0
return M
/obj/structure/stool/bed/chair/segway/handle_rotation()
if(dir == NORTH)
layer = OBJ_LAYER
else
layer = FLY_LAYER
update_mob()
/obj/structure/stool/bed/chair/segway/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
/obj/structure/stool/bed/chair/segway/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
return buckled_mob.bullet_act(Proj)
else if(istype(Proj, /obj/item/projectile/beam))
damage(Proj.damage)
/obj/structure/stool/bed/chair/segway/proc/damage(amount)
health -= amount
if(health <= 0)
if(buckled_mob)
buckled_mob << "The [src.name] was destroyed!"
qdel(src)
/obj/item/sec_seg_key
name = "security segway key"
desc = "A key for a security segway. You feel the choice of keyring could be more professional."
icon = 'icons/obj/vehicles.dmi'
icon_state = "keys" //Needs a proper sprite
w_class = 1
/datum/global_iterator/space_movement //moon_theme.mp3
delay = 5
process(var/obj/structure/stool/bed/chair/segway/seg as obj,direction)
if(!step(seg, direction))
src.stop()
/obj/structure/stool/bed/chair/segway/snowmobile
name = "red snowmobile"
desc = "Wheeeeeeeeeeee."
icon = 'icons/obj/vehicles.dmi'
icon_state = "snowmobile"
anchored = 1
density = 1
/obj/structure/stool/bed/chair/segway/snowmobile/blue
name = "blue snowmobile"
desc = "Wheeeeeeeeeeee."
icon = 'icons/obj/vehicles.dmi'
icon_state = "bluesnowmobile"
anchored = 1
density = 1
/obj/structure/stool/bed/chair/segway/snowmobile/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(!allowMove)
return
if(src.space_move.active())
return
allowMove = 0
step(src, direction)
update_mob()
handle_rotation()
if(istype(src.loc, /turf/space))
src.space_move.start(list(src,direction))
if(istype(src.loc, /turf/simulated))
damage(5)
usr << "Your snowmobile takes damage from not being on snow!"
var/turf/simulated/T = src.loc
if(T && T.wet == 2) //Lube! Fall off!
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
buckled_mob.Stun(8)
buckled_mob.Weaken(5)
unbuckle_mob()
step(src, dir)
sleep(delay)
allowMove = 1
+1 -1
View File
@@ -299,7 +299,7 @@
var/turf/tile = loc
loc.clean_blood()
for(var/obj/effect/E in tile)
if(istype(E,/obj/effect/rune) || istype(E,/obj/effect/decal/cleanable) || istype(E,/obj/effect/overlay))
if(is_cleanable(E))
qdel(E)
/obj/machinery/shower/process()