This commit is contained in:
Ghommie
2020-03-08 02:33:27 +01:00
190 changed files with 2895 additions and 2115 deletions
-33
View File
@@ -514,39 +514,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/client/proc/ResetAmbiencePlayed()
played = FALSE
/atom/proc/has_gravity(turf/T)
if(!T || !isturf(T))
T = get_turf(src)
if(!T)
return 0
var/list/forced_gravity = list()
SEND_SIGNAL(src, COMSIG_ATOM_HAS_GRAVITY, T, forced_gravity)
if(!forced_gravity.len)
SEND_SIGNAL(T, COMSIG_TURF_HAS_GRAVITY, src, forced_gravity)
if(forced_gravity.len)
var/max_grav
for(var/i in forced_gravity)
max_grav = max(max_grav, i)
if(max_grav)
return max_grav
if(isspaceturf(T)) // Turf never has gravity
return 0
var/area/A = get_area(T)
if(A.has_gravity) // Areas which always has gravity
return A.has_gravity
else
// There's a gravity generator on our z level
if(GLOB.gravity_generators["[T.z]"])
var/max_grav = 0
for(var/obj/machinery/gravity_generator/main/G in GLOB.gravity_generators["[T.z]"])
max_grav = max(G.setting,max_grav)
return max_grav
return SSmapping.level_trait(T.z, ZTRAIT_GRAVITY)
/area/proc/setup(a_name)
name = a_name
power_equip = FALSE
+2
View File
@@ -3,6 +3,8 @@
/area/ruin/space
has_gravity = FALSE
blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station.
outdoors = TRUE
ambientsounds = SPACE
/area/ruin/space/has_grav
has_gravity = STANDARD_GRAVITY
+49 -3
View File
@@ -97,7 +97,7 @@
var/temp_list = list()
for(var/i in custom_materials)
temp_list[getmaterialref(i)] = custom_materials[i] //Get the proper instanced version
temp_list[SSmaterials.GetMaterialRef(i)] = custom_materials[i] //Get the proper instanced version
custom_materials = null //Null the list to prepare for applying the materials properly
set_custom_materials(temp_list)
@@ -904,7 +904,7 @@ Proc for attack log creation, because really why not
if(custom_materials) //Only runs if custom materials existed at first. Should usually be the case but check anyways
for(var/i in custom_materials)
var/datum/material/custom_material = getmaterialref(i)
var/datum/material/custom_material = SSmaterials.GetMaterialRef(i)
custom_material.on_removed(src, material_flags) //Remove the current materials
if(!length(materials))
@@ -913,8 +913,54 @@ Proc for attack log creation, because really why not
custom_materials = list() //Reset the list
for(var/x in materials)
var/datum/material/custom_material = getmaterialref(x)
var/datum/material/custom_material = SSmaterials.GetMaterialRef(x)
if(!(material_flags & MATERIAL_NO_EFFECTS))
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
custom_materials[custom_material] += materials[x] * multiplier
/**
* Returns true if this atom has gravity for the passed in turf
*
* Sends signals COMSIG_ATOM_HAS_GRAVITY and COMSIG_TURF_HAS_GRAVITY, both can force gravity with
* the forced gravity var
*
* Gravity situations:
* * No gravity if you're not in a turf
* * No gravity if this atom is in is a space turf
* * Gravity if the area it's in always has gravity
* * Gravity if there's a gravity generator on the z level
* * Gravity if the Z level has an SSMappingTrait for ZTRAIT_GRAVITY
* * otherwise no gravity
*/
/atom/proc/has_gravity(turf/T)
if(!T || !isturf(T))
T = get_turf(src)
if(!T)
return 0
var/list/forced_gravity = list()
SEND_SIGNAL(src, COMSIG_ATOM_HAS_GRAVITY, T, forced_gravity)
if(!forced_gravity.len)
SEND_SIGNAL(T, COMSIG_TURF_HAS_GRAVITY, src, forced_gravity)
if(forced_gravity.len)
var/max_grav
for(var/i in forced_gravity)
max_grav = max(max_grav, i)
return max_grav
if(isspaceturf(T)) // Turf never has gravity
return 0
var/area/A = get_area(T)
if(A.has_gravity) // Areas which always has gravity
return A.has_gravity
else
// There's a gravity generator on our z level
if(GLOB.gravity_generators["[T.z]"])
var/max_grav = 0
for(var/obj/machinery/gravity_generator/main/G in GLOB.gravity_generators["[T.z]"])
max_grav = max(G.setting,max_grav)
return max_grav
return SSmapping.level_trait(T.z, ZTRAIT_GRAVITY)
+8 -3
View File
@@ -131,7 +131,7 @@
return FALSE
// Are we trying to pull something we are already pulling? Then enter grab cycle and end.
if(AM == pulling)
grab_state = state
setGrabState(state)
if(istype(AM,/mob/living))
var/mob/living/AMob = AM
AMob.grabbedby(src)
@@ -142,7 +142,7 @@
AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once.
pulling = AM
AM.pulledby = src
grab_state = state
setGrabState(state)
if(ismob(AM))
var/mob/M = AM
log_combat(src, M, "grabbed", addition="passive grab")
@@ -155,7 +155,7 @@
pulling.pulledby = null
var/mob/living/ex_pulled = pulling
pulling = null
grab_state = 0
setGrabState(0)
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
L.update_mobility()// mob gets up if it was lyng down in a chokehold
@@ -563,6 +563,11 @@
return FALSE
return TRUE
/// Updates the grab state of the movable
/// This exists to act as a hook for behaviour
/atom/movable/proc/setGrabState(newstate)
grab_state = newstate
/obj/item/proc/do_pickup_animation(atom/target)
set waitfor = FALSE
if(!istype(loc, /turf))
@@ -746,7 +746,7 @@
Mind.add_antag_datum(ninjadatum)
if(Ninja.mind != Mind) //something has gone wrong!
throw EXCEPTION("Ninja created with incorrect mind")
stack_trace("Ninja created with incorrect mind")
message_admins("[ADMIN_LOOKUPFLW(Ninja)] has been made into a ninja by dynamic.")
log_game("[key_name(Ninja)] was spawned as a ninja by dynamic.")
+25 -4
View File
@@ -86,8 +86,10 @@ GLOBAL_LIST_EMPTY(objectives)
if(M)
. += M
/datum/objective/proc/find_target()
/datum/objective/proc/find_target(dupe_search_range, blacklist)
var/list/datum/mind/owners = get_owners()
if(!dupe_search_range)
dupe_search_range = get_owners()
var/list/possible_targets = list()
var/try_target_late_joiners = FALSE
for(var/I in owners)
@@ -96,7 +98,8 @@ GLOBAL_LIST_EMPTY(objectives)
try_target_late_joiners = TRUE
for(var/datum/mind/possible_target in get_crewmember_minds())
if(!(possible_target in owners) && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && is_unique_objective(possible_target))
possible_targets += possible_target
if(!(possible_target in blacklist))
possible_targets += possible_target
if(try_target_late_joiners)
var/list/all_possible_targets = possible_targets.Copy()
for(var/I in all_possible_targets)
@@ -1075,7 +1078,7 @@ GLOBAL_LIST_EMPTY(cult_contraband)
var/mob/living/carbon/human/H = owner
H.equip_in_one_of_slots(I, list("backpack" = SLOT_IN_BACKPACK))
hoarded_item = I
GLOBAL_LIST_EMPTY(possible_sabotages)
@@ -1092,7 +1095,7 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
if(!GLOB.possible_sabotages.len)//Only need to fill the list when it's needed.
for(var/I in subtypesof(/datum/sabotage_objective))
new I
/datum/objective/sabotage/find_target()
var/list/datum/mind/owners = get_owners()
var/approved_targets = list()
@@ -1155,3 +1158,21 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
/datum/objective/flavor/wizard
flavor_file = "strings/flavor_objectives/wizard.txt"
/datum/objective/contract
var/payout = 0
var/payout_bonus = 0
var/area/dropoff = null
/datum/objective/contract/proc/generate_dropoff() // Generate a random valid area on the station that the dropoff will happen.
var/found = FALSE
while(!found)
var/area/dropoff_area = pick(GLOB.sortedAreas)
if(dropoff_area && is_station_level(dropoff_area.z) && !dropoff_area.outdoors)
dropoff = dropoff_area
found = TRUE
/datum/objective/contract/proc/dropoff_check(mob/user, mob/target) // Check if both the contractor and contract target are at the dropoff point.
var/area/user_area = get_area(user)
var/area/target_area = get_area(target)
return (istype(user_area, dropoff) && istype(target_area, dropoff))
+4 -4
View File
@@ -23,18 +23,18 @@
START_PROCESSING(SSprocessing, src)
/datum/sabotage_objective/processing/proc/check_condition_processing()
return 100
return 1
/datum/sabotage_objective/processing/process()
check_condition_processing()
if(won >= 100)
if(won >= 1)
STOP_PROCESSING(SSprocessing,src)
/datum/sabotage_objective/processing/check_conditions()
return won
/datum/sabotage_objective/processing/power_sink
name = "Drain at least 1 gigajoule of power using a power sink."
name = "Drain at least 100 megajoules of power using a power sink."
sabotage_type = "powersink"
special_equipment = list(/obj/item/sbeacondrop/powersink)
var/sink_found = FALSE
@@ -47,7 +47,7 @@
for(var/datum/powernet/PN in GLOB.powernets)
for(var/obj/item/powersink/sink in PN.nodes)
sink_found_this_time = TRUE
won = max(won,sink.power_drained/1e9)
won = max(won,sink.power_drained/1e8)
sink_found = sink_found_this_time
count = 0
return FALSE
+1 -1
View File
@@ -140,7 +140,7 @@
/obj/machinery/autolathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal))
use_power(MINERAL_MATERIAL_AMOUNT / 10)
else if(item_inserted.custom_materials?.len && item_inserted.custom_materials[getmaterialref(/datum/material/glass)])
else if(item_inserted.custom_materials?.len && item_inserted.custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
else
flick("autolathe_o",src)//plays metal insertion animation
+1 -1
View File
@@ -18,7 +18,7 @@
if(!charging)
return
. += image(charging.icon, charging.icon_state)
. += mutable_appearance(charging.icon, charging.icon_state)
. += "ccharger-on"
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
+7 -7
View File
@@ -491,29 +491,29 @@
/obj/machinery/clonepod/update_overlays()
. = ..()
if(mess)
var/image/gib1 = image(CRYOMOBS, "gibup")
var/image/gib2 = image(CRYOMOBS, "gibdown")
var/mutable_appearance/gib1 = mutable_appearance(CRYOMOBS, "gibup")
var/mutable_appearance/gib2 = mutable_appearance(CRYOMOBS, "gibdown")
gib1.pixel_y = 27 + round(sin(world.time) * 3)
gib1.pixel_x = round(sin(world.time * 3))
gib2.pixel_y = 27 + round(cos(world.time) * 3)
gib2.pixel_x = round(cos(world.time * 3))
. += gib2
. += gib1
. += "cover-on"
else if(occupant)
var/image/occupant_overlay
var/mutable_appearance/occupant_overlay
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
if(unattached_flesh.len <= 0)
occupant_overlay = image(occupant.icon, occupant.icon_state)
occupant_overlay = mutable_appearance(occupant.icon, occupant.icon_state)
occupant_overlay.copy_overlays(occupant)
. += "cover-on"
else
occupant_overlay = image(CRYOMOBS, "clone_meat")
occupant_overlay = mutable_appearance(CRYOMOBS, "clone_meat")
var/matrix/tform = matrix()
tform.Scale(completion)
tform.Turn(cos(world.time * 2) * 3)
occupant_overlay.transform = tform
occupant_overlay.appearance_flags = 0
occupant_overlay.appearance_flags = NONE
occupant_overlay.dir = SOUTH
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
+21 -13
View File
@@ -287,6 +287,7 @@
#define CRYO_PRESERVE 1
#define CRYO_OBJECTIVE 2
#define CRYO_IGNORE 3
#define CRYO_DESTROY_LATER 4
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I)
for(var/datum/objective_item/steal/T in control_computer.theft_cache)
@@ -308,8 +309,8 @@
if(iscyborg(mob_occupant))
var/mob/living/silicon/robot/R = mob_occupant
if(R.mmi?.brain)
cryo_items[R.mmi] = CRYO_IGNORE
cryo_items[R.mmi.brain] = CRYO_IGNORE
cryo_items[R.mmi] = CRYO_DESTROY_LATER
cryo_items[R.mmi.brain] = CRYO_DESTROY_LATER
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags
cryo_items[O] = should_preserve_item(O)
@@ -318,7 +319,7 @@
//Drop all items into the pod.
for(var/obj/item/I in mob_occupant)
if(cryo_items[I] == CRYO_IGNORE)
if(cryo_items[I] == CRYO_IGNORE || cryo_items[I] ==CRYO_DESTROY_LATER)
continue
cryo_items[I] = should_preserve_item(I)
mob_occupant.transferItemToLoc(I, src, TRUE)
@@ -334,17 +335,19 @@
if(QDELETED(I)) //edge cases and DROPDEL.
continue
var/preserve = cryo_items[I]
if(preserve == CRYO_IGNORE)
if(preserve == CRYO_DESTROY_LATER)
continue
else if(preserve == CRYO_DESTROY)
qdel(I)
else if(control_computer?.allow_items)
control_computer.frozen_items += I
if(preserve == CRYO_OBJECTIVE)
control_computer.objective_items += I
I.moveToNullspace()
else
I.forceMove(loc)
if(preserve != CRYO_IGNORE)
if(preserve == CRYO_DESTROY)
qdel(I)
else if(control_computer?.allow_items)
control_computer.frozen_items += I
if(preserve == CRYO_OBJECTIVE)
control_computer.objective_items += I
I.moveToNullspace()
else
I.forceMove(loc)
cryo_items -= I
//Update any existing objectives involving this mob.
for(var/datum/objective/O in GLOB.objectives)
@@ -405,6 +408,10 @@
mob_occupant.ghostize(FALSE, penalize = TRUE)
QDEL_NULL(occupant)
for(var/I in cryo_items) //only "CRYO_DESTROY_LATER" atoms are left)
var/atom/A = I
if(!QDELETED(A))
qdel(A)
open_machine()
name = initial(name)
@@ -412,6 +419,7 @@
#undef CRYO_PRESERVE
#undef CRYO_OBJECTIVE
#undef CRYO_IGNORE
#undef CRYO_DESTROY_LATER
/obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user)
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
@@ -705,7 +705,7 @@
/obj/machinery/porta_turret/syndicate/energy/pirate
max_integrity = 260
integrity_failure = 20
integrity_failure = 0.08
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
+1 -1
View File
@@ -121,7 +121,7 @@
return ..()
/obj/machinery/autoylathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
if(item_inserted.custom_materials?.len && item_inserted.custom_materials[getmaterialref(/datum/material/glass)])
if(item_inserted.custom_materials?.len && item_inserted.custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
else
flick("autolathe_o",src)//plays metal insertion animation
@@ -17,7 +17,7 @@
if(gibs_reagent_id)
reagents.add_reagent(gibs_reagent_id, 5)
if(gibs_bloodtype)
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype, diseases))
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype), diseases)
update_icon()
/obj/effect/decal/cleanable/blood/gibs/update_icon()
+2
View File
@@ -377,6 +377,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
qdel(src)
item_flags &= ~IN_INVENTORY
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
user.update_equipment_speed_mods()
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
@@ -422,6 +423,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
A.Grant(user)
item_flags |= IN_INVENTORY
user.update_equipment_speed_mods()
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
+21 -16
View File
@@ -2,8 +2,8 @@
name = "rapid cable layer"
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
icon = 'icons/obj/tools.dmi'
icon_state = "rcl-empty"
item_state = "rcl-0"
icon_state = "rcl"
item_state = "rcl"
var/obj/structure/cable/last
var/obj/item/stack/cable_coil/loaded
opacity = FALSE
@@ -23,6 +23,10 @@
var/datum/radial_menu/persistent/wiring_gui_menu
var/mob/listeningTo
/obj/item/twohanded/rcl/Initialize()
. = ..()
update_icon()
/obj/item/twohanded/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
@@ -105,7 +109,15 @@
. = ..()
if(!loaded || !loaded.amount)
return
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[max(CEILING(loaded.amount/(max_amount/3), 1), 3)]")
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "[initial(icon_state)]-[CEILING(loaded.amount/(max_amount/3), 1)]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
. += cable_overlay
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = ..()
if(!isinhands || !(loaded?.amount))
return
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
. += cable_overlay
@@ -279,18 +291,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
wiringGuiUpdate(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
. = ..()
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
update_icon()
/obj/item/twohanded/rcl/Initialize()
. = ..()
update_icon()
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/rcl_col))
current_color_index++;
@@ -309,10 +309,15 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
else //open the menu
showWiringGui(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
return ..()
/obj/item/twohanded/rcl/ghetto
actions_types = list()
max_amount = 30
name = "makeshift rapid cable layer"
icon_state = "rclg"
item_state = "rclg"
ghetto = TRUE
+2 -2
View File
@@ -66,8 +66,8 @@
if(iswallturf(T))
T.attackby(src, user, params)
var/metal_amt = round(custom_materials[getmaterialref(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(custom_materials[getmaterialref(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
var/metal_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
if(istype(W, /obj/item/wrench) && (metal_amt || glass_amt))
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
+7 -6
View File
@@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(PDAs)
#define PDA_SCANNER_HALOGEN 4
#define PDA_SCANNER_GAS 5
#define PDA_SPAM_DELAY 2 MINUTES
#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
//pda icon overlays list defines
#define PDA_OVERLAY_ALERT 1
@@ -33,14 +32,14 @@ GLOBAL_LIST_EMPTY(PDAs)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
//Main variables
var/owner = null // String name of owner
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
var/current_overlays = PDA_STANDARD_OVERLAYS
var/static/list/standard_overlays_icons = list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
var/list/current_overlays //set on Initialize.
//variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway)
var/new_overlays = FALSE
@@ -164,7 +163,7 @@ GLOBAL_LIST_EMPTY(PDAs)
overlays_x_offset = new_offsets[1]
overlays_y_offset = new_offsets[2]
if(!(icon in overlays_icons))
current_overlays = PDA_STANDARD_OVERLAYS
current_overlays = standard_overlays_icons
return
current_overlays = overlays_icons[icon]
@@ -228,8 +227,11 @@ GLOBAL_LIST_EMPTY(PDAs)
if(new_overlays)
set_new_overlays()
. += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
var/mutable_appearance/overlay = new()
var/screen_state = new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
var/mutable_appearance/overlay = mutable_appearance(icon, screen_state)
overlay.pixel_x = overlays_x_offset
overlay.pixel_y = overlays_y_offset
. += overlay
if(id)
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
. += new /mutable_appearance(overlay)
@@ -1223,7 +1225,6 @@ GLOBAL_LIST_EMPTY(PDAs)
#undef PDA_SCANNER_HALOGEN
#undef PDA_SCANNER_GAS
#undef PDA_SPAM_DELAY
#undef PDA_STANDARD_OVERLAYS
#undef PDA_OVERLAY_ALERT
#undef PDA_OVERLAY_SCREEN
@@ -193,8 +193,6 @@
/obj/item/pda/curator
name = "curator PDA"
icon_state = "pda-library"
overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"),
'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay"))
current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay")
default_cartridge = /obj/item/cartridge/curator
inserted_item = /obj/item/pen/fountain
+131 -25
View File
@@ -181,13 +181,60 @@
slot_flags = ITEM_SLOT_BELT
force = 12 //9 hit crit
w_class = WEIGHT_CLASS_NORMAL
var/cooldown = 13
var/on = TRUE
var/last_hit = 0
var/stun_stam_cost_coeff = 1.25
var/hardstun_ds = 1
var/hardstun_ds = TRUE
var/softstun_ds = 0
var/stam_dmg = 30
var/cooldown_check = 0 // Used internally, you don't want to modify
var/cooldown = 13 // Default wait time until can stun again.
var/stun_time_silicon = 60 // How long it stuns silicons for - 6 seconds.
var/affect_silicon = FALSE // Does it stun silicons.
var/on_sound // "On" sound, played when switching between able to stun or not.
var/on_stun_sound = "sound/effects/woodhit.ogg" // Default path to sound for when we stun.
var/stun_animation = TRUE // Do we animate the "hit" when stunning.
var/on = TRUE // Are we on or off
var/on_icon_state // What is our sprite when turned on
var/off_icon_state // What is our sprite when turned off
var/on_item_state // What is our in-hand sprite when turned on
var/force_on // Damage when on - not stunning
var/force_off // Damage when off - not stunning
var/weight_class_on // What is the new size class when turned on
/obj/item/melee/classic_baton/Initialize()
. = ..()
// Description for trying to stun when still on cooldown.
/obj/item/melee/classic_baton/proc/get_wait_description()
return
// Description for when turning their baton "on"
/obj/item/melee/classic_baton/proc/get_on_description()
. = list()
.["local_on"] = "<span class ='warning'>You extend the baton.</span>"
.["local_off"] = "<span class ='notice'>You collapse the baton.</span>"
return .
// Default message for stunning mob.
/obj/item/melee/classic_baton/proc/get_stun_description(mob/living/target, mob/living/user)
. = list()
.["visible"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
.["local"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
return .
// Default message for stunning a silicon.
/obj/item/melee/classic_baton/proc/get_silicon_stun_description(mob/living/target, mob/living/user)
. = list()
.["visible"] = "<span class='danger'>[user] pulses [target]'s sensors with the baton!</span>"
.["local"] = "<span class='danger'>You pulse [target]'s sensors with the baton!</span>"
return .
// Are we applying any special effects when we stun to carbon
/obj/item/melee/classic_baton/proc/additional_effects_carbon(mob/living/target, mob/living/user)
return
// Are we applying any special effects when we stun to silicon
/obj/item/melee/classic_baton/proc/additional_effects_silicon(mob/living/target, mob/living/user)
return
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
@@ -208,15 +255,28 @@
user.take_bodypart_damage(2*force)
return
if(iscyborg(target))
..()
if(user.a_intent != INTENT_HARM) // We don't stun if we're on harm.
if(affect_silicon)
var/list/desc = get_silicon_stun_description(target, user)
target.flash_act(affect_silicon = TRUE)
target.Stun(stun_time_silicon)
additional_effects_silicon(target, user)
user.visible_message(desc["visible"], desc["local"])
playsound(get_turf(src), on_stun_sound, 100, TRUE, -1)
if(stun_animation)
user.do_attack_animation(target)
else
..()
else
..()
return
if(!isliving(target))
return
if (user.a_intent == INTENT_HARM)
if(user.a_intent == INTENT_HARM)
if(!..() || !iscyborg(target))
return
else
if(last_hit < world.time)
if(cooldown_check < world.time)
if(target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
return
@@ -224,18 +284,25 @@
var/mob/living/carbon/human/H = target
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
var/list/desc = get_stun_description(target, user)
if(stun_animation)
user.do_attack_animation(target)
playsound(get_turf(src), on_stun_sound, 75, 1, -1)
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
additional_effects_carbon(target, user)
log_combat(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
add_fingerprint(user)
target.visible_message(desc["visible"], desc["local"])
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
last_hit = world.time + cooldown
target.LAssailant = WEAKREF(user)
cooldown_check = world.time + cooldown
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
else
var/wait_desc = get_wait_description()
if(wait_desc)
to_chat(user, wait_desc)
/obj/item/melee/classic_baton/telescopic
name = "telescopic baton"
@@ -250,6 +317,13 @@
item_flags = NONE
force = 0
on = FALSE
on_sound = 'sound/weapons/batonextend.ogg'
on_icon_state = "telebaton_1"
off_icon_state = "telebaton_0"
on_item_state = "nullrod"
force_on = 10
force_off = 0
weight_class_on = WEIGHT_CLASS_BULKY
total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
@@ -260,7 +334,7 @@
if(!on)
src.attack_self(user)
else
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
playsound(loc, on_sound, 50, 1)
add_fingerprint(user)
sleep(3)
if (H && !QDELETED(H))
@@ -272,25 +346,57 @@
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
on = !on
var/list/desc = get_on_description()
if(on)
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
to_chat(user, desc["local_on"])
icon_state = on_icon_state
item_state = on_item_state
w_class = weight_class_on
force = force_on
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
icon_state = "telebaton_0"
to_chat(user, desc["local_off"])
icon_state = off_icon_state
item_state = null //no sprite for concealment even when in hand
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
force = 0 //not so robust now
force = force_off
attack_verb = list("hit", "poked")
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
playsound(src.loc, on_sound, 50, 1)
add_fingerprint(user)
/obj/item/melee/classic_baton/telescopic/contractor_baton
name = "contractor baton"
desc = "A compact, specialised baton assigned to Syndicate contractors. Applies light electrical shocks to targets."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "contractor_baton_0"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
item_state = null
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
item_flags = NONE
force = 5
cooldown = 20
stam_dmg = 45 //3 hit stamcrit
affect_silicon = TRUE
on_sound = 'sound/weapons/contractorbatonextend.ogg'
on_stun_sound = 'sound/effects/contractorbatonhit.ogg'
on_icon_state = "contractor_baton_1"
off_icon_state = "contractor_baton_0"
on_item_state = "contractor_baton"
force_on = 16
force_off = 5
weight_class_on = WEIGHT_CLASS_NORMAL
/obj/item/melee/classic_baton/telescopic/contractor_baton/get_wait_description()
return "<span class='danger'>The baton is still charging!</span>"
/obj/item/melee/classic_baton/telescopic/contractor_baton/additional_effects_carbon(mob/living/target, mob/living/user)
target.Jitter(20)
target.apply_effect(EFFECT_STUTTER, 20)
target.apply_status_effect(/datum/status_effect/electrostaff, 30) //knockdown, disarm, and slowdown, the unholy triumvirate of stam combat
/obj/item/melee/supermatter_sword
name = "supermatter sword"
desc = "In a station full of bad ideas, this might just be the worst."
@@ -515,7 +621,7 @@
item_state = "mace_greyscale"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR //Material type changes the prefix as well as the color.
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
slot_flags = ITEM_SLOT_BELT
force = 14
+9 -2
View File
@@ -17,6 +17,7 @@
var/active = FALSE
var/atom/movable/target //The thing we're searching for
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
var/ignore_suit_sensor_level = FALSE // Do we find people even if their suit sensors are turned off
var/alert = FALSE // TRUE to display things more seriously
/obj/item/pinpointer/Initialize()
@@ -77,6 +78,8 @@
name = "crew pinpointer"
desc = "A handheld tracking device that points to crew suit sensors."
icon_state = "pinpointer_crew"
var/has_owner = FALSE
var/pinpointer_owner = null
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
var/turf/here = get_turf(src)
@@ -84,7 +87,7 @@
var/obj/item/clothing/under/U = H.w_uniform
// Suit sensors must be on maximum.
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS && !ignore_suit_sensor_level)
return FALSE
var/turf/there = get_turf(H)
@@ -101,7 +104,11 @@
STOP_PROCESSING(SSfastprocess, src)
update_icon()
return
if (has_owner && !pinpointer_owner)
pinpointer_owner = user
if (pinpointer_owner && pinpointer_owner != user)
to_chat(user, "<span class='notice'>The pinpointer doesn't respond. It seems to only recognise its owner.</span>")
return
var/list/name_counts = list()
var/list/names = list()
@@ -229,6 +229,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
null, \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
null, \
+4 -4
View File
@@ -48,7 +48,7 @@
merge_type = type
if(custom_materials && custom_materials.len)
for(var/i in custom_materials)
custom_materials[getmaterialref(i)] = mats_per_stack * amount
custom_materials[SSmaterials.GetMaterialRef(i)] = mats_per_stack * amount
. = ..()
if(merge)
for(var/obj/item/stack/S in loc)
@@ -57,7 +57,7 @@
var/list/temp_recipes = get_main_recipes()
recipes = temp_recipes.Copy()
if(material_type)
var/datum/material/M = getmaterialref(material_type) //First/main material
var/datum/material/M = SSmaterials.GetMaterialRef(material_type) //First/main material
for(var/i in M.categories)
switch(i)
if(MAT_CATEGORY_RIGID)
@@ -225,7 +225,7 @@
if(R.applies_mats && custom_materials && custom_materials.len)
var/list/used_materials = list()
for(var/i in custom_materials)
used_materials[getmaterialref(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
used_materials[SSmaterials.GetMaterialRef(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
O.set_custom_materials(used_materials)
//START: oh fuck i'm so sorry
@@ -347,7 +347,7 @@
src.amount += amount
if(custom_materials && custom_materials.len)
for(var/i in custom_materials)
custom_materials[getmaterialref(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
custom_materials[SSmaterials.GetMaterialRef(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
set_custom_materials() //Refresh
update_icon()
update_weight()
@@ -397,3 +397,97 @@
/obj/item/storage/box/syndie_kit/revolver/PopulateContents()
new /obj/item/gun/ballistic/revolver(src)
new /obj/item/ammo_box/a357(src)
/obj/item/storage/box/syndie_kit/contract_kit
name = "contractor kit"
desc = "Supplied to Syndicate contractors in active mission areas."
/obj/item/storage/box/syndicate/contractor_loadout
name = "standard loadout"
desc = "Supplied to Syndicate contractors, providing their specialised space suit and chameleon uniform."
icon_state = "syndiebox"
illustration = "writing_syndie"
/obj/item/paper/contractor_guide
name = "Contractor Guide"
/obj/item/paper/contractor_guide/Initialize()
info = {"<p>Welcome agent, congratulations on your new position as contractor. On top of your already assigned objectives,
this kit will provide you contracts to take on for TC payments.</p>
<p>Provided within, we give your specialist contractor space suit. It's even more compact, being able to fit into a pocket, and faster than the
Syndicate space suit available to you on the uplink. We also provide your chameleon jumpsuit and mask, both of which can be changed
to any form you need for the moment. The cigarettes are a special blend - it'll heal your injuries slowly overtime.</p>
<p>The three additional items, apart from the tablet and loadout box, have been randomly selected from what we had available. We hope
they're useful to you for you mission.</p>
<p>The contractor hub, available at the top right of the uplink, will provide you unique items and abilities. These are bought using Contractor Rep,
with two Rep being provided each time you complete a contract.</p>
<h3>Using the tablet</h3>
<ol>
<li>Open the Syndicate Contract Uplink program.</li>
<li>Assign yourself.</li>
<li>Here, you can accept a contract, and redeem your TC payments from completed contracts.</li>
<li>The payment number shown in brackets is the bonus you'll recieve when bringing your target <b>alive</b>. You recieve the
other number regardless of if they were alive or dead.</li>
<li>Contracts are completed by bringing the target to designated dropoff, calling for extraction, and putting them
inside the pod.</li>
</ol>
<p>Be careful when accepting a contract. While you'll be able to see the location of the dropoff point, cancelling will make it
unavailable to take on again.</p>
<p>The tablet can also be recharged at any cell charger.</p>
<h3>Extracting</h3>
<ol>
<li>Make sure both yourself and your target are at the dropoff.</li>
<li>Call the extraction, and stand back from the drop point</li>
<li>If it fails, make sure your target is inside, and there's a free space for the pod to land.</li>
<li>Grab your target, and drag them into the pod.</li>
</ol>
<h3>Ransoms</h3>
<p>We need your target for our own reasons, but we ransom them back to your mission area once their use is served. They will return back
from where you sent them off from in several minutes time. You will be paid in TC for your services.</p>
<p>Good luck agent. You can burn this document with the supplied lighter.</p>"}
return ..()
/obj/item/storage/box/syndicate/contractor_loadout/PopulateContents()
new /obj/item/clothing/head/helmet/space/syndicate/contract(src)
new /obj/item/clothing/suit/space/syndicate/contract(src)
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/chameleon(src)
new /obj/item/card/id/syndicate(src)
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src)
new /obj/item/lighter(src)
/obj/item/storage/box/syndie_kit/contract_kit/PopulateContents()
new /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink(src)
new /obj/item/storage/box/syndicate/contractor_loadout(src)
new /obj/item/melee/classic_baton/telescopic/contractor_baton(src)
var/list/item_list = list( // All 4 TC or less - some nukeops only items, but fit nicely to the theme.
/obj/item/storage/backpack/duffelbag/syndie/x4,
/obj/item/storage/box/syndie_kit/throwing_weapons,
/obj/item/gun/syringe/syndicate,
/obj/item/pen/edagger,
/obj/item/pen/sleepy,
/obj/item/flashlight/emp,
/obj/item/reagent_containers/syringe/mulligan,
/obj/item/clothing/shoes/chameleon/noslip,
/obj/item/storage/firstaid/tactical,
/obj/item/storage/backpack/duffelbag/syndie/surgery,
/obj/item/encryptionkey/syndicate,
/obj/item/clothing/glasses/thermal/syndi,
/obj/item/slimepotion/slime/sentience/nuclear,
/obj/item/storage/box/syndie_kit/imp_radio,
/obj/item/storage/box/syndie_kit/imp_uplink,
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot,
/obj/item/reagent_containers/syringe/stimulants,
/obj/item/storage/box/syndie_kit/imp_freedom,
/obj/item/toy/eightball/haunted
)
var/obj/item1 = pick_n_take(item_list)
var/obj/item2 = pick_n_take(item_list)
var/obj/item3 = pick_n_take(item_list)
new item1(src) // Create three, non repeat items from the list.
new item2(src)
new item3(src)
new /obj/item/paper/contractor_guide(src) //Paper guide
+3 -1
View File
@@ -25,7 +25,7 @@
/obj/item/melee/baton/examine(mob/user)
. = ..()
. += "<span class='notice'>Right click attack while in combat mode to disarm instead of stun.</span>"
. += "<span class='notice'>Right click attack while in combat mode or attack while in disarm intent to disarm instead of stun.</span>"
/obj/item/melee/baton/get_cell()
. = cell
@@ -149,6 +149,8 @@
//return TRUE to interrupt attack chain.
/obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE)
if(user.a_intent == INTENT_DISARM)
disarming = TRUE //override if they're in disarm intent.
if(iscyborg(M) || !isliving(M)) //can't baton cyborgs
return FALSE
if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
-19
View File
@@ -347,25 +347,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/switchblade/crafted
icon_state = "switchblade_ms"
desc = "A concealable spring-loaded knife."
force = 2
throwforce = 3
extended_force = 15
extended_throwforce = 18
extended_icon_state = "switchblade_ext_ms"
retracted_icon_state = "switchblade_ms"
/obj/item/switchblade/crafted/attackby(obj/item/I, mob/user, params)
. = ..()
if(istype(I, /obj/item/stack/sheet/mineral/silver))
icon_state = extended ? "switchblade_ext_msf" : "switchblade_msf"
extended_icon_state = "switchblade_ext_msf"
retracted_icon_state = "switchblade_msf"
icon_state = "switchblade_msf"
to_chat(user, "<span class='notice'>You use part of the silver to improve your Switchblade. Stylish!</span>")
/obj/item/phone
name = "red phone"
desc = "Should anything ever go wrong..."
@@ -153,7 +153,7 @@
///Material chair
/obj/structure/chair/greyscale
icon_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
item_chair = /obj/item/chair/greyscale
buildstacktype = null //Custom mats handle this
@@ -383,7 +383,7 @@
/obj/item/chair/greyscale
icon_state = "chair_greyscale_toppled"
item_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
origin_type = /obj/structure/chair/greyscale
/obj/item/chair/stool
@@ -83,9 +83,12 @@
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
resistance_flags = FLAMMABLE
can_weld_shut = FALSE
breakout_time = 200
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 5
var/pryLidTimer = 250
/obj/structure/closet/crate/coffin/examine(mob/user)
. = ..()
+1 -1
View File
@@ -41,7 +41,7 @@
make_new_table(material.tableVariant)
else
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
to_chat(user, "<span class='warning'>You need one sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
+1 -1
View File
@@ -211,7 +211,7 @@
/obj/structure/table/greyscale
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
icon_state = "table"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
buildstack = null //No buildstack, so generate from mat datums
/*
+72 -8
View File
@@ -444,9 +444,6 @@
C.adjustFireLoss(5)
to_chat(C, "<span class='danger'>The water is searing!</span>")
/obj/item/bikehorn/rubberducky
name = "rubber ducky"
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
@@ -454,8 +451,6 @@
icon_state = "rubberducky"
item_state = "rubberducky"
/obj/structure/sink
name = "sink"
icon = 'icons/obj/watercloset.dmi'
@@ -465,7 +460,6 @@
var/busy = FALSE //Something's being washed at the moment
var/dispensedreagent = /datum/reagent/water // for whenever plumbing happens
/obj/structure/sink/attack_hand(mob/living/user)
. = ..()
if(.)
@@ -578,12 +572,82 @@
new /obj/item/stack/sheet/metal (loc, 3)
qdel(src)
/obj/structure/sink/kitchen
name = "kitchen sink"
icon_state = "sink_alt"
/obj/structure/sink/well
name = "well"
desc = "A well, used to get water from an underground reservoir."
icon_state = "well"
//The making of the well
/obj/structure/well_foundation
name = "well foundation"
desc = "A small patch of dirt, ready for a well to be made over it. Just use a shovel!"
icon = 'icons/obj/watercloset.dmi'
icon_state = "well_1"
density = FALSE
anchored = TRUE
max_integrity = 1000
var/steps = 0
/obj/structure/well_foundation/attackby(obj/item/S, mob/user, params)
if(steps == 0 && S.tool_behaviour == TOOL_SHOVEL)
S.use_tool(src, user, 80, volume=100)
steps = 1
desc = "A deep patch of dirt, ready for a well to be made over it. Just add some sandstone!"
icon_state = "well_1"
return TRUE
if(steps == 1 && istype(S, /obj/item/stack/sheet/mineral/sandstone))
if(S.use(15))
steps = 2
desc = "A patch of dirt and bricks. Just add some more sandstone!"
icon_state = "well_2"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least fifteen pieces of sandstone!</span>")
return
if(steps == 2 && istype(S, /obj/item/stack/sheet/mineral/sandstone))
if(S.use(25))
steps = 3
desc = "A large well foundation ready to be dug out. Just use a shovel!"
icon_state = "well_3"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least tweenty-five pieces of sandstone!</span>")
return
if(steps == 3 && S.tool_behaviour == TOOL_SHOVEL)
S.use_tool(src, user, 80, volume=100)
steps = 4
desc = "A deep patch of dirt, needs something to hold a bucket and rope. Just add some wood planks!"
icon_state = "well_3"
return TRUE
if(steps == 4 && istype(S, /obj/item/stack/sheet/mineral/wood))
if(S.use(3))
steps = 5
desc = "A dug out well, A dug out well with out rope. Just add some cloth!"
icon_state = "well_4"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least three planks!</span>")
return
if(steps == 5 && istype(S, /obj/item/stack/sheet/cloth))
if(S.use(2))
steps = 6
desc = "A dug out well with a rope. Just add a wooden bucket!"
icon_state = "well_5"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least two pieces of cloth!</span>")
return
if(steps == 6 && istype(S, /obj/item/reagent_containers/glass/bucket/wood))
new /obj/structure/sink/well(loc)
qdel(S)
qdel(src)
return
else
return ..()
/obj/structure/sink/puddle //splishy splashy ^_^
name = "puddle"
+1 -2
View File
@@ -1,7 +1,6 @@
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, soundenvwet = -10000, soundenvdry = 0)
if(isarea(source))
throw EXCEPTION("playsound(): source is an area")
return
CRASH("playsound(): source is an area")
var/turf/turf_source = get_turf(source)