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\computer\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.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\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\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm" #include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.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/station_captured
var/can_nuke = 0 var/can_nuke = 0
/datum/antagonist/rogue_ai/New()
..()
malf = src
/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc) /datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc)
hacked_apcs |= apc hacked_apcs |= apc

View File

@@ -396,7 +396,7 @@
control_computer.frozen_crew += "[occupant.real_name]" control_computer.frozen_crew += "[occupant.real_name]"
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_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) set_occupant(null)
// Delete the mob. // Delete the mob.
@@ -555,7 +555,7 @@
src.occupant = occupant src.occupant = occupant
name = initial(name) name = initial(name)
if(occupant) if(occupant)
name = "[name] ([occupant])]" name = "[name] ([occupant])"
//Attacks/effects. //Attacks/effects.

View File

@@ -844,19 +844,20 @@ About the new airlock wires panel:
return 0 return 0
return ..() return ..()
/obj/machinery/door/airlock/can_close(var/forced) /obj/machinery/door/airlock/can_close()
if(locked || welded) if(locked || welded)
return 0 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 ..() return ..()
/obj/machinery/door/airlock/close(var/forced=0) /obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced)) if(!can_close())
return 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) if(safe)
for(var/turf/turf in locs) for(var/turf/turf in locs)

View File

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

View File

@@ -149,7 +149,7 @@
"\The [src]", "Yes, [density ? "open" : "close"]", "No") "\The [src]", "Yes, [density ? "open" : "close"]", "No")
if(answer == "No") if(answer == "No")
return 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." user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
return return
if(density && (stat & (BROKEN|NOPOWER))) //can still close without power if(density && (stat & (BROKEN|NOPOWER))) //can still close without power
@@ -169,7 +169,7 @@
if(alarmed) if(alarmed)
// Accountability! // Accountability!
users_to_open |= user.name users_to_open |= user.name
needs_to_close = 1 needs_to_close = !user.isSilicon()
spawn() spawn()
open() open()
else else

View File

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

View File

@@ -123,23 +123,6 @@
else else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>" 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 /obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit" name = "advanced trauma kit"
singular_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,6 +30,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
if(usr.stunned)
return 2 return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3) playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)

View File

@@ -197,6 +197,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src) s.set_up(3, 1, src)
s.start() s.start()
if(user.stunned)
return 1 return 1
else 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 used_skillpoints += 6 * multiplier
/datum/preferences/proc/GetSkillClass(points) /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 // 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 points -= min(round((age - 20) / 2.5), 4) // every 2.5 years after 20, one extra skillpoint
if(age > 30) if(age > 30)
points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint
if(original_points > 0 && points <= 0) points = 1
switch(points) switch(points)
if(0) if(-1000 to 3)
return "Unconfigured"
if(1 to 3)
return "Terrifying" return "Terrifying"
if(4 to 6) if(4 to 6)
return "Below Average" 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 += "<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=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>" dat += "<a href='byond://?src=\ref[user];preference=flavour_text_robot;task=open'><b>Set Robot Flavour Text</b></a><br>"

View File

@@ -706,6 +706,7 @@
/obj/item/weapon/rig/proc/shock(mob/user) /obj/item/weapon/rig/proc/shock(mob/user)
if (electrocute_mob(user, cell, src)) if (electrocute_mob(user, cell, src))
spark_system.start() spark_system.start()
if(user.stunned)
return 1 return 1
return 0 return 0

View File

@@ -319,6 +319,7 @@
del(src) del(src)
return return
/*
if(seed.kitchen_tag) if(seed.kitchen_tag)
switch(seed.kitchen_tag) switch(seed.kitchen_tag)
if("shand") if("shand")
@@ -333,6 +334,7 @@
user << "<span class='notice'>You mash the petals into a poultice.</span>" user << "<span class='notice'>You mash the petals into a poultice.</span>"
del(src) del(src)
return return
*/
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user) /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_HIGHKPA_TOLERANCE, 200) // High pressure capacity.
set_trait(TRAIT_IDEAL_HEAT, 293) // Preferred temperature in Kelvin. 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_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) spawn(5)
sleep(-1) sleep(-1)
@@ -142,6 +142,17 @@
if(!get_trait(TRAIT_STINGS)) if(!get_trait(TRAIT_STINGS))
return return
if(chems && chems.len) 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>" target << "<span class='danger'>You are stung by \the [fruit]!</span>"
for(var/rid in chems) for(var/rid in chems)
var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/5)) 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 plant_sprites[base] = ikey
for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi')) 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. // Populate the global seed datum list.
for(var/type in typesof(/datum/seed)-/datum/seed) for(var/type in typesof(/datum/seed)-/datum/seed)

