Merge remote-tracking branch 'upstream/dev' into sanitize_procs

This commit is contained in:
volas
2015-03-25 01:06:32 +03:00
34 changed files with 227 additions and 261 deletions

View File

@@ -642,6 +642,7 @@
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"

View File

@@ -19,6 +19,10 @@ var/datum/antagonist/rogue_ai/malf
var/station_captured
var/can_nuke = 0
/datum/antagonist/rogue_ai/New()
..()
malf = src
/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc)
hacked_apcs |= apc

View File

@@ -396,7 +396,7 @@
control_computer.frozen_crew += "[occupant.real_name]"
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
set_occupant(null)
// Delete the mob.
@@ -555,7 +555,7 @@
src.occupant = occupant
name = initial(name)
if(occupant)
name = "[name] ([occupant])]"
name = "[name] ([occupant])"
//Attacks/effects.

View File

@@ -844,19 +844,20 @@ About the new airlock wires panel:
return 0
return ..()
/obj/machinery/door/airlock/can_close(var/forced)
/obj/machinery/door/airlock/can_close()
if(locked || welded)
return 0
if(!forced)
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked, above
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
return 0
return ..()
/obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced))
return
if(!can_close())
return 0
if(!forced)
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked in can_close()
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
return 0
if(safe)
for(var/turf/turf in locs)

View File

@@ -88,10 +88,10 @@
return 0
return 1
/obj/machinery/door/proc/can_close(var/forced = 0)
if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER))))
return 1
return 0
/obj/machinery/door/proc/can_close()
if(density || operating || !ticker)
return 0
return 1
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return

View File

@@ -22,7 +22,7 @@
open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open
closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed
//These are frequenly used with windows, so make sure zones can pass.
//These are frequenly used with windows, so make sure zones can pass.
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
block_air_zones = 0
@@ -149,7 +149,7 @@
"\The [src]", "Yes, [density ? "open" : "close"]", "No")
if(answer == "No")
return
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user)))
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !user.isSilicon()) || (get_dist(src, user) > 1 && !isAI(user)))
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
return
if(density && (stat & (BROKEN|NOPOWER))) //can still close without power
@@ -169,7 +169,7 @@
if(alarmed)
// Accountability!
users_to_open |= user.name
needs_to_close = 1
needs_to_close = !user.isSilicon()
spawn()
open()
else
@@ -272,7 +272,7 @@
spawn(0)
close()
return
return ..()
// CHECK PRESSURE

View File

@@ -270,9 +270,9 @@ Class Procs:
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning()
return 1
else
return 0
if(user.stunned)
return 1
return 0
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))

View File

@@ -123,23 +123,6 @@
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/bruise_pack/tajaran
name = "\improper S'rendarr's Hand leaf"
singular_name = "S'rendarr's Hand leaf"
desc = "A poultice made of soft leaves that is rubbed on bruises."
//icon = 'icons/obj/harvest.dmi'
icon_state = "shandp"
heal_brute = 7
/obj/item/stack/medical/ointment/tajaran
name = "\improper Messa's Tear petals"
singular_name = "Messa's Tear petals"
desc = "A poultice made of cold, blue petals that is rubbed on burns."
//icon = 'icons/obj/harvest.dmi'
icon_state = "mtearp"
heal_burn = 7
/obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit"
singular_name = "advanced trauma kit"

View File

@@ -0,0 +1,15 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/miningdrill
name = T_BOARD("mining drill head")
build_path = "/obj/machinery/mining/drill"
board_type = "machine"
origin_tech = "programming=1;engineering=1"
frame_desc = "Requires 1 capacitor, 1 cell, 1 matter bin, and 1 micro laser."
req_components = list(
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/weapon/cell" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1)

View File

@@ -30,7 +30,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 2
if(usr.stunned)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)

View File

