Merge branch 'master' of https://github.com/tgstation/-tg-station into SubSystems

This commit is contained in:
carnie
2015-01-05 19:52:03 +00:00
16 changed files with 164 additions and 92 deletions
+6 -5
View File
@@ -22,6 +22,7 @@ RCD
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
var/matter = 0
var/max_matter = 100
var/working = 0
var/mode = 1
var/canRwall = 0
@@ -92,7 +93,7 @@ RCD
/obj/item/weapon/rcd/New()
desc = "A RCD. It currently holds [matter]/100 matter-units."
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -102,15 +103,15 @@ RCD
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 20) > 100)
if((matter + 20) > max_matter)
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
return
user.drop_item()
qdel(W)
matter += 20
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [matter]/30 matter-units."
user << "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>"
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
return
@@ -243,7 +244,7 @@ RCD
if(matter < amount)
return 0
matter -= amount
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
+2
View File
@@ -21,6 +21,8 @@
obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
var/turf/simulated/floor/F = A
F.dirt = 0
for(var/obj/effect/O in A)
if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
+74 -11
View File
@@ -7,25 +7,81 @@
icon = 'icons/obj/statue.dmi'
icon_state = ""
density = 1
anchored = 1
anchored = 0
var/hardness = 1
var/oreAmount = 7
var/mineralType = "metal"
var/last_event = 0
var/active = null
var/spam_flag = 0
/obj/structure/statue/Destroy()
density = 0
..()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/user)
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user as mob)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is loosening the [name]'s bolts...</span>", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user,40))
if(!src) return
if(!anchored) return
user.visible_message("<span class='notice'>[user] loosened the [name]'s bolts!</span>", \
"<span class='notice'>You loosened the [name]'s bolts!</span>")
anchored = 0
else if(!anchored)
if (!istype(src.loc, /turf/simulated/floor))
user.visible_message("<span class='danger'>A floor must be present to secure the [name]!</span>")
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is securing the [name]'s bolts...</span>", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40))
if(!src) return
if(anchored) return
user.visible_message("<span class='notice'>[user] has secured the [name]'s bolts!</span>", \
"<span class='notice'>You have secured the [name]'s bolts!</span>")
anchored = 1
/obj/structure/statue/attack_hand(mob/user)
visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>")
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user,30))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user.visible_message("<span class='notice'>[user] begins to drill apart the [name]!</span>", \
"<span class='notice'>You begin to drill apart the [name]!</span>")
if(do_after(user,5))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] destroys the [name]!</span>", \
"<span class='notice'>You destroy the [name]!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/weldingtool))
if(!anchored)
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else
hardness -= W.force/100
..()
CheckHardness()
/obj/structure/statue/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
user.visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>", \
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
/obj/structure/statue/CanAtmosPass()
return !density
@@ -83,6 +139,8 @@
hardness = 3
luminosity = 2
mineralType = "uranium"
var/last_event = 0
var/active = null
/obj/structure/statue/uranium/nuke
name = "Statue of a Nuclear Fission Explosive"
@@ -100,6 +158,7 @@
/obj/structure/statue/uranium/Bumped(atom/user)
radiate()
..()
/obj/structure/statue/uranium/attack_hand(mob/user)
radiate()
@@ -107,6 +166,7 @@
/obj/structure/statue/uranium/attack_paw(mob/user)
radiate()
..()
/obj/structure/statue/uranium/proc/radiate()
if(!active)
@@ -238,6 +298,7 @@
hardness = 3
mineralType = "bananium"
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
var/spam_flag = 0
/obj/structure/statue/bananium/clown
name = "Statue of a clown"
@@ -245,6 +306,7 @@
/obj/structure/statue/bananium/Bumped(atom/user)
honk()
..()
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user)
honk()
@@ -256,9 +318,10 @@
/obj/structure/statue/bananium/attack_paw(mob/user)
honk()
..()
/obj/structure/statue/bananium/proc/honk()
if(spam_flag == 0)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
@@ -55,6 +55,8 @@
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
qdel(src)
return
manual_unbuckle(M)
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
@@ -112,8 +114,8 @@
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) || M.anchored)
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
if (istype(M, /mob/living/carbon/slime) || istype(M, /mob/living/simple_animal/slime))
user << "\The [M] is too squishy to buckle in."
return
unbuckle()
-2
View File
@@ -37,12 +37,10 @@
if (istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if(M.lying) return
switch (src.wet)
if(1) //wet floor
if(!M.slip(4, 2, null, (NO_SLIP_WHEN_WALKING|STEP)))
M.inertia_dir = 0
return
if(2) //lube
M.slip(0, 7, null, (STEP|SLIDE|GALOSHES_DONT_HELP))
+19 -1
View File
@@ -32,6 +32,8 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
var/obj/item/stack/tile/builtin_tile = null //needed for performance reasons when the singularity rips off floor tiles
var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
var/list/burnt_states = list()
var/dirt = 0
var/ignoredirt = 0
/turf/simulated/floor/New()
..()
@@ -161,4 +163,20 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
/turf/simulated/floor/narsie_act()
if(prob(20))
ChangeTurf(/turf/simulated/floor/engine/cult)
ChangeTurf(/turf/simulated/floor/engine/cult)
/turf/simulated/floor/Entered(atom/A, atom/OL)
..()
if(!ignoredirt)
if(has_gravity(src))
if(istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if(M.lying) return
dirt++
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
if (dirt >= 30)
if (!dirtoverlay)
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
dirtoverlay.alpha = 15
else if (dirt > 30)
dirtoverlay.alpha = min(dirtoverlay.alpha+20, 255)
@@ -41,6 +41,7 @@
icon_state = "grass1"
floor_tile = /obj/item/stack/tile/grass
broken_states = list("sand1", "sand2", "sand3")
ignoredirt = 1
/turf/simulated/floor/fancy/grass/New()
..()
@@ -68,6 +68,7 @@
/turf/simulated/floor/beach
name = "Beach"
icon = 'icons/misc/beach.dmi'
ignoredirt = 1
/turf/simulated/floor/beach/ex_act(severity, target)
contents_explosion(severity, target)
@@ -89,11 +90,13 @@
..()
name = "Iron Sand"
icon_state = "ironsand[rand(1,15)]"
ignoredirt = 1
/turf/simulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
ignoredirt = 1
/turf/simulated/floor/plating/snow/ex_act(severity, target)
contents_explosion(severity, target)
+1
View File
@@ -475,6 +475,7 @@
icon_state = "asteroid"
icon_plating = "asteroid"
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
ignoredirt = 1
/turf/simulated/floor/plating/asteroid/airless
oxygen = 0.01
+23 -23
View File
@@ -664,30 +664,30 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
user << "<span class='warning'> The potion only works on slimes!</span>"
return ..()
if(M.stat)
user << "<span class='warning'> The slime is dead!</span>"
return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
qdel(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
/obj/item/weapon/slimepotion2/attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
user << "<span class='warning'> The potion only works on slimes!</span>"
return ..()
if(M.stat)
user << "<span class='warning'> The slime is dead!</span>"
return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/slime/adult/pet = new /mob/living/simple_animal/slime/adult(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
qdel(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
/obj/item/weapon/slimesteroid
@@ -852,6 +852,9 @@
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(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
@@ -15,34 +15,21 @@
ventcrawler = 2
var/colour = "grey"
/mob/living/simple_animal/adultslime
name = "pet slime"
desc = "A lovable, domesticated slime."
icon = 'icons/mob/slimes.dmi'
/mob/living/simple_animal/slime/adult
health = 200
maxHealth = 200
icon_state = "grey adult slime"
icon_living = "grey adult slime"
icon_dead = "grey baby slime dead"
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
emote_see = list("jiggles", "bounces in place")
var/colour = "grey"
/mob/living/simple_animal/adultslime/New()
/mob/living/simple_animal/slime/adult/New()
..()
overlays += "aslime-:33"
/mob/living/simple_animal/slime/adult/Die()
var/mob/living/simple_animal/slime/S1 = new /mob/living/simple_animal/slime (src.loc)
S1.icon_state = "[src.colour] baby slime"
S1.icon_living = "[src.colour] baby slime"
S1.icon_dead = "[src.colour] baby slime dead"
S1.colour = "[src.colour]"
var/mob/living/simple_animal/slime/S2 = new /mob/living/simple_animal/slime (src.loc)
S2.icon_state = "[src.colour] baby slime"
S2.icon_living = "[src.colour] baby slime"
S2.icon_dead = "[src.colour] baby slime dead"
S2.colour = "[src.colour]"
for(var/i = 0, i<=1, i++)
var/mob/living/simple_animal/slime/S1 = new /mob/living/simple_animal/slime (src.loc)
S1.icon_state = "[colour] baby slime"
S1.icon_living = "[colour] baby slime"
S1.icon_dead = "[colour] baby slime dead"
S1.colour = "[colour]"
qdel(src)
+14 -26
View File
@@ -19,15 +19,17 @@
canmove = 0
stunned = 1
icon = null
overlays.Cut()
invisibility = 101
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( loc )
O.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
var/atom/movable/overlay/animation = new( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(22)
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( loc )
qdel(animation)
// hash the original name?
if (tr_flags & TR_HASHNAME)
@@ -82,14 +84,8 @@
updateappearance(O)
. = O
if ( !(tr_flags & TR_KEEPSRC) ) //flag should be used if monkeyize() is called inside another proc of src so that one does not crash
var/mob/deleted = src
src = O
qdel(deleted)
qdel(src)
spawn(22)
//animation = null
O.invisibility = 0
qdel(animation)
////////////////////////// Humanize //////////////////////////////
//Could probably be merged with monkeyize but other transformations got their own procs, too
@@ -125,14 +121,18 @@
canmove = 0
stunned = 1
icon = null
overlays.Cut()
invisibility = 101
var/mob/living/carbon/human/O = new( loc )
O.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
var/atom/movable/overlay/animation = new( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(22)
var/mob/living/carbon/human/O = new( loc )
for(var/obj/item/C in O.loc)
O.equip_to_appropriate_slot(C)
qdel(animation)
O.gender = (deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
O.dna = dna
@@ -188,9 +188,6 @@
if (tr_flags & TR_DEFAULTMSG)
O << "<B>You are now a human.</B>"
for(var/obj/item/C in O.loc)
O.equip_to_appropriate_slot(C)
updateappearance(O)
. = O
@@ -199,17 +196,8 @@
loc.vars[A] = O
if ( !(tr_flags & TR_KEEPSRC) ) //don't delete src yet if it's needed to finish calling proc
var/mob/deleted = src
src = O
qdel(deleted)
qdel(src)
spawn(22)
O.invisibility = 0
for(var/obj/item/C in O.loc)
O.equip_to_appropriate_slot(C)
qdel(animation)
return
/mob/new_player/AIize()
spawning = 1
@@ -650,6 +650,10 @@ datum/reagent/space_cleaner/reaction_turf(var/turf/T, var/volume)
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
if(istype(T, /turf/simulated/floor))
var/turf/simulated/floor/F = T
if(volume >= 1)
F.dirt = 0
datum/reagent/space_cleaner/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
@@ -689,6 +693,7 @@ datum/reagent/cryptobiolin/on_mob_life(var/mob/living/M as mob)
if(!M.confused)
M.confused = 1
M.confused = max(M.confused, 20)
..()
return
datum/reagent/impedrezene
@@ -854,4 +859,4 @@ datum/reagent/plantnutriment/robustharvestnutriment
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM
#undef REM
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB