Merge remote-tracking branch 'upstream/master' into mining-tweaks

This commit is contained in:
Fox-McCloud
2016-07-15 23:16:00 -04:00
219 changed files with 5827 additions and 1435 deletions
+6 -4
View File
@@ -31,11 +31,13 @@
var/resintype = null
smooth = SMOOTH_TRUE
/obj/structure/alien/resin/New(location)
..()
/obj/structure/alien/resin/initialize()
air_update_turf(1)
return
..()
/obj/structure/alien/resin/Destroy()
air_update_turf(1)
return ..()
/obj/structure/alien/resin/Move()
var/turf/T = loc
+1 -1
View File
@@ -1075,7 +1075,7 @@ steam.start() -- spawns the effect
desc = "A lightweight foamed metal wall."
var/metal = MFOAM_ALUMINUM
/obj/structure/foamedmetal/New()
/obj/structure/foamedmetal/initialize()
..()
air_update_turf(1)
+7 -6
View File
@@ -8,7 +8,7 @@
/obj/effect/landmark/New()
..()
tag = text("landmark*[]", name)
set_tag()
invisibility = 101
switch(name) //some of these are probably obsolete
@@ -105,18 +105,19 @@
..()
return QDEL_HINT_HARDDEL_NOW
/obj/effect/landmark/proc/set_tag()
tag = text("landmark*[]", name)
/obj/effect/landmark/start
name = "start"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
anchored = 1.0
/obj/effect/landmark/start/New()
..()
/obj/effect/landmark/start/set_tag()
tag = "start*[name]"
invisibility = 101
return 1
//Costume spawner landmarks
@@ -260,4 +261,4 @@
/obj/effect/landmark/costume/sexymime/New()
new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc)
qdel(src)
qdel(src)
@@ -151,6 +151,15 @@
"" = 90
)
/obj/effect/spawner/lootdrop/crate_spawner // for ruins
name = "lootcrate spawner"
lootdoubles = 0
loot = list(
/obj/structure/closet/crate/secure/loot = 20,
"" = 80,
)
/obj/effect/spawner/lootdrop/trade_sol_rare
name = "trader rare item spawner"
lootdoubles = 0
@@ -5,10 +5,15 @@
var/useFull = 0
var/useGrille = 1
var/windowtospawn = /obj/structure/window/basic
anchored = 1 // No sliding out while you prime
/obj/effect/spawner/window/New()
/obj/effect/spawner/window/initialize()
spawn(0)
for(var/obj/structure/grille/G in get_turf(src)) qdel(G) //just in case mappers don't know what they are doing
var/turf/T = get_turf(src)
for(var/obj/structure/grille/G in get_turf(src))
// Complain noisily
log_debug("Extra grille on turf: ([T.x],[T.y],[T.z])")
qdel(G) //just in case mappers don't know what they are doing
if(!useFull)
for(var/cdir in cardinal)
@@ -30,7 +35,8 @@
spawn(10)
qdel(src)
/obj/effect/spawner/window/reinforced
name = "reinforced window spawner"
icon_state = "rwindow_spawner"
windowtospawn = /obj/structure/window/reinforced
windowtospawn = /obj/structure/window/reinforced
+44 -42
View File
@@ -8,84 +8,86 @@
desc = "This is rubbish."
/obj/item/trash/raisins
name = "4no raisins"
icon_state= "4no_raisins"
name = "4no raisins"
icon_state= "4no_raisins"
/obj/item/trash/candy
name = "Candy"
icon_state= "candy"
name = "Candy"
icon_state= "candy"
/obj/item/trash/cheesie
name = "Cheesie honkers"
icon_state = "cheesie_honkers"
name = "Cheesie honkers"
icon_state = "cheesie_honkers"
/obj/item/trash/chips
name = "Chips"
icon_state = "chips"
name = "Chips"
icon_state = "chips"
/obj/item/trash/popcorn
name = "Popcorn"
icon_state = "popcorn"
name = "Popcorn"
icon_state = "popcorn"
/obj/item/trash/sosjerky
name = "Scaredy's Private Reserve Beef Jerky"
icon_state = "sosjerky"
name = "Scaredy's Private Reserve Beef Jerky"
icon_state = "sosjerky"
/obj/item/trash/syndi_cakes
name = "Syndi cakes"
icon_state = "syndi_cakes"
name = "Syndi cakes"
icon_state = "syndi_cakes"
/obj/item/trash/waffles
name = "Waffles"
icon_state = "waffles"
name = "Waffles"
icon_state = "waffles"
/obj/item/trash/plate
name = "Plate"
icon_state = "plate"
name = "Plate"
icon_state = "plate"
/obj/item/trash/snack_bowl
name = "Snack bowl"
icon_state = "snack_bowl"
name = "Snack bowl"
icon_state = "snack_bowl"
/obj/item/trash/pistachios
name = "Pistachios pack"
icon_state = "pistachios_pack"
name = "Pistachios pack"
icon_state = "pistachios_pack"
/obj/item/trash/semki
name = "Semki pack"
icon_state = "semki_pack"
name = "Semki pack"
icon_state = "semki_pack"
/obj/item/trash/tray
name = "Tray"
icon_state = "tray"
name = "Tray"
icon_state = "tray"
/obj/item/trash/candle
name = "candle"
icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
name = "candle"
icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
/obj/item/trash/liquidfood
name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood"
name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood"
/obj/item/trash/can
name = "crushed can"
icon_state = "cola"
name = "crushed can"
icon_state = "cola"
var/is_glass = 0
var/is_plastic = 0
/obj/item/trash/gum
name = "chewed gum"
desc = "NOT free candy."
icon_state = "gum"
name = "chewed gum"
desc = "NOT free candy."
icon_state = "gum"
/obj/item/trash/tastybread
name = "bread tube"
icon_state = "tastybread"
name = "bread tube"
icon_state = "tastybread"
/obj/item/trash/tapetrash
name = "old duct tape"
icon_state = "tape"
desc = "Not sticky anymore."
throw_range = 1
name = "old duct tape"
icon_state = "tape"
desc = "Not sticky anymore."
throw_range = 1
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return
@@ -20,10 +20,19 @@
if(!user.IsAdvancedToolUser())
return
if(!istype(C))
return
if(CLUMSY in user.mutations && prob(50))
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
apply_cuffs(user,user)
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(!(H.get_organ("l_hand") || H.get_organ("r_hand")))
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
return
if(!C.handcuffed)
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
"<span class='userdanger'>[user] is trying to put [src.name] on [C]!</span>")
@@ -117,6 +126,11 @@
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
if(isrobot(user))
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(!(H.get_organ("l_hand") || H.get_organ("r_hand")))
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
return
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
@@ -192,7 +192,6 @@
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
desc = "There are [contents.len] cig\s left!"
return
/obj/item/weapon/storage/fancy/cigarettes/proc/lace_cigarette(var/obj/item/clothing/mask/cigarette/C as obj)
@@ -386,4 +385,4 @@
new /obj/item/weapon/egg_scoop(src)
new /obj/item/weapon/fish_net(src)
new /obj/item/weapon/tank_brush(src)
new /obj/item/weapon/fishfood(src)
new /obj/item/weapon/fishfood(src)
@@ -13,10 +13,8 @@
..()
new /obj/item/clothing/under/rank/chaplain(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/suit/nun(src)
new /obj/item/clothing/head/nun_hood(src)
new /obj/item/clothing/suit/chaplain_hoodie(src)
new /obj/item/clothing/head/chaplain_hood(src)
new /obj/item/clothing/suit/hooded/nun(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/clothing/under/wedding/bride_white(src)
new /obj/item/weapon/storage/backpack/cultpack (src)
@@ -28,4 +26,4 @@
new /obj/item/clothing/gloves/ring/silver(src)
new /obj/item/clothing/gloves/ring/silver(src)
new /obj/item/clothing/gloves/ring/gold(src)
new /obj/item/clothing/gloves/ring/gold(src)
new /obj/item/clothing/gloves/ring/gold(src)
@@ -15,6 +15,7 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/weapon/storage/backpack/duffel/engineering(src)
new /obj/item/clothing/head/beret/ce(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/storage/box/permits(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
@@ -141,4 +142,4 @@
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
new /obj/item/weapon/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
+1 -1
View File
@@ -25,7 +25,7 @@
var/health = 50.0
/obj/structure/inflatable/New(location)
/obj/structure/inflatable/initialize(location)
..()
air_update_turf(1)
+133 -130
View File
@@ -16,152 +16,155 @@
var/hardness = 1
var/oreAmount = 7
New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
air_update_turf(1)
/obj/structure/mineral_door/New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
Destroy()
density = 0
air_update_turf(1)
return ..()
/obj/structure/mineral_door/initialize()
..()
air_update_turf(1)
Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/mineral_door/Destroy()
density = 0
air_update_turf(1)
return ..()
Bumped(atom/user)
..()
if(!state)
return TryToSwitchState(user)
return
/obj/structure/mineral_door/Move()
var/turf/T = loc
..()
move_update_air(T)
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
else if(isrobot(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
attack_hand(mob/user as mob)
/obj/structure/mineral_door/Bumped(atom/user)
..()
if(!state)
return TryToSwitchState(user)
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
/obj/structure/mineral_door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
else if(isrobot(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
CanAtmosPass()
return !density
/obj/structure/mineral_door/attack_hand(mob/user as mob)
return TryToSwitchState(user)
proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
SwitchState()
else
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
/obj/structure/mineral_door/CanAtmosPass()
return !density
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
else
SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
proc/SwitchState()
if(state)
Close()
else
Open()
proc/Open()
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
update_icon()
isSwitchingStates = 0
air_update_turf(1)
proc/Close()
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
opacity = 1
state = 0
update_icon()
isSwitchingStates = 0
air_update_turf(1)
/obj/structure/mineral_door/proc/SwitchState()
if(state)
Close()
else
Open()
/obj/structure/mineral_door/proc/Open()
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
update_icon()
if(state)
icon_state = "[mineralType]open"
else
icon_state = mineralType
isSwitchingStates = 0
air_update_turf(1)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
to_chat(user, "You start digging the [name].")
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
to_chat(user, "You finished digging.")
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
to_chat(user, "You hit the [name] with your [W.name]!")
CheckHardness()
else
attack_hand(user)
return
/obj/structure/mineral_door/proc/Close()
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
opacity = 1
state = 0
update_icon()
isSwitchingStates = 0
air_update_turf(1)
proc/CheckHardness()
if(hardness <= 0)
/obj/structure/mineral_door/update_icon()
if(state)
icon_state = "[mineralType]open"
else
icon_state = mineralType
/obj/structure/mineral_door/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
to_chat(user, "You start digging the [name].")
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
to_chat(user, "You finished digging.")
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
to_chat(user, "You hit the [name] with your [W.name]!")
CheckHardness()
else
attack_hand(user)
return
/obj/structure/mineral_door/proc/CheckHardness()
if(hardness <= 0)
Dismantle(1)
/obj/structure/mineral_door/proc/Dismantle(devastated = 0)
if(!devastated)
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
qdel(src)
/obj/structure/mineral_door/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(1)
proc/Dismantle(devastated = 0)
if(!devastated)
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
qdel(src)
ex_act(severity = 1)
switch(severity)
if(1)
if(2)
if(prob(20))
Dismantle(1)
if(2)
if(prob(20))
Dismantle(1)
else
hardness--
CheckHardness()
if(3)
hardness -= 0.1
else
hardness--
CheckHardness()
return
if(3)
hardness -= 0.1
CheckHardness()
return
/obj/structure/mineral_door/iron
mineralType = "metal"
@@ -285,4 +288,4 @@
CheckHardness()
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
..()
..()
+13 -4
View File
@@ -338,10 +338,13 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
ini_dir = dir
if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced))
color = color_windows(src)
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/initialize()
air_update_turf(1)
return ..()
/obj/structure/window/Destroy()
density = 0
air_update_turf(1)
@@ -402,10 +405,13 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/plasmabasic/New(Loc,re=0)
..()
ini_dir = dir
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/plasmabasic/initialize()
..()
air_update_turf(1)
/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 32000)
hit(round(exposed_volume / 1000), 0)
@@ -433,10 +439,13 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/plasmareinforced/New(Loc,re=0)
..()
ini_dir = dir
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/plasmareinforced/initialize()
..()
air_update_turf(1)
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
@@ -516,4 +525,4 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
toggle_tint()
/obj/machinery/button/windowtint/update_icon()
icon_state = "light[active]"
icon_state = "light[active]"