@@ -68,12 +68,12 @@
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.damage
var/passthrough = 0
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
switch(Proj.damage_type)
if(BRUTE)
//bullets
//bullets
if(Proj.original == src || prob(20))
Proj.damage *= between(0, Proj.damage/60, 0.5)
if(prob(max((damage-10)/25, 0))*100)
@@ -86,11 +86,11 @@
if(!(Proj.original == src || prob(20)))
Proj.damage *= 0.5
passthrough = 1
if(passthrough)
. = -1
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
@@ -139,7 +139,7 @@
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/wtype = ST.created_window
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
@@ -197,7 +197,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
return 1
if(user.stunned)
return 1
else
return 0
return 0

12
code/modules/client/preferences.dm Executable file → Normal file
View File

@@ -171,16 +171,16 @@ datum/preferences
used_skillpoints += 6 * multiplier
/datum/preferences/proc/GetSkillClass(points)
return CalculateSkillClass(points, age)
/proc/CalculateSkillClass(points, age)
if(points <= 0) return "Unconfigured"
// skill classes describe how your character compares in total points
var/original_points = points
points -= min(round((age - 20) / 2.5), 4) // every 2.5 years after 20, one extra skillpoint
if(age > 30)
points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint
if(original_points > 0 && points <= 0) points = 1
switch(points)
if(0)
return "Unconfigured"
if(1 to 3)
if(-1000 to 3)
return "Terrifying"
if(4 to 6)
return "Below Average"
@@ -394,7 +394,7 @@ datum/preferences
dat += "<b><a href=\"byond://?src=\ref[user];preference=antagoptions;active=0\">Set Antag Options</b></a><br>"
dat += "\t<a href=\"byond://?src=\ref[user];preference=skills\"><b>Set Skills</b> (<i>[GetSkillClass(used_skillpoints)][used_skillpoints > 0 ? " [used_skillpoints]" : "0"])</i></a><br>"
dat += "\t<a href=\"byond://?src=\ref[user];preference=skills\"><b>Set Skills</b> (<i>[GetSkillClass(used_skillpoints)] [used_skillpoints > 0 ? "[used_skillpoints]" : "0"]</i>)</a><br>"
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=open'><b>Set Flavor Text</b></a><br>"
dat += "<a href='byond://?src=\ref[user];preference=flavour_text_robot;task=open'><b>Set Robot Flavour Text</b></a><br>"

View File

@@ -688,27 +688,28 @@
//Todo
/obj/item/weapon/rig/proc/malfunction()
return 0
return 0
/obj/item/weapon/rig/emp_act(severity_class)
//set malfunctioning
if(emp_protection < 30) //for ninjas, really.
malfunctioning += 10
if(malfunction_delay <= 0)
malfunction_delay = max(malfunction_delay, round(30/severity_class))
malfunction_delay = max(malfunction_delay, round(30/severity_class))
//drain some charge
if(cell) cell.emp_act(severity_class + 15)
//possibly damage some modules
take_hit((100/severity_class), "electrical pulse", 1)
take_hit((100/severity_class), "electrical pulse", 1)
/obj/item/weapon/rig/proc/shock(mob/user)
if (electrocute_mob(user, cell, src))
spark_system.start()
return 1
if(user.stunned)
return 1
return 0
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
if(!installed_modules.len)
@@ -740,7 +741,7 @@
dam_module = pick(damaged_modules)
else if(valid_modules.len)
dam_module = pick(valid_modules)
if(!dam_module) return
dam_module.damage++
@@ -748,11 +749,11 @@
if(!source)
source = "hit"
if(wearer)
if(wearer)
if(dam_module.damage >= 2)
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!"
else
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
dam_module.deactivate()
/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user)

View File

@@ -319,6 +319,7 @@
del(src)
return
/*
if(seed.kitchen_tag)
switch(seed.kitchen_tag)
if("shand")
@@ -333,6 +334,7 @@
user << "<span class='notice'>You mash the petals into a poultice.</span>"
del(src)
return
*/
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
..()

View File

