Conflicts:
	code/modules/power/cable.dm
	icons/obj/power_cond_red.dmi
This commit is contained in:
Chinsky
2014-01-27 02:27:27 +04:00
74 changed files with 1962 additions and 804 deletions
+28 -17
View File
@@ -6,21 +6,9 @@
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
//var/y1=((Center.y-Dist)<1 ? 1 : Center.y-Dist)
//var/x2=((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist)
//var/y2=((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist)
var/turf/x1y1 = locate(((Center.x-Dist)<1 ? 1 : Center.x-Dist),((Center.y-Dist)<1 ? 1 : Center.y-Dist),Center.z)
var/turf/x2y2 = locate(((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist),((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist),Center.z)
return block(x1y1,x2y2)
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
///// Z-Level Stuff
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = 1)
///// Z-Level Stuff
src = null //so we don't abort once src is deleted
spawn(0)
if(config.use_recursive_explosions)
@@ -28,6 +16,12 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
explosion_rec(epicenter, power)
return
///// Z-Level Stuff
if(z_transfer && (devastation_range > 0 || heavy_impact_range > 0))
//transfer the explosion in both directions
explosion_z_transfer(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
///// Z-Level Stuff
var/start = world.timeofday
epicenter = get_turf(epicenter)
if(!epicenter) return
@@ -61,7 +55,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y
var/z0 = epicenter.z
for(var/turf/T in trange(max(devastation_range, heavy_impact_range, light_impact_range), epicenter))
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range) dist = 1
@@ -98,4 +92,21 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
tile.ex_act(2)
tile.ex_act(2)
///// Z-Level Stuff
proc/explosion_z_transfer(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, up = 1, down = 1)
var/turf/controllerlocation = locate(1, 1, epicenter.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 1)
if(controller.up)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 1, 0)
///// Z-Level Stuff
+6 -6
View File
@@ -312,22 +312,22 @@
if(slot_l_ear)
if(H.l_ear)
return 0
if( w_class < 2 )
return 1
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_r_ear)
if(H.r_ear)
return 0
if( w_class < 2 )
return 1
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_w_uniform)
if(H.w_uniform)
@@ -488,7 +488,7 @@
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "\red You're going to need to remove the eye covering first."
return
var/mob/living/carbon/monkey/Mo = M
@@ -496,7 +496,7 @@
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "\red You're going to need to remove the eye covering first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N slimes also don't have eyes!
+1 -1
View File
@@ -27,7 +27,7 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
light("\red [user] casually lights the [name] with [W].")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
+2 -2
View File
@@ -90,8 +90,8 @@
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
if(M == user)
user << "You take a bite of the crayon. Delicious!"
user.nutrition += 5
user << "You take a bite of the crayon and swallow it."
// user.nutrition += 5
if(uses)
uses -= 5
if(uses <= 0)
+6 -10
View File
@@ -27,6 +27,12 @@ A list of items and costs is stored under the datum of every game mode, alongsid
ItemList = text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
nanoui_items = generate_nanoui_items()
for(var/D in ItemList)
var/list/O = text2list(D, ":")
if(O.len>0)
valid_items += O[1]
/*
Built the Items List for use with NanoUI
@@ -56,16 +62,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
return items_nano
//Halfassed fix for href exploit ~Z
for(var/D in ItemList)
var/list/O = text2list(D, ":")
if(O.len>0)
valid_items += O[1]
//Let's build a menu!
/obj/item/device/uplink/proc/generate_menu()
+2 -2
View File
@@ -72,11 +72,11 @@
syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a syndicate scum."
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
alien
icon_state = "target_q"
desc = "A shooting target that looks like a xenomorphic alien."
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
+2 -2
View File
@@ -294,7 +294,7 @@
/obj/item/toy/ammo/crossbow
name = "foam dart"
desc = "Its nerf or nothing! Ages 8 and up."
desc = "It's nerf or nothing! Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
flags = FPRINT | TABLEPASS
@@ -365,7 +365,7 @@
/obj/item/toy/crayon
name = "crayon"
desc = "A colourful crayon. Looks tasty. Mmmm..."
desc = "A colourful crayon. Please refrain from eating it or putting it in your nose."
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonred"
w_class = 1.0
@@ -82,17 +82,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
light("<span class='notice'>[user] casually lights the [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.</span>")
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
@@ -309,7 +309,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters."
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
@@ -360,7 +360,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
else
if(prob(75))
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
@@ -374,7 +374,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
@@ -395,7 +395,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
cig.attackby(src, user)
else
if(istype(src, /obj/item/weapon/lighter/zippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.</span>")
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M].</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
+1 -1
View File
@@ -71,7 +71,7 @@
/obj/item/weapon/book/manual/supermatter_engine
name = "Supermatter Engine User's Guide"
icon_state = "bookParticleAccelerator" //TEMP FIXME
icon_state = "bookSupermatter"
author = "Waleed Asad"
title = "Supermatter Engine User's Guide"
+4 -2
View File
@@ -10,7 +10,9 @@
/obj/structure/lattice/New()
..()
if(!(istype(src.loc, /turf/space)))
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/floor/open)))
///// Z-Level Stuff
del(src)
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
@@ -80,4 +82,4 @@
dir_sum += direction
icon_state = "lattice[dir_sum]"
return
return
+3 -3
View File
@@ -153,7 +153,7 @@
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin to adjust the temperature valve with the [I].</span>"
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
if(do_after(user, 50))
switch(watertemp)
if("normal")
@@ -162,7 +162,7 @@
watertemp = "boiling"
if("boiling")
watertemp = "normal"
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
@@ -354,7 +354,7 @@
if (istype(O, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RG = O
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("\blue [user] fills the [RG] using \the [src].","\blue You fill the [RG] using \the [src].")
user.visible_message("\blue [user] fills \the [RG] using \the [src].","\blue You fill \the [RG] using \the [src].")
return
else if (istype(O, /obj/item/weapon/melee/baton))