View File

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

View File

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

View File

@@ -66,7 +66,13 @@
victim.buckled = src victim.buckled = src
victim.update_canmove() victim.update_canmove()
buckled_mob = victim buckled_mob = victim
if(victim.loc != get_turf(src)) 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>") src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
victim.loc = src.loc victim.loc = src.loc
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>" victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"

View File

@@ -14,7 +14,6 @@
var/supported = 0 var/supported = 0
var/active = 0 var/active = 0
var/list/resource_field = list() var/list/resource_field = list()
var/open = 0
var/ore_types = list( var/ore_types = list(
"iron" = /obj/item/weapon/ore/iron, "iron" = /obj/item/weapon/ore/iron,
@@ -30,10 +29,10 @@
) )
//Upgrades //Upgrades
var/obj/item/weapon/stock_parts/matter_bin/storage var/harvest_speed
var/obj/item/weapon/stock_parts/micro_laser/cutter var/capacity
var/obj/item/weapon/stock_parts/capacitor/cellmount var/charge_use
var/obj/item/weapon/cell/cell var/obj/item/weapon/cell/cell = null
//Flags //Flags
var/need_update_field = 0 var/need_update_field = 0
@@ -43,13 +42,14 @@
..() ..()
storage = new(src) component_parts = list()
cutter = new(src) component_parts += new /obj/item/weapon/circuitboard/miningdrill(src)
cellmount = new(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) RefreshParts()
cell.maxcharge = 10000
cell.charge = cell.maxcharge
/obj/machinery/mining/drill/process() /obj/machinery/mining/drill/process()
@@ -74,11 +74,11 @@
return return
//Drill through the flooring, if any. //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) var/turf/simulated/floor/plating/airless/asteroid/T = get_turf(src)
if(!T.dug) if(!T.dug)
T.gets_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) var/turf/simulated/floor/T = get_turf(src)
T.ex_act(2.0) T.ex_act(2.0)
@@ -94,20 +94,20 @@
if(!harvesting) return 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. 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) for(var/metal in ore_types)
if(contents.len >= get_storage_capacity()) if(contents.len >= capacity)
system_error("insufficient storage space") system_error("insufficient storage space")
active = 0 active = 0
need_player_check = 1 need_player_check = 1
update_icon() update_icon()
return return
if(contents.len + total_harvest >= get_storage_capacity()) if(contents.len + total_harvest >= capacity)
total_harvest = get_storage_capacity() - contents.len total_harvest = capacity - contents.len
if(total_harvest <= 0) break if(total_harvest <= 0) break
if(harvesting.resources[metal]) if(harvesting.resources[metal])
@@ -124,7 +124,7 @@
create_ore = harvesting.resources[metal] create_ore = harvesting.resources[metal]
harvesting.resources[metal] = 0 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] var/oretype = ore_types[metal]
new oretype(src) new oretype(src)
@@ -140,93 +140,56 @@
/obj/machinery/mining/drill/attack_ai(var/mob/user as mob) /obj/machinery/mining/drill/attack_ai(var/mob/user as mob)
return src.attack_hand(user) return src.attack_hand(user)
/obj/machinery/mining/drill/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/mining/drill/attackby(obj/item/O as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver)) if(!active)
if(active) return if(default_deconstruction_screwdriver(user, O))
open = !open
user << "\blue You [open ? "open" : "close"] the maintenance panel." //TODO: Sprite.
return return
else if(default_deconstruction_crowbar(user, O))
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 return
else if(istype(W,/obj/item/weapon/stock_parts/matter_bin)) if(default_part_replacement(user, O))
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 return
else if(istype(W,/obj/item/weapon/stock_parts/micro_laser)) if(!panel_open || active) return ..()
if(cutter)
user << "The drill already has a cutting head installed." if(istype(O, /obj/item/weapon/cell))
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) if(cell)
user << "The drill already has a cell installed." user << "The drill already has a cell installed."
else else
user.drop_item() user.drop_item()
W.loc = src O.loc = src
cell = W cell = O
user << "You install \the [W]." component_parts += O
user << "You install \the [O]."
return return
..() ..()
/obj/machinery/mining/drill/attack_hand(mob/user as mob) /obj/machinery/mining/drill/attack_hand(mob/user as mob)
check_supports() 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." user << "You hit the manual override and reset the drill's error checking."
need_player_check = 0 need_player_check = 0
if(anchored) get_resource_field() if(anchored)
get_resource_field()
update_icon() update_icon()
return return
else if(supported && !panel_open)
else if(supported)
if(use_cell_power()) if(use_cell_power())
active = !active active = !active
if(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 need_update_field = 1
else 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 else
user << "\blue The drill is unpowered." user << "<span class='notice'>The drill is unpowered.</span>"
else 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() update_icon()
@@ -241,6 +204,21 @@
icon_state = "mining_drill" icon_state = "mining_drill"
return 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() /obj/machinery/mining/drill/proc/check_supports()
supported = 0 supported = 0
@@ -259,20 +237,12 @@
/obj/machinery/mining/drill/proc/system_error(var/error) /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 need_player_check = 1
active = 0 active = 0
update_icon() 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() /obj/machinery/mining/drill/proc/get_resource_field()
resource_field = list() resource_field = list()
@@ -281,13 +251,13 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) return if(!istype(T)) return
var/tx = T.x-2 var/tx = T.x - 2
var/ty = T.y-2 var/ty = T.y - 2
var/turf/mine_turf var/turf/mine_turf
for(var/iy=0,iy<5,iy++) for(var/iy = 0,iy < 5, iy++)
for(var/ix=0,ix<5,ix++) for(var/ix = 0, ix < 5, ix++)
mine_turf = locate(tx+ix,ty+iy,T.z) mine_turf = locate(tx + ix, ty + iy, T.z)
if(mine_turf && istype(mine_turf) && mine_turf.has_resources) if(mine_turf && mine_turf.has_resources)
resource_field += mine_turf resource_field += mine_turf
if(!resource_field.len) if(!resource_field.len)
@@ -295,9 +265,8 @@
/obj/machinery/mining/drill/proc/use_cell_power() /obj/machinery/mining/drill/proc/use_cell_power()
if(!cell) return 0 if(!cell) return 0
var/req = get_charge_use() if(cell.charge >= charge_use)
if(cell.charge >= req) cell.use(charge_use)
cell.use(req)
return 1 return 1
return 0 return 0
@@ -312,9 +281,9 @@
if(B) if(B)
for(var/obj/item/weapon/ore/O in contents) for(var/obj/item/weapon/ore/O in contents)
O.loc = B 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 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 /obj/machinery/mining/brace
@@ -326,16 +295,16 @@
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/wrench)) if(istype(W,/obj/item/weapon/wrench))
if(istype(get_turf(src),/turf/space)) if(istype(get_turf(src), /turf/space))
user << "\blue You can't anchor something to empty space. Idiot." user << "<span class='notice'>You can't anchor something to empty space. Idiot.</span>"
return return
if(connected && connected.active) 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 return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) 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 anchored = !anchored
if(anchored) if(anchored)
@@ -347,18 +316,16 @@
var/turf/T = get_step(get_turf(src), src.dir) 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) for(var/thing in T.contents)
if(istype(thing,/obj/machinery/mining/drill)) if(istype(thing, /obj/machinery/mining/drill))
connected = thing connected = thing
break break
if(!connected) return if(!connected)
return
if(!connected.supports) connected.supports = list() if(!connected.supports)
connected.supports = list()
icon_state = "mining_brace_active" icon_state = "mining_brace_active"