@@ -59,7 +59,7 @@
set_trait(TRAIT_HIGHKPA_TOLERANCE, 200) // High pressure capacity.
set_trait(TRAIT_IDEAL_HEAT, 293) // Preferred temperature in Kelvin.
set_trait(TRAIT_NUTRIENT_CONSUMPTION, 0.25) // Plant eats this much per tick.
set_trait(TRAIT_PLANT_COLOUR, "#6EF86A") // Colour of the plant icon.
set_trait(TRAIT_PLANT_COLOUR, "#46B543") // Colour of the plant icon.
spawn(5)
sleep(-1)
@@ -142,6 +142,17 @@
if(!get_trait(TRAIT_STINGS))
return
if(chems && chems.len)
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
for(var/obj/item/clothing/clothes in target)
if(target.l_hand == clothes|| target.r_hand == clothes)
continue
body_coverage &= ~(clothes.body_parts_covered)
if(!body_coverage)
return
target << "<span class='danger'>You are stung by \the [fruit]!</span>"
for(var/rid in chems)
var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/5))

View File

@@ -66,7 +66,9 @@ var/global/datum/controller/plants/plant_controller // Set in New().
plant_sprites[base] = ikey
for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi'))
plant_product_sprites |= icostate
var/split = findtext(icostate,"-")
if(split)
plant_product_sprites |= copytext(icostate,1,split)
// Populate the global seed datum list.
for(var/type in typesof(/datum/seed)-/datum/seed)

View File

@@ -241,7 +241,7 @@
set_trait(TRAIT_PRODUCTION,6)
set_trait(TRAIT_YIELD,5)
set_trait(TRAIT_POTENCY,10)
set_trait(TRAIT_PRODUCT_ICON,"treefruit")
set_trait(TRAIT_PRODUCT_ICON,"apple")
set_trait(TRAIT_PRODUCT_COLOUR,"#FF540A")
set_trait(TRAIT_PLANT_ICON,"tree2")
@@ -419,7 +419,7 @@
set_trait(TRAIT_POTENCY,10)
set_trait(TRAIT_PRODUCT_ICON,"mushroom")
set_trait(TRAIT_PRODUCT_COLOUR,"#FF4545")
set_trait(TRAIT_PLANT_COLOUR,"#F5F2D0")
set_trait(TRAIT_PLANT_COLOUR,"#E0DDBA")
set_trait(TRAIT_PLANT_ICON,"mushroom4")
/datum/seed/mushroom/poison/death
@@ -466,7 +466,6 @@
set_trait(TRAIT_SPREAD,1)
set_trait(TRAIT_MATURATION,15)
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_EXPLOSIVE,1)
set_trait(TRAIT_POTENCY,30)
set_trait(TRAIT_BIOLUM,1)
set_trait(TRAIT_BIOLUM_COLOUR,"#006622")
@@ -585,7 +584,7 @@
set_trait(TRAIT_YIELD,6)
set_trait(TRAIT_POTENCY,10)
set_trait(TRAIT_PRODUCT_ICON,"potato")
set_trait(TRAIT_PRODUCT_COLOUR,"#96855D")
set_trait(TRAIT_PRODUCT_COLOUR,"#C4AE7A")
set_trait(TRAIT_PLANT_ICON,"bush2")
/datum/seed/cabbage
@@ -919,8 +918,9 @@
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_POTENCY,10)
set_trait(TRAIT_PRODUCT_ICON,"cherry")
set_trait(TRAIT_PRODUCT_COLOUR,"#8C0101")
set_trait(TRAIT_PRODUCT_COLOUR,"#A80000")
set_trait(TRAIT_PLANT_ICON,"tree2")
set_trait(TRAIT_PLANT_COLOUR,"#2F7D2D")
/datum/seed/kudzu
name = "kudzu"

View File

@@ -12,6 +12,8 @@ var/global/list/plant_seed_sprites = list()
var/modified = 0
/obj/item/seeds/New()
while(!plant_controller)
sleep(30)
update_seed()
..()

View File

@@ -66,7 +66,13 @@
victim.buckled = src
victim.update_canmove()
buckled_mob = 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
if(!victim.anchored && !victim.buckled && victim.loc != get_turf(src))
var/can_grab = 1
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP))
can_grab = 0
if(can_grab)
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>"

View File

