Merge branch 'Baystation12/dev' into ofChemistryAndStuff

Conflicts:
	code/modules/mob/living/carbon/monkey/life.dm
	code/modules/mob/living/carbon/monkey/monkey.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/glass.dm
This commit is contained in:
Kelenius
2015-03-28 19:14:59 +03:00
260 changed files with 2116 additions and 2965 deletions
@@ -30,7 +30,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 2
if(usr.stunned)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
@@ -135,7 +135,7 @@
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
+7 -6
View File
@@ -68,12 +68,12 @@
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.damage
var/passthrough = 0
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
switch(Proj.damage_type)
if(BRUTE)
//bullets
//bullets
if(Proj.original == src || prob(20))
Proj.damage *= between(0, Proj.damage/60, 0.5)
if(prob(max((damage-10)/25, 0))*100)
@@ -86,11 +86,11 @@
if(!(Proj.original == src || prob(20)))
Proj.damage *= 0.5
passthrough = 1
if(passthrough)
. = -1
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
@@ -139,7 +139,7 @@
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/wtype = ST.created_window
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
@@ -197,7 +197,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
return 1
if(user.stunned)
return 1
else
return 0
return 0
+47 -65
View File
@@ -4,75 +4,57 @@
name = "a meat spike"
icon = 'icons/obj/kitchen.dmi'
icon_state = "spike"
desc = "A spike for collecting meat from animals"
desc = "A spike for collecting meat from animals."
density = 1
anchored = 1
var/meat = 0
var/occupied = 0
var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno
var/occupied
var/meat_type
var/victim_name = "corpse"
/obj/structure/kitchenspike
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(!istype(G, /obj/item/weapon/grab))
return
if(istype(G.affecting, /mob/living/carbon/monkey))
if(src.occupied == 0)
src.icon_state = "spikebloody"
src.occupied = 1
src.meat = 5
src.meattype = 1
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
else if(istype(G.affecting, /mob/living/carbon/alien))
if(src.occupied == 0)
src.icon_state = "spikebloodygreen"
src.occupied = 1
src.meat = 5
src.meattype = 2
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
return
if(occupied)
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
else
if(spike(G.affecting))
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
del(G.affecting)
del(G)
else
user << "\red They are too big for the spike, try something smaller!"
return
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
// MouseDrop_T(var/atom/movable/C, mob/user)
// if(istype(C, /obj/mob/carbon/monkey)
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime))
// else if(istype(C, /obj/livestock/spesscarp
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
attack_hand(mob/user as mob)
if(..())
return
if(src.occupied)
if(src.meattype == 1)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
usr << "You remove some meat from the monkey."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
usr << "You remove the last piece of meat from the monkey!"
src.icon_state = "spike"
src.occupied = 0
else if(src.meattype == 2)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
usr << "You remove some meat from the alien."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
usr << "You remove the last piece of meat from the alien!"
src.icon_state = "spike"
src.occupied = 0
if(!istype(victim))
return
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
if(!H.species.is_small)
return 0
meat_type = H.species.meat_type
icon_state = "spikebloody"
else if(istype(victim, /mob/living/carbon/alien))
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
icon_state = "spikebloodygreen"
else
return 0
victim_name = victim.name
occupied = 1
meat = 5
return 1
/obj/structure/kitchenspike/attack_hand(mob/user as mob)
if(..() || !occupied)
return
meat--
new meat_type(get_turf(src))
if(src.meat > 1)
user << "You remove some meat from \the [victim_name]."
else if(src.meat == 1)
user << "You remove the last piece of meat from \the [victim_name]!"
icon_state = "spike"
occupied = 0
+2 -2
View File
@@ -92,7 +92,7 @@
return
if ((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Morgue- '[]'", t)
else
@@ -258,7 +258,7 @@
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Crematorium- '[]'", t)
else