Tg port 2 15 (#230)

* defines/helpers

* globalvars, onclick, controllers

* datums and game

* woooooooooorld. Uh. dm

* modules sans mobs client admin

* modules/admin

* pref shit

* modules/mob

* icon updates

* extra things

* Cherrypicked fixes from open PRs

* metastation.tgm fix

* a better meta fix

* reverts async breakings
This commit is contained in:
Poojawa
2017-02-15 03:35:32 -06:00
committed by GitHub
parent fd3923d684
commit fc2dbcd9fe
192 changed files with 10451 additions and 160669 deletions
@@ -87,7 +87,7 @@
/obj/item/clothing/gloves/color/fyellow = 1,
/obj/item/clothing/head/hardhat = 1,
/obj/item/clothing/head/hardhat/red = 1,
/obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 1,
/obj/item/clothing/head/that{throwforce = 1;} = 1,
/obj/item/clothing/head/ushanka = 1,
/obj/item/clothing/head/welding = 1,
/obj/item/clothing/mask/gas = 15,
+2 -2
View File
@@ -104,7 +104,7 @@ var/explosionid = 1
for(var/obj/structure/blob/B in T)
cached_exp_block[T] += B.explosion_block
CHECK_TICK
//flash mobs
if(flash_range)
for(var/mob/living/L in viewers(flash_range, epicenter))
@@ -179,7 +179,7 @@ var/explosionid = 1
var/took = (world.timeofday-start)/10
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
if(Debug2)
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
log_world("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
//Machines which report explosions.
for(var/array in doppler_arrays)
+13 -14
View File
@@ -192,24 +192,23 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
var/mob/living/carbon/human/H = AM
if(PIERCEIMMUNE in H.dna.species.species_traits)
return
if(H.dna.species.id == "slime")
return
if(H.dna.species.id == "jelly")
if(H.dna.species.id == "slime" || "jelly")
return
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O))
return
var/feetCover = (H.wear_suit && H.wear_suit.body_parts_covered & FEET) || (H.w_uniform && H.w_uniform.body_parts_covered & FEET)
if(!H.shoes && !feetCover)
H.apply_damage(5, BRUTE, picked_def_zone)
if(cooldown < world.time - 10) //cooldown to avoid message spam.
if(!H.incapacitated())
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
"<span class='userdanger'>You step in the broken glass!</span>")
else
H.visible_message("<span class='danger'>[H] slides on the broken glass!</span>", \
"<span class='userdanger'>You slide on the broken glass!</span>")
if(H.shoes || feetCover || H.movement_type & FLYING || H.buckled)
return
H.apply_damage(5, BRUTE, picked_def_zone)
if(cooldown < world.time - 10) //cooldown to avoid message spam.
if(!H.incapacitated())
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
"<span class='userdanger'>You step in the broken glass!</span>")
else
H.visible_message("<span class='danger'>[H] slides on the broken glass!</span>", \
"<span class='userdanger'>You slide on the broken glass!</span>")
cooldown = world.time
H.Weaken(3)
cooldown = world.time
H.Weaken(3)
@@ -189,6 +189,8 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
null, \
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1), \
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
null, \
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
)
/obj/item/stack/sheet/cloth
+2 -6
View File
@@ -766,12 +766,8 @@
else if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!remove_item_from_storage(M))
M.temporarilyRemoveItemFromInventory(src, TRUE)
if(!M.put_in_hand(src, H.held_index))
qdel(src)
return
usr << "<span class='notice'>You pick up the deck.</span>"
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
usr << "<span class='notice'>You pick up the deck.</span>"
else
usr << "<span class='warning'>You can't reach it from here!</span>"
+1 -1
View File
@@ -609,4 +609,4 @@ var/global/list/RPD_recipes=list(
#undef METER_MODE
#undef DISPOSALS_MODE
#undef CATEGORY_ATMOS
#undef CATEGORY_DISPOSALS
#undef CATEGORY_DISPOSALS
+2 -6
View File
@@ -93,13 +93,9 @@
/obj/item/weapon/defibrillator/MouseDrop(obj/over_object)
if(ismob(src.loc))
var/mob/M = src.loc
if(istype(over_object, /obj/screen/inventory/hand))
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.temporarilyRemoveItemFromInventory(src))
return
if(!M.put_in_hand(src, H.held_index))
qdel(src) //wewie
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
@@ -220,10 +220,10 @@
possessed = TRUE
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100)
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
var/mob/dead/observer/theghost = null
if(candidates.len)
if(LAZYLEN(candidates))
theghost = pick(candidates)
var/mob/living/simple_animal/shade/S = new(src)
S.real_name = name
@@ -20,6 +20,9 @@
if(requires_sharpness && !I.sharpness)
user << "<span class='notice'>You can only sharpen items that are already sharp, such as knives.</span>"
return
if(istype(I, /obj/item/weapon/melee/energy))
user << "<span class='notice'>You don't think \the [I] will be the thing getting modified if you use it on \the [src].</span>"
return
if(istype(I, /obj/item/weapon/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
var/obj/item/weapon/twohanded/TH = I
if(TH.force_wielded >= max)
@@ -581,6 +581,12 @@
new /obj/item/stack/medical/ointment(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/weapon/storage/box/hug/survival/New()
..()
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/ammo_casing/shotgun/rubbershot
/obj/item/weapon/storage/box/rubbershot
@@ -60,10 +60,10 @@
..()
if(empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
for(var/i in 1 to 3)
for(var/i in 1 to 4)
new /obj/item/weapon/reagent_containers/syringe/charcoal(src)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
for(var/i in 1 to 2)
new /obj/item/weapon/storage/pill_bottle/charcoal(src)
new /obj/item/device/healthanalyzer(src)
return
@@ -138,21 +138,14 @@
var/mob/M = usr
if(!istype(over_object, /obj/screen) || !Adjacent(M))
return ..()
if(!M.restrained() && !M.stat && istype(over_object, /obj/screen/inventory/hand))
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.temporarilyRemoveItemFromInventory(src))
return
if(!M.put_in_hand(src,H.held_index))
qdel(src)
return
src.add_fingerprint(usr)
return
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
add_fingerprint(usr)
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if(usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/box/silver_sulf
name = "box of silver sulfadiazine patches"
@@ -45,7 +45,7 @@
show_to(M)
return
if(!M.restrained() && !M.stat)
if(!M.incapacitated())
if(!istype(over_object, /obj/screen))
return content_can_dump(over_object, M)
@@ -54,14 +54,9 @@
playsound(loc, "rustle", 50, 1, -5)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.temporarilyRemoveItemFromInventory(src))
return
if(!M.put_in_hand(src,H.held_index))
qdel(src)
return
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
add_fingerprint(usr)
@@ -85,10 +85,7 @@
var/mob/M = src.loc
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.temporarilyRemoveItemFromInventory(src))
return
M.put_in_hand(src, H.held_index)
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
if(W == noz)
+2 -2
View File
@@ -297,7 +297,7 @@
return (BRUTELOSS)
/obj/item/weapon/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user),"sound/items/change_jaws.ogg",50,1)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/weapon/crowbar/power/pryjaws = new /obj/item/weapon/crowbar/power
user << "<span class='notice'>You attach the pry jaws to [src].</span>"
qdel(src)
@@ -735,7 +735,7 @@
return (BRUTELOSS)
/obj/item/weapon/crowbar/power/attack_self(mob/user)
playsound(get_turf(user),"sound/items/change_jaws.ogg",50,1)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/weapon/wirecutters/power/cutjaws = new /obj/item/weapon/wirecutters/power
user << "<span class='notice'>You attach the cutting jaws to [src].</span>"
qdel(src)
+2 -2
View File
@@ -496,7 +496,7 @@
/obj/item/weapon/twohanded/required/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("<span class='danger'>Ranged attacks just make [owner] angrier!</span>")
playsound(src, pick("sound/weapons/bulletflyby.ogg","sound/weapons/bulletflyby2.ogg","sound/weapons/bulletflyby3.ogg"), 75, 1)
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
return 1
return 0
@@ -613,7 +613,7 @@
if(prob(final_block_chance))
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
playsound(src, pick("sound/weapons/bulletflyby.ogg","sound/weapons/bulletflyby2.ogg","sound/weapons/bulletflyby3.ogg"), 75, 1)
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
return 1
else
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
@@ -51,8 +51,8 @@
/obj/item/weapon/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
charges = list(20, 2, 0)//of 60 standard, 6 contraband
init_charges = list(20, 2, 0)
charges = list(20, 2, 1)//of 60 standard, 6 contraband, 1 premium
init_charges = list(20, 2, 1)
/obj/item/weapon/vending_refill/cigarette
machine_name = "ShadyCigs Deluxe"
+1 -1
View File
@@ -388,7 +388,7 @@ var/highlander_claymores = 0
throw_speed = 0
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "sound/weapons/chainsawhit.ogg"
hitsound = 'sound/weapons/chainsawhit.ogg'
/obj/item/weapon/mounted_chainsaw/dropped()
..()
+1 -1
View File
@@ -73,7 +73,7 @@
if(alert)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
playsound(src, "sound/effects/alert.ogg", 50, 1)
playsound(src, 'sound/effects/alert.ogg', 50, 1)
/*
@@ -57,7 +57,7 @@
..()
var/area/A = get_area(src)
if(A)
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK)
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
//Timeless prisons: Spawns in Wish Granter prisons in lavaland. Ghosts become age-old users of the Wish Granter and are advised to seek repentance for their past.
/obj/effect/mob_spawn/human/exile
@@ -113,7 +113,7 @@
mob_species = species
var/area/A = get_area(src)
if(A)
notify_ghosts("\A [initial(species.id)] golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK)
notify_ghosts("\A [initial(species.id)] golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
if(has_owner && creator)
flavour_text = "You are a golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. \
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost."
@@ -81,7 +81,7 @@
return
if(user.pulling != L)
return
playsound(src.loc, "sound/effects/splat.ogg", 25, 1)
playsound(src.loc, 'sound/effects/splat.ogg', 25, 1)
L.visible_message("<span class='danger'>[user] slams [L] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
L.loc = src.loc
L.emote("scream")
@@ -0,0 +1,90 @@
/obj/structure/life_candle
name = "life candle"
desc = "You are dead. Insert quarter to continue."
icon = 'icons/obj/candle.dmi'
icon_state = "candle1"
var/icon_state_active = "candle1_lit"
var/icon_state_inactive = "candle1"
anchored = TRUE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/lit_luminosity = 2
var/list/datum/mind/linked_minds = list()
// If the body is destroyed, what do we spawn for them
var/mob_type = /mob/living/carbon/human
// If the respawned person is given a specific outfit
var/datum/outfit/outfit
// How long until we respawn them after their death.
var/respawn_time = 50
var/respawn_sound = 'sound/magic/Staff_animation.ogg'
/obj/structure/life_candle/attack_hand(mob/user)
if(!user.mind)
return
if(user.mind in linked_minds)
user.visible_message("<span class='notice'>[user] reaches out and pinches the flame of [src].</span>", "<span class='warning'>You sever the connection between yourself and [src].</span>")
linked_minds -= user.mind
else
user.visible_message("<span class='notice'>[user] touches [src]. It seems to respond to their presence!</span>", "<span class='warning'>You create a connection between you and [src].</span>")
linked_minds |= user.mind
update_icon()
float(linked_minds.len)
if(linked_minds.len)
START_PROCESSING(SSobj, src)
SetLuminosity(lit_luminosity)
else
STOP_PROCESSING(SSobj, src)
SetLuminosity(0)
/obj/structure/life_candle/update_icon()
if(linked_minds.len)
icon_state = icon_state_active
else
icon_state = icon_state_inactive
/obj/structure/life_candle/examine(mob/user)
. = ..()
if(linked_minds.len)
user << "[src] is active, and linked to [linked_minds.len] souls."
else
user << "It is static, still, unmoving."
/obj/structure/life_candle/process()
if(!linked_minds.len)
STOP_PROCESSING(SSobj, src)
return
for(var/m in linked_minds)
var/datum/mind/mind = m
if(!mind.current || (mind.current && mind.current.stat == DEAD))
addtimer(CALLBACK(src, .proc/respawn, mind), respawn_time, TIMER_UNIQUE)
/obj/structure/life_candle/proc/respawn(datum/mind/mind)
var/turf/T = get_turf(src)
var/mob/living/body
if(mind.current)
if(mind.current.stat != DEAD)
return
else
body = mind.current
if(!body)
body = new mob_type(T)
var/mob/ghostie = mind.get_ghost(TRUE)
if(ghostie.client && ghostie.client.prefs)
ghostie.client.prefs.copy_to(body)
mind.transfer_to(body)
else
body.forceMove(T)
body.revive(1,1)
mind.grab_ghost(TRUE)
body.flash_act()
if(ishuman(body) && istype(outfit))
outfit.equip(body)
playsound(T, respawn_sound, 50, 1)