@@ -14,7 +14,6 @@
var/supported = 0
var/active = 0
var/list/resource_field = list()
var/open = 0
var/ore_types = list(
"iron" = /obj/item/weapon/ore/iron,
@@ -30,10 +29,10 @@
)
//Upgrades
var/obj/item/weapon/stock_parts/matter_bin/storage
var/obj/item/weapon/stock_parts/micro_laser/cutter
var/obj/item/weapon/stock_parts/capacitor/cellmount
var/obj/item/weapon/cell/cell
var/harvest_speed
var/capacity
var/charge_use
var/obj/item/weapon/cell/cell = null
//Flags
var/need_update_field = 0
@@ -43,13 +42,14 @@
..()
storage = new(src)
cutter = new(src)
cellmount = new(src)
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/miningdrill(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/cell/high(src)
cell = new(src)
cell.maxcharge = 10000
cell.charge = cell.maxcharge
RefreshParts()
/obj/machinery/mining/drill/process()
@@ -74,11 +74,11 @@
return
//Drill through the flooring, if any.
if(istype(get_turf(src),/turf/simulated/floor/plating/airless/asteroid))
if(istype(get_turf(src), /turf/simulated/floor/plating/airless/asteroid))
var/turf/simulated/floor/plating/airless/asteroid/T = get_turf(src)
if(!T.dug)
T.gets_dug()
else if(istype(get_turf(src),/turf/simulated/floor))
else if(istype(get_turf(src), /turf/simulated/floor))
var/turf/simulated/floor/T = get_turf(src)
T.ex_act(2.0)
@@ -94,20 +94,20 @@
if(!harvesting) return
var/total_harvest = get_harvest_capacity() //Ore harvest-per-tick.
var/total_harvest = harvest_speed //Ore harvest-per-tick.
var/found_resource = 0 //If this doesn't get set, the area is depleted and the drill errors out.
for(var/metal in ore_types)
if(contents.len >= get_storage_capacity())
if(contents.len >= capacity)
system_error("insufficient storage space")
active = 0
need_player_check = 1
update_icon()
return
if(contents.len + total_harvest >= get_storage_capacity())
total_harvest = get_storage_capacity() - contents.len
if(contents.len + total_harvest >= capacity)
total_harvest = capacity - contents.len
if(total_harvest <= 0) break
if(harvesting.resources[metal])
@@ -124,7 +124,7 @@
create_ore = harvesting.resources[metal]
harvesting.resources[metal] = 0
for(var/i=1,i<=create_ore,i++)
for(var/i=1, i <= create_ore, i++)
var/oretype = ore_types[metal]
new oretype(src)
@@ -140,93 +140,56 @@
/obj/machinery/mining/drill/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/mining/drill/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(active) return
open = !open
user << "\blue You [open ? "open" : "close"] the maintenance panel." //TODO: Sprite.
/obj/machinery/mining/drill/attackby(obj/item/O as obj, mob/user as mob)
if(!active)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
if(!panel_open || active) return ..()
if(istype(O, /obj/item/weapon/cell))
if(cell)
user << "The drill already has a cell installed."
else
user.drop_item()
O.loc = src
cell = O
component_parts += O
user << "You install \the [O]."
return
else
if(!open || active) return ..()
if(istype(W,/obj/item/weapon/crowbar))
if(cell)
user << "You pry out \the [cell]."
cell.loc = get_turf(src)
cell = null
else if(storage)
user << "You slip the bolt and pry out \the [storage]."
storage.loc = get_turf(src)
storage = null
else if(cutter)
user << "You carefully detatch and pry out \the [cutter]."
cutter.loc = get_turf(src)
cutter = null
else if(cellmount)
user << "You yank out a few wires and pry out \the [cellmount]."
cellmount.loc = get_turf(src)
cellmount = null
else
user << "There's nothing inside the drilling rig to remove."
return
else if(istype(W,/obj/item/weapon/stock_parts/matter_bin))
if(storage)
user << "The drill already has a matter bin installed."
else
user.drop_item()
W.loc = src
storage = W
user << "You install \the [W]."
return
else if(istype(W,/obj/item/weapon/stock_parts/micro_laser))
if(cutter)
user << "The drill already has a cutting head installed."
else
user.drop_item()
W.loc = src
cutter = W
user << "You install \the [W]."
return
else if(istype(W,/obj/item/weapon/stock_parts/capacitor))
if(cellmount)
user << "The drill already has a cell capacitor installed."
else
user.drop_item()
W.loc = src
cellmount = W
user << "You install \the [W]."
return
else if(istype(W,/obj/item/weapon/cell))
if(cell)
user << "The drill already has a cell installed."
else
user.drop_item()
W.loc = src
cell = W
user << "You install \the [W]."
return
..()
/obj/machinery/mining/drill/attack_hand(mob/user as mob)
check_supports()
if(need_player_check)
if (panel_open && cell)
user << "You take out \the [cell]."
cell.loc = get_turf(user)
component_parts -= cell
cell = null
return
else if(need_player_check)
user << "You hit the manual override and reset the drill's error checking."
need_player_check = 0
if(anchored) get_resource_field()
if(anchored)
get_resource_field()
update_icon()
return
else if(supported)
else if(supported && !panel_open)
if(use_cell_power())
active = !active
if(active)
user << "\blue You engage \the [src] and it lurches downwards, grinding noisily."
visible_message("<span class='notice'>\The [src] lurches downwards, grinding noisily.</span>")
need_update_field = 1
else
user << "\blue You disengage \the [src] and it shudders to a grinding halt."
visible_message("<span class='notice'>\The [src] shudders to a grinding halt.</span>")
else
user << "\blue The drill is unpowered."
user << "<span class='notice'>The drill is unpowered.</span>"
else
user << "\blue Turning on a piece of industrial machinery without sufficient bracing is a bad idea."
user << "<span class='notice'>Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea.</span>"
update_icon()
@@ -241,6 +204,21 @@
icon_state = "mining_drill"
return
/obj/machinery/mining/drill/RefreshParts()
..()
harvest_speed = 0
capacity = 0
charge_use = 50
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/micro_laser))
harvest_speed = P.rating
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
capacity = 200 * P.rating
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
charge_use -= 10 * P.rating
cell = locate(/obj/item/weapon/cell) in component_parts
/obj/machinery/mining/drill/proc/check_supports()
supported = 0
@@ -259,20 +237,12 @@
/obj/machinery/mining/drill/proc/system_error(var/error)
if(error) src.visible_message("\red \The [src] flashes a '[error]' warning.")
if(error)
src.visible_message("<span class='notice'>\The [src] flashes a '[error]' warning.</span>")
need_player_check = 1
active = 0
update_icon()
/obj/machinery/mining/drill/proc/get_harvest_capacity()
return (cutter ? cutter.rating : 0)
/obj/machinery/mining/drill/proc/get_storage_capacity()
return 200 * (storage ? storage.rating : 0)
/obj/machinery/mining/drill/proc/get_charge_use()
return 50 - (10 * (cellmount ? cellmount.rating : 0))
/obj/machinery/mining/drill/proc/get_resource_field()
resource_field = list()
@@ -281,13 +251,13 @@
var/turf/T = get_turf(src)
if(!istype(T)) return
var/tx = T.x-2
var/ty = T.y-2
var/tx = T.x - 2
var/ty = T.y - 2
var/turf/mine_turf
for(var/iy=0,iy<5,iy++)
for(var/ix=0,ix<5,ix++)
mine_turf = locate(tx+ix,ty+iy,T.z)
if(mine_turf && istype(mine_turf) && mine_turf.has_resources)
for(var/iy = 0,iy < 5, iy++)
for(var/ix = 0, ix < 5, ix++)
mine_turf = locate(tx + ix, ty + iy, T.z)
if(mine_turf && mine_turf.has_resources)
resource_field += mine_turf
if(!resource_field.len)
@@ -295,9 +265,8 @@
/obj/machinery/mining/drill/proc/use_cell_power()
if(!cell) return 0
var/req = get_charge_use()
if(cell.charge >= req)
cell.use(req)
if(cell.charge >= charge_use)
cell.use(charge_use)
return 1
return 0
@@ -312,9 +281,9 @@
if(B)
for(var/obj/item/weapon/ore/O in contents)
O.loc = B
usr << "\red You unload the drill's storage cache into the ore box."
usr << "<span class='notice'>You unload the drill's storage cache into the ore box.</span>"
else
usr << "\red You must move an ore box up to the drill before you can unload it."
usr << "<span class='notice'>You must move an ore box up to the drill before you can unload it.</span>"
/obj/machinery/mining/brace
@@ -326,16 +295,16 @@
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/wrench))
if(istype(get_turf(src),/turf/space))
user << "\blue You can't anchor something to empty space. Idiot."
if(istype(get_turf(src), /turf/space))
user << "<span class='notice'>You can't anchor something to empty space. Idiot.</span>"
return
if(connected && connected.active)
user << "\blue You can't unanchor the brace of a running drill!"
user << "<span class='notice'>You can't unanchor the brace of a running drill!</span>"
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue You [anchored ? "un" : ""]anchor the brace."
user << "<span class='notice'>You [anchored ? "un" : ""]anchor the brace.</span>"
anchored = !anchored
if(anchored)
@@ -347,18 +316,16 @@
var/turf/T = get_step(get_turf(src), src.dir)
if(!T.has_resources)
src.visible_message("\red The terrain near the brace is unsuitable!")
return
for(var/thing in T.contents)
if(istype(thing,/obj/machinery/mining/drill))
if(istype(thing, /obj/machinery/mining/drill))
connected = thing
break
if(!connected) return
if(!connected)
return
if(!connected.supports) connected.supports = list()
if(!connected.supports)
connected.supports = list()
icon_state = "mining_brace_active"

