Merge branch 'master' into mapsyncs43293845982

This commit is contained in:
deathride58
2018-01-08 06:18:11 +00:00
committed by GitHub
35 changed files with 269 additions and 142 deletions
@@ -22,18 +22,16 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/datum/gas_mixture
var/list/gases
var/temperature //kelvins
var/tmp/temperature_archived
var/volume //liters
var/last_share
var/temperature = 0 //kelvins
var/tmp/temperature_archived = 0
var/volume = CELL_VOLUME //liters
var/last_share = 0
var/list/reaction_results
/datum/gas_mixture/New(volume = CELL_VOLUME)
/datum/gas_mixture/New(volume)
gases = new
temperature = 0
temperature_archived = 0
src.volume = volume
last_share = 0
if (!isnull(volume))
src.volume = volume
reaction_results = new
//listmos procs
@@ -301,7 +301,8 @@ Pipelines + Other Objects -> Pipe network
#define VENT_SOUND_DELAY 30
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
if(!(direction & initialize_directions)) //cant go this way.
direction &= initialize_directions
if(!direction || !(direction in GLOB.cardinals)) //cant go this way.
return
if(user in buckled_mobs)// fixes buckle ventcrawl edgecase fuck bug
@@ -322,13 +323,12 @@ Pipelines + Other Objects -> Pipe network
if(world.time - user.last_played_vent > VENT_SOUND_DELAY)
user.last_played_vent = world.time
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
else
if((direction & initialize_directions) || is_type_in_typecache(src, GLOB.ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.forceMove(loc)
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.canmove = 0
spawn(1)
user.canmove = 1
else if(is_type_in_typecache(src, GLOB.ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.forceMove(loc)
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.canmove = FALSE
addtimer(VARSET_CALLBACK(user, canmove, TRUE), 1)
/obj/machinery/atmospherics/AltClick(mob/living/L)
+18
View File
@@ -205,8 +205,26 @@
/mob/proc/put_in_hands(obj/item/I, del_on_fail = FALSE)
if(!I)
return FALSE
// If the item is a stack and we're already holding a stack then merge
if (istype(I, /obj/item/stack))
var/obj/item/stack/I_stack = I
var/obj/item/stack/active_stack = get_active_held_item()
if (istype(active_stack) && istype(I_stack, active_stack.merge_type))
if (I_stack.merge(active_stack))
to_chat(usr, "<span class='notice'>Your [active_stack.name] stack now contains [active_stack.get_amount()] [active_stack.singular_name]\s.</span>")
return TRUE
else
var/obj/item/stack/inactive_stack = get_inactive_held_item()
if (istype(inactive_stack) && istype(I_stack, inactive_stack.merge_type))
if (I_stack.merge(inactive_stack))
to_chat(usr, "<span class='notice'>Your [inactive_stack.name] stack now contains [inactive_stack.get_amount()] [inactive_stack.singular_name]\s.</span>")
return TRUE
if(put_in_active_hand(I))
return TRUE
var/hand = get_empty_held_index_for_side("l")
if(!hand)
hand = get_empty_held_index_for_side("r")
+28 -3
View File
@@ -386,12 +386,22 @@ All effects don't start immediately, but rather get worse over time; the rate is
81-90: Extremely high alcohol content - light brain damage, passing out
91-100: Dangerously toxic - swift death
*/
#define BALLMER_POINTS 5
GLOBAL_LIST_INIT(ballmer_good_msg, list("Hey guys, what if we rolled out a bluespace wiring system so mice can't destroy the powergrid anymore?",
"Hear me out here. What if, and this is just a theory, we made R&D controllable from our PDAs?",
"I'm thinking we should roll out a git repository for our research under the AGPLv3 license so that we can share it among the other stations freely.",
"I dunno about you guys, but IDs and PDAs being separate is clunky as fuck. Maybe we should merge them into a chip in our arms? That way they can't be stolen easily.",
"Why the fuck aren't we just making every pair of shoes into galoshes? We have the technology."))
GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put a webserver that's automatically turned on with default admin passwords into every PDA?",
"So like, you know how we separate our codebase from the master copy that runs on our consumer boxes? What if we merged the two and undid the separation between codebase and server?",
"Dude, radical idea: H.O.N.K mechs but with no bananium required.",
"Best idea ever: Disposal pipes instead of hallways."))
/mob/living/carbon/human/handle_status_effects()
..()
if(drunkenness)
drunkenness = max(drunkenness - (drunkenness * 0.04), 0)
if(drunkenness >= 6)
if(prob(25))
slurring += 2
@@ -399,7 +409,22 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(drunkenness >= 11 && slurring < 5)
slurring += 1.2
if(mind && (mind.assigned_role == "Scientist" || mind.assigned_role == "Research Director"))
if(SSresearch.science_tech)
if(drunkenness >= 12.9 && drunkenness <= 13.8)
drunkenness = round(drunkenness, 0.01)
var/ballmer_percent = 0
if(drunkenness == 13.35) // why run math if I dont have to
ballmer_percent = 1
else
ballmer_percent = (-abs(drunkenness - 13.35) / 0.9) + 1
if(prob(5))
say(pick(GLOB.ballmer_good_msg))
SSresearch.science_tech.research_points += (BALLMER_POINTS * ballmer_percent)
if(drunkenness > 26) // by this point you're into windows ME territory
if(prob(5))
SSresearch.science_tech.research_points -= BALLMER_POINTS
say(pick(GLOB.ballmer_windows_me_msg))
if(drunkenness >= 41)
if(prob(25))
confused += 2
@@ -807,6 +807,15 @@
build_path = /obj/item/stock_parts/cell/emergency_light
category = list("initial", "Electronics")
/datum/design/packageWrap
name = "Package Wrapping"
id = "packagewrap"
build_type = AUTOLATHE
materials = list(MAT_METAL = 200, MAT_GLASS = 200)
build_path = /obj/item/stack/packageWrap
category = list("initial", "Misc")
maxstack = 30
/datum/design/holodisk
name = "Holodisk"
id = "holodisk"
@@ -24,9 +24,7 @@
stoplag(1)
/obj/effect/proc_holder/spell/targeted/touch/can_cast(mob/user = usr)
if(attached_hand)
return TRUE
return ..()
return ..() && attached_hand
/obj/effect/proc_holder/spell/targeted/touch/proc/ChargeHand(mob/living/carbon/user)
attached_hand = new hand_path(src)
@@ -20,6 +20,8 @@ GLOBAL_LIST(uplink_purchase_logs_by_key) //assoc key = /datum/uplink_purchase_lo
/datum/uplink_purchase_log/Destroy()
purchase_log = null
parent = null
if(GLOB.uplink_purchase_logs_by_key[owner] == src)
GLOB.uplink_purchase_logs_by_key -= owner
return ..()
/datum/uplink_purchase_log/proc/MergeWithAndDel(datum/uplink_purchase_log/other)
+71 -76
View File
@@ -1,76 +1,71 @@
/obj/vehicle/ridden
name = "ridden vehicle"
can_buckle = TRUE
max_buckled_mobs = 1
buckle_lying = FALSE
default_driver_move = FALSE
var/legs_required = 2
var/arms_requires = 0 //why not?
/obj/vehicle/ridden/Initialize()
. = ..()
LoadComponent(/datum/component/riding)
/obj/vehicle/ridden/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>Put a key inside it by clicking it with the key. If there's a key inside, you can remove it via Alt-Click!</span>")
/obj/vehicle/ridden/generate_action_type(actiontype)
var/datum/action/vehicle/ridden/A = ..()
. = A
if(istype(A))
A.vehicle_ridden_target = src
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
remove_occupant(M)
return ..()
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
add_occupant(M)
return ..()
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
if(key_type && !is_key(inserted_key) && is_key(I))
if(user.transferItemToLoc(I, src))
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
if(inserted_key) //just in case there's an invalid key
inserted_key.forceMove(drop_location())
inserted_key = I
else
to_chat(user, "<span class='notice'>[I] seems to be stuck to your hand!</span>")
return
return ..()
/obj/vehicle/ridden/AltClick(mob/user)
if(user.Adjacent(src) && inserted_key)
if(!is_occupant(user))
to_chat(user, "<span class='notice'>You must be riding the [src] to remove [src]'s key!</span>")
return
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
inserted_key.forceMove(drop_location())
user.put_in_hands(inserted_key)
inserted_key = null
return ..()
/obj/vehicle/ridden/driver_move(mob/user, direction)
if(key_type && !is_key(inserted_key))
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
return FALSE
var/datum/component/riding/R = GetComponent(/datum/component/riding)
R.handle_ride(user, direction)
return ..()
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if(user.incapacitated())
return
for(var/atom/movable/A in get_turf(src))
if(A.density)
if(A != src && A != M)
return
M.forceMove(get_turf(src))
. = ..()
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!force && occupant_amount() >= max_occupants)
return FALSE
return ..()
/obj/vehicle/ridden
name = "ridden vehicle"
can_buckle = TRUE
max_buckled_mobs = 1
buckle_lying = FALSE
default_driver_move = FALSE
var/legs_required = 2
var/arms_requires = 0 //why not?
/obj/vehicle/ridden/Initialize()
. = ..()
LoadComponent(/datum/component/riding)
/obj/vehicle/ridden/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>Put a key inside it by clicking it with the key. If there's a key inside, you can remove it via Alt-Click!</span>")
/obj/vehicle/ridden/generate_action_type(actiontype)
var/datum/action/vehicle/ridden/A = ..()
. = A
if(istype(A))
A.vehicle_ridden_target = src
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
remove_occupant(M)
return ..()
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
add_occupant(M)
return ..()
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
if(key_type && !is_key(inserted_key) && is_key(I))
if(user.transferItemToLoc(I, src))
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
if(inserted_key) //just in case there's an invalid key
inserted_key.forceMove(drop_location())
inserted_key = I
else
to_chat(user, "<span class='notice'>[I] seems to be stuck to your hand!</span>")
return
return ..()
/obj/vehicle/ridden/AltClick(mob/user)
if(user.Adjacent(src) && inserted_key)
if(!is_occupant(user))
to_chat(user, "<span class='notice'>You must be riding the [src] to remove [src]'s key!</span>")
return
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
inserted_key.forceMove(drop_location())
user.put_in_hands(inserted_key)
inserted_key = null
return ..()
/obj/vehicle/ridden/driver_move(mob/user, direction)
if(key_type && !is_key(inserted_key))
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
return FALSE
var/datum/component/riding/R = GetComponent(/datum/component/riding)
R.handle_ride(user, direction)
return ..()
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if(!in_range(user, src) || !in_range(M, src))
return FALSE
. = ..(M, user, FALSE)
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!force && occupant_amount() >= max_occupants)
return FALSE
return ..()