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

This commit is contained in:
Hubblenaut
2015-08-16 20:39:50 +02:00
331 changed files with 4688 additions and 4170 deletions
@@ -9,7 +9,7 @@
/obj/effect/expl_particles/New()
..()
spawn (15)
src.loc = null
qdel(src)
return
/obj/effect/expl_particles/Move()
@@ -49,7 +49,7 @@
/obj/effect/explosion/New()
..()
spawn (10)
src.loc = null
qdel(src)
return
/datum/effect/system/explosion
+13
View File
@@ -1,3 +1,9 @@
// Uncomment this define to check for possible lengthy processing of emp_act()s.
// If emp_act() takes more than defined deciseconds (1/10 seconds) an admin message and log is created.
// I do not recommend having this uncommented on main server, it probably causes a bit more lag, espicially with larger EMPs.
// #define EMPDEBUG 10
proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
@@ -24,6 +30,9 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
M << 'sound/effects/EMPulse.ogg'
for(var/atom/T in range(light_range, epicenter))
#ifdef EMPDEBUG
var/time = world.timeofday
#endif
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0
@@ -36,4 +45,8 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
T.emp_act(2)
else if(distance <= light_range)
T.emp_act(2)
#ifdef EMPDEBUG
if((world.timeofday - time) >= EMPDEBUG)
log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!")
#endif
return 1
+4 -1
View File
@@ -68,7 +68,7 @@
/obj/item/weapon/pen/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(istype(target,/turf/simulated/floor))
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter")
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter","arrow")
switch(drawtype)
if("letter")
drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
@@ -77,6 +77,9 @@
user << "You start drawing graffiti on the [target.name]."
if("rune")
user << "You start drawing a rune on the [target.name]."
if("arrow")
drawtype = input("Choose the arrow.", "Crayon scribbles") in list("left", "right", "up", "down")
user << "You start drawing an arrow on the [target.name]."
if(instant || do_after(user, 50))
new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
user << "You finish drawing."
+1 -34
View File
@@ -1284,40 +1284,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "<span class='notice'>No significant chemical agents found in [A].</span>"
if(5)
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "<span class='warning'>\The [user] has used [src] on \icon[icon] [A].</span>"
var/pressure = A:air_contents.return_pressure()
var/total_moles = A:air_contents.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in A:air_contents.gas)
user << "<span class='notice'>[gas_data.name[g]]: [round((A:air_contents.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(A:air_contents.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "<span class='warning'>\The [user] has used [src] on \icon[icon] [A]</span>"
var/obj/machinery/atmospherics/pipe/tank/T = A
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in T.parent.air.gas)
user << "<span class='notice'>[gas_data.name[g]]: [round((T.parent.air.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(T.parent.air.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
analyze_gases(A, user)
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
// JMO 20140705: Makes scanned document show up properly in the notes. Not pretty for formatted documents,
@@ -192,7 +192,7 @@
*/
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and his slaves."
desc = "A headset used by the QM and their slaves."
icon_state = "cargo_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/headset_cargo
@@ -578,7 +578,6 @@
if(keyslot.syndie)
src.syndie = 1
for (var/ch_name in src.channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
+8 -75
View File
@@ -7,60 +7,6 @@ GAS ANALYZER
MASS SPECTROMETER
REAGENT SCANNER
*/
/obj/item/device/t_scanner
name = "\improper T-ray scanner"
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon_state = "t-ray0"
var/on = 0
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
matter = list(DEFAULT_WALL_MATERIAL = 150)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
/obj/item/device/t_scanner/attack_self(mob/user)
on = !on
icon_state = "t-ray[on]"
if(on)
processing_objects.Add(src)
/obj/item/device/t_scanner/process()
if(!on)
processing_objects.Remove(src)
return null
for(var/turf/T in range(1, src.loc) )
if(!T.intact)
continue
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
O.invisibility = 0
O.alpha = 128
spawn(10)
if(O)
var/turf/U = O.loc
if(U.intact)
O.invisibility = 101
O.alpha = 255
var/mob/living/M = locate() in T
if(M && M.invisibility == 2)
M.invisibility = 0
spawn(2)
if(M)
M.invisibility = INVISIBILITY_LEVEL_TWO
/obj/item/device/healthanalyzer
name = "health analyzer"
@@ -256,6 +202,13 @@ REAGENT SCANNER
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
/obj/item/device/analyzer/atmosanalyze(var/mob/user)
var/air = user.return_air()
if (!air)
return
return atmosanalyzer_scan(src, air, user)
/obj/item/device/analyzer/attack_self(mob/user as mob)
if (user.stat)
@@ -264,27 +217,7 @@ REAGENT SCANNER
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
var/turf/location = user.loc
if (!( istype(location, /turf) ))
return
var/datum/gas_mixture/environment = location.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
user.show_message("<span class='notice'><b>Results:</b></span>", 1)
if(abs(pressure - ONE_ATMOSPHERE) < 10)
user.show_message("<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>", 1)
else
user.show_message("<span class='warning'>Pressure: [round(pressure,0.1)] kPa</span>", 1)
if(total_moles)
for(var/g in environment.gas)
user.show_message("<span class='notice'>[gas_data.name[g]]: [round((environment.gas[g] / total_moles)*100)]%</span>", 1)
user.show_message("<span class='notice'>Temperature: [round(environment.temperature-T0C)]&deg;C</span>", 1)
src.add_fingerprint(user)
analyze_gases(src, user)
return
/obj/item/device/mass_spectrometer
@@ -0,0 +1,135 @@
#define OVERLAY_CACHE_LEN 50
/obj/item/device/t_scanner
name = "\improper T-ray scanner"
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon_state = "t-ray0"
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
matter = list(DEFAULT_WALL_MATERIAL = 150)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
var/scan_range = 1
var/on = 0
var/list/active_scanned = list() //assoc list of objects being scanned, mapped to their overlay
var/client/user_client //since making sure overlays are properly added and removed is pretty important, so we track the current user explicitly
var/flicker = 0
var/global/list/overlay_cache = list() //cache recent overlays
/obj/item/device/t_scanner/update_icon()
icon_state = "t-ray[on]"
/obj/item/device/t_scanner/attack_self(mob/user)
set_active(!on)
/obj/item/device/t_scanner/proc/set_active(var/active)
on = active
if(on)
processing_objects.Add(src)
flicker = 0
else
processing_objects.Remove(src)
set_user_client(null)
update_icon()
//If reset is set, then assume the client has none of our overlays, otherwise we only send new overlays.
/obj/item/device/t_scanner/process()
if(!on) return
//handle clients changing
var/client/loc_client = null
if(ismob(src.loc))
var/mob/M = src.loc
loc_client = M.client
set_user_client(loc_client)
//no sense processing if no-one is going to see it.
if(!user_client) return
//get all objects in scan range
var/list/scanned = get_scanned_objects(scan_range)
var/list/update_add = scanned - active_scanned
var/list/update_remove = active_scanned - scanned
//Add new overlays
for(var/obj/O in update_add)
var/image/overlay = get_overlay(O)
active_scanned[O] = overlay
user_client.images += overlay
//Remove stale overlays
for(var/obj/O in update_remove)
user_client.images -= active_scanned[O]
active_scanned -= O
//Flicker effect
for(var/obj/O in active_scanned)
var/image/overlay = active_scanned[O]
if(flicker)
overlay.alpha = 0
else
overlay.alpha = 128
flicker = !flicker
//creates a new overlay for a scanned object
/obj/item/device/t_scanner/proc/get_overlay(obj/scanned)
//Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room.
//Also means that images are reused if multiple people are using t-rays to look at the same objects.
if(scanned in overlay_cache)
. = overlay_cache[scanned]
else
var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER)
//Pipes are special
if(istype(scanned, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = scanned
I.color = P.pipe_color
I.overlays += P.overlays
I.alpha = 128
I.mouse_opacity = 0
. = I
// Add it to cache, cutting old entries if the list is too long
overlay_cache[scanned] = .
if(overlay_cache.len > OVERLAY_CACHE_LEN)
overlay_cache.Cut(1, overlay_cache.len-OVERLAY_CACHE_LEN-1)
/obj/item/device/t_scanner/proc/get_scanned_objects(var/scan_dist)
. = list()
var/turf/center = get_turf(src.loc)
if(!center) return
for(var/turf/T in range(scan_range, center))
if(!T.intact)
continue
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(!O.invisibility)
continue //if it's already visible don't need an overlay for it
. += O
/obj/item/device/t_scanner/proc/set_user_client(var/client/new_client)
if(new_client == user_client)
return
if(user_client)
for(var/scanned in active_scanned)
user_client.images -= active_scanned[scanned]
if(new_client)
for(var/scanned in active_scanned)
new_client.images += active_scanned[scanned]
else
active_scanned.Cut()
user_client = new_client
/obj/item/device/t_scanner/dropped(mob/user)
set_user_client(null)
#undef OVERLAY_CACHE_LEN
@@ -131,7 +131,7 @@ datum/uplink_item/dd_SortValue()
path = /obj/item/ammo_magazine/a357
/datum/uplink_item/item/ammo/mc9mm
name = ".9mm"
name = "9mm"
path = /obj/item/ammo_magazine/mc9mm
/datum/uplink_item/item/ammo/darts
@@ -142,6 +142,14 @@ datum/uplink_item/dd_SortValue()
name = "14.5mm"
path = /obj/item/weapon/storage/box/sniperammo
/datum/uplink_item/item/ammo/a10mm
name = "10mm"
path = /obj/item/ammo_magazine/a10mm
/datum/uplink_item/item/ammo/a762
name = "7.62mm"
path = /obj/item/ammo_magazine/a762
/***************************************
* Highly Visible and Dangerous Weapons *
***************************************/
@@ -188,6 +196,17 @@ datum/uplink_item/dd_SortValue()
item_cost = DEFAULT_TELECRYSTAL_AMOUNT
path = /obj/item/weapon/gun/projectile/heavysniper
//These are for traitors (or other antags, perhaps) to have the option of purchasing some merc gear.
/datum/uplink_item/item/visible_weapons/submachinegun
name = "Submachine Gun"
item_cost = 6
path = /obj/item/weapon/gun/projectile/automatic/c20r
/datum/uplink_item/item/visible_weapons/assaultrifle
name = "Assault Rifle"
item_cost = 7
path = /obj/item/weapon/gun/projectile/automatic/sts35
/*************************************
* Stealthy and Inconspicuous Weapons *
*************************************/
+2 -7
View File
@@ -68,10 +68,7 @@
if (istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
if (src.get_amount() >= srl.req_amount)
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
else
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title]</a>"
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
@@ -360,8 +357,6 @@
/datum/stack_recipe_list
var/title = "ERROR"
var/list/recipes = null
var/req_amount = 1
New(title, recipes, req_amount = 1)
New(title, recipes)
src.title = title
src.recipes = recipes
src.req_amount = req_amount
@@ -83,7 +83,7 @@ AI MODULES
laws.sync(target, 0)
addAdditionalLaws(target, sender)
target << "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target << "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
@@ -140,13 +140,7 @@ AI MODULES
if(!targetName)
usr << "No name detected on module, please enter one."
return 0
..()
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is a crew member."
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
return ..()
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an crew member."
@@ -100,10 +100,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
/obj/item/clothing/mask/smokable/Destroy()
..()
qdel(reagents)
/obj/item/clothing/mask/smokable/process()
var/turf/location = get_turf(src)
smoketime--
@@ -32,7 +32,7 @@
else if(istype(target,/turf))
user << "<span class='notice'>You scrub \the [target.name] clean.</span>"
var/turf/T = target
T.clean()
T.clean(src)
else
user << "<span class='notice'>You clean \the [target.name].</span>"
target.clean_blood()
@@ -112,20 +112,9 @@
update_icon()
return
if(istype(W, /obj/item/device/analyzer) && ptank)
var/obj/item/weapon/icon = src
user.visible_message("<span class='notice'>[user] has used the analyzer on \icon[icon]</span>")
var/pressure = ptank.air_contents.return_pressure()
var/total_moles = ptank.air_contents.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if(total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in ptank.air_contents.gas)
user << "<span class='notice'>[gas_data.name[g]]: [round((ptank.air_contents.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(ptank.air_contents.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
if(istype(W, /obj/item/device/analyzer))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
return
..()
return
@@ -38,7 +38,7 @@
user << "<span class='warning'>\The [src] is full.</span>"
else
spawn(5)
I.reagents.trans_to_mob(src.imp, 5)
I.reagents.trans_to_obj(src.imp, 5)
user << "<span class='notice'>You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units.</span>"
else if (istype(I, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/M = I
@@ -34,7 +34,7 @@
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
if (active)
if ((CLUMSY in user.mutations) && prob(50))
user.visible_message("<span class='danger'>[user] accidentally cuts \himself with \the [src].</span>",\
user.visible_message("<span class='danger'>\The [user] accidentally cuts \himself with \the [src].</span>",\
"<span class='danger'>You accidentally cut yourself with \the [src].</span>")
user.take_organ_damage(5,5)
deactivate(user)
@@ -50,9 +50,10 @@
return
/obj/item/weapon/melee/energy/suicide_act(mob/user)
var/tempgender = "[user.gender == MALE ? "he's" : user.gender == FEMALE ? "she's" : "they are"]"
if (active)
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like \he's trying to commit seppuku.</span>", \
"<span class='danger'>\The [user] is falling on \the [src]! It looks like \he's trying to commit suicide.</span>")
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like [tempgender] trying to commit seppuku.</span>", \
"<span class='danger'>\The [user] is falling on \the [src]! It looks like [tempgender] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/*
@@ -90,7 +91,7 @@
user << "<span class='notice'>\The [src] is de-energised. It's just a regular axe now.</span>"
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
viewers(user) << "<span class='warning'>\The [user] swings \the [src] towards /his head! It looks like \he's trying to commit suicide.</span>"
viewers(user) << "<span class='warning'>\The [user] swings \the [src] towards \his head! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS|FIRELOSS)
/*
+1
View File
@@ -16,6 +16,7 @@
/obj/item/weapon/mop/New()
create_reagents(5)
//expects an atom containing the reagents used to clean the turf
/turf/proc/clean(atom/source)
if(source.reagents.has_reagent("water", 1))
clean_blood()
+1
View File
@@ -14,6 +14,7 @@ var/global/list/cached_icons = list()
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,60)
volume = 60
unacidable = 0
flags = OPENCONTAINER
var/paint_type = "red"
@@ -15,8 +15,8 @@
/obj/item/weapon/storage/bible/booze/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
@@ -146,11 +146,6 @@
new /obj/item/clothing/mask/smokable/cigarette(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
/obj/item/weapon/storage/fancy/cigarettes/Destroy()
qdel(reagents)
..()
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return
@@ -202,10 +197,6 @@
new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
create_reagents(15 * storage_slots)
/obj/item/weapon/storage/fancy/cigar/Destroy()
qdel(reagents)
..()
/obj/item/weapon/storage/fancy/cigar/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return
+8 -24
View File
@@ -87,28 +87,12 @@
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "<span class='notice'>\The [user] has used [W] on \icon[icon] [src]</span>"
var/pressure = air_contents.return_pressure()
manipulated_by = user.real_name //This person is aware of the contents of the tank.
var/total_moles = air_contents.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in air_contents.gas)
user << "<span class='notice'>[gas_data.name[g]]: [(round(air_contents.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
src.add_fingerprint(user)
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
@@ -131,7 +115,7 @@
location = loc.loc
else if(istype(loc, /mob/living/carbon))
location = loc
var/using_internal
if(istype(location))
if(location.internal==src)
@@ -278,11 +262,11 @@
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
explosion(
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
)
qdel(src)
+6 -5
View File
@@ -14,6 +14,11 @@
var/damtype = "brute"
var/force = 0
/obj/Destroy()
processing_objects -= src
nanomanager.close_uis(src)
return ..()
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
@@ -118,10 +123,6 @@
if(istype(M) && M.client && M.machine == src)
src.attack_self(M)
/obj/proc/alter_health()
return 1
/obj/proc/hide(h)
return
@@ -141,4 +142,4 @@
return
/obj/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
return
return
@@ -25,6 +25,16 @@ LINEN BINS
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
if(do_after(user, 50))
user << "<span class='notice'>You cut [src] into pieces!</span>"
for(var/i in 1 to rand(2,5))
new /obj/item/weapon/reagent_containers/glass/rag(src.loc)
qdel(src)
return
..()
/obj/item/weapon/bedsheet/blue
icon_state = "sheetblue"
@@ -53,11 +53,6 @@
else
user << "It is full."
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0 || wall_mounted)) return 1
return (!density)
@@ -11,16 +11,16 @@
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
@@ -42,11 +42,11 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/weapon/storage/box/handcuffs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/gun/energy/gun(src)
@@ -14,7 +14,7 @@
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.loc = T
if(AM.simulated) AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
-6
View File
@@ -60,9 +60,6 @@
return
return
/obj/structure/morgue/alter_health()
return src.loc
/obj/structure/morgue/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
@@ -230,9 +227,6 @@
return
return
/obj/structure/crematorium/alter_health()
return src.loc
/obj/structure/crematorium/attack_hand(mob/user as mob)
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
+2 -2
View File
@@ -395,7 +395,7 @@
if (istype(RG) && RG.is_open_container())
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("<span class='notice'>[user] fills \the [RG] using \the [src].</span>","<span class='notice'>You fill \the [RG] using \the [src].</span>")
return
return 1
else if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
@@ -413,7 +413,7 @@
user.visible_message( \
"<span class='danger'>[user] was stunned by \his wet [O]!</span>", \
"<span class='userdanger'>[user] was stunned by \his wet [O]!</span>")
return
return 1
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
return
+26 -27
View File
@@ -239,6 +239,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0)
@@ -337,7 +338,11 @@
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
update_nearby_icons()
var/turf/location = loc
loc = null
for(var/obj/structure/window/W in orange(location, 1))
W.update_icon()
loc = location
..()
@@ -357,35 +362,31 @@
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
update_icon()
for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon()
for(var/obj/structure/window/W in orange(src, 1))
W.update_icon()
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if(!is_fulltile())
icon_state = "[basestate]"
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if(opacity)
icon_state = "[basestate][junction]"
else
if(reinf)
icon_state = "[basestate][junction]"
else
icon_state = "[basestate][junction]"
overlays.Cut()
if(!is_fulltile())
icon_state = "[basestate]"
return
var/list/dirs = list()
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
dirs += get_dir(src, W)
var/list/connections = dirs_to_corner_states(dirs)
icon_state = ""
for(var/i = 1 to 4)
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
overlays += I
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 800)
@@ -466,11 +467,9 @@
basestate = "window"
maxhealth = 40
reinf = 1
basestate = "w"
dir = 5
update_icon() //icon_state has to be set manually
return
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
@@ -0,0 +1,89 @@
// Ported from Haine and WrongEnd with much gratitude!
/* ._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._. */
/*-=-=-=-=-=-=-=-=-=-=-=-=-=WHAT-EVER=-=-=-=-=-=-=-=-=-=-=-=-=-*/
/* '~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~' */
/obj/effect/wingrille_spawn
name = "window grille spawner"
icon = 'icons/obj/structures.dmi'
icon_state = "wingrille"
density = 1
anchored = 1.0
pressure_resistance = 4*ONE_ATMOSPHERE
var/win_path = /obj/structure/window/basic
var/activated
/obj/effect/wingrille_spawn/attack_hand()
attack_generic()
/obj/effect/wingrille_spawn/attack_ghost()
attack_generic()
/obj/effect/wingrille_spawn/attack_generic()
activate()
/obj/effect/wingrille_spawn/initialize()
..()
if(!win_path)
return
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
activate()
/obj/effect/wingrille_spawn/proc/activate()
if(activated) return
if (!locate(/obj/structure/grille) in get_turf(src))
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
handle_grille_spawn(G)
var/list/neighbours = list()
for (var/dir in cardinal)
var/turf/T = get_step(src, dir)
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
if(!other)
var/found_connection
if(locate(/obj/structure/grille) in T)
for(var/obj/structure/window/W in T)
if(W.type == win_path && W.dir == get_dir(T,src))
found_connection = 1
qdel(W)
if(!found_connection)
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
new_win.set_dir(dir)
handle_window_spawn(new_win)
else
neighbours |= other
activated = 1
for(var/obj/effect/wingrille_spawn/other in neighbours)
if(!other.activated) other.activate()
qdel(src)
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
return
// Currently unused, could be useful for pre-wired electrified windows.
/obj/effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
return
/obj/effect/wingrille_spawn/reinforced
name = "reinforced window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/phoron
name = "phoron window grille spawner"
icon_state = "p-wingrille"
win_path = /obj/structure/window/phoronbasic
/obj/effect/wingrille_spawn/reinforced_phoron
name = "reinforced phoron window grille spawner"
icon_state = "pr-wingrille"
win_path = /obj/structure/window/phoronreinforced
/obj/effect/wingrille_spawn/reinforced/polarized
name = "polarized window grille spawner"
color = "#444444"
win_path = /obj/structure/window/reinforced/polarized
var/id
/obj/effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
if(id)
P.id = id