Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-02-23

# Conflicts:
#	code/game/jobs/job_controller.dm
#	code/game/machinery/oxygen_pump.dm
#	code/game/objects/items/weapons/storage/firstaid.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/modules/mob/new_player/new_player.dm
#	code/modules/organs/internal/eyes.dm
#	html/changelogs/.all_changelog.yml
#	maps/southern_cross/southern_cross-1.dmm
#	vorestation.dme
This commit is contained in:
Leshana
2018-02-23 20:32:44 -05:00
138 changed files with 2790 additions and 1112 deletions
@@ -5,92 +5,89 @@
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1)
var/banglet = 0
prime()
..()
for(var/obj/structure/closet/L in hear(7, get_turf(src)))
if(locate(/mob/living/carbon/, L))
for(var/mob/living/carbon/M in L)
bang(get_turf(src), M)
/obj/item/weapon/grenade/flashbang/prime()
..()
for(var/obj/structure/closet/L in hear(7, get_turf(src)))
if(locate(/mob/living/carbon/, L))
for(var/mob/living/carbon/M in L)
bang(get_turf(src), M)
for(var/mob/living/carbon/M in hear(7, get_turf(src)))
bang(get_turf(src), M)
for(var/mob/living/carbon/M in hear(7, get_turf(src)))
bang(get_turf(src), M)
for(var/obj/structure/blob/B in hear(8,get_turf(src))) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
if(B.overmind)
damage *= B.overmind.blob_type.burn_multiplier
B.adjust_integrity(-damage)
for(var/obj/structure/blob/B in hear(8,get_turf(src))) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
if(B.overmind)
damage *= B.overmind.blob_type.burn_multiplier
B.adjust_integrity(-damage)
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
qdel(src)
return
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
qdel(src)
return
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
M << "<span class='danger'>BANG</span>" // Called during the loop that bangs people in lockers/containers and when banging
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
to_chat(M, "<span class='danger'>BANG</span>") // Called during the loop that bangs people in lockers/containers and when banging
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
// -- Polymorph
//Checking for protections
var/eye_safety = 0
var/ear_safety = 0
if(iscarbon(M))
eye_safety = M.eyecheck()
ear_safety = M.get_ear_protection()
//Checking for protections
var/eye_safety = 0
var/ear_safety = 0
if(iscarbon(M))
eye_safety = M.eyecheck()
ear_safety = M.get_ear_protection()
//Flashing everyone
if(eye_safety < 1)
M.flash_eyes()
M.Stun(2)
M.Weaken(10)
//Flashing everyone
if(eye_safety < 1)
M.flash_eyes()
M.Confuse(2)
M.Weaken(5)
//Now applying sound
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
if(ear_safety > 0)
M.Stun(2)
M.Weaken(1)
else
M.Stun(10)
M.Weaken(3)
if ((prob(14) || (M == src.loc && prob(70))))
M.ear_damage += rand(1, 10)
else
M.ear_damage += rand(0, 5)
M.ear_deaf = max(M.ear_deaf,15)
else if(get_dist(M, T) <= 5)
if(!ear_safety)
M.Stun(8)
M.ear_damage += rand(0, 3)
M.ear_deaf = max(M.ear_deaf,10)
else if(!ear_safety)
M.Stun(4)
M.ear_damage += rand(0, 1)
M.ear_deaf = max(M.ear_deaf,5)
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if (E && E.damage >= E.min_bruised_damage)
M << "<span class='danger'>Your eyes start to burn badly!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (E.damage >= E.min_broken_damage)
M << "<span class='danger'>You can't see anything!</span>"
if (M.ear_damage >= 15)
M << "<span class='danger'>Your ears start to ring badly!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.ear_damage - 10 + 5))
M << "<span class='danger'>You can't hear anything!</span>"
M.sdisabilities |= DEAF
//Now applying sound
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
if(ear_safety > 0)
M.Confuse(2)
M.Weaken(1)
else
if (M.ear_damage >= 5)
M << "<span class='danger'>Your ears start to ring!</span>"
M.update_icons() //Forces matrix transform to proc if they are now laying, I guess?
M.Confuse(10)
M.Weaken(3)
if ((prob(14) || (M == src.loc && prob(70))))
M.ear_damage += rand(1, 10)
else
M.ear_damage += rand(0, 5)
M.ear_deaf = max(M.ear_deaf,15)
else if(get_dist(M, T) <= 5)
if(!ear_safety)
M.Confuse(8)
M.ear_damage += rand(0, 3)
M.ear_deaf = max(M.ear_deaf,10)
else if(!ear_safety)
M.Confuse(4)
M.ear_damage += rand(0, 1)
M.ear_deaf = max(M.ear_deaf,5)
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if (E && E.damage >= E.min_bruised_damage)
M << "<span class='danger'>Your eyes start to burn badly!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (E.damage >= E.min_broken_damage)
M << "<span class='danger'>You can't see anything!</span>"
if (M.ear_damage >= 15)
to_chat(M, "<span class='danger'>Your ears start to ring badly!</span>")
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.ear_damage - 10 + 5))
to_chat(M, "<span class='danger'>You can't hear anything!</span>")
M.sdisabilities |= DEAF
else if(M.ear_damage >= 5)
to_chat(M, "<span class='danger'>Your ears start to ring!</span>")
M.update_icons() //Forces matrix transform to proc if they are now laying, I guess?
/obj/item/weapon/grenade/flashbang/Destroy()
walk(src, 0) // Because we might have called walk_away, we must stop the walk loop or BYOND keeps an internal reference to us forever.
@@ -14,3 +14,34 @@
var/datum/gender/T = gender_datums[user.get_visible_gender()]
user.visible_message(span("danger", "\The [user] [T.is] strangling [T.himself] with \the [src]! It looks like [T.he] [T.is] trying to commit suicide."), span("danger", "You start to strangle yourself with \the [src]!"), span("danger", "You hear the sound of someone choking!"))
return (OXYLOSS)
/obj/item/weapon/melee/umbrella
name = "umbrella"
desc = "To keep the rain off you. Use with caution on windy days."
icon = 'icons/obj/items.dmi'
icon_state = "umbrella_closed"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 5
w_class = ITEMSIZE_NORMAL
var/open = FALSE
/obj/item/weapon/melee/umbrella/New()
..()
color = "#"+get_random_colour()
update_icon()
/obj/item/weapon/melee/umbrella/attack_self()
src.toggle_umbrella()
/obj/item/weapon/melee/umbrella/proc/toggle_umbrella()
open = !open
icon_state = "umbrella_[open ? "open" : "closed"]"
item_state = icon_state
update_icon()
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
H.update_inv_l_hand(0)
H.update_inv_r_hand()
..()
@@ -68,6 +68,9 @@
// -----------------------------
// Mining Satchel
// -----------------------------
/*
* Mechoid - Orebags are the most common quick-gathering thing, and also have tons of lag associated with it. Their checks are going to be hyper-simplified due to this, and their INCREDIBLY singular target contents.
*/
/obj/item/weapon/storage/bag/ore
name = "mining satchel"
@@ -79,7 +82,80 @@
max_storage_space = ITEMSIZE_COST_NORMAL * 25
max_w_class = ITEMSIZE_NORMAL
can_hold = list(/obj/item/weapon/ore)
var/stored_ore = list()
var/last_update = 0
/obj/item/weapon/storage/bag/ore/remove_from_storage(obj/item/W as obj, atom/new_location)
if(!istype(W)) return 0
if(new_location)
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
W.hud_layerise()
else
W.reset_plane_and_layer()
W.forceMove(new_location)
else
W.forceMove(get_turf(src))
W.on_exit_storage(src)
update_icon()
return 1
/obj/item/weapon/storage/bag/ore/gather_all(turf/T as turf, mob/user as mob, var/silent = 0)
var/success = 0
var/failure = 0
for(var/obj/item/weapon/ore/I in T) //Only ever grabs ores. Doesn't do any extraneous checks, as all ore is the same size. Tons of checks means it causes hanging for up to three seconds.
if(contents.len >= max_storage_space)
failure = 1
break
I.forceMove(src)
success = 1
if(success && !failure && !silent)
to_chat(user, "<span class='notice'>You put everything in [src].</span>")
else if(success && (!silent || (silent && contents.len >= max_storage_space)))
to_chat(user, "<span class='notice'>You fill the [src].</span>")
else if(!silent)
to_chat(user, "<span class='notice'>You fail to pick anything up with \the [src].</span>")
/obj/item/weapon/storage/bag/ore/examine(mob/user)
..()
if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them.
return
if(istype(user, /mob/living))
add_fingerprint(user)
if(!contents.len)
to_chat(user, "It is empty.")
return
if(world.time > last_update + 10)
update_ore_count()
last_update = world.time
to_chat(user, "<span class='notice'>It holds:</span>")
for(var/ore in stored_ore)
to_chat(user, "<span class='notice'>- [stored_ore[ore]] [ore]</span>")
return
/obj/item/weapon/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it.
if(world.time > last_update + 10)
update_ore_count()
last_update = world.time
examine(user)
/obj/item/weapon/storage/bag/ore/proc/update_ore_count() //Stolen from ore boxes.
stored_ore = list()
for(var/obj/item/weapon/ore/O in contents)
if(stored_ore[O.name])
stored_ore[O.name]++
else
stored_ore[O.name] = 1
// -----------------------------
// Plant bag
@@ -132,7 +132,7 @@
/obj/item/weapon/surgical/FixOVein,
/obj/item/stack/medical/advanced/bruise_pack,
/obj/item/stack/nanopaste
///obj/item/device/healthanalyzer/enhanced //VOREStation Removal
// /obj/item/device/healthanalyzer/advanced //VOREStation Removal
)
starts_with = list(
@@ -145,8 +145,8 @@
/obj/item/weapon/surgical/surgicaldrill,
/obj/item/weapon/surgical/bonegel,
/obj/item/weapon/surgical/FixOVein,
/obj/item/stack/medical/advanced/bruise_pack
///obj/item/device/healthanalyzer/enhanced //VOREStation Removal
/obj/item/stack/medical/advanced/bruise_pack,
///obj/item/device/healthanalyzer/advanced //VOREStation Removal
)
/obj/item/weapon/storage/firstaid/clotting
+13 -4
View File
@@ -13,20 +13,29 @@
desc = "A small wrapped package."
w_class = ITEMSIZE_NORMAL
var/power = 1 /*Size of the explosion.*/
var/devastate = 0
var/heavy_impact = 1
var/light_impact = 2
var/flash_range = 5
var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/
/obj/item/weapon/syndie/c4explosive/heavy
icon_state = "c-4large_0"
item_state = "radio"
desc = "A mysterious package, it's quite heavy."
power = 2
devastate = 1
heavy_impact = 2
light_impact = 5
flash_range = 7
size = "large"
/obj/item/weapon/syndie/c4explosive/heavy/super_heavy
name = "large-sized package"
desc = "A mysterious package, it's quite exceptionally heavy."
power = 3
devastate = 2
heavy_impact = 5
light_impact = 7
flash_range = 7
/obj/item/weapon/syndie/c4explosive/New()
var/K = rand(1,2000)
@@ -43,7 +52,7 @@
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] <span class = 'warning'> The [src.name] beeps! </span>")
sleep(50)
explosion(get_turf(src), power, power*2, power*3, power*4, power*5)
explosion(get_turf(src), devastate, heavy_impact, light_impact, flash_range)
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
var/turf/simulated/wall/T = get_step(src,dirn)
if(locate(/obj/machinery/door/airlock) in T)