View File

@@ -5,16 +5,13 @@
icon_state = "forensic0-old" //GET A BETTER SPRITE.
item_state = "electronic"
matter = list("metal" = 150)
origin_tech = "magnets=1;engineering=1"
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
user << "You begin sweeping \the [src] about, scanning for metal deposits."
if(!do_after(user,50)) return
if(!user || !src) return
if(!do_after(user, 50))
return
var/list/metals = list(
"surface minerals" = 0,
@@ -23,32 +20,30 @@
"exotic matter" = 0
)
for(var/turf/T in range(3,get_turf(user)))
for(var/turf/T in range(2, get_turf(user)))
if(!T.has_resources)
continue
for(var/metal in T.resources)
var/ore_type
switch(metal)
if("silicates" || "carbonaceous rock" || "iron") ore_type = "surface minerals"
if("gold" || "silver" || "diamond") ore_type = "precious metals"
if("uranium") ore_type = "nuclear fuel"
if("phoron" || "osmium" || "hydrogen") ore_type = "exotic matter"
if("silicates", "carbonaceous rock", "iron") ore_type = "surface minerals"
if("gold", "silver", "diamond") ore_type = "precious metals"
if("uranium") ore_type = "nuclear fuel"
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
if(ore_type) metals[ore_type] += T.resources[metal]
user << "\icon[src] \blue The scanner beeps and displays a readout."
user << "\icon[src] <span class='notice'>The scanner beeps and displays a readout.</span>"
for(var/ore_type in metals)
var/result = "no sign"
switch(metals[ore_type])
if(1 to 50) result = "trace amounts"
if(51 to 150) result = "significant amounts"
if(151 to INFINITY) result = "huge quantities"
if(1 to 25) result = "trace amounts"
if(26 to 75) result = "significant amounts"
if(76 to INFINITY) result = "huge quantities"
user << "- [result] of [ore_type]."

