mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts: code/game/objects/effects/decals/Cleanable/fuel.dm maps/exodus-5.dmm
This commit is contained in:
@@ -72,11 +72,11 @@ datum/mind
|
||||
current.remove_changeling_powers()
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
current.mind = null
|
||||
|
||||
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
|
||||
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
|
||||
current = new_character //link ourself to our new body
|
||||
new_character.mind = src //and link our new body to ourself
|
||||
|
||||
|
||||
@@ -265,13 +265,19 @@ Auto Patrol: []"},
|
||||
src.mode = 0
|
||||
walk_to(src,0)
|
||||
|
||||
// We re-assess human targets, before bashing their head in, in case their credentials change
|
||||
if(target && istype(target, /mob/living/carbon/human))
|
||||
var/threat = src.assess_perp(target, idcheck, check_records, check_arrest)
|
||||
if(threat < 4)
|
||||
target = null
|
||||
|
||||
if(target) // make sure target exists
|
||||
// We re-assess human targets, before bashing their head in, in case their credentials change
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/threat = src.assess_perp(target, idcheck, check_records, check_arrest)
|
||||
if(threat < 4)
|
||||
frustration = 8
|
||||
return
|
||||
|
||||
// The target must remain in view to complete the desire to bash its head in
|
||||
if(!(target in view(search_range,src)))
|
||||
frustration++
|
||||
return
|
||||
|
||||
if(!lasercolor && Adjacent(target)) // If right next to perp. Lasertag bots do not arrest anyone, just patrol and shoot and whatnot
|
||||
if(istype(src.target,/mob/living/carbon))
|
||||
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
@@ -915,7 +915,7 @@ About the new airlock wires panel:
|
||||
..()
|
||||
|
||||
//if assembly is given, create the new door from the assembly
|
||||
if (assembly)
|
||||
if (assembly && istype(assembly))
|
||||
assembly_type = assembly.type
|
||||
|
||||
electronics = assembly.electronics
|
||||
|
||||
@@ -12,18 +12,20 @@
|
||||
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
|
||||
src.amount = amt
|
||||
|
||||
var/has_spread = 0
|
||||
//Be absorbed by any other liquid fuel in the tile.
|
||||
for(var/obj/effect/decal/cleanable/liquid_fuel/other in newLoc)
|
||||
if(other != src)
|
||||
other.amount += src.amount
|
||||
|
||||
var/oldsrc = src
|
||||
src = null
|
||||
spawn other.Spread()
|
||||
del(oldsrc)
|
||||
other.Spread()
|
||||
has_spread = 1
|
||||
break
|
||||
|
||||
Spread()
|
||||
. = ..()
|
||||
if(!has_spread)
|
||||
Spread()
|
||||
else
|
||||
del(src)
|
||||
|
||||
proc/Spread(exclude=list())
|
||||
//Allows liquid fuels to sometimes flow into other tiles.
|
||||
|
||||
@@ -188,10 +188,17 @@
|
||||
item_to_spawn()
|
||||
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,\
|
||||
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,\
|
||||
prob(3);/obj/item/weapon/gun/projectile/sec,\
|
||||
prob(2);/obj/item/weapon/gun/projectile/sec/wood,\
|
||||
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
|
||||
|
||||
/obj/random/handgun
|
||||
name = "Random Handgun"
|
||||
desc = "This is a random security sidearm."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "secgundark"
|
||||
item_to_spawn()
|
||||
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,\
|
||||
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
|
||||
|
||||
|
||||
/obj/random/ammo
|
||||
name = "Random Ammunition"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(access_surgery)
|
||||
req_access = list(access_medical)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/weapon/gun/projectile/sec(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -50,21 +50,21 @@ proc/admin_proc()
|
||||
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
||||
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
*/
|
||||
/proc/check_rights(rights_required, show_msg=1)
|
||||
if(usr && usr.client)
|
||||
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
|
||||
if(user && user.client)
|
||||
if(rights_required)
|
||||
if(usr.client.holder)
|
||||
if(rights_required & usr.client.holder.rights)
|
||||
if(user.client.holder)
|
||||
if(rights_required & user.client.holder.rights)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
else
|
||||
if(usr.client.holder)
|
||||
if(user.client.holder)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
usr << "<font color='red'>Error: You are not an admin.</font>"
|
||||
user << "<font color='red'>Error: You are not an admin.</font>"
|
||||
return 0
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
|
||||
@@ -1,54 +1,55 @@
|
||||
proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
world << "\red \b Searching for away missions..."
|
||||
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
// var/value = null
|
||||
|
||||
if (pos)
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = copytext(t, 1, pos)
|
||||
// value = copytext(t, pos + 1)
|
||||
else
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = t
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
potentialRandomZlevels.Add(name)
|
||||
|
||||
|
||||
if(potentialRandomZlevels.len)
|
||||
world << "\red \b Loading away mission..."
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file, load_speed = 100)
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
world << "\red \b Away mission loaded."
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
var/list/potentialRandomZlevels = list()
|
||||
world << "\red \b Searching for away missions..."
|
||||
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
|
||||
if(!Lines.len) return
|
||||
for (var/t in Lines)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if (length(t) == 0)
|
||||
continue
|
||||
else if (copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
// var/value = null
|
||||
|
||||
if (pos)
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = copytext(t, 1, pos)
|
||||
// value = copytext(t, pos + 1)
|
||||
else
|
||||
// No, don't do lowertext here, that breaks paths on linux
|
||||
name = t
|
||||
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
potentialRandomZlevels.Add(name)
|
||||
|
||||
|
||||
if(potentialRandomZlevels.len)
|
||||
world << "\red \b Loading away mission..."
|
||||
|
||||
var/map = pick(potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
maploader.load_map(file)
|
||||
world.log << "away mission loaded: [map]"
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
world << "\red \b Away mission loaded."
|
||||
|
||||
else
|
||||
world << "\red \b No away missions found."
|
||||
return
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(!isnull(seed.chems["pacid"]))
|
||||
spawn(rand(5,25)) floor.ex_act(3)
|
||||
continue
|
||||
else if(!floor.Enter(src))
|
||||
if(!Adjacent(floor))
|
||||
continue
|
||||
neighbors |= floor
|
||||
// Update all of our friends.
|
||||
|
||||
@@ -60,11 +60,13 @@
|
||||
if(buckled_mob)
|
||||
return
|
||||
|
||||
if(!Adjacent(victim))
|
||||
return
|
||||
|
||||
victim.buckled = src
|
||||
victim.update_canmove()
|
||||
buckled_mob = victim
|
||||
var/turf/T = get_turf(src)
|
||||
if(victim.loc != T && T.Enter(victim, get_turf(victim)))
|
||||
if(victim.loc != get_turf(src))
|
||||
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
|
||||
victim.loc = src.loc
|
||||
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
|
||||
|
||||
@@ -248,6 +248,15 @@
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/hatchet/tacknife
|
||||
name = "tactical knife"
|
||||
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "tacknife"
|
||||
item_state = "knife"
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
|
||||
|
||||
/obj/item/weapon/scythe
|
||||
icon_state = "scythe0"
|
||||
name = "scythe"
|
||||
|
||||
@@ -53,10 +53,9 @@ dmm_suite{
|
||||
|
||||
*/
|
||||
|
||||
verb/load_map(var/dmm_file as file, var/z_offset as num, var/load_speed as num)
|
||||
verb/load_map(var/dmm_file as file, var/z_offset as num)
|
||||
// dmm_file: A .dmm file to load (Required).
|
||||
// z_offset: A number representing the z-level on which to start loading the map (Optional).
|
||||
// load_speed: How many tiles should be loaded per second, defaults to no pause (Optional)
|
||||
|
||||
verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
|
||||
// t1: A turf representing one corner of a three dimensional grid (Required).
|
||||
|
||||
@@ -600,32 +600,35 @@
|
||||
// Hot air hurts :(
|
||||
if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
|
||||
|
||||
if(breath.temperature < species.cold_level_1)
|
||||
if(breath.temperature <= species.cold_level_1)
|
||||
if(prob(20))
|
||||
src << "<span class='danger'>You feel your face freezing and icicles forming in your lungs!</span>"
|
||||
else if(breath.temperature > species.heat_level_1)
|
||||
else if(breath.temperature >= species.heat_level_1)
|
||||
if(prob(20))
|
||||
src << "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>"
|
||||
|
||||
switch(breath.temperature)
|
||||
if(-INFINITY to species.cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(species.cold_level_3 to species.cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(species.cold_level_2 to species.cold_level_1)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(species.heat_level_1 to species.heat_level_2)
|
||||
if(breath.temperature >= species.heat_level_1)
|
||||
if(breath.temperature < species.heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(species.heat_level_2 to species.heat_level_3)
|
||||
else if(breath.temperature < species.heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(species.heat_level_3 to INFINITY)
|
||||
else
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
else if(breath.temperature <= species.cold_level_1)
|
||||
if(breath.temperature > species.cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else if(breath.temperature > species.cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
@@ -695,43 +698,38 @@
|
||||
|
||||
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
||||
var/relative_density = environment.total_moles / MOLES_CELLSTANDARD
|
||||
temp_adj *= relative_density
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
|
||||
//world << "Environment: [loc_temp], [src]: [bodytemperature], Adjusting: [temp_adj]"
|
||||
bodytemperature += temp_adj
|
||||
bodytemperature += between(BODYTEMP_COOLING_MAX, temp_adj*relative_density, BODYTEMP_HEATING_MAX)
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > species.heat_level_1)
|
||||
if(bodytemperature >= species.heat_level_1)
|
||||
//Body temperature is too hot.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
switch(bodytemperature)
|
||||
if(species.heat_level_1 to species.heat_level_2)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(species.heat_level_2 to species.heat_level_3)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(species.heat_level_3 to INFINITY)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
if(bodytemperature < species.heat_level_2)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
else if(bodytemperature < species.heat_level_3)
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
else
|
||||
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
else if(bodytemperature < species.cold_level_1)
|
||||
else if(bodytemperature <= species.cold_level_1)
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
|
||||
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
switch(bodytemperature)
|
||||
if(species.cold_level_2 to species.cold_level_1)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(species.cold_level_3 to species.cold_level_2)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(-INFINITY to species.cold_level_3)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(bodytemperature > species.cold_level_2)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else if(bodytemperature > species.cold_level_3)
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
|
||||
@@ -678,7 +678,7 @@
|
||||
|
||||
taj_sideburns
|
||||
name = "Tajara Sideburns"
|
||||
icon_state = "facial_mutton"
|
||||
icon_state = "facial_sideburns"
|
||||
species_allowed = list("Tajara")
|
||||
|
||||
taj_mutton
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
return STATUS_CLOSE // By default no mob can do anything with NanoUI
|
||||
|
||||
/mob/dead/observer/can_use_topic()
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
if(check_rights(R_ADMIN, 0, src))
|
||||
return STATUS_INTERACTIVE // Admins are more equal
|
||||
return STATUS_UPDATE // Ghosts can view updates
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
*/
|
||||
/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob)
|
||||
//testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]")
|
||||
if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
|
||||
if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
|
||||
//testing("nanomanager/user_transferred mob [oldMob.name] has no open uis")
|
||||
return 0 // has no open uis
|
||||
|
||||
|
||||
@@ -311,9 +311,9 @@ var/global/photo_count = 0
|
||||
var/obj/item/weapon/photo/p = new/obj/item/weapon/photo()
|
||||
|
||||
p.name = name
|
||||
p.icon = icon
|
||||
p.tiny = tiny
|
||||
p.img = img
|
||||
p.icon = icon(icon, icon_state)
|
||||
p.tiny = icon(tiny)
|
||||
p.img = icon(img)
|
||||
p.desc = desc
|
||||
p.pixel_x = pixel_x
|
||||
p.pixel_y = pixel_y
|
||||
|
||||
@@ -82,27 +82,27 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
||||
return 0
|
||||
if (user.a_intent == "harm") //check for Hippocratic Oath
|
||||
return 0
|
||||
if(M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
user << "\red You can't operate on the patient while surgery is already in progress."
|
||||
var/zone = user.zone_sel.selecting
|
||||
if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
user << "\red You can't operate on this area while surgery is already in progress."
|
||||
return 1
|
||||
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
//check if tool is right or close enough and if this step is possible
|
||||
if(S.tool_quality(tool))
|
||||
var/step_is_valid = S.can_use(user, M, user.zone_sel.selecting, tool)
|
||||
var/step_is_valid = S.can_use(user, M, zone, tool)
|
||||
if(step_is_valid && S.is_valid_target(M))
|
||||
if(step_is_valid == 2) // This is a failure that already has a message for failing.
|
||||
return 1
|
||||
M.op_stage.in_progress = 1
|
||||
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
|
||||
M.op_stage.in_progress += zone
|
||||
S.begin_step(user, M, zone, tool) //start on it
|
||||
//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
|
||||
S.end_step(user, M, zone, tool) //finish successfully
|
||||
else if ((tool in user.contents) && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||
S.fail_step(user, M, zone, tool) //malpractice~
|
||||
else // This failing silently was a pain.
|
||||
user << "\red You must remain close to your patient to conduct surgery."
|
||||
M.op_stage.in_progress = 0 // Clear the in-progress flag.
|
||||
M.op_stage.in_progress -= zone // Clear the in-progress flag.
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_surgery()
|
||||
@@ -134,4 +134,4 @@ proc/sort_surgeries()
|
||||
var/face = 0
|
||||
var/head_reattach = 0
|
||||
var/current_organ = "organ"
|
||||
var/in_progress = 0
|
||||
var/list/in_progress = list()
|
||||
Reference in New Issue
Block a user