View File

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

View File

@@ -189,7 +189,7 @@ var/list/ai_verbs_default = list(
src << radio_text src << radio_text
if (!(ticker && ticker.mode && (mind in malf.current_antagonists))) if (malf && !(mind in malf.current_antagonists))
show_laws() show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>" 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() /mob/living/silicon/ai/Del()
ai_list -= src ai_list -= src
del(eyeobj)
..() ..()
/mob/living/silicon/ai/pointed(atom/A as mob|obj|turf in view()) /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. robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999) ident = rand(1, 999)
module_sprites["Basic"] = "robot" module_sprites["Basic"] = "robot"
icontype = "Default" icontype = "Basic"
updatename("Default") updatename("Default")
updateicon() 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) var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
RG.synths = list(metal, glass) RG.synths = list(metal, glass)
src.modules += R src.modules += RG
/obj/item/weapon/robot_module/engineering /obj/item/weapon/robot_module/engineering
name = "engineering robot module" name = "engineering robot module"

View File

@@ -168,30 +168,7 @@ proc/setup_skills()
mob/living/carbon/human/proc/GetSkillClass(points) mob/living/carbon/human/proc/GetSkillClass(points)
// skill classes describe how your character compares in total points return CalculateSkillClass(points, age)
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"
proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M) proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M)
if(!istype(M)) return if(!istype(M)) return