View File

@@ -189,7 +189,7 @@ var/list/ai_verbs_default = list(
src << radio_text
if (!(ticker && ticker.mode && (mind in malf.current_antagonists)))
if (malf && !(mind in malf.current_antagonists))
show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
@@ -197,6 +197,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/Del()
ai_list -= src
del(eyeobj)
..()
/mob/living/silicon/ai/pointed(atom/A as mob|obj|turf in view())

View File

@@ -113,7 +113,7 @@
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
module_sprites["Basic"] = "robot"
icontype = "Default"
icontype = "Basic"
updatename("Default")
updateicon()

View File

@@ -196,7 +196,7 @@
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass)
src.modules += R
src.modules += RG
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"

View File

@@ -168,30 +168,7 @@ proc/setup_skills()
mob/living/carbon/human/proc/GetSkillClass(points)
// skill classes describe how your character compares in total points
var/original_points = points
points -= min(round((age - 20) / 2.5), 4) // every 2.5 years after 20, one extra skillpoint
if(age > 30)
points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint
if(original_points > 0 && points <= 0) points = 1
switch(points)
if(0)
return "Unconfigured"
if(1 to 3)
return "Terrifying"
if(4 to 6)
return "Below Average"
if(7 to 10)
return "Average"
if(11 to 14)
return "Above Average"
if(15 to 18)
return "Exceptional"
if(19 to 24)
return "Genius"
if(24 to 1000)
return "God"
return CalculateSkillClass(points, age)
proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M)
if(!istype(M)) return

