mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-24 17:11:40 +00:00
Merge resolution, master into dev.
This commit is contained in:
@@ -254,7 +254,6 @@
|
||||
|
||||
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
|
||||
/client/proc/send_resources()
|
||||
// preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in.
|
||||
|
||||
getFiles(
|
||||
'html/search.js',
|
||||
|
||||
@@ -292,6 +292,8 @@ datum/preferences
|
||||
|
||||
if(total_cost < MAX_GEAR_COST)
|
||||
dat += " <a href='byond://?src=\ref[user];preference=loadout;task=input'>\[add\]</a>"
|
||||
if(gear && gear.len)
|
||||
dat += " <a href='byond://?src=\ref[user];preference=loadout;task=remove'>\[remove\]</a>"
|
||||
|
||||
dat += "<br><br><b>Occupation Choices</b><br>"
|
||||
dat += "\t<a href='?_src_=prefs;preference=job;task=menu'><b>Set Preferences</b></a><br>"
|
||||
@@ -999,10 +1001,18 @@ datum/preferences
|
||||
user << "\red That item will exceed the maximum loadout cost of [MAX_GEAR_COST] points."
|
||||
|
||||
else if(href_list["task"] == "remove")
|
||||
var/to_remove = href_list["gear"]
|
||||
if(!to_remove) return
|
||||
|
||||
if(isnull(gear) || !islist(gear))
|
||||
gear = list()
|
||||
if(!gear.len)
|
||||
return
|
||||
|
||||
var/choice = input(user, "Select gear to remove: ") as null|anything in gear
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
for(var/gear_name in gear)
|
||||
if(gear_name == to_remove)
|
||||
if(gear_name == choice)
|
||||
gear -= gear_name
|
||||
break
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
/obj/item/clothing/shoes/swimmingfins
|
||||
desc = "Help you swim good."
|
||||
name = "swimming fins"
|
||||
icon_state = "flipperfeet"
|
||||
icon_state = "flippers"
|
||||
flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
species_restricted = null
|
||||
|
||||
@@ -170,6 +170,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||
if(response != "Ghost") return //didn't want to ghost after-all
|
||||
resting = 1
|
||||
var/turf/location = get_turf(src)
|
||||
message_admins("[key_name_admin(usr)] has ghosted. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(usr)] has ghosted.")
|
||||
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
|
||||
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
|
||||
return
|
||||
|
||||
@@ -104,9 +104,9 @@
|
||||
shock_damage *= siemens_coeff
|
||||
if (shock_damage<1)
|
||||
return 0
|
||||
|
||||
|
||||
src.apply_damage(shock_damage, BURN, def_zone, used_weapon="Electrocution")
|
||||
|
||||
|
||||
playsound(loc, "sparks", 50, 1, -1)
|
||||
if (shock_damage > 10)
|
||||
src.visible_message(
|
||||
@@ -217,7 +217,7 @@
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
if(lying)
|
||||
if(lying || src.sleeping)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
if(W.internal && !temp.open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick!
|
||||
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /5) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks.
|
||||
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
|
||||
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
@@ -73,7 +75,7 @@
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && !in_stasis)
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath || (health < config.health_threshold_crit)) //First, resolve location and get a breath
|
||||
breathe() //Only try to take a breath every 4 ticks, unless suffocating
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
@@ -130,38 +132,52 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
// Calculate how vulnerable the human is to under- and overpressure.
|
||||
// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%).
|
||||
// Suitdamage can modifiy this in 10% steps.
|
||||
/mob/living/carbon/human/proc/get_pressure_weakness()
|
||||
|
||||
//Much like get_heat_protection(), this returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
/mob/living/carbon/human/proc/get_pressure_protection()
|
||||
var/pressure_adjustment_coefficient = 1 //Determins how much the clothing you are wearing protects you in percent.
|
||||
var/pressure_adjustment_coefficient = 1 // Assume no protection at first.
|
||||
|
||||
if(head && (head.flags & STOPSPRESSUREDMAGE))
|
||||
pressure_adjustment_coefficient -= PRESSURE_HEAD_REDUCTION_COEFFICIENT
|
||||
if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE) && head && (head.flags & STOPSPRESSUREDMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed.
|
||||
pressure_adjustment_coefficient = 0
|
||||
|
||||
if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE))
|
||||
pressure_adjustment_coefficient -= PRESSURE_SUIT_REDUCTION_COEFFICIENT
|
||||
|
||||
//Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure reduction.
|
||||
// Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection.
|
||||
if(istype(wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/S = wear_suit
|
||||
if(S.can_breach && S.damage)
|
||||
var/pressure_loss = S.damage * 0.1
|
||||
pressure_adjustment_coefficient += pressure_loss
|
||||
pressure_adjustment_coefficient += S.damage * 0.1
|
||||
|
||||
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) //So it isn't less than 0 or larger than 1.
|
||||
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) // So it isn't less than 0 or larger than 1.
|
||||
|
||||
return 1 - pressure_adjustment_coefficient //want 0 to be bad protection, 1 to be good protection
|
||||
return pressure_adjustment_coefficient
|
||||
|
||||
// Calculate how much of the enviroment pressure-difference affects the human.
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
|
||||
..()
|
||||
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
|
||||
var/pressure_difference
|
||||
|
||||
pressure_difference = pressure_difference * (1 - get_pressure_protection())
|
||||
// First get the absolute pressure difference.
|
||||
if(pressure < ONE_ATMOSPHERE) // We are in an underpressure.
|
||||
pressure_difference = ONE_ATMOSPHERE - pressure
|
||||
|
||||
else //We are in an overpressure or standard atmosphere.
|
||||
pressure_difference = pressure - ONE_ATMOSPHERE
|
||||
|
||||
if(pressure_difference < 5) // If the difference is small, don't bother calculating the fraction.
|
||||
pressure_difference = 0
|
||||
|
||||
if(pressure > ONE_ATMOSPHERE)
|
||||
return ONE_ATMOSPHERE + pressure_difference
|
||||
else
|
||||
// Otherwise calculate how much of that absolute pressure difference affects us, can be 0 to 1 (equals 0% to 100%).
|
||||
// This is our relative difference.
|
||||
pressure_difference *= get_pressure_weakness()
|
||||
|
||||
// The difference is always positive to avoid extra calculations.
|
||||
// Apply the relative difference on a standard atmosphere to get the final result.
|
||||
// The return value will be the adjusted_pressure of the human that is the basis of pressure warnings and damage.
|
||||
if(pressure < ONE_ATMOSPHERE)
|
||||
return ONE_ATMOSPHERE - pressure_difference
|
||||
else
|
||||
return ONE_ATMOSPHERE + pressure_difference
|
||||
|
||||
/mob/living/carbon/human
|
||||
proc/handle_disabilities()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
var/list/trays = list()
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1))
|
||||
if(tray.nutrilevel < 10)
|
||||
if(tray.nutrilevel < 10 && src.Adjacent(tray))
|
||||
trays += tray
|
||||
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
var/list/trays = list()
|
||||
for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1))
|
||||
if(tray.weedlevel > 0)
|
||||
if(tray.weedlevel > 0 && src.Adjacent(tray))
|
||||
trays += tray
|
||||
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays
|
||||
@@ -186,7 +186,8 @@
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/human/H in oview(1,src))
|
||||
choices += H
|
||||
if(src.Adjacent(H))
|
||||
choices += H
|
||||
|
||||
var/mob/living/carbon/human/M = input(src,"Who do you wish to take a sample from?") in null|choices
|
||||
|
||||
|
||||
@@ -80,11 +80,6 @@
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure)
|
||||
..()
|
||||
return pressure
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
|
||||
proc/handle_disabilities()
|
||||
@@ -389,9 +384,8 @@
|
||||
|
||||
//Moved these vars here for use in the fuck-it-skip-processing check.
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
if(pressure < WARNING_HIGH_PRESSURE && pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.phoron < MOLES_PHORON_VISIBLE)
|
||||
|
||||
if(adjusted_pressure < WARNING_HIGH_PRESSURE && adjusted_pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.gas["phoron"] < gas_data.overlay_limit["phoron"])
|
||||
|
||||
//Hopefully should fix the walk-inside-still-pressure-warning issue.
|
||||
if(pressure_alert)
|
||||
@@ -413,9 +407,9 @@
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
switch(adjusted_pressure)
|
||||
switch(pressure)
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
|
||||
adjustBruteLoss( min( ( (pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
|
||||
pressure_alert = 2
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure_alert = 1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
|
||||
//affects them once clothing is factored in. ~Errorage
|
||||
/mob/living/proc/calculate_affecting_pressure(var/pressure)
|
||||
return 0
|
||||
return
|
||||
|
||||
|
||||
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
|
||||
@@ -300,6 +300,7 @@
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
tod = null
|
||||
timeofdeath = 0
|
||||
|
||||
// restore us to conciousness
|
||||
stat = CONSCIOUS
|
||||
|
||||
@@ -446,13 +446,6 @@ var/list/ai_verbs_default = list(
|
||||
lawchannel = setchannel
|
||||
checklaws()
|
||||
|
||||
//Uncomment this line of code if you are enabling the AI Vocal (VOX) announcements.
|
||||
/*
|
||||
if(href_list["say_word"])
|
||||
play_vox_word(href_list["say_word"], null, src)
|
||||
return
|
||||
*/
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
|
||||
@@ -3,126 +3,3 @@
|
||||
return parent.say(message)
|
||||
//If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead.
|
||||
return ..(message)
|
||||
|
||||
// These Verbs are commented out since we've disabled the AI vocal (VOX) announcements.
|
||||
// If you re-enable them there is 3 lines in ai.dm Topic() that you need to uncomment as well.
|
||||
// just search for VOX in there.
|
||||
|
||||
/*
|
||||
var/announcing_vox = 0 // Stores the time of the last announcement
|
||||
var/const/VOX_CHANNEL = 200
|
||||
var/const/VOX_DELAY = 100 // 10 seconds
|
||||
var/const/VOX_PATH = "sound/vox/"
|
||||
|
||||
/mob/living/silicon/ai/verb/announcement_help()
|
||||
|
||||
set name = "Announcement Help"
|
||||
set desc = "Display a list of vocal words to announce to the crew."
|
||||
set category = "AI Commands"
|
||||
|
||||
|
||||
var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.<BR> \
|
||||
<UL><LI>You can also click on the word to preview it.</LI>\
|
||||
<LI>You can only say 30 words for every announcement.</LI>\
|
||||
<LI>Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.</LI></UL>\
|
||||
<font class='bad'>WARNING:</font><BR>Misuse of the announcement system will get you job banned.<HR>"
|
||||
|
||||
var/index = 0
|
||||
var/list/vox_words = flist(VOX_PATH) // flist will return a list of strings with all the files in the path
|
||||
for(var/word in vox_words)
|
||||
index++
|
||||
var/stripped_word = copytext(word, 1, length(word) - 3) // Remove the .wav
|
||||
dat += "<A href='?src=\ref[src];say_word=[stripped_word]'>[capitalize(stripped_word)]</A>"
|
||||
if(index != vox_words.len)
|
||||
dat += " / "
|
||||
|
||||
src << browse(dat, "window=announce_help;size=500x400")
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/announcement()
|
||||
|
||||
set name = "Announcement"
|
||||
set desc = "Create a vocal announcement by typing in the available words to create a sentence."
|
||||
set category = "AI Commands"
|
||||
|
||||
if(announcing_vox > world.time)
|
||||
src << "<span class='notice'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>"
|
||||
return
|
||||
|
||||
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text
|
||||
|
||||
last_announcement = message
|
||||
|
||||
if(!message || announcing_vox > world.time)
|
||||
return
|
||||
|
||||
var/list/words = text2list(trim(message), " ")
|
||||
var/list/incorrect_words = list()
|
||||
|
||||
if(words.len > 30)
|
||||
words.len = 30
|
||||
|
||||
// Detect incorrect words which aren't .wav files.
|
||||
for(var/word in words)
|
||||
word = trim(word)
|
||||
if(!word)
|
||||
words -= word
|
||||
continue
|
||||
if(!vox_word_exists(word))
|
||||
incorrect_words += word
|
||||
|
||||
if(incorrect_words.len)
|
||||
src << "<span class='notice'>These words are not available on the announcement system: [english_list(incorrect_words)].</span>"
|
||||
return
|
||||
|
||||
announcing_vox = world.time + VOX_DELAY
|
||||
|
||||
log_game("[key_name_admin(src)] made a vocal announcement with the following message: [message].")
|
||||
|
||||
for(var/word in words)
|
||||
play_vox_word(word, src.z, null)
|
||||
|
||||
|
||||
/proc/play_vox_word(var/word, var/z_level, var/mob/only_listener)
|
||||
|
||||
word = lowertext(word)
|
||||
|
||||
if(vox_word_exists(word))
|
||||
|
||||
var/sound_file = get_vox_file(word)
|
||||
var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL)
|
||||
voice.status = SOUND_STREAM
|
||||
|
||||
// If there is no single listener, broadcast to everyone in the same z level
|
||||
if(!only_listener)
|
||||
// Play voice for all mobs in the z level
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T.z == z_level)
|
||||
M << voice
|
||||
else
|
||||
only_listener << voice
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/vox_word_exists(var/word)
|
||||
return fexists("[VOX_PATH][word].wav")
|
||||
|
||||
/proc/get_vox_file(var/word)
|
||||
if(vox_word_exists(word))
|
||||
return file("[VOX_PATH][word].wav")
|
||||
|
||||
// Dynamically loading it has bad results with sounds overtaking each other, even with the wait variable.
|
||||
// We send the file to the user when they login.
|
||||
|
||||
/client/proc/preload_vox()
|
||||
var/list/vox_files = flist(VOX_PATH)
|
||||
for(var/file in vox_files)
|
||||
// src << "Downloading [file]"
|
||||
var/sound/S = sound("[VOX_PATH][file]")
|
||||
src << browse_rsc(S)
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
|
||||
|
||||
/datum/paiController
|
||||
var/inquirer = null
|
||||
var/list/pai_candidates = list()
|
||||
var/list/asked = list()
|
||||
|
||||
@@ -344,6 +345,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
|
||||
user << browse(dat, "window=findPai")
|
||||
|
||||
|
||||
/datum/paiController/proc/requestRecruits()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
@@ -368,7 +370,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(!C) return
|
||||
asked.Add(C.key)
|
||||
asked[C.key] = world.time
|
||||
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
|
||||
var/response = alert(C, "[inquirer] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
|
||||
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
|
||||
if(response == "Yes")
|
||||
recruitWindow(C.mob)
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
/obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
/obj/item/weapon/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)
|
||||
|
||||
if(!target || !flag) //Target is invalid or we are not adjacent.
|
||||
if(!target || !proximity) //Target is invalid or we are not adjacent.
|
||||
return
|
||||
|
||||
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
|
||||
@@ -80,25 +80,22 @@
|
||||
wrapped = thing
|
||||
break
|
||||
|
||||
if(wrapped) //Already have an item.
|
||||
|
||||
if(wrapped) //Already have an item.
|
||||
|
||||
//Temporary put wrapped into user so target's attackby() checks pass.
|
||||
wrapped.loc = user
|
||||
//Pass the attack on to the target.
|
||||
|
||||
//Pass the attack on to the target. This might delete/relocate wrapped.
|
||||
target.attackby(wrapped,user)
|
||||
|
||||
if(wrapped && src && wrapped.loc == user)
|
||||
|
||||
//If wrapped did neither get deleted nor put into target, put it back into the gripper.
|
||||
if(wrapped && user && (wrapped.loc == user))
|
||||
wrapped.loc = src
|
||||
|
||||
//Sanity/item use checks.
|
||||
|
||||
if(!wrapped || !user)
|
||||
return
|
||||
|
||||
if(wrapped.loc != src.loc)
|
||||
else
|
||||
wrapped = null
|
||||
return
|
||||
|
||||
if(istype(target,/obj/item)) //Check that we're not pocketing a mob.
|
||||
else if(istype(target,/obj/item)) //Check that we're not pocketing a mob.
|
||||
|
||||
//...and that the item is not in a container.
|
||||
if(!isturf(target.loc))
|
||||
@@ -158,9 +155,9 @@
|
||||
/obj/item/weapon/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/matter_decompiler/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
/obj/item/weapon/matter_decompiler/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)
|
||||
|
||||
if(!flag) return //Not adjacent.
|
||||
if(!proximity) return //Not adjacent.
|
||||
|
||||
//We only want to deal with using this on turfs. Specific items aren't important.
|
||||
var/turf/T = get_turf(target)
|
||||
@@ -357,4 +354,4 @@
|
||||
stack = stack_plastic
|
||||
|
||||
stack.amount++
|
||||
decompiler.stored_comms[type]--;
|
||||
decompiler.stored_comms[type]--;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/mob/living/silicon/robot/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
health = 200
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = 200 - (getBruteLoss() + getFireLoss())
|
||||
health = maxHealth - (getBruteLoss() + getFireLoss())
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/getBruteLoss()
|
||||
@@ -145,4 +145,4 @@
|
||||
brute -= (picked.brute_damage - brute_was)
|
||||
burn -= (picked.electronics_damage - burn_was)
|
||||
|
||||
parts -= picked
|
||||
parts -= picked
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
name = "RoboTray"
|
||||
desc = "An autoloading tray specialized for carrying refreshments."
|
||||
|
||||
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob)
|
||||
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if ( !target )
|
||||
return
|
||||
// pick up items, mostly copied from base tray pickup proc
|
||||
|
||||
@@ -434,6 +434,9 @@
|
||||
// And uncomment this, too.
|
||||
//new_character.dna.UpdateSE()
|
||||
|
||||
// Do the initial caching of the player's body icons.
|
||||
new_character.regenerate_icons()
|
||||
|
||||
new_character.key = key //Manually transfer the key to log them in
|
||||
|
||||
return new_character
|
||||
|
||||
@@ -206,6 +206,9 @@ This function completely restores a damaged organ to perfect condition.
|
||||
perma_injury = 0
|
||||
brute_dam = 0
|
||||
burn_dam = 0
|
||||
germ_level = 0
|
||||
wounds.Cut()
|
||||
number_wounds = 0
|
||||
|
||||
// handle internal organs
|
||||
for(var/datum/organ/internal/current_organ in internal_organs)
|
||||
@@ -265,25 +268,6 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(W)
|
||||
wounds += W
|
||||
|
||||
/datum/organ/external/proc/get_wound_type(var/type = CUT, var/damage)
|
||||
//if you look a the names in the wound's stages list for each wound type you will see the logic behind these values
|
||||
switch(type)
|
||||
if(CUT)
|
||||
if (damage <= 5) return /datum/wound/cut/small
|
||||
if (damage <= 15) return /datum/wound/cut/deep
|
||||
if (damage <= 25) return /datum/wound/cut/flesh
|
||||
if (damage <= 50) return /datum/wound/cut/gaping
|
||||
if (damage <= 60) return /datum/wound/cut/gaping_big
|
||||
return /datum/wound/cut/massive
|
||||
if(BRUISE)
|
||||
return /datum/wound/bruise
|
||||
if(BURN)
|
||||
if (damage <= 5) return /datum/wound/burn/moderate
|
||||
if (damage <= 15) return /datum/wound/burn/large
|
||||
if (damage <= 30) return /datum/wound/burn/severe
|
||||
if (damage <= 40) return /datum/wound/burn/deep
|
||||
return /datum/wound/burn/carbonised
|
||||
|
||||
/****************************************************
|
||||
PROCESSING & UPDATING
|
||||
****************************************************/
|
||||
@@ -396,10 +380,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.species.body_temperature
|
||||
if (fever_temperature > owner.bodytemperature)
|
||||
//need to make sure we raise temperature fast enough to get around environmental cooling preventing us from reaching fever_temperature
|
||||
owner.bodytemperature += (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 5)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.species.body_temperature
|
||||
//need to make sure we raise temperature fast enough to get around environmental cooling preventing us from reaching fever_temperature
|
||||
owner.bodytemperature += between(0, (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
|
||||
|
||||
if(prob(round(germ_level/10)))
|
||||
if (antibiotics < 5)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/current_stage = 0
|
||||
|
||||
// description of the wound
|
||||
var/desc = ""
|
||||
var/desc = "wound" //default in case something borks
|
||||
|
||||
// amount of damage this wound causes
|
||||
var/damage = 0
|
||||
@@ -207,6 +207,44 @@
|
||||
|
||||
return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5)
|
||||
|
||||
/** WOUND DEFINITIONS **/
|
||||
|
||||
//Note that the MINIMUM damage before a wound can be applied should correspond to
|
||||
//the damage amount for the stage with the same name as the wound.
|
||||
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
|
||||
//because in it's stages list, "deep cut" = 15.
|
||||
/proc/get_wound_type(var/type = CUT, var/damage)
|
||||
switch(type)
|
||||
if(CUT)
|
||||
switch(damage)
|
||||
if(70 to INFINITY)
|
||||
return /datum/wound/cut/massive
|
||||
if(60 to 70)
|
||||
return /datum/wound/cut/gaping_big
|
||||
if(50 to 60)
|
||||
return /datum/wound/cut/gaping
|
||||
if(25 to 50)
|
||||
return /datum/wound/cut/flesh
|
||||
if(15 to 25)
|
||||
return /datum/wound/cut/deep
|
||||
if(0 to 15)
|
||||
return /datum/wound/cut/small
|
||||
if(BRUISE)
|
||||
return /datum/wound/bruise
|
||||
if(BURN)
|
||||
switch(damage)
|
||||
if(50 to INFINITY)
|
||||
return /datum/wound/burn/carbonised
|
||||
if(40 to 50)
|
||||
return /datum/wound/burn/deep
|
||||
if(30 to 40)
|
||||
return /datum/wound/burn/severe
|
||||
if(15 to 30)
|
||||
return /datum/wound/burn/large
|
||||
if(0 to 15)
|
||||
return /datum/wound/burn/moderate
|
||||
return null //no wound
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut/small
|
||||
// link wound descriptions to amounts of damage
|
||||
@@ -220,7 +258,7 @@
|
||||
damage_type = CUT
|
||||
|
||||
/datum/wound/cut/flesh
|
||||
max_bleeding_stage = 3
|
||||
max_bleeding_stage = 4
|
||||
stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
@@ -249,25 +287,26 @@ datum/wound/cut/massive
|
||||
|
||||
/** BURNS **/
|
||||
/datum/wound/burn/moderate
|
||||
stages = list("ripped burn" = 10, "moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
|
||||
stages = list("ripped burn" = 10, "moderate burn" = 5, "healing moderate burn" = 2, "fresh skin" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/burn/large
|
||||
stages = list("ripped large burn" = 20, "large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
|
||||
stages = list("ripped large burn" = 20, "large burn" = 15, "healing large burn" = 5, "fresh skin" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/burn/severe
|
||||
stages = list("ripped severe burn" = 35, "severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
|
||||
stages = list("ripped severe burn" = 35, "severe burn" = 30, "healing severe burn" = 10, "burn scar" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/burn/deep
|
||||
stages = list("ripped deep burn" = 45, "deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
|
||||
stages = list("ripped deep burn" = 45, "deep burn" = 40, "healing deep burn" = 15, "large burn scar" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/burn/carbonised
|
||||
stages = list("carbonised area" = 50, "treated carbonised area" = 20, "massive burn scar" = 0)
|
||||
stages = list("carbonised area" = 50, "healing carbonised area" = 20, "massive burn scar" = 0)
|
||||
damage_type = BURN
|
||||
|
||||
/** INTERNAL BLEEDING **/
|
||||
/datum/wound/internal_bleeding
|
||||
internal = 1
|
||||
stages = list("severed artery" = 30, "cut artery" = 20, "damaged artery" = 10, "bruised artery" = 5)
|
||||
@@ -284,4 +323,4 @@ datum/wound/cut/massive
|
||||
return 0 //cannot be merged
|
||||
|
||||
/datum/wound/lost_limb/small
|
||||
stages = list("ripped stump" = 40, "bloody stump" = 30, "clotted stump" = 15, "scarred stump" = 0)
|
||||
stages = list("ripped stump" = 40, "bloody stump" = 30, "clotted stump" = 15, "scarred stump" = 0)
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
/obj/machinery/power/smes/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(!powernet)
|
||||
connect_to_network()
|
||||
|
||||
dir_loop:
|
||||
for(var/d in cardinal)
|
||||
var/turf/T = get_step(src, d)
|
||||
@@ -46,6 +49,8 @@
|
||||
stat |= BROKEN
|
||||
return
|
||||
terminal.master = src
|
||||
if(!terminal.powernet)
|
||||
terminal.connect_to_network()
|
||||
updateicon()
|
||||
return
|
||||
|
||||
|
||||
@@ -1099,8 +1099,7 @@ datum
|
||||
else if(!alien || alien != IS_DIONA)
|
||||
M.adjustOxyLoss(-2*REM)
|
||||
|
||||
if(holder.has_reagent("lexorin"))
|
||||
holder.remove_reagent("lexorin", 2*REM)
|
||||
holder.remove_reagent("lexorin", 2*REM)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1123,8 +1122,7 @@ datum
|
||||
else if(!alien || alien != IS_DIONA)
|
||||
M.adjustOxyLoss(-M.getOxyLoss())
|
||||
|
||||
if(holder.has_reagent("lexorin"))
|
||||
holder.remove_reagent("lexorin", 2*REM)
|
||||
holder.remove_reagent("lexorin", 2*REM)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1221,8 +1219,7 @@ datum
|
||||
M.AdjustParalysis(-1)
|
||||
M.AdjustStunned(-1)
|
||||
M.AdjustWeakened(-1)
|
||||
if(holder.has_reagent("mindbreaker"))
|
||||
holder.remove_reagent("mindbreaker", 5)
|
||||
holder.remove_reagent("mindbreaker", 5)
|
||||
M.hallucination = max(0, M.hallucination - 10)
|
||||
if(prob(60)) M.adjustToxLoss(1)
|
||||
..()
|
||||
@@ -1315,7 +1312,7 @@ datum
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if(istype(E))
|
||||
if(E.damage > 0)
|
||||
E.damage -= 1
|
||||
E.damage = max(E.damage - 1, 0)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1336,7 +1333,7 @@ datum
|
||||
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
|
||||
for(var/datum/organ/internal/I in H.internal_organs)
|
||||
if(I.damage > 0)
|
||||
I.damage -= 0.20
|
||||
I.damage = max(I.damage - 0.20, 0)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1600,8 +1597,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(holder.has_reagent("inaprovaline"))
|
||||
holder.remove_reagent("inaprovaline", 2*REM)
|
||||
holder.remove_reagent("inaprovaline", 2*REM)
|
||||
..()
|
||||
return
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
@@ -2052,7 +2048,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.nutrition -= nutriment_factor
|
||||
M.nutrition = max(M.nutrition - nutriment_factor, 0)
|
||||
M.overeatduration = 0
|
||||
if(M.nutrition < 0)//Prevent from going into negatives.
|
||||
M.nutrition = 0
|
||||
@@ -2202,25 +2198,14 @@ datum
|
||||
color = "#B31008" // rgb: 139, 166, 233
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!data) data = 1
|
||||
switch(data)
|
||||
if(1 to 15)
|
||||
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to INFINITY)
|
||||
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1)) M.emote("shiver")
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
data++
|
||||
if(!M)
|
||||
M = holder.my_atom
|
||||
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature = max(M.bodytemperature - rand(10,20), 0)
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
holder.remove_reagent(src.id, FOOD_METABOLISM)
|
||||
..()
|
||||
return
|
||||
@@ -2629,8 +2614,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0)
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 10*REAGENTS_METABOLISM)
|
||||
holder.remove_reagent("capsaicin", 10*REAGENTS_METABOLISM)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -2673,7 +2657,7 @@ datum
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
M.make_jittery(5)
|
||||
if(adj_temp > 0 && holder.has_reagent("frostoil"))
|
||||
if(adj_temp > 0)
|
||||
holder.remove_reagent("frostoil", 10*REAGENTS_METABOLISM)
|
||||
|
||||
holder.remove_reagent(src.id, 0.1)
|
||||
@@ -2843,25 +2827,14 @@ datum
|
||||
adj_temp = -9
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!data) data = 1
|
||||
switch(data)
|
||||
if(1 to 15)
|
||||
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to INFINITY)
|
||||
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1)) M.emote("shiver")
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
data++
|
||||
if(!M)
|
||||
M = holder.my_atom
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature = max(M.bodytemperature - rand(10,20), 0)
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
holder.remove_reagent(src.id, FOOD_METABOLISM)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
return
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
target.add_fingerprint(user)
|
||||
|
||||
if(!target.reagents.total_volume && target.reagents)
|
||||
user << "\red [target] is empty."
|
||||
|
||||
@@ -114,11 +114,14 @@
|
||||
overlays = new/list()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (istype(W,/obj/item/weapon/wrench))
|
||||
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
|
||||
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
|
||||
modded = modded ? 0 : 1
|
||||
if (modded)
|
||||
message_admins("[key_name_admin(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
|
||||
log_game("[key_name(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel.")
|
||||
leak_fuel(amount_per_transfer_from_this)
|
||||
if (istype(W,/obj/item/device/assembly_holder))
|
||||
if (rig)
|
||||
@@ -130,8 +133,8 @@
|
||||
|
||||
var/obj/item/device/assembly_holder/H = W
|
||||
if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
|
||||
message_admins("[key_name_admin(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.")
|
||||
log_game("[key_name(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.")
|
||||
message_admins("[key_name_admin(user)] rigged fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) for explosion. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
|
||||
log_game("[key_name(user)] rigged fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) for explosion.")
|
||||
|
||||
rig = W
|
||||
user.drop_item()
|
||||
@@ -148,8 +151,8 @@
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
if(istype(Proj.firer))
|
||||
message_admins("[key_name_admin(Proj.firer)] shot fueltank at ([loc.x],[loc.y],[loc.z]).")
|
||||
log_game("[key_name(Proj.firer)] shot fueltank at ([loc.x],[loc.y],[loc.z]).")
|
||||
message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
|
||||
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
|
||||
|
||||
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
|
||||
explode()
|
||||
@@ -174,18 +177,18 @@
|
||||
if(temperature > T0C+500)
|
||||
explode()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Move()
|
||||
if (..() && modded)
|
||||
leak_fuel(amount_per_transfer_from_this/10.0)
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/proc/leak_fuel(amount)
|
||||
if (reagents.total_volume == 0)
|
||||
return
|
||||
|
||||
|
||||
amount = min(amount, reagents.total_volume)
|
||||
reagents.remove_reagent("fuel",amount)
|
||||
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, amount)
|
||||
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, amount,1)
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "Pepper Spray Refiller"
|
||||
|
||||
@@ -137,10 +137,3 @@
|
||||
|
||||
/datum/computer/file/embedded_program/docking/simple/escape_pod/prepare_for_undocking()
|
||||
eject_time = world.time + eject_delay*10
|
||||
|
||||
/*
|
||||
/datum/computer/file/embedded_program/docking/simple/escape_pod/ready_for_undocking()
|
||||
if (world.time < eject_time)
|
||||
return 0
|
||||
return ..()
|
||||
*/
|
||||
@@ -34,15 +34,14 @@
|
||||
if (moving_status == SHUTTLE_IDLE)
|
||||
return //someone cancelled the launch
|
||||
|
||||
move(departing, interim, direction)
|
||||
|
||||
moving_status = SHUTTLE_INTRANSIT
|
||||
move(departing, interim, direction)
|
||||
|
||||
arrive_time = world.time + travel_time*10
|
||||
while (world.time < arrive_time)
|
||||
sleep(5)
|
||||
|
||||
move(interim, destination, direction)
|
||||
|
||||
moving_status = SHUTTLE_IDLE
|
||||
|
||||
/datum/shuttle/proc/dock()
|
||||
@@ -69,6 +68,8 @@
|
||||
return 0
|
||||
|
||||
//just moves the shuttle from A to B, if it can be moved
|
||||
//A note to anyone overriding move in a subtype. move() must absolutely not, under any circumstances, fail to move the shuttle.
|
||||
//If you want to conditionally cancel shuttle launches, that logic must go in short_jump() or long_jump()
|
||||
/datum/shuttle/proc/move(var/area/origin, var/area/destination, var/direction=null)
|
||||
|
||||
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
var/is_chest_organ_damaged = 0
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
@@ -244,7 +244,7 @@
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You treat damage to [target]'s [I.name] with [tool_name]." )
|
||||
"\blue You treat damage to [target]'s [I.name] with [tool_name]." )
|
||||
else
|
||||
user.visible_message("\blue [user] pokes [target]'s mechanical [I.name] with [tool_name]...", \
|
||||
"\blue You poke [target]'s mechanical [I.name] with [tool_name]... \red For no effect, since it's robotic.")
|
||||
|
||||
@@ -89,7 +89,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
|
||||
//We had proper tools! (or RNG smiled.) and User did not move or change hands.
|
||||
if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
|
||||
else //or
|
||||
else if (tool in user.contents && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||
return 1 //don't want to do weapony things after surgery
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user