View File

@@ -324,8 +324,7 @@
if(href_list["write"]) if(href_list["write"])
var/id = 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(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 = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN)
var/t = input("Enter what you want to write:", "Write", null, null) as message
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/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 var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen)) if(!istype(i, /obj/item/weapon/pen))

View File

@@ -534,6 +534,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
if(user.stunned)
return return
C.use(10) C.use(10)
user.visible_message(\ user.visible_message(\
@@ -554,6 +555,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
if(usr.stunned)
return return
new /obj/item/stack/cable_coil(loc,10) new /obj/item/stack/cable_coil(loc,10)
user << "<span class='notice'>You cut the cables and dismantle the power terminal.</span>" user << "<span class='notice'>You cut the cables and dismantle the power terminal.</span>"

View File

@@ -193,8 +193,8 @@ 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 var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
if(usr.stunned)
return 1 return 1
else
return 0 return 0
//explosion handling //explosion handling

View File

@@ -275,6 +275,7 @@
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
building_terminal = 0 building_terminal = 0
if(usr.stunned)
return 0 return 0
new /obj/item/stack/cable_coil(loc,10) new /obj/item/stack/cable_coil(loc,10)
user.visible_message(\ user.visible_message(\

View File

@@ -58,8 +58,7 @@
/datum/surgery_step/internal/fix_organ /datum/surgery_step/internal/fix_organ
allowed_tools = list( allowed_tools = list(
/obj/item/stack/medical/advanced/bruise_pack= 100, \ /obj/item/stack/medical/advanced/bruise_pack= 100, \
/obj/item/stack/medical/bruise_pack = 20, \ /obj/item/stack/medical/bruise_pack = 20
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
) )
min_duration = 70 min_duration = 70
@@ -82,10 +81,7 @@
var/tool_name = "\the [tool]" var/tool_name = "\the [tool]"
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
tool_name = "regenerative membrane" tool_name = "regenerative membrane"
if (istype(tool, /obj/item/stack/medical/bruise_pack)) else 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)) if (!hasorgans(target))
@@ -106,9 +102,6 @@
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
tool_name = "regenerative membrane" tool_name = "regenerative membrane"
if (istype(tool, /obj/item/stack/medical/bruise_pack)) 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)) if (!hasorgans(target))
@@ -136,9 +129,6 @@
target.adjustToxLoss(5) target.adjustToxLoss(5)
else if (istype(tool, /obj/item/stack/medical/bruise_pack)) 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 dam_amt = 5
target.adjustToxLoss(10) target.adjustToxLoss(10)
affected.createwound(CUT, 5) affected.createwound(CUT, 5)

View File

@@ -331,3 +331,7 @@ STARLIGHT 0
## Defines how Law Zero is phrased. Primarily in the Malfunction gamemode. ## 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 # 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