View File

@@ -324,8 +324,7 @@
if(href_list["write"])
var/id = href_list["write"]
//var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message
//var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
var/t = input("Enter what you want to write:", "Write", null, null) as message
var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN)
var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))

View File

@@ -534,7 +534,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
if(user.stunned)
return
C.use(10)
user.visible_message(\
"<span class='warning'>[user.name] has added cables to the APC frame!</span>",\
@@ -554,7 +555,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
if(usr.stunned)
return
new /obj/item/stack/cable_coil(loc,10)
user << "<span class='notice'>You cut the cables and dismantle the power terminal.</span>"
del(terminal) // qdel

View File

@@ -193,9 +193,9 @@ By design, d1 is the smallest direction and d2 is the highest
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
else
return 0
if(usr.stunned)
return 1
return 0
//explosion handling
/obj/structure/cable/ex_act(severity)

View File

@@ -275,7 +275,8 @@
s.set_up(5, 1, src)
s.start()
building_terminal = 0
return 0
if(usr.stunned)
return 0
new /obj/item/stack/cable_coil(loc,10)
user.visible_message(\
"<span class='notice'>[user.name] cut the cables and dismantled the power terminal.</span>",\

View File

@@ -58,8 +58,7 @@
/datum/surgery_step/internal/fix_organ
allowed_tools = list(
/obj/item/stack/medical/advanced/bruise_pack= 100, \
/obj/item/stack/medical/bruise_pack = 20, \
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
/obj/item/stack/medical/bruise_pack = 20
)
min_duration = 70
@@ -82,11 +81,8 @@
var/tool_name = "\the [tool]"
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
tool_name = "regenerative membrane"
if (istype(tool, /obj/item/stack/medical/bruise_pack))
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
tool_name = "the poultice"
else
tool_name = "the bandaid"
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
tool_name = "the bandaid"
if (!hasorgans(target))
return
@@ -106,10 +102,7 @@
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
tool_name = "regenerative membrane"
if (istype(tool, /obj/item/stack/medical/bruise_pack))
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
tool_name = "the poultice"
else
tool_name = "the bandaid"
tool_name = "the bandaid"
if (!hasorgans(target))
return
@@ -136,12 +129,9 @@
target.adjustToxLoss(5)
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
target.adjustToxLoss(7)
else
dam_amt = 5
target.adjustToxLoss(10)
affected.createwound(CUT, 5)
dam_amt = 5
target.adjustToxLoss(10)
affected.createwound(CUT, 5)
for(var/datum/organ/internal/I in affected.internal_organs)
if(I && I.damage > 0)

View File

@@ -331,3 +331,7 @@ STARLIGHT 0
## Defines how Law Zero is phrased. Primarily in the Malfunction gamemode.
# LAW_ZERO ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010
## Enable asteroid tunnel/cave generation. Will behave strangely if turned off with a map that expects it on.
# GENERATE_ASTEROID

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB